Repository navigation
[Fix][BCG][Spec] Restore EAGLE prefill plumbing dropped by #23906 - #28870
Merged
Merged
Conversation
Oasis-Git
requested review from
Fridge003,
Ying1123,
hnyls2002,
ispobock and
merrymercy
as code owners
June 22, 2026 02:30
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
Collaborator
Author
|
/tag-run-ci-label |
Oasis-Git
force-pushed
the
eagle-prefill-skip-rationale
branch
2 times, most recently
from
June 22, 2026 05:12
82f50e8 to
de3ebbf
Compare
… from sgl-project#25795 The cuda graph runner refactor (sgl-project#23906) consolidated BCG and PCG into PrefillCudaGraphRunner but dropped four sgl-project#25795 hooks needed for BCG+EAGLE end to end: * __init__: capture_hidden_mode for BCG+EAGLE — draft worker LAST, target worker FULL. * __init__: allocate static_draft_hidden_states buffer for BCG+draft+EAGLE (captured segments hold its address). * capture_prepare: pass spec_info=EagleDraftInput(hidden_states=...) aliasing the static buffer instead of spec_info=None. * load_batch: copy live forward_batch.spec_info.hidden_states into the static buffer before replay. Also narrow the existing model_runner.py skip block to non-BCG so the restored target-FULL capture isn't short-circuited to eager_runner. tc_piecewise stays on the skip — it has no pre-sgl-project#23906 logic to restore here, and its dead-graph capture corrupts FP4 / TRTLLM-MoE decode replay (see sgl-project#28386). Alternative to PR sgl-project#28809, which only attempted the target-worker capture_hidden_mode flip, botched the tc_piecewise branch (codex P1), and dropped the skip block — reproducing the sgl-project#28386 corruption end to end (gsm8k=0.0 on test_deepseek_v3_fp4_mtp_small in PR Test (Base)). Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Oasis-Git
force-pushed
the
eagle-prefill-skip-rationale
branch
from
June 22, 2026 05:37
de3ebbf to
1068d5e
Compare
ch-wan
approved these changes
Jun 22, 2026
merrymercy
reviewed
Jun 22, 2026
| ] | ||
| timeout_mult = 3 | ||
| server_env = {"SGLANG_ALLOW_OVERWRITE_LONGER_CONTEXT_LEN": "1"} | ||
| accuracy_threshold = 0.75 |
Collaborator
There was a problem hiding this comment.
how do you assert the cuda graph is turned on for both the draft model and target model?
Collaborator
Author
There was a problem hiding this comment.
I made a local assert to verify whether:
prefill_cg_target == "PrefillCudaGraphRunner(BreakableCudaGraphBackend)" ✓
prefill_cg_draft == "PrefillCudaGraphRunner(BreakableCudaGraphBackend)" ✓
Let me check if an assert can be added in test file directly.
Oasis-Git
added a commit
to Oasis-Git/sglang
that referenced
this pull request
Jun 29, 2026
…hidden width sgl-project#28870 restored the BCG EAGLE draft-prefill plumbing but sized static_draft_hidden_states from fc.in_features. That is correct only for EAGLE3, whose fc consumes the aux-stacked target hidden directly. EAGLE-v1's fc instead consumes cat([embed(H), target_hidden(H)]), so fc.in_features overcounts the target-hidden slice by H: spec_info.hidden_states becomes 2H wide and the draft prefill capture crashes at llama_eagle.py fc with "mat1 and mat2 shapes cannot be multiplied (Nx3H and 2HxH)". Gate the fc.in_features shortcut to EAGLE3; route EAGLE-v1 (and any arch without an fc) to get_draft_hidden_dim(), which already returns the correct width for both algorithms. EAGLE3 behavior is unchanged. Verified on B200 with Llama-2-7b-chat-hf + sglang-EAGLE-llama2-chat-7B: TestEagleLlama2Chunked4 -> 4 passed; TestEagleLlama2Suite -> 14 passed + 2 subtests. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Chronostasys
pushed a commit
to MindLab-Research/sglang
that referenced
this pull request
Aug 24, 2026
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.
The cuda graph runner refactor (#23906) consolidated BCG and PCG into PrefillCudaGraphRunner but dropped four #25795 hooks needed for BCG+EAGLE end to end:
Also narrow the existing model_runner.py skip block to non-BCG so the restored target-FULL capture isn't short-circuited to eager_runner. tc_piecewise stays on the skip — it has no pre-#23906 logic to restore here, and its dead-graph capture corrupts FP4 / TRTLLM-MoE decode replay (see #28386).
Alternative to PR #28809, which only attempted the target-worker capture_hidden_mode flip, botched the tc_piecewise branch (codex P1), and dropped the skip block — reproducing the #28386 corruption end to end (gsm8k=0.0 on test_deepseek_v3_fp4_mtp_small in PR Test (Base)).
Motivation
Modifications
Accuracy Tests
Speed Tests and Profiling
Checklist
Review and Merge Process
/tag-and-rerun-ci,/tag-run-ci-label,/rerun-failed-ciCI States
Latest PR Test (Base): ✅ Run #27932537034
Latest PR Test (Extra): ❌ Run #27932536842