Repository navigation
Conversation
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
|
@Qiaolin-Yu @BBuf Could you please help triage/review this DSv4 + DSpark correctness fix and enable the base CI for the current commit? The PR is currently blocked on the missing |
|
Hardware validation of this PR on SM120, plus a datapoint that I think Setup. 4× RTX PRO 6000 Blackwell (sm_120), TP=4 + DP attention + EP=4, This PR does what it says. With the backport applied and the plan kernel It is necessary but not sufficient for the corruption we see. With this
Depths above the broken one are clean, and depth 5 is exactly I mention it here for two reasons: so nobody concludes "this PR didn't fix We ship this PR as a backport in our production image for this hardware — Happy to run any candidate patch on this hardware; the repro takes about |
Backport the correctness fix from sgl-project#32183 to the pre-kernel-migration DSpark branch. Propagate the runtime verifier width into both CPU and GPU C4 prefill planners so every gamma+1 verifier row is rewritten. Upstream-Commit: ee481e7 Co-authored-by: chenshuailin <[email protected]>
Adds sgl-project/sglang#32183 to the carried set. It propagates the runtime DSpark verifier width into the DeepSeek-V4 compressed-state planner instead of the hardcoded kMaxMTPDraftTokens = 4 rewrite window. At the DSpark depth this image uses the verify width is 8, so the planner rewrote only part of the window and compressed attention state accumulated pollution every 4 tokens. Long single-file code generation degraded as a result: reasoning leaked into the output, forbidden placeholders appeared, the code fence was left unclosed, and generation terminated early with finish_reason=stop far below the token limit. Short answers were unaffected, so eval scores did not surface it. Measured on the validated configuration, scoring each generation by whether the code fence closes and the extracted script passes node --check: long write, temperature 1.0 0/8 -> 14/14 long write, greedy 0/1 -> 3/3 decode throughput 237.5 -> 319.8 tok/s accept length 4.04 -> 5.5 Throughput improves because the draft model is no longer verifying against a degraded target. sglang effective tree 0491c1f4 -> 85d0a01a; every other pin unchanged.
…project#32035 sgl-project#33656 sgl-project#32183 sgl-project#33145) Applied PRs (latest from GitHub): sgl-project#33288 Indexer logits OOM fix sgl-project#30393 HiCache packed/sidecar draft caches sgl-project#31170 DPA prefix_affinity load balancing sgl-project#33795 DSpark compact ragged-verify CUDA graph JIT race sgl-project#32467 C128 plan-kernel warp barrier sgl-project#33865 DSpark x prefill CP unblock sgl-project#30371 SWA state pool sizing (storage page) sgl-project#33358 FlashMLA norm-rope K-tokens-per-block ILP sgl-project#33872 num_draft_tokens clamp + extend_len==0 skip (supersede sgl-project#32183) sgl-project#34002 Sidecar backup vacuously-successful fix (replaces sgl-project#33656, with tests) sgl-project#33862 Reclaim redundant host mirrors after storage backup sgl-project#31315 Avoid repeated Mooncake gets after stale hits sgl-project#32327 Q8KV8 sparse MLA prefill backend (flashmla_sparse_q8) sgl-project#31668 Fix sidecar pool life-time (use-after-free on prefetch abort) sgl-project#31195 TP0 verify-token-budget broadcast (adapted to get_schedule() API) Dropped (per user request or superseded): sgl-project#32771 IndexCache C4 top-k reuse — has bug sgl-project#32035 DSpark C128 online compressor — has bug sgl-project#33656 Superseded by sgl-project#34002 (same fix + unit tests) sgl-project#32183 Superseded by sgl-project#33872 (included in supersede PR) sgl-project#33145 Base f01f706 already has superior reasoning-effort profile system Conflicts resolved: sgl-project#31195: adapted to base get_schedule().disable_overlap_schedule API sgl-project#32327: path remapped jit_kernel/ -> kernels/jit/ and kernels/ops/attention/ sgl-project#31668: applied cleanly on top of sgl-project#30393+sgl-project#34002+sgl-project#33862 modifications
Phoenix3334
left a comment
There was a problem hiding this comment.
Related B300/TP8 investigation note: I have not isolated this verifier-window fix in its own A/B test, so I am treating it as a separate correctness layer rather than attributing the B300 failures to it. The independent evidence localized #31195 to cross-TP Graph-tier consistency (120/120, zero divergence) and #32467 to plan-kernel producer correctness (2592/6000 invalid plans unpatched -> 0/30000 patched, plus clean #32467-only startup/replay in the tested B300 paths). I have reflected that separation in #31023 / #33356 / #32432.
|
Thanks @slchenchn. Closing this because it has had no updates in 91 days. Reopen it if the work is still relevant. Some directories moved recently, so an older branch may need retargeting: |
Motivation
DSpark verifies
gamma + 1target rows, but the DeepSeek-V4 compressed-state prefill planner protected at most four MTP rows through the hard-codedkMaxMTPDraftTokens = 4.For example, with
gamma = 4, the target verifies five rows. At certain compression boundaries, the planner omitted the first verifier row from the write plan, so subsequent compressed state was not guaranteed to be reconstructed from the verifier-committed token sequence.The verifier already knew the correct window through
speculative_num_draft_tokens; that runtime value was not propagated to the compressed-state planner.Modifications
DeepseekV4AttnBackendthrough the compressor metadata and Python JIT wrapper to the C++ prefill planner.verify_width = 0as the default so regular prefill and non-DSpark speculative algorithms preserve their existing behavior.2,4,5,8, and12Accuracy Tests
Before the fix, the write plan omitted ragged row
0:Added regression tests assert that every verifier row appears in the write plan for all supported boundary cases.
Local non-GPU validation:
The final branch's GPU unit tests and end-to-end accuracy tests are left to GitHub CI.
Speed Tests and Profiling
Not benchmarked locally.
The change does not affect regular prefill or non-DSpark speculative algorithms. For DSpark verifier windows larger than four, it
adds the state writes required to reconstruct the full accepted verification path.
Checklist
Review and Merge Process
/tag-and-rerun-ci,/tag-run-ci-label,/rerun-failed-ciCI States
Latest PR Test (Base): ❌ Missing
run-cilabel -- add it to run CI tests.Latest PR Test (Extra): ❌ Blocked --
run-ciis required first.