Efficient Memory Management for Large Language Model Serving with PagedAttention
High-throughput LLM serving systems are bottlenecked by KV cache memory allocation. PagedAttention adapts virtual memory paging principles to dynamically partition attention key-value states into non-contiguous physical blocks, eliminating external fragmentation and enabling memory sharing across parallel sampling requests.
Partitions dynamic KV cache states into non-contiguous fixed blocks matching OS virtual memory pages.
Shrinks memory waste from traditional 60% to 80% reservations down to under 4% across batch workloads.
Enables zero-copy state reuse for parallel sampling, speculative decoding and shared prompt prefixes.
