inference-efficiency · 2026-12-03 · Tier 1

Fast 4-bit KV-cache decoding on Hopper GPUs without FP4 hardware

Fast 4-bit KV-cache decoding on Hopper without FP4 hardware

TL;DR. On H100/H200 (Hopper, which has no FP4 tensor cores), today's 4-bit KV cache paths are slower than FP8: the FlashInfer kernel behind vLLM's NVFP4 KV reaches only 10-19% of memory bandwidth. The paper shows this is a kernel problem, not a format problem. Counting instructions with NVBit against Hopper's issue budget (about 7 thread instructions per byte loaded on H200), the existing 4-bit kernels execute 2-6x that budget and serialize load, decode and matmul. A new decode kernel stays inside the budget and overlaps dequantization with loading (a TMA producer warp, a cache layout that feeds decoded values to tensor cores straight from registers, swapped operands for small query groups). As a bare kernel it is 1.10-1.48x faster than the faster of TensorRT-LLM XQA and FlashAttention-4 FP8 at all 11 shapes, 1.22-1.76x when 4-bit K/V run on FP8 tensor cores. Inside vLLM, with K mean removal, K rotation, four BF16 sink tokens and layer 0 kept in BF16, a Llama-3.1-8B decode step is 1.12-1.64x faster than FlashInfer FP8 at batch 8+, the cache holds 1.63x as many tokens, and on five models the 95% intervals exclude accuracy losses above about 3.5 points versus BF16 KV. At 120K tokens it loses 15 points versus BF16, about as much as vLLM's default FP8 path.

4-bit KV was slow on Hopper because of the kernel, not the bits
Stay under the per-byte instruction budget and overlap decode with load, and 4-bit beats FP8.
flowchart LR
  C["4-bit KV<br/><small>1.63x more tokens fit</small>"] --> T["TMA producer warp<br/><small>streams packed bytes</small>"]
  T --> D["Register decode<br/><small>within ~7 instr/byte</small>"]
  D --> M["FP8 tensor cores<br/><small>no FP4 hardware needed</small>"]
  M --> O["Decode step<br/><small>1.12-1.64x vs FP8</small>"]
  C -.->|old kernels| X["Serialized path<br/><small>2-6x over budget</small>"]
  classDef input fill:#d0ebff,stroke:#1971c2,color:#1b1b1b,stroke-width:2px
  classDef core fill:#e5dbff,stroke:#6741d9,color:#1b1b1b,stroke-width:2px
  classDef loop fill:#fff3bf,stroke:#f08c00,color:#1b1b1b,stroke-width:2px
  classDef exit fill:#d3f9d8,stroke:#2f9e44,color:#1b1b1b,stroke-width:2px
  classDef err fill:#ffe3e3,stroke:#e03131,color:#1b1b1b,stroke-width:2px
  class C input
  class T,D loop
  class M core
  class O exit
  class X err
  linkStyle 3 stroke:#2f9e44,stroke-width:2px
  linkStyle 4 stroke:#e03131,stroke-width:2px
Blue is the cache, amber is the overlapped load/decode pipeline, purple is compute, green is the result, red is the old serialized path.

Key findings

  • The bottleneck on Hopper is instruction issue, not bandwidth: each loaded byte needs unpacking, scaling and conversion, and the old kernels spend 2-6x the issue budget doing it.
  • Accuracy recipe matters as much as the kernel: K mean removal plus K rotation (outlier flattening), BF16 sinks and a BF16 first layer.
  • Speedup appears at batch 8+ (on par at batch 1); 1.04-1.18x on 32B and 72B models. One H200 absorbed 1.23-2.20x FP8's request rate in 600 s bursts from an empty cache (mostly one seed; sustained rate not established).
  • Long context still hurts: 15 points lost at 120K tokens on Llama-3.1-8B, versus 3 for offline FP8 storage alone.

Relation to prior wiki pages

  • Extends BitDecoding-FP4 (11-18), which got native NVFP4 KV within 0.5-1 point of BF16 on B300 with FP4 hardware. This paper brings the capacity win to the installed Hopper base, where most serving still runs.
  • Confirms the 10-23 MiniMax disclosure (summary) that 4-bit KV losses hide in specific slices: here the slice is very long context.
  • Fits the 11-02 lesson (KV compression infra problems) that compression results must be judged by what the serving stack actually frees and runs; quantization frees memory uniformly, which is why it composes with paged attention where token eviction does not.
  • Concept pages: kv-cache, quantization, gpu-kernels.

Research angle. Can the same instruction-budget accounting make 2-3-bit KV viable on Hopper, and does K rotation interact with RoPE-structured eviction (the 11-02 geometry trick) so quantization and eviction compose?

Source: arXiv 2611.30027 · raw: raw/huggingface/2026-12-02-fast-4-bit-kv-cache-decoding-on-hopper-gpus-without-fp4-hard.md