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
41a11335
Unverified
Commit
41a11335
authored
Oct 28, 2025
by
Shangming Cai
Committed by
GitHub
Oct 28, 2025
Browse files
Fix potential eos bug on decode instance when PD is enabled (#12206)
Signed-off-by:
Shangming Cai
<
csmthu@gmail.com
>
parent
a1f2dc90
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
python/sglang/srt/disaggregation/decode.py
python/sglang/srt/disaggregation/decode.py
+6
-2
No files found.
python/sglang/srt/disaggregation/decode.py
View file @
41a11335
...
@@ -773,8 +773,12 @@ class DecodeTransferQueue:
...
@@ -773,8 +773,12 @@ class DecodeTransferQueue:
indices_to_remove
.
add
(
i
)
indices_to_remove
.
add
(
i
)
decode_req
.
req
.
time_stats
.
wait_queue_entry_time
=
time
.
perf_counter
()
decode_req
.
req
.
time_stats
.
wait_queue_entry_time
=
time
.
perf_counter
()
# special handling for sampling_params.max_new_tokens == 1
# special handling for corner cases
if
decode_req
.
req
.
sampling_params
.
max_new_tokens
==
1
:
should_finish
=
(
decode_req
.
req
.
sampling_params
.
max_new_tokens
==
1
or
output_id
in
decode_req
.
req
.
eos_token_ids
)
if
should_finish
:
# finish immediately
# finish immediately
decode_req
.
req
.
time_stats
.
forward_entry_time
=
(
decode_req
.
req
.
time_stats
.
forward_entry_time
=
(
decode_req
.
req
.
time_stats
.
completion_time
decode_req
.
req
.
time_stats
.
completion_time
...
...
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