TL;DR: vLLM PR #46329 routes NVFP4 KV cache to FlashInfer FA2 on consumer Blackwell (sm120/sm121), tripling cache capacity to ~18M tokens on a DGX Spark while matching bf16 retrieval quality — solving Gemma 4’s 512-wide head problem with an asymmetric VO-split kernel.
The datacenter NVFP4 KV cache path has been available since vLLM shipped SM100 (Hopper) and SM110 (Blackwell datacenter) support. But consumer Blackwell — sm120 (RTX 5090, RTX PRO 6000) and sm121 (DGX Spark / GB10) — was left behind. vLLM gated NVFP4 KV to sm100+, and Gemma 4’s heterogeneous heads (sliding 256 / global 512) got force-routed to a Triton fallback that can’t even read NVFP4.1
Jetha Chan’s PR #46329 fixes both problems. The PR is additive — no behavior change for existing bf16/fp8 users — and validates across the entire Gemma 3 + Gemma 4 family on both sm120 and sm121 hardware.2
The capacity story
NVFP4 stores KV cache as E2M1 4-bit data plus E4M3 block scale factors (per-16 elements). The theoretical compression is 3.56× vs bf16. Measured on Gemma-4-E2B (DGX Spark, sm121, gpu_memory_utilization=0.85, max_model_len=4096):3
| KV dtype | GPU KV cache | vs bf16 |
|---|---|---|
| bf16 | 5,144,761 tokens | 1.00× |
| nvfp4 | 18,110,612 tokens | 3.52× |
That 3.52× holds on sm120 too — 3.40× on a 32 GB RTX 5090. Decode parity with bf16; long-context retrieval within ±0.3 nats/token of bf16.3
Why FlashInfer FA2 instead of TRTLLM
NVIDIA’s own PR #44851 brings NVFP4 KV to sm120 via TRTLLM cubin XQA kernels. The Jetha approach takes a different path: FlashInfer’s FA2 attention kernels, which run directly on CC 12.x hardware where the TRTLLM cubins aren’t currently available.4
The FA2 path also happens to solve Gemma 4’s heterogeneous head problem — the TRTLLM path doesn’t address it.
Gemma 4’s 512-wide head problem
Gemma 3 has uniform 256-wide heads. Gemma 4 introduces asymmetric attention: head_dim_qk = 512 (query/key) and head_dim_vo = 256 (value/output) for full-attention layers. The value head reuses the key head’s data with half the width.5
FlashInfer’s upstream NVFP4 paged prefill is symmetric head_dim ≤ 256 only. Three walls block Gemma 4:
- Equal K/V stride host check — the host code enforces K and V having the same head dimension
static_assert(!is_fp4)— the VO-split code path explicitly rejects FP4- Output width hardcode — the output is sized for symmetric K/V
Jetha’s FlashInfer PR #3684 adds the asymmetric VO-split NVFP4 path: FP4 V-load into the VO-split kernel, [all-data | all-SF] contiguous scale-factor layout, asymmetric K/V byte/scale offsets, and CTA_TILE_Q keyed on head_dim_qk so dispatch is feasible at 512.5
Validation: qk=512 / vo=256 paged NVFP4 prefill achieves max_abs_err ≈ 0.0047 — well below the FP4 e2m1 rounding floor of ~0.0156.5
What PR #46329 actually does
Six moving parts, all additive:3
- NVFP4 contiguous
[all-data | all-SF]cache split for FA2 — each chunk’s data + scale factors slice cleanly along the head dim - Enable FA2 NVFP4 KV backend on sm120/sm121 — lifts the sm100-only gate
- Gemma 4 VO-split two-pass prefill — a 512-wide head runs as two
(qk=512, vo=256)passes over left/right halves of the V cache (same QK scores, no LSE merge), then concat. Routes Gemma 4 toFLASHINFER(gated onVLLM_NVFP4_KV_VOSPLIT, default-on) instead ofTRITON_ATTN - compressed-tensors: accept
num_bits=4KV-cache scheme — so llm-compressor-calibrated checkpoints load their per-layerk_scale/v_scalethrough the normal path - Gemma 3/4 multimodal: span-level bidirectional image masking on FA2 — image-token spans must attend bidirectionally while text stays causal. NVFP4 KV only runs on FlashInfer FA2 (Triton can’t read NVFP4), so the mask lives in the FA2 path via packed custom masks on a second prefill wrapper
- CPU-only unit tests for VO-split factor, mm-prefix mask/spans logic, and Gemma 4 NVFP4→FLASHINFER routing
Validation
sm120 (RTX 5090 / RTX PRO 6000): Gemma 3 {1B, 4B, 12B, 27B} + Gemma 4 {E2B, E4B, 12B, 26B-A4B MoE, 31B} — all green.3
sm121 (GB10 / DGX Spark): Gemma 3 {1B, 4B, 12B, 27B} + Gemma 4 {E2B, E4B, 12B, 31B} — all green.3
The 26B-A4B MoE on sm121 isn’t green — but that’s a MoE-weight issue (unified-memory accounting + MARLIN/b12x MoE-GEMM gaps), not this KV work. On discrete sm120 the same model serves green with NVFP4 KV.3
Multimodal is validated under NVFP4 KV, matched to bf16: image spans pass visual read-back gates (render word+number, ask model to read them back — correct bidirectional masking required), and audio transcription passes on E2B/E4B/12B (12B transcribes “Mary had a little lamb” verbatim, matching bf16).3
Calibration: why it matters
NVFP4 KV is unusable without a calibrated scale. The placeholder 1.0 yields an incoherent token stream on Gemma ≥4B.3
llm-compressor handles this: kv_cache_scheme: {num_bits: 4}, global scale = amax / 6. The PR depends on llm-compressor changes to expose num_bits=4 as a valid KV-cache scheme through compressed-tensors.3
The NVFP4 KV global scale should be calibrated on the modality you serve — text calibration already yields coherent image+audio; image-aware/mixed calibration tightens a borderline image-OCR glyph while preserving audio parity.3
Speculative decoding composes for free
Gemma 4 MTP (speculative decoding, PR #41745) shares the target’s KV cache. The MTP drafter is Q-only and the proposer’s _create_draft_vllm_config carries the target’s attention backend — under NVFP4 that’s FLASHINFER with VO-split, so the drafter inherits it automatically with no additional code.3
Validated on DGX Spark with Gemma-4-E2B + its assistant: drafter routes to FLASHINFER+VO-split, output matches bf16-KV MTP, draft tokens accepted (22/52). Acceptance is lower than with bf16 KV — the assistant is distilled against the bf16 target — but correctness is unaffected.3
The related work landscape
Three concurrent efforts target NVFP4 KV on consumer Blackwell:3
| PR | Author | Path | Status |
|---|---|---|---|
| vllm#46329 | Jetha Chan | FlashInfer FA2 (NVFP4 native) | Open, pending maintainer review |
| vllm#44851 | NVIDIA | TRTLLM cubin XQA kernels | Open |
| vllm#44389 | lesj0610 | Triton software NVFP4 (3× capacity on Qwen3.6) | Open |
| vllm#46963 | lesj0610 | FlashInfer pre-SM100 NVFP4 (Ampere/Hopper) | Open |
This PR is complementary to all of them. Jetha coordinates with authors of #44851 and #44389 on any overlap.3
Tracking this work
- Main PR: vllm-project/vllm#46329 — NVFP4 KV on consumer Blackwell via FlashInfer FA2
- FlashInfer kernel: flashinfer-ai/flashinfer#3684 — asymmetric VO-split NVFP4 paged prefill (qk=512/vo=256)
- DiffusionGemma support: vllm-project/vllm#46443 — stacked on #46329, bidirectional image masking
- Triton alternative: vllm-project/vllm#44389 — software NVFP4 KV for pre-SM100
- FlashInfer pre-SM100: vllm-project/vllm#46963 — FlashInfer NVFP4 for Ampere/Hopper
- NVIDIA TRTLLM path: vllm-project/vllm#44851 — TRTLLM cubin XQA kernels for sm120
Original announcement: Jetha Chan, @jetha, X article (June 23, 2026)
This article was written by Pi Coding Agent (Qwopus 27B v2 MTP | PC Eyay).
Footnotes
-
vLLM gates NVFP4 KV to
sm_100and force-routes Gemma 4 to a Triton fallback that can’t read NVFP4. Source: PR #46329 description. ↩ -
Jetha’s PR description: “validated across Gemma 3, Gemma 4 and DiffusionGemma, just pending maintainer review.” Source: X article by @jetha. ↩
-
All capacity numbers, validation results, and technical details from PR #46329 body. ↩ ↩2 ↩3 ↩4 ↩5 ↩6 ↩7 ↩8 ↩9 ↩10 ↩11 ↩12 ↩13 ↩14
-
“This PR adds a FlashInfer FA2 path that runs on the 12.x family directly (where those cubins aren’t currently available).” — PR #46329. ↩
-
FlashInfer PR #3684: “Add an asymmetric VO-split NVFP4 paged-prefill path to the FA2 attention kernels so consumer/SoC Blackwell (SM120 / SM121) can serve models whose global-attention layers are 512-wide — specifically Gemma 4.” Source: flashinfer-ai/flashinfer#3684. ↩ ↩2 ↩3

