计算机科学 > 机器学习
[提交于 2026年2月18日 (v1),最后修订于 2026年5月26日 (此版本, v2)]
标题:Fast KV Compaction via Attention Matching
查看中文 PDF 查看原文 PDF EasyResearch 阅读摘要: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, we develop a family of methods that significantly push the Pareto frontier of compaction time versus quality, achieving up to 50x compaction in seconds on some datasets with little quality loss.
提交历史
来自:Adam Zweiger[v1] 2026年2月18日 星期三 09:06:53 UTC (348 KB)
[v2] 2026年5月26日 星期二 20:24:41 UTC (413 KB)