Repository navigation
[DSV4.1] Big fused wo_a quant - #39957
Conversation
|
Tested this PR on 4× GB300 (SM103). At request concurrency 1, median client-side decode throughput improved from 1167.22 to 1202.65 tokens/s (+3.03%).
Each revision had two fresh server starts, with one warmup and 20 measured requests per start. Execution order was baseline → PR → PR → baseline. Prefix caches were flushed before each request; all 80 measured requests had zero cached tokens. No samples were discarded.
Units: tokens/s. Throughput is measured at the streaming client as The isolated inverse-RoPE → WO-A partial GEMM → reduce/quant chain also shows a consistent improvement:
These are medians of three sweep medians, alternating measurement order, using the same benchmark helper/L2 marker for both implementations and rotating weight buffers beyond L2 capacity (30 warmups and 2000 replays per sweep). Separate model traces confirm the fused path is active: in each rank0 trace covering 20 decode steps, 800 instances of the original three-kernel chain were replaced by 800 Validation: all 18 added kernel tests passed. This run used a synthetic token prompt and simulated acceptance for performance measurement; GSM8K/AIME/GPQA were not run, so this does not establish task-level accuracy equivalence. BS32/64 and the combination with #39941 were not measured here. |
|
Accuracy follow-up on Same 4×GB300, TP4/EP1, DSPARK block size 5, real speculative acceptance (no simulated acceptance), temperature 0, and identical frozen prompts/evaluator settings. The full suites used concurrency 4, exercising the fused path with 24 verify rows.
There were no request errors. GSM8K excludes the five examples used as demonstrations. Output-limit hits remain in the scored results. For the small GSM8K difference, fresh-server repeats produced 1,281/1,314 on baseline and 1,279/1,314 on the PR. Thus baseline scored 97.49–97.56% and the PR 97.26–97.34%; five of the seven initially lost questions recovered in the PR repeat. There is question-level run-to-run variation, so I would not treat the initial four-question difference alone as evidence of a kernel accuracy bug. These runs do not establish exact numerical or statistical equivalence. The GPQA increase also should not be interpreted as a model-quality improvement: output-limit outcomes contribute to the difference. Additional checks:
Both source snapshots were hash-checked after evaluation. The evaluator was pinned to SGL-Eval |
|
/rerun-test test/registered/quant/test_llama8b_nvfp4_kv_cache_sm120.py |
|
Results for 🚀 |
|
Base NVIDIA CI has a PR-related unit-test failure: Could you initialize |
|
/rerun-test test/registered/unit/models/test_deepseek_v4_unified_fp8_q_pair.py |
|
Results for 🚀 |
|
Fixed the CPU test regression in 280d84c. The test harness bypasses MQALayer.init, so it now initializes use_fused_wo_a=False to match the production default and keep this unified-KV test on the intended non-fused path. Validation:
The remaining Base failure is an unrelated current-main test regression (test_layer_communicator_fusion_gate.py mocks get_tp_group after that symbol was removed). Extra jobs are being fast-failed by the unrelated current-main ruff-format failure in logits_processor.py; no #39957 GPU test reported a real failure on this head. |
…-fused-wo-a # Conflicts: # python/sglang/srt/layers/logits_processor.py
|
/rerun-test test/registered/kernels/ops/attention/test_wo_a_fused.py test/registered/kernels/ops/attention/test_fp8_wo_a.py test/registered/kernels/ops/layernorm/test_mxfp8_epilogue.py test/registered/unit/layers/quantization/test_fp8_blockwise_linear_backends.py test/registered/unit/models/test_deepseek_v4_unified_fp8_q_pair.py |
|
Results for 🚀 🚀 🚀 🚀 |
|
/rerun-test test/registered/kernels/ops/attention/test_wo_a_fused.py test/registered/kernels/ops/attention/test_fp8_wo_a.py test/registered/kernels/ops/layernorm/test_mxfp8_epilogue.py test/registered/unit/layers/quantization/test_fp8_blockwise_linear_backends.py test/registered/unit/models/test_deepseek_v4_unified_fp8_q_pair.py test/registered/unit/managers/test_disagg_idle_step_counters.py |
|
Results for 🚀 🚀 🚀 🚀 |
Main moved kernel tests under test/registered/kernels/ops (sgl-project#39966), renamed wo_a_bf16.py to wo_a.py (sgl-project#39957) and moved the low-ratio page-table expansion into dsv4/candidate_indexer.py (sgl-project#40352). Place the remaining AMD suites in the plural tree and follow the two renames. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…sts for main's metadata and KV-config changes Main's sgl-project#39957 introduced the model-type fast_path flag around the CUDA wo_a fast paths; the gfx950 decode/verify and prefill branches carry their own gates, so they no longer sit behind that flag (direct kernel callers and the AMD prefill test rely on this). The HIP radix metadata test sets need_compress (sgl-project#40205) and the paged DSpark test stub carries pp_size/attn_dp_size on the KV-cache config (sgl-project#40707). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Motivation
On small DeepSeek-V4.1 TP4 batches, inverse RoPE, WO-A projection, and MXFP8 quantization require separate kernel launches. This PR fuses the sequence to reduce launch and intermediate-memory overhead.
Changes
(groups, rank, K) = (2, 1024, 4096)shape.test/registered/kernels/: BF16/MXFP8 output, padded inputs, token-count boundaries, scale padding, and int32/int64 positions. Validate scales in bulk and update the WO-A imports in existing tests.Validation
Rebased onto
mainata6cf05817f11d22023fd951a76255ef50fb09f49, after #38798 and #40039 landed. All local pre-commit checks on changed files passed. Full suite-registration validation passed for all 2,489 registrations; the experimental benchmark with an invalid B200 suite has been removed, along with its unrelated global benchmark changes. Vectorized scale indexing was checked against all 8,192 original offsets. CI is rerunning on the updated head. GPU tests and benchmarks have not yet been rerun on this new main-based revision.Historical measurements on
e919e8be784473d2fb7ea10d10f45c23af658f68and its direct parent:CI States
Latest PR Test (Base): ⏳ Run #35437055876
Latest PR Test (Extra): ⏳ Run #35437055726
Latest PR Test (AMD ROCm 10): ⏳ Run #35437055858