KV-Cache Compression
Definition
KV-Cache Compression is a set of techniques aimed at reducing the memory footprint of the KV-Cache. The KV-cache stores keys and values of attention for all previous tokens, which limits the context length and increases Inference Latency.
Main Approaches
| Approach | Description |
|---|---|
| KV-Cache Eviction | Removal of the least important tokens from the cache |
| KV-Cache Quantization | Reduction of the precision of key and value storage |
| Lossy Compression | Application of low-rank approximations to the cache |
| Token Merging | Combination of neighboring keys and values |
Benefits
- Increased effective context length
- Reduced requirements for VRAM
- Increased Throughput
- Reduced Time to First Token