Tiny fix eos handling for PD disaggregation (#12334)

Signed-off-by: Shangming Cai <csmthu@gmail.com>
This commit is contained in:
Shangming Cai
2025-11-01 08:57:10 +08:00
committed by GitHub
parent 41c10e67fc
commit 358ae3563d

View File

@@ -776,7 +776,7 @@ class DecodeTransferQueue:
# special handling for corner cases
should_finish = (
decode_req.req.sampling_params.max_new_tokens == 1
or output_id in decode_req.req.eos_token_ids
or decode_req.req.output_ids[-1] in decode_req.req.eos_token_ids
)
if should_finish:
# finish immediately