Reproduce “A Simple and Effective $L_2$ Norm-Based Strategy for KV Cache Compression” on OpenResearch
Run Claude Code, Codex or any coding agent as a research agent: literature, hypotheses and experiments on your laptop, cluster or cloud GPUs.
Universal app for Apple silicon and Intel. Requires macOS 11 or later.
About this paper
Alessio Devoto, Yu Zhao, Simone Scardapane, Pasquale Minervini
Researchers from Sapienza University of Rome and The University of Edinburgh introduce a straightforward, L2 norm-based method to compress the Key-Value (KV) cache in large language models. This strategy reduces KV cache size by up to 90% in certain long-context tasks while maintaining model performance and ensuring compatibility with efficient attention mechanisms like FlashAttention.
Key insights
- An empirical correlation exists between the L2 norm of key embeddings in the KV cache and their corresponding attention scores, where low L2 norms frequently indicate high attention.
- This correlation varies across different layers and attention heads within Transformer models, suggesting that importance signals are not uniformly distributed.
- Low L2 norm keys may function as 'sink' tokens, exhibiting sparse, peaked activations that concentrate their influence and lead to disproportionately high attention scores.
Summary by alphaXiv.
Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.