Stateful Large Language Model Serving with Pensieve
Lingfan Yu, Jinkun Lin, Jinyang Li
摘要
Large Language Models (LLMs) are wildly popular today and it is important to serve them efficiently. Existing LLM serving systems are stateless across requests. Consequently, when LLMs are used in the common setting of multi-turn conversations, a growing log of the conversation history must be processed alongside any request by the serving system at each turn, resulting in repeated processing.
In this paper, we design 𝑃𝑒𝑛𝑠𝑖𝑒𝑣𝑒, a system optimized for multi-turn conversation LLM serving. 𝑃𝑒𝑛𝑠𝑖𝑒𝑣𝑒 maintains the conversation state across requests by caching previously processed history to avoid duplicate processing. 𝑃𝑒𝑛𝑠𝑖𝑒𝑣𝑒's multi-tier caching strategy can utilize both GPU and CPU memory to efficiently store and retrieve cached data. 𝑃𝑒𝑛𝑠𝑖𝑒𝑣𝑒 also generalizes the recent PagedAttention kernel to support attention between multiple input tokens with a GPU cache spread over non-contiguous memory. Our evaluation shows that 𝑃𝑒𝑛𝑠𝑖𝑒𝑣𝑒 can achieve 1.14-3.0× the throughput of vLLM and TensorRT-LLM and significantly reduce latency.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 28 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- LoRA: Low-Rank Adaptation of Large Language Models 引用了 Language Models are Few-Shot Learners
- QLoRA: Efficient Finetuning of Quantized LLMs 引用了 LoRA: Low-Rank Adaptation of Large Language Models
- FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness 引用了 Language Models are Few-Shot Learners
- Memory-R1: Enhancing Large Language Model Agents to Manage and Utilize Memories via Reinforcement Learning 引用了 Language Models are Few-Shot Learners
- KVFlow: Efficient Prefix Caching for Accelerating LLM-Based Multi-Agent Workflows 引用了 Cost-Efficient Large Language Model Serving for Multi-turn Conversations with CachedAttention
- 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 引用了 Cost-Efficient Large Language Model Serving for Multi-turn Conversations with CachedAttention
- Cost-Efficient Large Language Model Serving for Multi-turn Conversations with CachedAttention 引用了 SGLang: Efficient Execution of Structured Language Model Programs
- SGLang: Efficient Execution of Structured Language Model Programs 引用了 FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
- SGLang: Efficient Execution of Structured Language Model Programs 引用了 Language Models are Few-Shot Learners
- GEPA: Reflective Prompt Evolution Can Outperform Reinforcement Learning 引用了 LoRA: Low-Rank Adaptation of Large Language Models
- GEPA: Reflective Prompt Evolution Can Outperform Reinforcement Learning 引用了 SGLang: Efficient Execution of Structured Language Model Programs
引用它的顶会 Paper28
- GEPA: Reflective Prompt Evolution Can Outperform Reinforcement LearningLakshya A. Agrawal, Shangyin Tan, Dilara Soylu, Noah Ziems 等ICLR 2026 · 466 次引用
- Cost-Efficient Large Language Model Serving for Multi-turn Conversations with CachedAttentionBin Gao, Zhuomin He, Puru Sharma, Qingxuan Kang 等USENIX ATC 2024 · 273 次引用
- Memory-R1: Enhancing Large Language Model Agents to Manage and Utilize Memories via Reinforcement LearningSikuan Yan, Xiufeng Yang, Zuchao Huang, Ercong Nie 等ACL 2026 · 140 次引用
- 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 次引用
它引用的 Paper22
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
- LoRA: Low-Rank Adaptation of Large Language ModelsEdward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu 等ICLR 2022 · 18,833 次引用
- QLoRA: Efficient Finetuning of Quantized LLMsTim Dettmers, Artidoro Pagnoni, Ari Holtzman, Luke ZettlemoyerNeurIPS 2023 · 5,863 次引用
- FlashAttention: Fast and Memory-Efficient Exact Attention with IO-AwarenessTri Dao, Daniel Y. Fu, Stefano Ermon, Atri Rudra 等NeurIPS 2022 · 5,493 次引用
- SGLang: Efficient Execution of Structured Language Model ProgramsLianmin Zheng, Liangsheng Yin, Zhiqiang Xie, Chuyue Sun 等NeurIPS 2024 · 1,586 次引用
相关 Paper
- ConServe: Contiguity-Preserving Memory Management for Multi-Turn LLM ServingBingyao LiISCA 2026
- Efficient Memory Management for Large Language Model Serving with PagedAttentionWoosuk Kwon, Zhuohan Li, Siyuan Zhuang, Ying Sheng 等SOSP 2023 · 1,016 次引用
- Accelerating LLM Serving for Multi-turn Dialogues with Efficient Resource ManagementJinwoo Jeong, Jeongseob AhnASPLOS 2025 · 6 次引用
- ConServe: Fine-Grained GPU Harvesting for LLM Online and Offline Co-ServingYifan Qiao, Shan Yu, Shu Anzai, Haoran Ma 等ICML 2026 · 7 次引用
- Mell: Memory-Efficient Large Language Model Serving via Multi-GPU KV Cache ManagementQianli Liu, Zicong Hong, Peng Li, Fahao Chen 等INFOCOM 2025 · 4 次引用
