PagedAttention: Mathematical Foundations, Virtual Memory Block Allocation, and Zero-Waste KV Cache Serving
PagedAttention: Mathematical Foundations, Virtual Memory Block Allocation, and Zero-Waste KV Cache Serving In autoregressive transformer inference, serving throughput is bounded primarily by high-bandwidth memory (HBM) capacity and memory bandwidth rather than raw floating-point operations. As large language models generate tokens sequentially, each newly sampled token requires caching the key and value projection vectors across all preceding tokens in the sequence. In legacy serving engines, t






