[Spec] Stage Inkling MTP draft metadata before verify - #38169
Merged
Qiaolin-Yu merged 5 commits intoSep 10, 2026
Merged
Qiaolin-Yu merged 5 commits into
Qiaolin-Yu merged 5 commits into
Conversation
paulzhang-tm
requested review from
Fridge003,
HaiShaw,
Qiaolin-Yu,
Ying1123,
hebiao064,
hnyls2002,
ispobock and
merrymercy
as code owners
September 6, 2026 01:44
Collaborator
|
/tag-and-rerun-ci |
Qiaolin-Yu
approved these changes
Sep 8, 2026
Resolve shared attention and conv-slot mappings into draft-owned buffers before target verification. Preserve the final-draft-runner fallback introduced in sgl-project#36752.
Keep the missing-runner fallback explicit, assert initialized attention backends, and assert topk=1 after staging eligibility is established.
paulzhang-tm
force-pushed
the
codex/stage-draft-metadata-before-verify
branch
from
September 9, 2026 20:12
849d7f8 to
764d63b
Compare
Collaborator
|
/rerun-test test/registered/e2e/models/test_mimo_v2.py test/registered/e2e/models/test_mimo_v2_flash.py |
Contributor
|
Collaborator
|
/rerun-test test/registered/e2e/models/test_mimo_v2.py test/registered/e2e/models/test_mimo_v2_flash.py |
Contributor
|
Results for 🚀 |
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
Inkling MTP draft extension reads shared request/KV and conv-slot mappings after target verification, keeping the scheduler from updating those mappings for the next batch. Stage those reads into draft-owned buffers before verify so the target metadata-completion event can release the scheduler earlier.
Runtime-only mirror, following the staging approach in #35126 and #35289.
Modifications
Exactly five files under
python/sglang/srt/:layers/attention/base_attn_backend.pylayers/attention/flashattention_backend.pylayers/attention/linear/inkling_sconv_backend.pyspeculative/multi_layer_eagle_draft_extend_cuda_graph_runner.pyspeculative/multi_layer_eagle_worker_v2.pyPreserves #36752: unstaged/eager fallback still uses the final draft runner. Combined draft graphs remain supported. Staging requires compatible top-k-1 attention/conv backends, a target graph marker, and a supported batch bucket. The Inkling wrapper queries the full-attention capability without importing a concrete backend. Standalone FlashAttention keeps its existing in-graph metadata path and final draft fence.
Accuracy Tests
test_multi_layer_eagle_shared_read_event.pyandtest_decode_cuda_graph_shared_read_fence.py).git diff --checkpassed.The GPU validation harness is separate from this runtime-only mirror. No test, private-extension, or benchmark files are added.
Speed Tests and Profiling
No end-to-end speed benchmark was run against this upstream checkout. The change moves shared mapping reads before verify; model computation and KV allocation are unchanged.
Checklist
srt/files.-Robot
CI States
Latest PR Test (Base): 🚫 Run #34536403208
Latest PR Test (Extra): ❌ Run #34536403316
Latest PR Test (AMD ROCm 10): ⏳ Run #34536403290