Repository navigation
Conversation
4 of 5 tasks
Contributor
Author
|
/tag-and-rerun-ci |
3 of 5 tasks
Jin-Chuan
force-pushed
the
fix-qwen35-eagle3-aux-capture
branch
2 times, most recently
from
September 30, 2026 08:01
f17520a to
ba6f323
Compare
Contributor
Author
|
/tag-and-rerun-ci |
2 of 5 tasks
This branch has not been deployed
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.
Motivation
Serving the Qwen3.5 architecture family with
--speculative-algorithm EAGLE3crashes at startup. Root cause is that the inner decoder collects aux hidden states through the DFLASH-style per-layer flags, while EAGLE3's layer ids werenever wired into that mechanism.
Multimodal — Qwen3.5-VL (
models/qwen3_5.py) and Qwen4 (models/qwen4_exp.py) inherit the wrapper inmodels/qwen3_vl.py, which only writes thelayers_to_capturelist the flag-based inner ignores. Both fail at CUDAgraph capture with:
Text-only — Qwen3.8-2.4T-A95B ships as
Qwen3_5MoeForCausalLMand is served throughmodels/qwen3_5_text.py, which lacks the EAGLE3 hook entirely. It fails right at startup with:Modifications
python/sglang/srt/models/qwen3_5.py
set_eagle3_layers_to_captureto the innerQwen3_5ForCausalLM, reusing the same per-layer flag mechanism asset_dflash_layers_to_capture, so the forward returns hidden states and aux hidden states together as the EAGLE3 contract requires.python/sglang/srt/models/qwen3_vl.py
Qwen3VLForConditionalGeneration.set_eagle3_layers_to_capturenow skips non-last PP ranks and delegates to the inner model's ownset_eagle3_layers_to_capturewhen implemented, falling back to the previouslayers_to_captureassignment otherwise.python/sglang/srt/models/qwen3_5_text.py
set_eagle3_layers_to_captureto the inner body.test/registered/unit/models/test_qwen3_eagle_capture.py
Accuracy Tests
With this fix, serving a Qwen3.5-35B-A3B model with
--speculative-algorithm EAGLE3passes CUDA-graph capture, and the server serves normally once the companion fix for the OOB gather in EAGLE3 draft-extend prefill BCG on multimodal models is also applied (#38330).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 #36687158669
Latest PR Test (Extra): ❌ Run #36687158446
Latest PR Test (AMD ROCm 10): ❌ Run #36687158894