Reproduce “Efficient Memory Management for Large Language Model Serving with PagedAttention” on OpenResearch
Turn your favorite coding agents into research agents that review literature, develop hypotheses, and run experiments.
Universal app for Apple silicon and Intel. Requires macOS 11 or later.
About this paper
Woosuk Kwon, Zhuohan Li, Siyuan Zhuang, Ying Sheng, Lianmin Zheng, Cody Hao Yu, Joseph E. Gonzalez, Hao Zhang and 1 more
PagedAttention serves LLMs by dividing growing key-value caches into fixed-size blocks, allocating them on demand, and mapping them to scattered GPU memory. It also supports cache sharing. In tests, vLLM batched 30.42 versus 13.62 requests and sustained 1.7×–2.7× higher request rates than Orca (Oracle), whose output-length knowledge is infeasible; these comparisons do not isolate paging as the sole cause.
Key insights
- Applying operating system virtual memory paging concepts to LLM Key-Value (KV) cache management improves memory efficiency.
- Co-designing the attention algorithm (PagedAttention) with the overall system architecture (vLLM) yields substantial performance improvements.
- Block-based memory allocation effectively eliminates memory fragmentation and the need for pre-reservation, optimizing GPU resource utilization.
Summary by alphaXiv.
Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.