AutoCache: agentic search for LLM prefix cache compression
TL;DR. A serving system stores the computed state of shared prompt prefixes so it can skip prefill (the pass that reads the prompt) next time. That store is limited, so entries get evicted and recomputed. AutoCache lets an agent search over compression and reconstruction programs for a given model, dataset and accuracy target. On RULER (a long-context recall benchmark) at 32K with Qwen3.5-9B it reports 291.1x KV-cache compression against 16.0x for the strongest baseline it evaluated, by composing factorization, quantization, entropy coding and protection of high-saliency entries. It also compresses the recurrent states of hybrid models, using a low-rank structure it found in them, for 222.6x on the total cache footprint.
flowchart LR
I["Model + data<br/><small>plus accuracy target</small>"] --> A["Search agent<br/><small>writes recipes</small>"]
A --> R["Recipe<br/><small>factor, quantize, entropy code</small>"]
R --> E["Evaluate<br/><small>accuracy and size</small>"]
E -->|refine| A
E -->|passes| P["Prefix store<br/><small>far smaller entries</small>"]
P --> D["Reconstruct<br/><small>on cache hit</small>"]
classDef input fill:#d0ebff,stroke:#1971c2,color:#1b1b1b,stroke-width:2px
classDef core fill:#e5dbff,stroke:#6741d9,color:#1b1b1b,stroke-width:2px
classDef loop fill:#fff3bf,stroke:#f08c00,color:#1b1b1b,stroke-width:2px
classDef exit fill:#d3f9d8,stroke:#2f9e44,color:#1b1b1b,stroke-width:2px
class I input
class A,R core
class E loop
class P,D exit
linkStyle 3 stroke:#f08c00,stroke-width:2px
linkStyle 4 stroke:#2f9e44,stroke-width:2px
Key points
- Storage compression, not compute compression. The target is the prefix store, so a recipe can afford a reconstruction step that would be too slow inside the attention loop.
- Composition is the result: factorization + quantization + entropy coding + keeping salient entries exact.
- Hybrid models: recurrent states turn out to be low-rank, which AutoCache exploits.
Gaps
- Abstract-level read only. Reconstruction latency against plain recompute, results beyond RULER 32K, and how well a recipe transfers across workloads are not stated there.
- An agent searching against one benchmark can overfit to it.
Relation to prior wiki
- Complements SealKV: SealKV compresses the live decode cache 6.6x at 2 bits and reads it in registers; AutoCache compresses the stored cache far harder and rebuilds on hit. Different tiers, different latency budgets.
- Extends the harness-searches-for-algorithms thread (Sakana's evolved least-squares solvers, same window).
- Concept page: kv-cache.
Source: arXiv 2612.03651 · raw: raw/kurate/2026-12-04-cs-ai.md