Repository navigation
[Fix] disaggregation: Keep output ids during a PD rebootstrap instead of popping and replaying the last one - #47366
Conversation
…t ids except the last; drop the commit-time replay of the popped token
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.
Tip: disable this comment in your organization's Code Review settings.
|
/rerun-test test_scheduler_pause_generation.py test_priority_scheduling_disaggregation.py test_prefill_complete_integration.py test_disaggregation_wire.py test_admission_abort_not_enqueued.py test_batch_result_processor_spec_grammar.py test_hisparse_max_token_pool_size.py test_decode_radix_lock_ref.py test_mamba_capacity.py test_disaggregation_dsv4.py registered/disaggregation/test_disaggregation_basic.py test_prefill_complete_allocation.py test_scheduler_control.py test_update_weights_from_tensor.py test_weight_version_spans.py |
|
🚀 🚀 🚀 🚀 |
…p the rebootstrap prefill length helper and the pd rebootstrap in-progress flag
|
/rerun-test test_disaggregation_dsv4.py registered/disaggregation/test_disaggregation_basic.py test_prefill_complete_allocation.py test_disaggregation_optimistic_prefill.py |
|
🚀 🚀 |
Resolve the decode.py conflict with sgl-project#47366: carry main's origin_input_len -> fill_len rename into the moved _publish_destination and _PendingPublish. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A PD decode rebootstrap (a retracted request whose prefix KV the prefill worker recomputes, e.g. DeepSeek-V4 retraction or
pause_generation(mode="retract")) popped the last output id before the recompute and appended it back at the transfer commit, overriding the token the prefill sampled. While it was popped,output_idswas one shorter than what the client had already received, so an output row emitted in that window (overlap scheduling) reported a shrunkencompletion_tokens, and the replayed id and its logprob row were then streamed to the client a second time.The last output id now stays in
output_ids:origin_input_ids + output_ids[:-1], the same tokens as before; the prefill's sampled token is still ignored, so the next token is sampled on the decode side with its grammar, penalties and logprob state._pre_alloc_fill_lenis one formula,len(origin_input_ids) + max(len(output_ids) - 1, 0), and every decode prealloc length uses it (admission, capacity check, KV preallocation); KV sizes are unchanged.pd_rebootstrap_forced_output_id, both pops and the commit-time override are gone.pd_rebootstrap_in_progressand_rebootstrap_prefill_lenare gone too: the flag only told that helper to use the fill length instead of the prompt length, and the two now agree for every request in the prealloc queue (new requests have no output, rebootstrap requests had the flag set). The only other caller is the capacity check, where an offload-retracted request now sees its fill length (prompt + output - 1) instead of its prompt length; the check'sceiling_fitsbranch already used this length, and the request's KV fit the pool before the retract, so the check gives the same result.Verification
output_idsis untouched; the commit test checks the emitted ids and their mask rows survive and the prefill's token is dropped.test_disaggregation_dsv4.py,test_disaggregation_basic.py,test_prefill_complete_allocation.py, and the PD pause/retract tests.CI States
Latest PR Test (Base): 🚫 Run #40993962760
Latest PR Test (Extra): ❌ Run #40993963404
Latest PR Test (AMD ROCm 10): 🚫 Run #40993963214