USENIX ATC2024顶会
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
摘要
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 for multi-turn conversations, and reduces the end-to-end inference cost by up to 70%.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 54 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Efficient Streaming Language Models with Attention Sinks 引用了 PIQA: Reasoning about Physical Commonsense in Natural Language
- Measuring Massive Multitask Language Understanding 引用了 PIQA: Reasoning about Physical Commonsense in Natural Language
- IMPRESS: An Importance-Informed Multi-Tier Prefix KV Storage System for Large Language Model Inference 引用了 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 引用了 SGLang: Efficient Execution of Structured Language Model Programs
- CacheGen: KV Cache Compression and Streaming for Fast Large Language Model Serving 引用了 PIQA: Reasoning about Physical Commonsense in Natural Language
- CacheGen: KV Cache Compression and Streaming for Fast Large Language Model Serving 引用了 SGLang: Efficient Execution of Structured Language Model Programs
- Mooncake: Trading More Storage for Less Computation - A KVCache-centric Architecture for Serving LLM Chatbot 引用了 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 引用了 SGLang: Efficient Execution of Structured Language Model Programs
- KVFlow: Efficient Prefix Caching for Accelerating LLM-Based Multi-Agent Workflows 引用了 Efficient Streaming Language Models with Attention Sinks
- KVFlow: Efficient Prefix Caching for Accelerating LLM-Based Multi-Agent Workflows 引用了 SGLang: Efficient Execution of Structured Language Model Programs
- KVCache Cache in the Wild: Characterizing and Optimizing KVCache Cache at a Large Cloud Provider 引用了 Efficient Streaming Language Models with Attention Sinks
- KVCache Cache in the Wild: Characterizing and Optimizing KVCache Cache at a Large Cloud Provider 引用了 CacheGen: KV Cache Compression and Streaming for Fast Large Language Model Serving
- SGLang: Efficient Execution of Structured Language Model Programs 引用了 Measuring Massive Multitask Language Understanding
引用它的顶会 Paper54
- Mooncake: Trading More Storage for Less Computation - A KVCache-centric Architecture for Serving LLM ChatbotRuoyu Qin, Zheming Li, Weiran He, Jialei Cui 等FAST 2025 · 337 次引用
- CacheGen: KV Cache Compression and Streaming for Fast Large Language Model ServingYuhan Liu, Hanchen Li, Yihua Cheng, Siddhant Ray 等SIGCOMM 2024 · 111 次引用
- KVFlow: Efficient Prefix Caching for Accelerating LLM-Based Multi-Agent WorkflowsZaifeng Pan, Ajjkumar Patel, Yipeng Shen, Zhengding Hu 等NeurIPS 2025 · 77 次引用
- KVCache Cache in the Wild: Characterizing and Optimizing KVCache Cache at a Large Cloud ProviderJiahao Wang, Jinbo Han, Xingda Wei, Sijie Shen 等USENIX ATC 2025 · 70 次引用
- IMPRESS: An Importance-Informed Multi-Tier Prefix KV Storage System for Large Language Model InferenceWeijian Chen, Shuibing He, Haoyang Qu, Ruidong Zhang 等FAST 2025 · 40 次引用
它引用的 Paper25
- Measuring Massive Multitask Language UnderstandingDan Hendrycks, Collin Burns, Steven Basart, Andy Zou 等ICLR 2021 · 7,905 次引用
- PIQA: Reasoning about Physical Commonsense in Natural LanguageYonatan Bisk, Rowan Zellers, Ronan Le Bras, Jianfeng Gao 等AAAI 2020 · 2,916 次引用
- Transformer in TransformerKai Han, An Xiao, Enhua Wu, Jianyuan Guo 等NeurIPS 2021 · 2,148 次引用
- Efficient Streaming Language Models with Attention SinksGuangxuan Xiao, Yuandong Tian, Beidi Chen, Song Han 等ICLR 2024 · 1,714 次引用
- SGLang: Efficient Execution of Structured Language Model ProgramsLianmin Zheng, Liangsheng Yin, Zhiqiang Xie, Chuyue Sun 等NeurIPS 2024 · 1,586 次引用
相关 Paper
- LazyAttention: Efficient Retrieval-Augmented Generation with Deferred Positional EncodingHaocheng Xia, Mihir Pamnani, Hanxi Fang, Supawit Chockchowwat 等ICML 2026
- Stateful Large Language Model Serving with PensieveLingfan Yu, Jinkun Lin, Jinyang LiEuroSys 2025 · 23 次引用
- ChunkAttention: Efficient Self-Attention with Prefix-Aware KV Cache and Two-Phase PartitionLu Ye, Ze Tao, Yong Huang, Yang LiACL 2024
- Layer-Condensed KV Cache for Efficient Inference of Large Language ModelsHaoyi Wu, Kewei TuACL 2024
- Accelerating LLM Serving for Multi-turn Dialogues with Efficient Resource ManagementJinwoo Jeong, Jeongseob AhnASPLOS 2025 · 6 次引用
