Efficient Memory Management for Large Language Model Serving with PagedAttention
Summary
This paper introduces PagedAttention, an algorithm inspired by virtual memory paging, and vLLM, a serving system that significantly improves LLM throughput by reducing memory fragmentation in key-value caches.
View Cached Full Text
Cached at: 05/08/26, 08:38 AM
Paper page - Efficient Memory Management for Large Language Model Serving with PagedAttention
Source: https://huggingface.co/papers/2309.06180
Abstract
PagedAttention algorithm and vLLM system enhance the throughput of large language models by efficiently managing memory and reducing waste in the key-value cache.
High throughput serving of large language models (LLMs) requires batching sufficiently many requests at a time. However, existing systems struggle because thekey-value cache(KV cache) memory for each request is huge and grows and shrinks dynamically. When managed inefficiently, this memory can be significantly wasted by fragmentation and redundant duplication, limiting the batch size. To address this problem, we proposePagedAttention, an attention algorithm inspired by the classicalvirtual memoryandpaging techniquesin operating systems. On top of it, we buildvLLM, an LLM serving system that achieves (1) near-zero waste inKV cachememory and (2) flexible sharing of KV cache within and across requests to further reduce memory usage. Our evaluations show thatvLLMimproves the throughput of popular LLMs by 2-4times with the same level of latency compared to the state-of-the-art systems, such asFasterTransformerandOrca. The improvement is more pronounced with longer sequences, larger models, and more complex decoding algorithms.vLLM’s source code is publicly available at https://github.com/vllm-project/vllm
View arXiv pageView PDFGitHub79.4kautoAdd to collection
Get this paper in your agent:
hf papers read 2309\.06180
Don’t have the latest CLI?curl \-LsSf https://hf\.co/cli/install\.sh \| bash
Models citing this paper2
#### theonlyengine/Flash-attention1 UpdatedAug 7, 2024
#### enfinity7B/apac Updated17 days ago
Datasets citing this paper1
#### TheBlueScrubs/TheBlueScrubs-v1 Preview• UpdatedFeb 24, 2025 • 37 • 14
Spaces citing this paper1
Collections including this paper27
Similar Articles
Memory
Explains why LLM inference is increasingly memory-bandwidth bound due to the KV cache scaling with context length and concurrent users, and how systems like vLLM and PagedAttention improve memory utilization.
@_avichawla: A tricky LLM interview question: You're serving a reasoning model on vLLM, and it keeps running out of GPU memory on lo…
Explains why evicting 90% of KV cache tokens fails to free GPU memory when serving reasoning models on vLLM, due to paged attention fragmentation, and introduces NVIDIA's TriAttention as a solution that achieves 2.5x speedup and 10.7x memory reduction.
@amitiitbhu: New Article: How does vLLM work? Read here: https://outcomeschool.com/blog/how-does-vllm-work…
A detailed blog post explaining how vLLM works, including PagedAttention, KV cache management, and continuous batching for efficient LLM serving.
@mgoin_: Today I deleted PagedAttention from vLLM
Michael Goin announced removing PagedAttention from vLLM, a significant change to the open-source LLM inference engine.
@neural_avb: Very cool intro to LLM serving, basics of inference, and VLLM (paged attention, continuous batching etc) Highly recomme…
Recommends an introduction to LLM serving, inference basics, and VLLM, covering paged attention and continuous batching.