Nearly Optimal Attention Coresets

Liberty, Edo, Andoni, Alexandr, Kleiner, Eldar

–arXiv.org Artificial Intelligence 

Each attention head typically retains a large KV-cache (set of keys and values), that serves as the working memory and context of the model during generation [41, 37]. As context windows grew, the size of this cache become one of the dominant bottlenecks of deploying large language models [27, 39, 19, 32, 42]. Compressing KV-caches is therefore a central problem for the practical deployment of long-context models. There has already been substantial effort in this direction (see Section 1.1 for further related work). We study the question of optimal KV-cache compression with error guarantees.