Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
650127a1
Unverified
Commit
650127a1
authored
Jun 20, 2025
by
fzyzcjy
Committed by
GitHub
Jun 19, 2025
Browse files
Reintroduce tiny fix sampler error when prob is not contiguous (#7354)
parent
3774f078
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
python/sglang/srt/layers/sampler.py
python/sglang/srt/layers/sampler.py
+1
-1
No files found.
python/sglang/srt/layers/sampler.py
View file @
650127a1
...
@@ -91,7 +91,7 @@ class Sampler(nn.Module):
...
@@ -91,7 +91,7 @@ class Sampler(nn.Module):
)
)
else
:
else
:
batch_next_token_ids
=
top_k_top_p_sampling_from_probs
(
batch_next_token_ids
=
top_k_top_p_sampling_from_probs
(
probs
,
probs
.
contiguous
()
,
sampling_info
.
top_ks
,
sampling_info
.
top_ks
,
sampling_info
.
top_ps
,
sampling_info
.
top_ps
,
filter_apply_order
=
"joint"
,
filter_apply_order
=
"joint"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment