Abstract
Long-context LLM decoding reads the key–value (KV) cache at every step. Loading it takes longer than computing attention over it, so throughput is bandwidth-bound. Hence, reducing the cache size can raise both decoding speed and serving capacity. The challenge is to reduce cache size while preserving the attention products, keeping reconstruction cheap, and using a fixed per-token bit count. At two bits per element, the most competitive methods rely on orthogonal transforms. However, existing techniques are either data-oblivious or use the query statistics without deriving the transform from a distortion criterion. Moreover, they rely on transforms built on top of random or Hadamard rotations, which equalize variances across entries rather than compacting energy, and fixed-width scalar quantizers, which are suboptimal at low rates. In this paper, we formulate KV cache quantization as a transform coding problem in which distortion is the error in the attention products. We derive closed-form optimal transforms for keys and values from calibration statistics, under a high-resolution model. We show that the optimal key transform is not orthogonal and satisfies a generalized Parseval relation: the attention-aware distortion becomes mean-squared error (MSE) in the transform domain. Thus, we can use MSE-optimal vector quantizers applied directly to the transformed key coefficients. To meet the fixed-width layout requirement, we show that grouping coefficients into equal-volume partitions makes equal-size codebooks attain the variable-rate optimum under the same high-resolution model. At two bits per element, our method, termed NOVA-KV, recovers most of the long-context retrieval accuracy lost by scalar quantization methods at comparable throughput. The margin is widest on hybrid-attention mixture-of-experts models: on GPT-OSS-20B, prior two-bit transforms collapse at every context length, while NOVA-KV remains effective.
KV cache quantization
A transformer caches one key and one value vector per token, per layer, per head. This cache grows with context length and with batch size, and every decoding step must read all of it from memory. Modern kernels compute attention faster than the cache can be loaded, so once the context is long, the cache becomes the bottleneck.
Three requirements
Three requirements constrain the design of KV cache compressors.
We pose the problem as transform coding with the attention-product error as the distortion. This gives an optimal transform, and that transform is not a rotation.
What's wrong with MSE?
Standard quantizers minimize the error in the stored keys and values. Keys are read through the key–query inner product. Two reconstructions with identical MSE can distort the attention logits by very different amounts, depending on whether their error lands in directions the queries look along.
Transform coding and VQ for the attention products
Results
(OSCAR: 25.3)
reasoning & code
Long-context retrieval
On Qwen3-8B the scalar baselines collapse as context grows, while NOVA-KV tracks the uncompressed reference:
| Method | BPE | 8K | 32K | 64K | 128K |
|---|---|---|---|---|---|
| BF16 (uncompressed) | 16 | 99.9 | 98.5 | 84.3 | 83.4 |
| QuaRot | 2.25 | 54.8 | 23.5 | 0.0 | 0.0 |
| OSCAR | 2.28 | 96.7 | 86.9 | 60.6 | 25.3 |
| NOVA-KV (ours) | 2.22 | 99.4 | 96.0 | 76.4 | 75.4 |
RULER NIAH mean accuracy (%), Qwen3-8B.
Throughput
A smaller cache leads to faster decoding. We measure decode throughput in SGLang, excluding time to first token.
Robustness across architectures
The gap widens on models where orthogonal transforms struggle. On GPT-OSS-20B, NOVA-KV preserves most of the BF16 accuracy on every generation benchmark (mean 72.4 against 76.5). Across all four models tested, NOVA-KV stays close to BF16 while the robustness of the orthogonal-transform baselines varies considerably.