MiniMax-M3-AWQ at 1M-token context on 4× DGX Spark (GB10) — 4-bit nvfp4 KV 25 tok/s

Follow-up to our M3-AWQ TP=4 build. We got MiniMax-M3-AWQ serving a full 1,048,576-token context across the 4 Sparks by moving the KV cache to 4-bit nvfp4, then recovered most of the lost speed with an inline-dequant kernel.

The lever: nvfp4 KV nearly halves per-token KV memory, growing the pool ~36% (965K → 1.31M tokens at GMU 0.80). That headroom lets one request hold the full 1M context (1.25× concurrency at 1M). Coherent, TP=4, on 4× GB10.

Two fixes made it work:

  • Query dtype: vLLM’s generic attention auto-quantizes the query to fp8 when KV is fp8/nvfp4. That fp8 query hit the bf16-only dequant kernel and crashed generation. Forcing the query to stay bf16 for nvfp4 fixed it.
  • Speed (Phase 2): the first version unpacked KV into a bf16 scratch buffer every decode step (~17.8 tok/s, half of fp8). Fusing the 4-bit→bf16 unpack into the attention kernel (no scratch pass) brought it to ~25.2 tok/s single-stream, +42%, bit-identical output, full 1M pool intact.

What didn’t work (transparency): enabling cudagraphs forced breakable-cudagraph mode, which disables torch.compile and net-regressed to ~17 tok/s — so we serve eager. A full WMMA tensor-core decode path came out slower on M3’s 1-KV-head-per-rank TP=4 layout, shipped off.

Net: 1M context on 4 desktop GB10s at ~25 tok/s (vs fp8’s ~34 at 262K). A long-context build.

Credit: built on CosmicRaisins’ M3-AWQ recipe; nvfp4-KV layout from the MiMo nvfp4-KV work; concurrency lineage Keys (@u1tra_instinct).

Recipe + honest benchmarks: GitHub - tonyd2wild/MiniMax-M3-AWQ-1M-NVFP4-KV-4x-DGX-Spark: MiniMax-M3-AWQ serving 1,048,576-token (1M) context on 4x DGX Spark (GB10) via a 4-bit nvfp4 KV cache. Built on CosmicRaisins' M3 recipe. · GitHub

2 Likes