AI generated
Follow-up to our earlier post on breaking 1,000+ tok/s on 4× RTX PRO 6000 Blackwell (SM12 0, PCIe — no NVLink) running DeepSeek-V4.1-Flash via NVIDIA Flare. Last time, decode was already flying, while cold prefill sat around 31k–33k tok/s. Over the last few days we tore apart the SM120 prefill path and the speculative scheduler — and we just published a new signed gb202 release on Hugging Face that pushes cold prefill to 59,051 tok/s (peak 59,077 tok/s) on four PCIe workstation GPUs. To put that in perspective: a 64K-token cold prompt (71k actual tokens) prefills in 1.20 seconds, and 128K (142.5k tokens) prefills in 2.46 seconds — verified via Prometheus flar e_prefill_tokens_total with 0% prefix-cache hit. --- ### Cold Prefill Benchmarks (4× RTX PRO 6000 Blackwell, PCIe, 0% prefix reuse) | Context | Actual Prompt Tokens | Cold Prefill Speed | TTFT | vs Previous gb202 Release | |---|---:|---:|---:|---:| | 8K | 8,700 | 44,712 tok/s | 0.194 s | +43% | | 16K | 17,379 | 51,264 tok/s | 0.340 s | +57% | | 32K | 35,540 | 56,997 tok/s | 0.624 s | +72% | | 64K | 71,212 | 59,051 tok/s (peak 59,077) | 1.205 s | +77% | | 128K | 142,508 | 57,944 tok/s | 2.460 s | +82% | (Measured on 4× RTX PRO 6000 Blackwell with NVreg_EnablePCIERelaxedOrderingMode=1, --max-concurrency 32 --mtp-draft-tokens 7 --mtp-adaptive-verification --mtp-max-verification-token-budget 128 --mtp-adaptive-verification-alpha 1.0 --embedding-table-storage ram. Sanity-checked with greedy math, 4/4 partial-tail NIAH up to 32.5k, and 17.02M shared KV token capacity / 1 M max context per request.) --- ### What's New — How We Nearly Doubled Prefill on PCIe GPUs (Without Touching Model Quality) Almost the entire jump from ~32k → 59.1k tok/s comes from three stacked open-source changes (all 0-ULP bit-exact on attention): 1. 2.27×–2.63× faster SM120 BF16 prefill MLA kernel (local-inference-lab/flashinfer#142): - Removed L2::evict_first thrashing on reused prefill KV gathers. - Doubled 16 → 32 heads per CTA (mg_n_hg = 2) in an 80.5 KiB hybrid SMEM layout — cutting KV gather & dequantization work in half with 0 bytes of register spills. - Compile-time split of SWA vs NVFP4 tile loops with hoisted vectorized scale loads and a bank-conflict-free 304 B NVFP4 staging stride. 2. Full 20-layer row-sharded encoder attention (hyperflare-inference#508, hyperflare-recipes#29, #30): - Replicates encoder attention weights across TP4 (+2.32 GiB/rank) so all 20 encoder layers execute 4× row-sharded per rank instead of blasting full-chunk PCIe AllGathers/AllReduces across the bus. - Shrinks the Layer-20 encoder→decoder boundary gather by 64× — from 320 MiB down to 5 MiB (128-row active suffix only). 3. Overlapped PCIe P2P transfers (hyperflare-recipes#30): - Routes encoder KV gathers over SM BAR1 P2P (DcpAllToAll) so the DMA copy engine overlaps MXFP8 FFN AllGathers completely behind attention, and hides Engram AllGathers inside the FFN compute window (prefill8192 shrinks from 6,839 → 5,379 CUDA graph nodes). ### Bonus: Decode & Speculative Scheduler Upgrades We also landed a scheduler upgrade upstream in Flare (main, already merged): - GPU Confidence Calibration + Cross-Lane Order-Statistic Allocation Surplus (NVIDIA/hyperflare-inference#515 — merged, plus follow-up #522 co-authored with @original-el8): - Previously, Flare's scheduler priced crowded packed speculative batches (B=16/32) from time-averaged per-lane acceptance curves, missing the fact that the GPU prefix allocator sees fresh per-step confidences across all lanes and cherry-picks the easiest (lane, depth) slots (Jensen's inequality). - By calibrating drafter confidence per depth/request and modeling the empirical cross-lane Lorenz concentration surplus, default alpha = 1.0 now beats the old main across the board (+9.3% on C=16, +18.6% to +20% on diverse/hard C=32 prompts, cutting unnecessary W=1 fallback by up to 35×) — no more alpha = 0.6 workaround needed! - Decode on this C32 release (alpha = 1.0): - C1 (unique prompt): 460.1 tok/s (5.95 ms/step) - 16k coding session (Tetris): 155.3 steps/s (6.42 ms/step), 612.4 tok/s end-to-end average - Diverse concurrent decode (512 out tokens each): 866 tok/s (C4) · 1,121 tok/s (C8) · 1,384 tok/s (C16) · 1,743 tok/s (C32) — and 2,668 tok/s on standard synthetic C=32 decode sweeps (2,704 tok/s at alpha=0.6). --- ### Try It Now (Live on Hugging Face) The new signed C32 (120-graph, 17.02M KV tokens) package is already live on the gb202 branch: 👉 https://huggingface.co/local-inference-lab/DeepSeek-V4.1-Flash-1017-FLARE/tree/gb202 sh docker run --pull=always --rm -it \ --gpus '"device=0,1,2,3"' --ulimit memlock=-1:-1 \ --security-opt seccomp=unconfined \ -p 127.0.0.1:8000:8000 \ -v flare-home:/home/flare \ ghcr.io/local-inference-lab/flare:release \ run local-inference-lab/DeepSeek-V4.1-Flash-1017-FLARE \ --revision gb202 --filename model.safetensors \ --gpus 0,1,2,3 --max-concurrency 32 --mtp-draft-tokens 7 \ --mtp-adaptive-verification --mtp-max-verification-token-budget 128 \ --mtp-adaptive-verification-alpha 1.0 --scheduler-policy balanced \ --embedding-table-storage disk --prefix-cache-memory 64G \ --kv-cache-limit memory --host 0.0.0.0 --port 8000 (With 320+ GiB host RAM, switch --embedding-table-storage disk to ram for full speed. Compatible with v0.2.3, with Flare main recommended for the #515 scheduler upgrade.) local inference lab discord: https://discord.gg/gmvKSN3tVy