Skip to content
THE INFERENCE CURRICULUM

The mechanisms behind every inference question

One page per mechanism: the KV cache budget, the roofline, paged allocation, online softmax and the rest. Each states the governing equation, works one example with real part numbers, and lists the questions that depend on it. Read the tracks in order, or open the one your last mock exposed.

36 concepts across 12 tracks · foundational concepts are free · see them as a map

Begin the curriculum →
01

⚛️ Inference Physics

Count bytes and FLOPs per token, place prefill and decode on the roofline, and turn a model config and a datasheet into a latency floor before any benchmark runs.

02

🧮 KV Cache & Memory

Derive the KV footprint for every attention variant, then manage it like an operating system: pages, sharing, eviction, quantization and tiers.

03

⏱️ Batching & Scheduling

Why iteration-level scheduling won, how a token budget trades TTFT against inter-token latency, and what a scheduler does when memory runs out.

04

🔦 Attention Kernels

Exact attention computed in tiles: the online-softmax recurrence, the FlashAttention generations, and the decode-time kernels that split work across the KV length.

05

🟩 GPU Performance

The hardware model an inference kernel engineer reasons with: hierarchy bandwidths, tensor-core pipelines per generation, and the profiler evidence that separates hypotheses.

06

🔢 Quantization & Numerics

What each number format can represent, where the scales live, which kernels make a format fast, and how to prove a quantized model still answers the same way.

07

🌳 Decoding Algorithms

Sampling, speculation and constraints as algorithms with proofs and cost models, not features to switch on.

08

🕸️ Distributed Inference

Split a model across GPUs and nodes, count the bytes each split puts on the wire, and decide when prefill and decode deserve separate machines.

09

⚙️ Serving Engines

Follow a request through vLLM, SGLang and TensorRT-LLM, and learn which component owns each decision and each knob.

10

🏛️ Inference System Design

The fleet above the engine: routing, autoscaling, multi-tenancy and the cost model that turns a GPU-hour price into dollars per million tokens.

11

🩺 Performance Debugging

Decompose a latency, an OOM or a wrong answer into measurable parts, and design benchmarks whose numbers survive review.

12

⌨️ Implementation Patterns

The reference implementations behind the coding round, with the invariants and edge cases graders test.