How much does FP8 KV cache help, what does it cost and what is KIVI?
Quantizing the KV cache is the second big lever (after weight quantization) for serving long-context. Quantify what FP8 KV cache buys you, explain the calibration cost, and describe how KIVI pushes the trade further. When does KV-cache quant cause noticeable quality regressions?
FP8 KV cache halves cache bytes and bandwidth, roughly doubling batch size. KIVI pushes to 2 bits via per-channel K and per-token V scales, with quality risk on long-context retrieval.
Imagine a giant warehouse of notes the model rereads to write each new word. The notes are stored at high precision, which eats space and slows every read. Quantizing the cache is like writing the notes in shorthand: each note takes half the room, so you can hold twice as many conversations at once, and reading them is faster too. The catch is that shorthand loses detail. For casual notes that is fine. But if a note records an exact number, a variable name, or a precise fact buried deep in a long document, the shorthand might blur it. The model then struggles to tell two similar past notes apart, and the answer drifts on tasks where exact recall matters.
Detailed answer & concept explanation~8 min readEverything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
4 min: FP8 savings (memory plus bandwidth), then batch size, then calibration scales, then the KIVI 2-bit asymmetric scheme and recent-token window, then failure modes on long-context retrieval and code.
Real products, models, and research that use this idea.
- vLLM ships FP8 KV cache as a flag, letting operators trade a small quality check for roughly double the concurrent requests on long-context workloads.
- TensorRT-LLM (NVIDIA) exposes FP8 and INT8 KV cache with calibration on H100 and B200, pairing it with paged attention for production decode.
- KIVI demonstrated 2-bit KV cache with per-channel K and per-token V scales, reporting near-lossless quality on most LLM benchmarks.
- DeepSeek V4 combines Multi-head Latent Attention with low-precision KV storage so 128k-context serving stays within HBM budget.
- SGLang serving Llama 4 supports quantized KV alongside prefix sharing to keep long shared system prompts cheap across batched requests.
What an interviewer would ask next. Try answering before peeking at the approach.
QWhy do keys prefer per-channel scaling while values prefer per-token scaling?
QWhy does KIVI keep a window of recent tokens in full precision?
Don't say thisRed flags and common mistakes that signal junior thinking. Click to expand.
Red flags and common mistakes that signal junior thinking. Click to expand.
Claiming KV quant saves only memory. It also halves the bandwidth read per decode step, which is the actual bottleneck, and the freed memory converts directly into bigger batches and higher throughput.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.
Same topic, related formats. Practice these next.