Conversation
Jiminator
requested review from
ByronHsu,
ShangmingCai,
Ying1123,
hnyls2002,
merrymercy and
xiezhq-hermann
as code owners
May 27, 2026 22:18
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
Jiminator
force-pushed
the
codex/port-pr-24082-specv2-disagg-grammar
branch
from
May 27, 2026 22:31
01affa6 to
df11184
Compare
Jiminator
marked this pull request as draft
May 27, 2026 23:04
…ort #24082) Port PR #24082 onto the post-refactor scheduler component layout. The v0.5.11 fix only covered the Spec V1 grammar-finish path; it did not cover Spec V2 or the PD-disaggregated overlap decode event loop. - decode.py: in event_loop_overlap_disagg_decode, process the previously queued batch result (advancing the grammar) before launching the next Spec V2 grammar decode batch, and skip the duplicate last-batch pop so it is not processed twice. - batch_result_processor.py: in process_batch_result_decode, for is_spec_v2 and req.grammar is not None, accept proposed tokens one at a time and stop at grammar completion, trimming output_ids, the grammar FSM, reasoning state, and logprob bookkeeping to the accepted prefix. Tests: - CPU unit test for the trimming loop (runs the real process_batch_result_decode). - PD disagg + overlap + EAGLE Spec V2 (topk=1) + grammar regression test. Co-authored-by: Ashish Datta <1856117+ashishdatta@users.noreply.github.com>
Jiminator
force-pushed
the
codex/port-pr-24082-specv2-disagg-grammar
branch
from
May 27, 2026 23:24
df11184 to
fad591b
Compare
21 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ports @ashishdatta's #24082 onto current
main(post scheduler-component refactor) and adds focused regression tests. Original fix and approach by @ashishdatta (credited as co-author); this PR re-applies it on the refactored layout since #24082 can't rebase cleanly (scheduler_output_processor_mixin.pywas removed). Supersedes #24082.Changes (both gated on
is_spec_v2)disaggregation/decode.py— inevent_loop_overlap_disagg_decode, process the previously-queued result (advancing the grammar) before launching the next Spec V2 grammar decode batch, and skip the duplicate last-batch pop. Without it, the next batch's draft proposes against a stale grammar.scheduler_components/batch_result_processor.py— inprocess_batch_result_decode, for Spec V2 + grammar, accept proposed tokens one at a time and stop at grammar completion, trimmingoutput_ids/ grammar FSM / reasoning / logprobs to the accepted prefix instead of emitting past the finish.The v0.5.11 fix (#21723) covered only the Spec V1 path (
eagle_info.py); Spec V2 and the disagg overlap loop were left unaddressed. This PR touches neithereagle_info.pynor the V1 path.Tests
test/registered/unit/managers/test_batch_result_processor_spec_grammar.py— CPU unit test driving the realprocess_batch_result_decodetrimming.test/registered/disaggregation/test_disaggregation_spec_grammar.py— PD disagg + overlap + Spec V2 (topk=1) + xgrammar regression.The PD test sets
SGLANG_ALLOW_OVERWRITE_LONGER_CONTEXT_LEN=1(test-setup only): the EAGLE3 draft derives a 2048 ctx vs the target's 131072, which the Spec V2 draft worker otherwise rejects at startup.Validation (H200)
Per-change isolation — both independently necessary, each guarded by a different test:
Tokens not accepted→ abort); trimming alone can't help (bad token is proposed before the result processor runs).topk=1greedy rarely accepts across the grammar boundary) but the unit test fails. So the trimming is guarded by the unit test, the sync by the PD test.CI States
Latest PR Test (Base): ❌ Run #26544656185
Latest PR Test (Extra): ❌ Run #26544656085
Latest PR Test (AMD ROCm 10): ➖ No AMD PR run found for this commit.