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
ba4ee37f
Unverified
Commit
ba4ee37f
authored
Nov 26, 2024
by
Lianmin Zheng
Committed by
GitHub
Nov 26, 2024
Browse files
Update sampler.py to skip the success check (#2197)
parent
ac5a0f04
Changes
1
Hide 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 @
ba4ee37f
...
...
@@ -74,7 +74,7 @@ class Sampler(nn.Module):
filter_apply_order
=
"joint"
,
)
if
not
torch
.
all
(
success
):
if
self
.
use_nan_detectioin
and
not
torch
.
all
(
success
):
logger
.
warning
(
"Detected errors during sampling!"
)
batch_next_token_ids
=
torch
.
zeros_like
(
batch_next_token_ids
)
elif
global_server_args_dict
[
"sampling_backend"
]
==
"pytorch"
:
...
...
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