Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a prefill guard for DeepSeek V4 models using compressed attention backends to limit prefill requests to 1 when the system is under load. I have suggested caching the configuration checks during initialization to avoid redundant evaluations in the hot scheduling loop, which will improve performance.
|
Addressed the Gemini feedback in c2f72f48ec586b3a1a4e1f3217e6750e174dde0e by caching the DSv4 compressed/backend predicate during scheduler initialization and using the cached flag in the prefill hot path. Re-ran |
c2f72f4 to
27467df
Compare
|
Hi, @Fridge003 , could you please take a look? |
|
Manually closing this PR as it is no longer being pursued. |
Summary
This PR adds a narrow scheduler guard for DeepSeek V4 compressed attention.
When DSv4 compressed attention already has running decode requests, the scheduler now caps the effective prefill request count to 1. This avoids a mixed decode plus multi-new-prefill shape that currently produces invalid FlashMLA decode metadata on GB200.
The problematic live shape was:
With this guard, the trailing prefills are admitted as separate prefill steps while decode is running:
This is intentionally scoped to:
running_bs > 0prefill_max_requests <= 1Validation
Validated on one GB200 node with full DeepSeek-V4-Flash TP=4,
moe_runner_backend=flashinfer_mxfp4,disable_cuda_graph,disable_flashinfer_autotune, andSGLANG_JIT_DEEPGEMM_PRECOMPILE=0.First, a single raw
4096+2request completed and boundary instrumentation showed all layers0..42reachedbackend_post_flashmla, clearing the first FP8/DeepGEMM and first FlashMLA prefill paths as the blocker.Then the original staggered failure shape was rerun:
4096+15005s4096+2Result:
No
#new-seq: 3mixed-prefill batch occurred, and noget_decoding_sched_meta.cu:111error occurred.Notes
This PR does not claim to fix FlashMLA's internal handling of the mixed metadata shape. It prevents SGLang from constructing that currently unsupported DSv4 compressed-attention scheduling state. A follow-up investigation should compare the legal guarded metadata with the failing
#running-req: 1 + #new-seq: 3metadata to decide whether the deeper fix belongs in metadata construction or FlashMLA.