Skip to content

Fix extra_buffer_lazy guard bypass - #31942

Merged
ispobock merged 1 commit into
mainfrom
fix-lazy-dflash-guard-main
Jul 21, 2026
Merged

ispobock merged 1 commit into
mainfrom
fix-lazy-dflash-guard-main

Conversation

@ispobock

@ispobock ispobock commented Jul 21, 2026 •

Copy link
Copy Markdown
Collaborator

Motivation

#30437 blocks extra_buffer_lazy for the DFLASH/DSPARK spec algorithms (their verify bypasses prepare_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 under if view.speculative_num_draft_tokens is not None, but _validate_mamba_extra_buffer runs before handle_speculative_decoding resolves 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) sees None at validation and the guard is skipped; a lowercase dflash also 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, lowercase dflash, DSPARK) now raise at startup, while EAGLE / NEXTN + extra_buffer_lazy stay allowed.


CI States

Latest PR Test (Base): ❌ Run #29830661282
Latest PR Test (Extra): ❌ Run #29830661097

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@ispobock
ispobock merged commit 0a06cc5 into main Jul 21, 2026
96 of 112 checks passed
@ispobock
ispobock deleted the fix-lazy-dflash-guard-main branch July 21, 2026 12:41
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant