ADKV: A Low-Overhead Adaptive Delta Quantization for KV Cache in LLM Inference
Honghao Jia, Zhenxing Li, Jialiang Guo, Jiacheng Gan
NeurIPS page · OpenReview · Open on the map
Category: Efficient LLM Inference & Training › KV Cache Quantization Compression · Type: new method · Keywords: KV cache quantization, adaptive delta coding, LLM inference efficiency, metadata reduction, CUDA kernel optimization
Areas: Memory › Model Memory Optimization › KV Cache Optimization; Long Context › Long-context mechanisms › KV cache eviction
Summary
ADKV introduces a low-overhead adaptive delta quantization framework for LLM KV cache that tracks per-channel statistics via online EMA and uses delta coding to embed metadata, reducing metadata memory footprint by ~12.8× while matching static quantization accuracy.
Explained to a 5-year-old
Large language models need to remember things while talking, which takes a lot of memory. The paper finds a way to shrink that memory by using a smart method that changes a little over time. It hides extra information inside the memory itself so it doesn't need extra space. This helps the models run faster and use less memory. Because of this, the models can answer more questions without slowing down.
Explained to a 5-year-old, longer
When a big computer talks like a person, it has to keep a lot of notes about what it said before. These notes are called the KV cache and take up a lot of space in the computer's memory. The paper wants to make these notes smaller so the computer can work faster. It looks at how the notes change over time and notices they follow a smooth pattern. The method keeps track of a few numbers that describe the notes and updates them slowly. Instead of storing extra information separately, it hides that information inside the notes themselves. This way, the extra data does not need extra memory space. The method also uses a simple learning step to make sure the hidden information is accurate. As a result, the computer uses much less memory while keeping the same quality of answers. The faster memory usage lets the computer handle more questions at once. It also helps when the computer needs to remember long conversations. Overall, the idea makes big language models more efficient and easier to run on regular computers.
For a technical reader
The paper addresses the memory bottleneck of the key-value (KV) cache used during large language model inference, where storing per-token keys and values consumes significant GPU memory. It proposes an adaptive delta quantization scheme that continuously updates per-channel scaling and zero-point parameters using an exponential moving average, allowing the quantization to follow the natural drift of the cache over time. By encoding these parameters directly into the quantized sequence via delta coding, the approach eliminates separate metadata buffers, dramatically reducing overhead as context length grows. The authors also provide an SGD-based calibration algorithm that models the quantization as an RNN to minimize attention output error. Finally, a custom fused kernel optimized for memory-bound autoregressive generation yields roughly 1.96× throughput compared to the FP16 baseline.
Problem
Quantizing the KV cache in large language model inference involves a trade-off between metadata overhead and accuracy. Static group-wise quantization either uses large groups (low overhead but high quantization error due to temporal drift) or small groups (high accuracy but high metadata overhead), making it challenging to efficiently compress KV cache while preserving performance.
Method
The approach leverages the temporal structure of the KV cache by tracking per-channel zero-points and scaling factors with an online exponential moving average, adapting to sinusoidal-like drift. It employs delta coding to embed these statistics directly into the quantized sequence, decoupling metadata overhead from context length. An SGD-based calibration algorithm models the quantization as an RNN to minimize the mean-squared error of attention outputs.
Results
The approach reduces the metadata memory footprint by approximately 12.8× while matching the accuracy of static group-wise quantization. A custom fused kernel for the approach achieves about 1.96× throughput over the FP16 baseline.
Contributions
It introduces an adaptive quantization mechanism that tracks per-channel statistics online and uses delta coding to embed metadata, eliminating the rigidity of static group-wise quantization. It also provides an SGD-based calibration algorithm and a fused kernel optimized for memory-bound autoregressive generation.
Practical relevance
This work enables more memory-efficient LLM inference, allowing larger batches and longer contexts on existing hardware.
Research questions this paper is counted under
This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction