Conversation
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
yhyang201
force-pushed
the
dsv4-mixed-split-decode-attn
branch
6 times, most recently
from
July 7, 2026 07:20
7e1ab42 to
5d010fd
Compare
41 tasks
… kernel Mixed-chunk batches currently send all tokens (prefill chunk + one decode token per running request) through the bf16 sparse-prefill workspace path, which dequantizes the fp8 KV cache every layer. Split the batch at the prefill/decode boundary instead: the decode tail uses the fp8-native flash_mla_with_kvcache kernel (no dequant), and the sparse-prefill workspace only covers the prefill requests' windows. Gated behind SGLANG_OPT_MIXED_SPLIT_DECODE_ATTN (default off). 8xB300 DSV4-Pro 8k1k conc2048: 9064 -> 9796 tok/s (+8.1%), TPOT 192.6 -> 174.5 ms. GSM8K under concurrency: 0.970 (on) vs 0.980 (off), within noise.
yhyang201
force-pushed
the
dsv4-mixed-split-decode-attn
branch
from
August 14, 2026 10:15
5d010fd to
ae9a5ea
Compare
Fridge003
marked this pull request as ready for review
August 18, 2026 21:15
Fridge003
requested review from
Fridge003,
HaiShaw,
Qiaolin-Yu,
Ying1123,
hebiao064,
hnyls2002,
ispobock,
merrymercy and
xiezhq-hermann
as code owners
August 18, 2026 21:15
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
With
--enable-mixed-chunk, every step in the high-concurrency steady state is a mixed batch (prefill chunk + one decode token per running request), and all tokens go through the bf16 sparse-prefill workspace path. This forces two_dequantize_k_cache_pagedcalls per layer covering every running request's SWA window (~16.9 ms/step at conc 2048 on 8xB300), and the fp8-native decode kernel is never used in steady state.Modification
mix_with_runningappends decode requests after prefill requests (one token each), so decode tokens are the contiguous tail of the batch. Split at that boundary:flash_mla_with_kvcache(row-sliced topk indices, no dequant);SparsePrefillChunkCachebuilt over the prefill requests only, shrinking the dequant workspace.Controlled by
SGLANG_OPT_MIXED_SPLIT_DECODE_ATTN(default on; set to 0 to fall back to the previous behavior).Results
8xB300, DeepSeek-V4-Pro FP4, 8k1k, conc 2048 (megamoe + dp-attention + mixed-chunk), radix cache enabled with forced misses, num_prompts = 6x conc, warmup = 2x conc. Back-to-back A/B on the same machine with byte-identical launch commands; the only variable is this commit (feature default-on for the comparison):
GSM8K under concurrency (mixed steps active): 0.970 with the flag vs 0.980 without, within noise (n=200).
TODO (draft)
num_mixed_decode_tokensis recorded bymix_with_runningand plumbed throughForwardBatch. A temporary cross-check assert against a tail-scan ofextend_seq_lensran clean over 16k requests (~4.7k mixed steps) and has been removed.CI States
Latest PR Test (Base): ❌ Run #31791518956
Latest PR Test (Extra): ❌ Run #31791518814