Efficient Memory Management for Large Language Model Serving with PagedAttention
Paper · https://arxiv.org/abs/2309.06180
High throughput serving of large language models (LLMs) requires batching sufficiently many requests at a time. However, existing systems struggle because the key-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 propose PagedAttention, an attention algorithm inspired by the classical virtual memory and paging techniques in operating systems. On top of it, we build vLLM, an LLM serving system that achieves (1) near-zero waste in KV cache memory and (2) flexible sharing of KV cache within and across requests to further reduce memory usage. Our evaluations show that vLLM improves the throughput of popular LLMs by 2-4times with the same level of latency compared to the state-of-the-art systems, such as FasterTransformer and Orca. 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
First seen by Oriel on .
AI summary
The paper introduces PagedAttention and vLLM, which manage LLM key-value cache memory more efficiently and deliver 2–4× higher throughput at the same latency as compared systems.
- PagedAttention applies virtual-memory paging techniques to handle the large, dynamically changing KV caches used by concurrent requests.
- vLLM reports near-zero KV cache memory waste and supports flexible cache sharing within and across requests.
- Evaluations report 2–4× throughput improvements over FasterTransformer and Orca at the same latency.
- The gains are more pronounced with longer sequences, larger models, and more complex decoding algorithms.
#llm serving #pagedattention #vllm #memory management
Generated by gpt-5.6-sol. Check the original for details.
Metric trends
Last 30 days · Up to 120 recorded samples per source and metric, with reposts kept separate · First and latest retained
Points
Score reported by the source.
- Hugging Face Papers: 79, latest observation ; +2 over observed period since
Comments
Comment count reported by the source.
- Hugging Face Papers: 1, latest observation ; 0 over observed period since
Aliases
| Source | External ID | URL |
|---|---|---|
| Hugging Face Papers | 2309.06180 | https://arxiv.org/abs/2309.06180 Read discussion |