Conversation
Split FP32 projection weights into TF32 high and residual components, then fuse per-slice compensation into Sinkhorn. Preserve small-row and batch-invariant paths and reject online updates while derived graph weights are active. Validated on GB300: 35 coefficient, replay, dispatch, epilogue and update-guard tests; 1314 real-acceptance GSM8K requests, 1277 correct, no request errors and two length-limited outputs.
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
DeepSeek-V4.1 Flash at concurrency 64 spends avoidable prefill time in untuned dense MXFP8 GEMMs, repeated mHC projections, and output-layout copies. DSpark warmup covers small verify shapes; the large-prefill tactic can also disappear when a subsequent draft autotune phase loads its cache after a server restart.
On the current
dsv4.1port, the code changes improve the unchanged attention TP4 / MoE EP4 serving configuration from 7348.46 to 7955.07 output tokens/s (+8.25%). A separate deployment using existing DPA4 attention reduces TTFT below the recorded vLLM TP4 reference in two independent starts. DPA4 changes attention parallelism; its full gain is not a kernel-only comparison. Original attention TP4 still has higher P99 TTFT.This remains a draft. Current-source GPU tests and serving measurements are complete; the finite accuracy comparisons below do not establish exact output equivalence or a formal non-inferiority margin. No merge is requested by this update.
Changes
SGLANG_DSV41_COMPENSATED_MHC=1large-batch path. Small supported batches use the high/residual DeepGEMM projections plus fused residual reduction. For DSV4.1 prefill M=4096..65536, three BF16 weight components share one activation read with separate FP32 accumulation and fixed 16-way K partitioning, followed by the existing reduce/Sinkhorn kernel. Unsupported configurations and batch-invariant execution retain fallback.The candidate graph and compensated projection changes were already part of this standalone PR. This update adds the prefill work and validates the combined runtime on GB300. It does not duplicate #38944/#39305 sparse-indexer or consumer TopK integration.
Current-source validation
Runtime commit:
ad3122c811507679b014cde703b9ce91bc603b24. Its 15 changed/new files matched the remote tested files by SHA256. The subsequent commits format one test without changing its AST and move the CUDA cache test into the kernel CI suite; runtime code is identical. Current head:933cd91263ef45b91e8cb218f639d95ccb134a36.dsv4.1base pass. The relocated CUDA cache tests also pass again (2 tests). GitHub's prior-head lint failure was formatting in two unrelated tool-parser files in the CI merge tree; it was not a GPU test failure. The draft PR gate skips GitHub GPU jobs. Local GPU validation does not imply all GitHub checks are green.Real-acceptance GSM8K uses the same 1314 held-out five-shot prompts; both simulation variables were confirmed absent in the server environment. Initial differences triggered a fixed additional control set; every run is reported:
DPA4 scores overlap the prior implementation's repeated-run range; the mean difference is -0.038 percentage points. Parent repeat 1→2 changes 7 wrong answers to correct and 9 correct to wrong; final repeat 1→2 changes 6/5. Corresponding parent→final runs change 5 gained/7 lost and 7 gained/6 lost. This small control set does not prove exact output equivalence or formal non-inferiority.
The TP4 truncation is sample119 (also incorrect in the historical reference); the parent DPA4 truncation is sample1003. Both reach the unchanged 4096 output limit with repeated reasoning. No sample was excluded or given a larger scoring budget. The original stricter historical-score/zero-truncation checks remain recorded as unmet; diagnostic repeats are separate evidence, not a threshold relaxation. AIME was not run in this round.
Fixed serving results
Same 4×GB300 node, checkpoint revision
dba1be0a40aa45a94ad051997016db3960a90277, frozen 1024 requests, 4096 input / 1024 output tokens, concurrency 64, static DSpark with five draft tokens and simulated acceptance length 5.5. The SGLang v0.5.19 streaming client uses 64 warmups, flushes the cache, then times 1024 requests including fill/drain; all cases complete 1,048,576 output tokens. TTFT is the first nonempty text SSE chunk.The first code-only control already includes the necessary 65536-token planner boundary fix; the unmodified prior head rejected that warmup. DPA4 uses existing
--enable-dp-attention --dp-size 4 --enable-dp-lm-head, giving attention TP1 per DP rank, with the same global prefill ceiling of 65536 and per-DP ceiling of 16384. All four ranks flushed their cache before measurement. These comparisons establish improvement against this recorded vLLM deployment, not the best possible vLLM configuration. vLLM offloads Engram to CPU while SGLang keeps it on GPU.Representative separate profiles confirm dispatch: 64K TP4 dense MXFP8 summed kernel time ~148 → 76 ms, mHC projection ~97.61 → 46.53 ms, and prefill kernel count 3866 → 3786 after the mHC update. Final DPA4 rank-0 prefill span is ~582.85 ms; its head64 sparse-attention family does fewer query rows (~57 ms versus TP4 ~224 ms). Profiled kernel sums include instrumentation and overlap and are not additive TTFT speedups.
Environment: driver 595.71.05, PyTorch 2.13.0+cu130, Triton 3.7.1, FlashInfer 0.6.18, TileLang 0.1.12, NCCL 2.30.7; vLLM
0.1.dev20904+g179dd0fa9. Client source commit0bcd822377da7b5718e674eaf9c870d349424dd1; frozen corpus SHA2561f8e67cba16f9fa16573286775db9a2353fc4c42006695ba63c3515c7b2401f3.Serving command for the DPA4 result
From this checkout, set
MODEL_PATHto the pinned checkpoint:Remove the three DP flags to use the original attention TP4 topology. Also unset
SGLANG_DISABLE_CONSECUTIVE_PREFILL_OVERLAPand remove--prefill-decode-interval 4for the original-schedule code-only control. The DPA result is not attention TP4 despite the outer--tp 4argument.Unset both simulation variables before restarting for real accuracy evaluation. The score protocol uses identical pinned five-shot GSM8K prompts, test indices 5..1318, temperature 0, top_p 1, seed 0, max output 4096, concurrency 64, recording complete responses and truncations. Dataset SHA256:
3730d312f6e3440559ace48831e51066acaca737f6eabec99bccb9e4b3c39d14.Raw serving timings, full accuracy responses, all-rank traces, source hashes and replay scripts are archived with the local experiment report. Regenerating random prompts is a new workload.
Remaining limits
CI States
Latest PR Test (Base): ❌ Run #34830110815
Latest PR Test (Extra): ❌ Run #34830110709
Latest PR Test (AMD ROCm 10): ❌ Run #34830111337