4-bit KV Cache Decoding Speeds Up Hopper GPUs

4-bit KV cache decoding kernel running on an Nvidia Hopper H200 GPU

A new research paper describes a faster way to run a 4-bit KV cache on Nvidia’s Hopper GPUs, and it explains why the existing approach is slow. The 4-bit KV cache decoding kernel reaches 67-75% of peak memory bandwidth on an H200, where vLLM’s current 4-bit path manages only 10-20%.

The gap matters because a 4-bit cache reads about half the bytes of FP8. In theory that should make decoding faster. On Hopper, it often does the opposite.

Why 4-bit decoding is slow on Hopper

Hopper has no native FP4 support, so software must unpack the 4-bit values before the tensor cores can use them. Every byte fetched then brings extra instructions, and the chip has few spare issue slots for each byte of bandwidth.

Profiling with NVBit pointed to two problems. The code behind vLLM’s 4-bit options (FlashInfer NVFP4 and Triton UltraQuant) issues between 2 and 6 times the instructions Hopper can handle for each byte. Those kernels also do their loading, unpacking and matrix math in strict sequence.

On an H200, vLLM’s NVFP4 KV path built on FlashInfer’s decode is up to 1.7x slower than FP8.

What the new kernel changes

The Hopper-native kernel makes three changes:

  • One TMA producer warp streams data in while two compute warpgroups work in parallel, so the stages run at the same time.
  • Values are arranged when they are written to the cache, which lets unpacked data go from registers directly into the tensor cores.
  • Swapping the operands of the matrix multiply removes the padding that small query groups would otherwise need.

Speed results

At batch sizes of 32 to 128 on an H200, the kernel reaches 67-75% of peak bandwidth. Across all 11 tested shapes it is 1.12-1.49x faster than the faster of XQA and FlashAttention-4’s proposed native FP8.

Integrated into vLLM and tested on Llama-3.1-8B, each decoding step runs 1.12-1.64x faster than with vLLM’s FlashInfer FP8 path once batches reach 8. Compared with FlashAttention-4’s FP8, the improvement is 1.04-1.24x. A single request sees no difference. The compact cache also fits 1.63x more tokens.

A serving test on one H200 with a reasoning-style request mix measured the top request rate at which 99% of requests still hit their latency targets. That rate is 1.23-1.32x FP8’s on Llama-3.1-8B and 1.67-2.20x on Qwen2.5-72B. Cache capacity is the bottleneck in that setting, so a smaller cache pays off most.

The catch: prefill-heavy streams do worse, with prefill 7% slower.

Keeping accuracy intact

Speed only helps if answers stay correct. The accuracy recipe combines K mean removal with rotation, keeps four sink tokens in BF16, and leaves layer 0 in BF16. Across five models from 7B to 32B, repeated runs found no significant accuracy gap against a BF16 KV cache.

The paper also explains why reasoning variants of Qwen2 models break under FP8 KV. In those models the key mean in layer 0 is nearly all the key-projection bias that earlier work identified, as seen through RoPE, and it can be calculated from the weights. Leaving that layer in BF16 makes FP8 KV work again. Adding K mean removal does the same for 4-bit KV.

Practical constraints apply too. The kernel targets Hopper specifically, so it does not carry over directly to Blackwell, which has native FP4 support. Anyone running smaller batches will see little change, because the results at batch 1 are level with FP8. The biggest wins appear at batch 8 and above, where the memory traffic saved by the smaller cache starts to dominate the step time.

What it means for inference teams

Teams serving long contexts on H100 or H200 hardware are often limited by KV cache size rather than compute. A cache that is half the size and no slower than FP8 means more concurrent requests per GPU. For workloads with heavy prefill, the 7% slowdown may cancel part of that benefit, so it is worth measuring on real traffic.

The results come from the authors’ own tests on one GPU type. The paper was submitted on 23 November 2026. Whether the kernel lands in vLLM or other serving engines is not stated.

Source: arXiv.org

Written by

Saksham Bhargava

Saksham Bhargava runs Alteroid and has been writing about consumer technology for over five years, covering iPhone, Android, Windows, AI tools and gaming. With an MCA and six years of hands-on web development experience, he tests the features he writes about on his own devices and focuses on clear, practical guides that solve real problems. Away from the screen, he enjoys travelling to places most tourists skip.