跳到主要内容Skip to main content

PagedAttentionPagedAttention

PagedAttention

  • 硬件与部署Hardware & deployment
  • 第五站 · 跑起来Station 5 · Running It
解决什么问题What problem it solves

借操作系统的分页思路管理 KV 缓存,让显存几乎不浪费。Manage the KV cache with OS paging ideas so memory is barely wasted.

这是什么What it is

Kwon 等人的定义:受操作系统虚拟内存与分页技术启发的注意力算法。

论文称基于它构建的 vLLM 在 KV 缓存上接近零浪费,吞吐提升 2–4 倍。

Kwon et al.'s definition: an attention algorithm inspired by classical virtual memory and paging in operating systems.

The paper reports vLLM achieving near-zero KV cache waste and 2-4x throughput.

为什么需要知道Why it matters

vLLM 快的真正原因。理解了它,才明白显存要算的是缓存而不只是权重。The real reason vLLM is fast. Memory budgeting is about cache, not only weights.

出处Sources
  • Kwon 等《Efficient Memory Management for LLM Serving with PagedAttention》PagedAttention paper (SOSP 2023) ↗
  • 从业者深版:跑起来深水专题(AI 模型站)Practitioner deep-dive: serving deep dive guide (AI Models site) ↗