From 93be7e863eba89c4079936f3d4ba7b23974e1c23 Mon Sep 17 00:00:00 2001 From: ishandhanani <82981111+ishandhanani@users.noreply.github.com> Date: Mon, 3 Nov 2025 21:44:14 -0800 Subject: [PATCH] fix: respect `--ignore-eos` in PD case for benchmarking (#12597) --- python/sglang/srt/disaggregation/decode.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/sglang/srt/disaggregation/decode.py b/python/sglang/srt/disaggregation/decode.py index fd98604e8..68528f630 100644 --- a/python/sglang/srt/disaggregation/decode.py +++ b/python/sglang/srt/disaggregation/decode.py @@ -774,9 +774,9 @@ class DecodeTransferQueue: decode_req.req.time_stats.wait_queue_entry_time = time.perf_counter() # special handling for corner cases - should_finish = ( - decode_req.req.sampling_params.max_new_tokens == 1 - or decode_req.req.output_ids[-1] in decode_req.req.eos_token_ids + should_finish = decode_req.req.sampling_params.max_new_tokens == 1 or ( + not decode_req.req.sampling_params.ignore_eos + and decode_req.req.output_ids[-1] in decode_req.req.eos_token_ids ) if should_finish: # finish immediately