Repository navigation
Description
Context
docs/benchmark_results/speculative-pairing-gb10-2026-07-10.md (the "Why MTP loses here", "Contrast with Apple Silicon", and "Policy tuning" sections) and docs/benchmark_results/model_tests.md (the GB10 CUDA matrix note, around line 264) attribute the MTP regression measured in PR #733 (issue #638: baseline 14.5 tok/s, 0.77x at K=2, 0.52x at K=4/8 on GB10) to GB10 being "compute-bound".
The 2026-07-11 investigation showed the mechanism is the M*B < 8 per-row qmv dispatch fallback (src/lib/mlx-cpp/patches/mlx/backend/cuda/quantized/quantized.cpp:229-245, the #725 kernel gap): the MTP verify is a [1, K] sequence-axis forward, the sm90 CUTLASS path is Hopper-gated, so the verify re-reads the full weight matrix K times. This is not fundamental compute-boundness: GB10 has MORE compute headroom per byte than Apple M-series (~273 GB/s with ~100 TFLOPS bf16, vs M5 Max ~614 GB/s with far less compute), and SGLang / TRT-LLM on the same DGX Spark hardware demonstrate near-linear batched decode scaling (20.5 tok/s at B=1 to 368 tok/s at B=32, llama-3.1-8b) and up to 2x end-to-end EAGLE-3 speculative speedups (LMSYS: https://www.lmsys.org/blog/2025-10-13-nvidia-dgx-spark/; NVIDIA speculative-decoding playbook for DGX Spark: https://build.nvidia.com/spark/speculative-decoding).
Impact
The "compute-bound" framing points readers (and future policy work) at the wrong fix: it suggests the hardware cannot do better, when the gap is a dispatch/kernel limitation tracked in #725 with concrete follow-ups (#735, #736, #737). The docs should carry the mechanism that the follow-up work is built on.
What's needed
- Rewrite the causal framing in both docs to the kernel-gap explanation.
- Include the fitting arithmetic: classic forward 69 ms; K=2 round 140 ms = 2.0 forwards; K=4 round ~270 ms = 3.9 forwards; the measured 0.77x / 0.52x equal tokens-per-round divided by round cost exactly.
- State that the verify cost scaling is linear in K, and correct the sqrt(K) calibration paragraph: the K=8 row ran at effective K=4 (drafter block size 4, adaptive controller never expanded at 35% acceptance), so the "1.9x from K=2 to K=8" datum actually shows 2x width for 1.94x time.
- Cite the LMSYS / NVIDIA external evidence.
- Cross-link perf(cuda/quant): amortizing small-M quantized GEMM for batched decode on Blackwell #725 and the sibling follow-up issues: perf(speculative): pad the CUDA MTP verify forward past the qmv dispatch threshold #735 (padded CUDA verify), perf(speculative): replace the sqrt(K) verify-cost heuristic with measured round cost in the adaptive MTP policy #736 (measured round-cost policy), bench(speculative): acceptance-rate cross-check for the Gemma 4 MTP pairing on Apple Silicon #737 (acceptance-rate cross-check).
Acceptance Criteria
- Both docs updated with the corrected mechanism and arithmetic.
- The effective-K mislabel corrected wherever the sqrt(K) calibration is described.
- Links to perf(cuda/quant): amortizing small-M quantized GEMM for batched decode on Blackwell #725 and the sibling issues (perf(speculative): pad the CUDA MTP verify forward past the qmv dispatch threshold #735, perf(speculative): replace the sqrt(K) verify-cost heuristic with measured round cost in the adaptive MTP policy #736, bench(speculative): acceptance-rate cross-check for the Gemma 4 MTP pairing on Apple Silicon #737) added.
- No change to the shipped policy behavior claimed by the docs: the decline verdict on GB10 remains correct as protection until perf(cuda/quant): amortizing small-M quantized GEMM for batched decode on Blackwell #725 lands.
Technical Considerations
- Refs perf(cuda/quant): amortizing small-M quantized GEMM for batched decode on Blackwell #725, perf(speculative): CUDA drafter pairing matrix and continuous-batching integration #638, PR perf(speculative): CUDA pairing matrix and burst HOL observability #733. Sibling issues: perf(speculative): pad the CUDA MTP verify forward past the qmv dispatch threshold #735, perf(speculative): replace the sqrt(K) verify-cost heuristic with measured round cost in the adaptive MTP policy #736, bench(speculative): acceptance-rate cross-check for the Gemma 4 MTP pairing on Apple Silicon #737.
- Docs to edit:
docs/benchmark_results/speculative-pairing-gb10-2026-07-10.md,docs/benchmark_results/model_tests.md.
Activity
docs: correct the GB10 MTP regression framing to the small-M qmv kern…
perf(cuda/quant): amortize small-M quantized matmul with a multirow q…
docs: correct the GB10 MTP regression framing to the small-M qmv kern…
perf(cuda/quant): amortize small-M quantized matmul with a multirow q…