Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
PagedAttention is vLLM's block-based KV-cache allocator that borrows OS virtual-memory paging, eliminating the fragmentation waste of contiguous max-length reservations.
Imagine renting a parking garage where every car gets a private aisle sized for the biggest truck the garage might ever see. Hatchbacks waste most of their aisle. Now picture the garage manager dividing every aisle into uniform stalls and giving each car only the stalls it actually needs, picked from anywhere in the building. A central clipboard remembers which stalls belong to which car. The garage fits far more cars, and nobody hoards space they will never use. PagedAttention is that clipboard for the KV cache: fixed-size blocks anywhere in HBM, looked up through a per-sequence table.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
3 min: vLLM origin + OS paging analogy + the fragmentation problem with contiguous allocation + block tables + enabler for continuous batching and prefix caching.
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Calling PagedAttention a new attention math. It is a KV-cache allocator. The math is unchanged; only how K and V are laid out in HBM differs.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.