Pith. sign in

REVIEW 5 cited by

Cache Me If You Can: How Many KVs Do You Need for Effective Long-Context LMs?

Not yet reviewed by Pith; the record is open.

This paper has not been read by Pith yet. Machine review is queued; the pith claim, tier, and objections will appear here once it completes.

SPECIMEN: schema-true, not a live event

T0 review · schema-true

One-sentence machine reading of the paper's core claim.

pith:XXXXXXXX · record.json · timestamp

arxiv 2506.17121 v1 pith:VBGYU2E3 submitted 2025-06-20 cs.CL

Cache Me If You Can: How Many KVs Do You Need for Effective Long-Context LMs?

classification cs.CL
keywords methodsmemoryfootprintevictionlong-contextperformancecachehigh
verification ladder T0 review T1 audit T2 compute T3 formal T4 reserved
0 comments
Share X Bluesky LinkedIn Reddit HN
read the original abstract

Language models handle increasingly long contexts for tasks such as book summarization, but this leads to growing memory costs for the key-value (KV) cache. Many prior works have proposed ways of discarding KVs from memory, but their approaches are tailored to favorable settings, obscuring caveats like high peak memory and performance degradation, and a fair comparison between methods is difficult. In this paper, we propose the *KV footprint* as a unified metric, which accounts for both the amount of KV entries stored and their lifespan in memory. We evaluate methods based on the smallest footprint they attain while preserving performance in both long-context understanding and generation, with context lengths of up to 128K tokens. This metric reveals the high peak memory of prior KV eviction methods. One class of methods -- *post-fill eviction* -- has a high footprint due to being incompatible with eviction during pre-filling. We adapt these methods to be able to evict KVs during pre-filling, achieving substantially lower KV footprints. We then turn to *recency eviction* methods, wherein we propose PruLong, an end-to-end optimization method for learning which attention heads need to retain the full KV cache and which do not. PruLong saves memory while preserving long-context performance, achieving 12% smaller KV footprint than prior methods while retaining performance in challenging recall tasks. Our paper clarifies the complex tangle of long-context inference methods and paves the way for future development to minimize the KV footprint.

discussion (0)

Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.

Forward citations

Cited by 5 Pith papers

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score.

  1. FlashAccel: Leveraging High-Bandwidth Flash for High-Throughput LLM Inference

    cs.AR 2026-07 conditional novelty 7.0

    Six HBF stacks plus FlashAccel co-design deliver 2.54× decode throughput and 1.93× energy efficiency per GPU versus HBM-only under a 100 ms latency constraint.

  2. Scaling LLM Inference Beyond Amdahl`s Limits via Eliminating Non-Scalable Overheads

    cs.DC 2026-06 unverdicted novelty 6.0

    Albireo overlaps non-scalable overheads with compute in tensor-parallel LLM inference to raise the empirical optimal TP degree, delivering up to 1.9x throughput and 48% lower latency versus vLLM.

  3. Which Heads Matter for Reasoning? RL-Guided KV Cache Compression

    cs.CL 2025-10 conditional novelty 6.0

    A small set of "reasoning heads" found by RL can keep full KV cache while other heads are compressed to a constant size, giving 20–50% cache savings with near-lossless accuracy.

  4. MachineLearningLM: Scaling Many-shot In-context Learning via Continued Pretraining

    cs.CL 2025-09 unverdicted novelty 6.0

    MachineLearningLM uses continued pretraining on SCM-synthesized ML tasks with random-forest distillation to give LLMs robust many-shot in-context learning on tabular classification, reaching random-forest accuracy lev...

  5. Flux Attention: Context-Aware Hybrid Attention for Efficient LLMs Inference

    cs.LG 2026-04 unverdicted novelty 5.0

    Flux Attention uses a context-aware Layer Router to dynamically assign full or sparse attention to each LLM layer, achieving up to 2.8x prefill and 2.0x decode speedups with competitive performance on long-context and...