Fast KV Compaction via Attention Matching
Adam Zweiger, Xinghong Fu, Han Guo, Yoon Kim

TL;DR
This paper introduces a fast method for compacting key-value caches in language models using Attention Matching, enabling significant compression with minimal quality loss and much faster processing than previous approaches.
Contribution
It presents a novel, efficient approach for latent space KV cache compaction via Attention Matching, improving speed and maintaining performance.
Findings
Achieves up to 50x compaction in seconds.
Maintains high attention fidelity with minimal quality loss.
Decomposes the problem into simple, solvable subproblems.
Abstract
Scaling language models to long contexts is often bottlenecked by the size of the key-value (KV) cache. In deployed settings, long contexts are typically managed through compaction in token space via summarization. However, summarization can be highly lossy, substantially harming downstream performance. Recent work on Cartridges has shown that it is possible to train highly compact KV caches in latent space that closely match full-context performance, but at the cost of slow and expensive end-to-end optimization. This work describes an approach for fast context compaction in latent space through Attention Matching, which constructs compact keys and values to reproduce attention outputs and preserve attention mass at a per-KV-head level. We show that this formulation naturally decomposes into simple subproblems, some of which admit efficient closed-form solutions. Within this framework,…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsNatural Language Processing Techniques · Big Data and Digital Economy · Parallel Computing and Optimization Techniques
