vLLM · PagedAttention
Efficient Memory Management for Large Language Model Serving with PagedAttention
Woosuk Kwon et al. · SOSP 2023
Map logical tokens to physical KV-cache blocks through block tables so attention can read noncontiguous storage.
What you will implement
Implement paged KV gathering and batched single-token attention; verify shared blocks, partial-block masking and invariance to physical layout.
- 125. PagedAttention KV Pages and Decode Attention
Read scattered physical KV pages through logical block tables while preserving dense-attention results.
A CPU specification of page indexing, shared prefixes, partial tails and multihead decode attention, with replay and slot accounting.