Repository navigation
Fix extra_buffer_lazy guard bypass - #31942
Merged
Merged
Conversation
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
Zhylkaaa
pushed a commit
to Zhylkaaa/sglang
that referenced
this pull request
Jul 29, 2026
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
#30437 blocks
extra_buffer_lazyfor the DFLASH/DSPARK spec algorithms (their verify bypassesprepare_mamba_track_for_verify, so the lazy pending slot never receives the checkpoint scatter yet is still promoted in result processing). The guard was nested underif view.speculative_num_draft_tokens is not None, but_validate_mamba_extra_bufferruns beforehandle_speculative_decodingresolves that value, and DFLASH derives it from--speculative-dflash-block-size. So--speculative-algorithm DFLASH --speculative-dflash-block-size N --mamba-radix-cache-strategy extra_buffer_lazy(without an explicit--speculative-num-draft-tokens) seesNoneat validation and the guard is skipped; a lowercasedflashalso slips past the uppercase string compare.This keys the check on the algorithm name (present and case-normalized at validation time) instead of
speculative_num_draft_tokens, so the unsupported combination is rejected regardless of how the block size is passed or cased.Verified the previously-bypassing configs (
DFLASH+block_size, lowercasedflash,DSPARK) now raise at startup, whileEAGLE/NEXTN+extra_buffer_lazystay allowed.CI States
Latest PR Test (Base): ❌ Run #29830661282
Latest PR Test (Extra): ❌ Run #29830661097