ADKV: A Low-Overhead Adaptive Delta Quantization for KV Cache in LLM Inference
Honghao Jia ⋅ Zhenxing Li ⋅ Jialiang Guo ⋅ Jiacheng Gan
Abstract
The KV cache is a major memory bottleneck in LLM inference, especially under large batch sizes and long contexts. While quantization is a promising solution, existing static per-group quantization methods are constrained by a trade-off between metadata overhead and accuracy: increasing the group size reduces group-wise metadata (e.g., zero points, scaling factors, and outlier indices), but exacerbates quantization error under the sinusoidal-like temporal drift of post-RoPE outlier channels; conversely, using smaller groups improves accuracy but incurs substantial metadata overhead. In this paper, we propose **ADKV**, a low-overhead adaptive delta quantization framework for KV cache in LLM inference, which leverages the temporal structure of the KV cache. ADKV tracks channel-wise zero points and scaling factors online via EMA, adapting to the sinusoidal-like temporal drift, thereby eliminating the rigidity of static per-group quantization. This adaptive mechanism further enables delta coding to embed metadata implicitly into the quantized sequence, decoupling metadata overhead from context length. To minimize the MSE of attention outputs, we design an SGD-based calibration algorithm that models ADKV as a recurrent computation graph. Experiments on generation and long-context benchmarks demonstrate that ADKV reduces total KV cache memory by $5.87$-$19.99$% and quantization metadata memory by $99.76$-$99.94$% compared to the static per-group quantization baselines, while maintaining comparable accuracy. On an NVIDIA L40 ($48$GB) GPU, a custom fused ADKV-GEMV CUDA kernel optimized for memory-bound autoregressive decoding achieves a $2\times$ larger maximum feasible batch size, and $1.53\times$ end-to-end throughput gain at a batch size of $128$ over the baselines. Code: [github.com/LoveLonelyTime/ADKV](https://github.com/LoveLonelyTime/ADKV)
Successful Page Load