Repository navigation
[srt] Fix sconv state memory corruption on specdec - #34043
Merged
ispobock merged 3 commits intoAug 9, 2026
Merged
Conversation
DFlash/DSpark pools corrupt memory when radix cache is turned on for models, such as Inkling and Inkling-Small, with SConv. This is because the mamba tracking was gated on prefill-graph capture, and any requests with a radix cache hit would resolve with all-zero sconv cache tensors. It would especially affect long-context. We were able to find a 70-problem subset of (SWEBench Verified, SWEBench Pro, and SWEBench Multilingual) where DFlash reduces the pass rate from 55% to 35% due to long-context Inkling rollouts getting stuck and being "forgetful" due to the sconv cache corruption. After this fix, DSpark / DFlash has parity without speculation on nvfp4. ┌─────────────────────────────┬────────┬────────┬───────┐ │ Arm (fixed build, same day) │ Reward │ Tokens │ Turns │ ├─────────────────────────────┼────────┼────────┼───────┤ │ DSpark │ 0.486 │ 76.3k │ 110.9 │ ├─────────────────────────────┼────────┼────────┼───────┤ │ nospec │ 0.471 │ 74.4k │ 106.9 │ └─────────────────────────────┴────────┴────────┴───────┘
ekzhang
requested review from
Fridge003,
HaiShaw,
Qiaolin-Yu,
Ying1123,
hebiao064,
hnyls2002,
ispobock and
merrymercy
as code owners
August 7, 2026 22:58
Contributor
Author
|
/tag-and-rerun-ci |
Collaborator
|
could you fix the lint |
Qiaolin-Yu
approved these changes
Aug 8, 2026
Collaborator
|
/tag-and-rerun-ci |
Leoyzen
pushed a commit
to Leoyzen/sglang
that referenced
this pull request
Aug 9, 2026
3 tasks done
5 tasks
This was referenced Aug 15, 2026
saturn-acc
pushed a commit
to saturn-acc/sglang
that referenced
this pull request
Aug 16, 2026
4 of 5 tasks
Atituiset
pushed a commit
to Atituiset/sglang
that referenced
this pull request
Sep 10, 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.
Motivation
DFlash/DSpark speculative pools corrupt sconv (short-conv) state when the radix cache is enabled for hybrid-SWA models such as Inkling and Inkling-Small.
This is because the mamba tracking was gated on prefill-graph capture, and any requests with a radix cache hit would resolve with all-zero sconv cache tensors.
It would especially affect long-context. We were able to find a 70-problem subset of (SWEBench Verified, SWEBench Pro, and SWEBench Multilingual) where DFlash reduces the pass rate from 55% to 35% due to long-context Inkling rollouts getting stuck and being "forgetful" due to the sconv cache corruption.
After this fix, DSpark / DFlash has parity without speculation on nvfp4.
Modifications
spec_algorithm.is_none()from mamba index tracking guardmamba_track_*padding rows in the prefill graph's static input buffersVerification
CI States
Latest PR Test (Base): ❌ Run #31251353987
Latest PR Test (Extra): ❌ Run #31251353876