KV-COBRA: KV Cache Compression via Co-Optimized Bit-Rank Allocation
Sihyeon Ha, Jaeho Lee, Yo-Seb Jeon
NeurIPS page · OpenReview · alphaXiv · Open on the map
Category: Efficient LLM Inference & Training › Low-Precision LLM Inference · Type: new method · Keywords: KV cache compression, attention head optimization, low-rank approximation, quantization, resource allocation
Summary
KV-COBRA co-optimizes rank truncation and quantization per attention head to achieve superior KV-cache compression at extreme bit-rates.
Explained to a 5-year-old
Computers that read and write lots of words need to remember some information while they work. This memory is called the KV cache, and it can be made smaller to make the computer faster. The current way to shrink it treats all parts the same, which wastes space. The new idea looks at each part separately and decides how much to shrink each one. This helps keep the computer fast while losing less of the important information.
Explained to a 5-year-old, longer
When a big computer program reads many words, it stores some of the information in a special place called the KV cache to help it remember what it has seen. To make the program run faster, we want this cache to use as little memory as possible. The usual method for making the cache smaller just cuts down the size of everything equally, but that isn’t always the best way because different parts of the cache are more important than others. The new technique looks at each part of the cache individually and figures out how much it can shrink each part without losing too much of the important details. It does this by balancing two kinds of shrinkage: one that removes some of the information (rank truncation) and another that makes the numbers use fewer bits (quantization). By giving each part just the right amount of shrinkage, the cache stays small while keeping the program’s accuracy high. The method also uses a special rotation to make the numbers more evenly spread out and reorders the storage order so that the most important information is kept in the most accessible spots. This idea works not only for the key part of the cache but also for the value part together, making the whole system even more efficient.
For a technical reader
The paper addresses the inefficiency of uniform rank and bit-width allocation in KV-cache compression. It proposes a per-head resource-allocation formulation that balances truncation and quantization losses, redistributing the budget to minimize overall distortion. A fused Hadamard rotation equalizes channel variance, and the SVD basis is reordered using attention-KL importance to make the allocation query-aware. The allocator is extended to jointly compress keys and values, achieving the smallest accuracy loss at low bit-rates without extra per-token overhead.
Problem
Compressing KV caches at very low bit-rates is limited not by the compression scheme but by how the compression budget is allocated across attention heads. Existing methods apply the same rank and bit-width to all heads, ignoring that each head has a different optimal mix of truncation and quantization.
Method
The approach treats compression as a per-head resource-allocation problem, balancing rank-truncation loss against quantization loss and redistributing the budget across heads to minimize total distortion. It employs a fused Hadamard rotation to equalize channel variance and reorders the SVD basis by attention-KL importance to make the allocation query-aware. The same allocator is extended to compress both key and value caches jointly.
Results
On perplexity, zero-shot, and long-context benchmarks ranging from 0.5 to 4 bits per dimension, the approach suffers the smallest accuracy degradation among evaluated methods at low bit-rates and incurs no per-token overhead.
Contributions
It reveals that uniform rank/bit-width allocation is suboptimal and introduces a per-head co-optimization of rank and quantization formalized as a resource-allocation problem, incorporating a fused Hadamard rotation and query-aware SVD reordering, and extending to joint K+V compression.
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