Lune

ICML2025Top-tier venue

SpeCache: Speculative Key-Value Caching for Efficient Generation of LLMs

Shibo Jie, Yehui Tang, Kai Han, Zhi-Hong Deng, Jing Han

Abstract

Transformer-based large language models (LLMs) have already achieved remarkable results on longtext tasks, but the limited GPU memory (VRAM) resources struggle to accommodate the linearly growing demand for key-value (KV) cache as the sequence length increases, which has become a bottleneck for the application of LLMs on long sequences. Existing KV cache compression methods include eviction, merging, or quantization of the KV cache to reduce its size. However, compression results in irreversible information forgetting, potentially affecting the accuracy of subsequent decoding. In this paper, we propose SPECACHE, which takes full advantage of the large and easily expandable CPU memory to offload the complete KV cache, and dynamically fetches KV pairs back in each decoding step based on their importance measured by low-bit KV cache copy in VRAM. To avoid inference latency caused by CPU-GPU communication, SPECACHE speculatively predicts the KV pairs that the next token might attend to, allowing us to prefetch them before the next decoding step which enables parallelization of prefetching and computation. Experiments on LongBench and Needlein-a-Haystack benchmarks verify that SPECACHE effectively reduces VRAM usage while avoiding information forgetting for long sequences without re-training, even with a 10× high KV cache compression ratio.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

2 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Efficient Streaming Language Models with Attention Sinks cites H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models
  • H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models cites Efficient Streaming Language Models with Attention Sinks
  • H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models cites Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
  • Efficient Low Rank Attention for Long-Context Inference in Large Language Models cites Efficient Streaming Language Models with Attention Sinks
  • Efficient Low Rank Attention for Long-Context Inference in Large Language Models cites H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models
  • Attention with Routed-Memory for Learnable Sparse Control cites Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
  • Attention with Routed-Memory for Learnable Sparse Control cites Efficient Streaming Language Models with Attention Sinks
  • Attention with Routed-Memory for Learnable Sparse Control cites H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models
  • Attention with Routed-Memory for Learnable Sparse Control cites Efficient Low Rank Attention for Long-Context Inference in Large Language Models
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers2

  1. Efficient Low Rank Attention for Long-Context Inference in Large Language ModelsTenghui Li, Guoxu Zhou, Xuyang Zhao, Yuning Qiu et al.NeurIPS 2025 · 4 citations
  2. Attention with Routed-Memory for Learnable Sparse ControlQIUHAO Zeng, Jerry Huang, Peng Lu, Ruiyi Fang et al.ICML 2026

Builds on17

  1. Transformers are RNNs: Fast Autoregressive Transformers with Linear AttentionAngelos Katharopoulos, Apoorv Vyas, Nikolaos Pappas, François FleuretICML 2020 · 2,665 citations
  2. Efficient Streaming Language Models with Attention SinksGuangxuan Xiao, Yuandong Tian, Beidi Chen, Song Han et al.ICLR 2024 · 1,714 citations
  3. Fast Inference from Transformers via Speculative DecodingYaniv Leviathan, Matan Kalman, Yossi MatiasICML 2023 · 1,472 citations
  4. Efficient Memory Management for Large Language Model Serving with PagedAttentionWoosuk Kwon, Zhuohan Li, Siyuan Zhuang, Ying Sheng et al.SOSP 2023 · 1,016 citations
  5. H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language ModelsZhenyu Zhang, Ying Sheng, Tianyi Zhou, Tianlong Chen et al.NeurIPS 2023 · 1,003 citations

Related papers

  1. Draft-based Approximate Inference for LLMsKevin Galim, Ethan Ewer, Wonjun Kang, Minjae Lee et al.ICLR 2026 · 5 citations
  2. IndexMem: Learned KV-Cache Eviction with Latent Memory for Long-Context LLM InferenceXintong Yang, Hao Gu, Binxing Xu, Lujun Li et al.ICML 2026 · 2 citations
  3. RocketKV: Accelerating Long-Context LLM Inference via Two-Stage KV Cache CompressionPayman Behnam, Yaosheng Fu, Ritchie Zhao, Po-An Tsai et al.ICML 2025
  4. Lookahead Q-Cache: Achieving More Consistent KV Cache Eviction via Pseudo QueryYixuan Wang, Shiyu Ji, Yijun Liu, Yuzhuang Xu et al.EMNLP 2025
  5. FAEDKV: Infinite-Window Fourier Transform for Unbiased KV Cache CompressionRunchao Li, Yao Fu, Mu Sheng, Xianxuan Long et al.EMNLP Findings 2025
Dusk over the sea between two cliffs drawn in fine vertical lines