Repository navigation
Conversation
|
Fresh RED/GREEN revalidation on the current Environment: 4x RTX 5090 (SM120), TP=4, RED —
GREEN — identical stack plus
Therefore #36806 fixes the launch/decode-routing failure, but does not cover cached QSA chunk-prefill. The FP8-KV issue addressed by this PR remains reproducible on the current Qwen base, and this patch fixes it under a controlled A/B. |
|
@Qiaolin-Yu @JustinTong0323, could you please take a look when you have a chance? The issue is still reproducible on the latest Qwen integration head, and the RED/GREEN result above isolates the remaining FP8 KV cached chunk-prefill path. Since this PR is stacked on #36497, guidance on the preferred integration/rebase path would also be appreciated. |
|
Independent validation of this design on RTX PRO 6000 Blackwell (SM120, 96 GB): I've been running an equivalent patch in production (widen-on-load inside Quality, measured as teacher-forced input logprobs FP8-vs-BF16 and judged against the same server's BF16-vs-BF16 rerun noise floor (the deployment is not bit-deterministic, so raw diffs mean nothing without the floor):
Single-stream decode is within noise of the BF16 pool, and two concurrent 248k-token requests (95% pool usage) both stay coherent — the halved pool bytes are what make two full-262K-context requests fit on 96 GB at all. One data point in favor of the in-kernel widen this PR uses: my first attempt widened the chunked-prefill full-context gather at the torch level instead, and at ~113k context the extra query-dtype transient OOM'd the card mid-prefill. Widening on load keeps the gather at FP8 bandwidth (half the previous BF16 transient) and is what makes long-context chunked prefill fit. |
|
Data point from GB10 (SM121), which is not in the PR's validation matrix: 2x NVIDIA DGX Spark, TP2/EP2 over a ConnectX-7 200G direct link, the official Before the patch, With the PR applied (
This is the paged-attention fallback path (the FlashInfer/trtllm decode route stays excluded for SM121 after #36806). Dockerfile, launch flags, and notes: https://github.com/bradsmithmba/dgx-spark-qwen38-flash-next-fp8 |
|
Thanks @LingZ315. Closing this because you have 7 PRs open and none updated in 7 days, over our soft cap of 5 for idle PRs. Reopen the two or three you most want reviewed - a short active set moves faster than a long idle one. Some directories moved recently, so an older branch may need retargeting: |
Summary
Addresses the remaining prefill/chunk-prefill FP8 path related to #36545.
Context
With an FP8 KV cache, a long cached chunk-prefill request reaches the QSA Triton kernel with BF16 queries and FP8 cached keys/values.
tl.dotthen rejects the mixed input dtypes. PR #36806 fixes the exact-SM120 QSA sparse-decode routing and supersedes the broader SM12x routing proposed in #36556. That decode-path fix does not dequantize FP8 QSA cache entries consumed by normal or chunked prefill; this PR covers that orthogonal data path.This PR is stacked on #36497 because the Qwen3.8/QSA implementation is not on
mainyet.Validation
pre-commit run --from-ref 73a255206f --to-ref d2c8b42cb1: all hooks passedexisting QSA GPU suite on RTX 5090 (SM120):
52 passednew focused QSA FP8 KV GPU suite on RTX 5090:
7 passedreal checkpoint smoke test:
RadixArk/Qwen3.8-Flash-Next-NVFP4, TP=8 on 8x RTX 5090,--kv-cache-dtype fp8_e4m3fresh current-base RED/GREEN revalidation (full setup and results) on
qwen4-main-squashed99c9362(including fix(qsa): route exact SM120 to FlashInfer sparse decode #36806), 4x RTX 5090, TP=4, and real WikiText-103 token IDs_sparse_gqa_chunk_prefillattl.dot(q_values, keys)withUnsupported rhs dtype fp8e4nvThe original TP=8 end-to-end worktree additionally carried #36556. The fresh TP=4 RED/GREEN revalidation instead used the current base
99c9362, including #36806. Both sides of each A/B carried the same unrelated ModelOpt NVFP4 MoE TP-padding loader fix required to load this particular exported checkpoint; none of those auxiliary changes are included in this PR. The checkpoint exposes unit/default KV scales, while non-unit scale behavior is covered by the focused kernel tests above.Accuracy
Full official GSM8K A/B (
python -m sglang.test.run_eval, all 1,314 examples, Chat API, thinking disabled, temperature 0, max 512 output tokens, concurrency 8) on the same patched source, checkpoint, and TP=8 host; only--kv-cache-dtypechanges:The paired result agrees on 1,298/1,314 examples (98.78%): 1,255 are correct under both KV dtypes, 43 are wrong under both, 10 are BF16-only correct, and 6 are FP8-only correct. A two-sided exact McNemar test on the 16 discordant examples gives p=0.45, so this run does not show a statistically significant task-accuracy difference. The focused GPU tests separately compare normal and cached chunk-prefill FP8 outputs against a dequantized reference with non-unit K/V scales.
Serving performance
Controlled A/B on the same patched source, model, 8x RTX 5090 host, and exact WikiText-103 token-ID prompts; each setting contains 16 requests and only
--kv-cache-dtypechanges:The same long-context BF16 workload before vs. after this patch was -0.44% at c=1 and +1.17% at c=8, showing no measurable BF16 regression. FP8 increased allocated KV capacity per GPU from 762,496 to 1,440,320 tokens (+88.9%). The unpatched 50k / 90%-hit FP8 case crashes in the QSA mixed-dtype dot before producing a comparable result, so these numbers are intended as a regression guardrail rather than a broad speedup claim.
Integration note
Commit
d2c8b42cb1applies cleanly to the currentqwen4-main-squashedhead99c9362(including #36806). The controlled RED/GREEN revalidation above reproduces the failure on the base and passes with this commit. The full changed-file pre-commit suite passes, and the four files changed here pass the same hooks.CI States
Latest PR Test (Base): ❌ Run #34829312782
Latest PR Test (Extra): ❌ Run #34829312532
Latest PR Test (AMD ROCm 10): ❌ Run #34829312674