Share from 0:00
0:00
/

"More Tokens, Lower Precision: Towards the Optimal Token-Precision Trade-off in KV Cache Compression"

Generated below podcast on this paper with Google's Illuminate.

Cut KV cache memory by 75% while keeping 97% performance through smarter compression.

Less bits per token means more tokens in memory.

The paper introduces a novel KV cache compression method that balances token count and numerical precision, achieving better performance while using less memory.

-----

https://arxiv.org/abs/2412.12706

Original Problem 🎯:

β†’ As LLMs handle longer contexts, KV cache memory usage becomes a major bottleneck during inference, requiring about 20GB for processing 100k tokens

β†’ Current compression methods focus on either reducing tokens or lowering precision, but not both together

-----

Solution in this Paper πŸ”§:

β†’ The paper proposes "quantized pruning" that combines token pruning with precision reduction

β†’ Instead of storing fewer tokens at high precision (16-bit), it stores more tokens at lower precision (4-bit)

β†’ It leverages both KV pruning methods to select important tokens and quantization techniques to reduce precision

β†’ The solution maintains performance while significantly reducing memory usage

-----

Key Insights πŸ”:

β†’ 4-bit precision with 4x tokens outperforms 16-bit precision with 1x tokens

β†’ Lower precision storage works particularly well for retrieval-heavy tasks

β†’ The approach remains stable across different model scales and architectures

β†’ Middle transformer layers benefit more from having more tokens than high precision

-----

Results πŸ“Š:

β†’ Achieves 82.2% accuracy on RULER-8k task using 4-bit precision (vs 67.5% with 16-bit)

β†’ Maintains 97% performance while reducing KV cache size by 75%

β†’ Shows consistent improvements across Llama-3 and Mistral-7B models

Discussion about this video

User's avatar

Ready for more?