Optimizing Inference for Long Context and Large Batch Sizes with NVFP4 KV Cache

AI-generated summary of reporting by NVIDIA Developer Blog. Read the original for the full story.

Why it matters

Teams running long-context LLM inference on Blackwell GPUs can halve KV cache memory for under 1% accuracy loss, freeing budget for bigger batches and longer sequences.

Read this as

AI models keep a 'KV cache', a memory record of previous text tokens, so they don't have to recompute them for every new word generated. This cache eats enormous memory. NVIDIA's new NVFP4 format shrinks that cache by half compared with the previous standard, letting models handle twice as much context or serve more users at once. Accuracy drops less than 1% on tests like MMLU-PRO and LiveCodeBench.

For companies serving large language models at scale, KV cache memory is a major cost bottleneck. NVIDIA's NVFP4 cuts it 50% versus FP8, effectively doubling context budgets, with under 1% accuracy loss on benchmarks including MMLU-PRO and Ruler 64K. Tests on Qwen3-Coder-480B showed up to 3x better time-to-first-token latency via higher cache-hit rates. Adoption requires Blackwell GPUs and TensorRT Model Optimizer; it beats rival MXFP4 by 5% on MMLU for Llama 3.3 70B.

NVFP4 KV cache quantization compresses K/V tensors from 16-bit to 4-bit, dequantizing to FP8 before attention math. Versus FP8 it halves cache footprint, doubles context budget, raises cache-hit rates ~20%, and cuts TTFT up to 3x (Qwen3-Coder-480B-A35B testing). Accuracy loss is under 1% versus BF16/FP8 on LiveCodeBench, MMLU-PRO, MBPP and Ruler 64K. NVFP4 outperforms MXFP4 by 5% MMLU on Llama 3.3 70B, attributed to granular block scaling and E4M3 scaling factors. Enable via TensorRT Model Optimizer's mtq.quantize with NVFP4_KV_CFG for PTQ or QAT.

Read the original

This summary exists to save you time, not to replace the source.

Key terms

NVIDIA TensorRT Model Optimizer Blackwell NVLink Dynamo NVFP4

Was this summary useful?

One click, anonymous. It tells us which summaries to re-run.

Related reading