Update logprob_start_len handling in scheduler (#16240)

This commit is contained in:
Cheng Wan
2025-12-31 14:11:24 -08:00
committed by GitHub
parent 5595ae142c
commit 2b461c15b4

View File

@@ -1532,6 +1532,10 @@ class Scheduler(
self._add_request_to_queue(req)
return
if not recv_req.return_logprob and recv_req.logprob_start_len != -1:
# When return_logprob is False, logprob_start_len should be ignored
recv_req.logprob_start_len = -1
if recv_req.logprob_start_len == -1:
if req.is_prefill_only:
# For prefill-only requests with logprob_start_len == -1, set logprob_start_len