Lune

USENIX ATC2024Top-tier venue

Cost-Efficient Large Language Model Serving for Multi-turn Conversations with CachedAttention

Bin Gao, Zhuomin He, Puru Sharma, Qingxuan Kang, Djordje Jevdjic, Junbo Deng, Xingkun Yang, Zhou Yu, Pengfei Zuo

Abstract

Interacting with humans through multi-turn conversations is a fundamental feature of large language models (LLMs). However, existing LLM serving engines executing multi-turn conversations are inefficient due to the need to repeatedly compute the key-value (KV) caches of historical tokens, incurring high serving costs. To address the problem, this paper proposes CachedAttention, a new attention mechanism that enables reuse of KV caches across multi-turn conversations, significantly reducing the repetitive computation overheads. CachedAttention maintains a hierarchical KV caching system that leverages cost-effective memory/storage mediums to save KV caches for all requests. To reduce KV cache access overheads from slow mediums, CachedAttention employs layer-wise pre-loading and asynchronous saving schemes to overlap the KV cache access with the GPU computation. To ensure that the KV caches to be accessed are placed in the fastest hierarchy, CachedAttention employs scheduler-aware fetching and eviction schemes to consciously place the KV caches in different layers based on the hints from the inference job scheduler. To avoid the invalidation of the saved KV caches incurred by context window overflow, CachedAttention enables the saved KV caches to remain valid via decoupling the positional encoding and effectively truncating the KV caches. Extensive experimental results demonstrate that CachedAttention significantly decreases the time to the first token (TTFT) by up to 87%, improves the prompt prefilling throughput by up to 7.8×\times for multi-turn conversations, and reduces the end-to-end inference cost by up to 70%.

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.

53 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 PIQA: Reasoning about Physical Commonsense in Natural Language
  • Measuring Massive Multitask Language Understanding cites PIQA: Reasoning about Physical Commonsense in Natural Language
  • IMPRESS: An Importance-Informed Multi-Tier Prefix KV Storage System for Large Language Model Inference cites CacheGen: KV Cache Compression and Streaming for Fast Large Language Model Serving
  • IMPRESS: An Importance-Informed Multi-Tier Prefix KV Storage System for Large Language Model Inference cites SGLang: Efficient Execution of Structured Language Model Programs
  • CacheGen: KV Cache Compression and Streaming for Fast Large Language Model Serving cites PIQA: Reasoning about Physical Commonsense in Natural Language
  • CacheGen: KV Cache Compression and Streaming for Fast Large Language Model Serving cites SGLang: Efficient Execution of Structured Language Model Programs
  • Mooncake: Trading More Storage for Less Computation - A KVCache-centric Architecture for Serving LLM Chatbot cites CacheGen: KV Cache Compression and Streaming for Fast Large Language Model Serving
  • Mooncake: Trading More Storage for Less Computation - A KVCache-centric Architecture for Serving LLM Chatbot cites SGLang: Efficient Execution of Structured Language Model Programs
  • KVFlow: Efficient Prefix Caching for Accelerating LLM-Based Multi-Agent Workflows cites Efficient Streaming Language Models with Attention Sinks
  • KVFlow: Efficient Prefix Caching for Accelerating LLM-Based Multi-Agent Workflows cites SGLang: Efficient Execution of Structured Language Model Programs
  • KVCache Cache in the Wild: Characterizing and Optimizing KVCache Cache at a Large Cloud Provider cites Efficient Streaming Language Models with Attention Sinks
  • KVCache Cache in the Wild: Characterizing and Optimizing KVCache Cache at a Large Cloud Provider cites CacheGen: KV Cache Compression and Streaming for Fast Large Language Model Serving
  • SGLang: Efficient Execution of Structured Language Model Programs cites Measuring Massive Multitask Language Understanding
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers53

  1. Mooncake: Trading More Storage for Less Computation - A KVCache-centric Architecture for Serving LLM ChatbotRuoyu Qin, Zheming Li, Weiran He, Jialei Cui et al.FAST 2025 · 337 citations
  2. CacheGen: KV Cache Compression and Streaming for Fast Large Language Model ServingYuhan Liu, Hanchen Li, Yihua Cheng, Siddhant Ray et al.SIGCOMM 2024 · 111 citations
  3. KVFlow: Efficient Prefix Caching for Accelerating LLM-Based Multi-Agent WorkflowsZaifeng Pan, Ajjkumar Patel, Yipeng Shen, Zhengding Hu et al.NeurIPS 2025 · 77 citations
  4. KVCache Cache in the Wild: Characterizing and Optimizing KVCache Cache at a Large Cloud ProviderJiahao Wang, Jinbo Han, Xingda Wei, Sijie Shen et al.USENIX ATC 2025 · 70 citations
  5. IMPRESS: An Importance-Informed Multi-Tier Prefix KV Storage System for Large Language Model InferenceWeijian Chen, Shuibing He, Haoyang Qu, Ruidong Zhang et al.FAST 2025 · 40 citations

Builds on25

  1. Measuring Massive Multitask Language UnderstandingDan Hendrycks, Collin Burns, Steven Basart, Andy Zou et al.ICLR 2021 · 7,905 citations
  2. PIQA: Reasoning about Physical Commonsense in Natural LanguageYonatan Bisk, Rowan Zellers, Ronan Le Bras, Jianfeng Gao et al.AAAI 2020 · 2,916 citations
  3. Transformer in TransformerKai Han, An Xiao, Enhua Wu, Jianyuan Guo et al.NeurIPS 2021 · 2,148 citations
  4. Efficient Streaming Language Models with Attention SinksGuangxuan Xiao, Yuandong Tian, Beidi Chen, Song Han et al.ICLR 2024 · 1,714 citations
  5. SGLang: Efficient Execution of Structured Language Model ProgramsLianmin Zheng, Liangsheng Yin, Zhiqiang Xie, Chuyue Sun et al.NeurIPS 2024 · 1,586 citations

Related papers

  1. LazyAttention: Efficient Retrieval-Augmented Generation with Deferred Positional EncodingHaocheng Xia, Mihir Pamnani, Hanxi Fang, Supawit Chockchowwat et al.ICML 2026
  2. Stateful Large Language Model Serving with PensieveLingfan Yu, Jinkun Lin, Jinyang LiEuroSys 2025 · 23 citations
  3. ChunkAttention: Efficient Self-Attention with Prefix-Aware KV Cache and Two-Phase PartitionLu Ye, Ze Tao, Yong Huang, Yang LiACL 2024
  4. Layer-Condensed KV Cache for Efficient Inference of Large Language ModelsHaoyi Wu, Kewei TuACL 2024
  5. Accelerating LLM Serving for Multi-turn Dialogues with Efficient Resource ManagementJinwoo Jeong, Jeongseob AhnASPLOS 2025 · 6 citations
Dusk over the sea between two cliffs drawn in fine vertical lines