[PD-Disagg] Check finish after pop tranferred (#12638)
This commit is contained in:
@@ -773,17 +773,12 @@ class DecodeTransferQueue:
|
||||
indices_to_remove.add(i)
|
||||
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 (
|
||||
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:
|
||||
decode_req.req.check_finished()
|
||||
if decode_req.req.finished():
|
||||
# finish immediately
|
||||
decode_req.req.time_stats.forward_entry_time = (
|
||||
decode_req.req.time_stats.completion_time
|
||||
) = time.perf_counter()
|
||||
decode_req.req.check_finished()
|
||||
self.scheduler.stream_output(
|
||||
[decode_req.req], decode_req.req.return_logprob
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user