Reference
References
What this course is built on. Read each paper after the chapter it belongs to; they get much easier once you have implemented the idea badly yourself.
Papers
The vLLM paper. Introduces PagedAttention and measures the fragmentation it removes.
- Orca: A Distributed Serving System for Transformer-Based Generative ModelsYu et al., OSDI 2022S09S10
Iteration-level scheduling and selective batching: the origin of continuous batching.
Tiling plus online softmax. The follow-ups (FA-2, FA-3) improve work partitioning and add FP8.
The recurrence FlashAttention is built on, published four years earlier for a different reason.
Chunked prefill and stall-free batching.
The rejection-sampling proof that speculation preserves the target distribution exactly.
Draft heads on the target model's own hidden states, and tree-shaped candidate verification.
The three families of post-training quantization: error compensation, salient channels, and outlier migration.
- GQA: Training Generalized Multi-Query Transformer Models from Multi-Head CheckpointsAinslie et al., 2023S03S05
The compromise between multi-head and multi-query attention that every modern model now ships.
RoPE. Read it if only to understand why the two implementation layouts are both called by the same name.
- Megatron-LM: Training Multi-Billion Parameter Language Models Using Model ParallelismShoeybi et al., 2019S17
Column-then-row sharding with one all-reduce per sublayer. Written for training; inference uses it unchanged.
Prefill/decode disaggregation, and the KV-cache-centric architecture that follows from it.
Sparse MoE at serving scale, including auxiliary-loss-free load balancing.
Engines worth reading
Scheduler, KV cache manager, model runner, spec decode: most of this course in production form.
The prefix cache and the allocator as one radix tree; jump-forward decoding.
The quantization formats the rest of the local ecosystem reads.
mmap'd GGUF, fused dequant+dot, online softmax, grammar-constrained JSON, on a Raspberry Pi in 45 MB resident — the KV cache at a ~2k context, with the weights left file-backed.
Lloyd-Max codebooks, random Hadamard transforms, a full-precision window over recent tokens.
One CLI: pull, chat, serve. Paged KV, continuous batching and prefix caching on Apple Silicon and GB10.
Paged + GQA + flash attention in one library, used by several engines.
Schema and grammar compilation to token-level masks.
Write-ups
The clearest end-to-end walkthrough of a production engine's internals.
Release notes that double as design documents, the v1 engine post especially.
Where the roofline numbers in this course come from, derived from first principles.
This course is an educational reimplementation and is not affiliated with any of the projects above. Where a chapter attributes a behaviour to a specific engine, check the current source: the field moves fast, and defaults change between releases.