LinkedIn analytics tracking pixel for AIDOLS AI consulting website performance measurement
Infrastructure

Paged Attention

Paged attention is a KV-cache memory-management technique that stores attention keys and values in fixed-size blocks, addressed via a page table — analogous to virtual memory in operating systems.

Full definition

Introduced in vLLM (Kwon et al., SOSP 2023), paged attention solves KV-cache fragmentation. Naive serving allocates a contiguous KV-cache buffer sized to the maximum context, wasting 60-80% of GPU memory on padding and reservation. Paged attention allocates KV-cache in 16-token blocks and uses a page table per sequence, eliminating fragmentation and enabling memory sharing across requests with shared prefixes (system prompts, few-shot examples). Reported gains: 2-4x throughput vs FasterTransformer, 5-10x vs HuggingFace Transformers.

Why it matters

Paged attention is what made cheap long-context inference economically viable. Anthropic's prompt caching, OpenAI's prefix caching, and every modern serving engine implement variants of it. Without paged attention, $0.30/1M-input-token pricing for cached prompts would not exist.

Example

A coding assistant ships a 30k-token system prompt with rules and examples; paged attention shares those KV-cache blocks across 200 concurrent users, freeing 90% of the memory a naive implementation would consume.

Source & further reading

Primary source: Kwon et al. — "Efficient Memory Management for Large Language Model Serving with PagedAttention" (SOSP) (2023).

Citation policy: this entry is part of the AIDOLS AI Implementation Glossary and may be quoted for research, journalism, and education with attribution to aidolsgroup.com/es/glossary/paged-attention/.