Module resources
Inference engineering
Checked sources to go further than the lessons. Back to the module.
Recommended learning sequence
Work through these in order.
Large Transformer Model Inference Optimization (opens in a new tab)
Start with a survey of why large transformer inference is costly: the post names the memory footprint of parameters and the KV cache, and the poor parallelizability of autoregressive decoding, as the two bottlenecks. It then walks through distillation, quantization, pruning, sparsity and architectural changes, so the module has a wide map to hang on. The post dates from January 2023, so treat engine details elsewhere as more current.
All About Transformer Inference (How To Scale Your Model, Part 7) (opens in a new tab)
Then work through a quantitative treatment of prefill and generation as two tasks with different bottlenecks, the KV cache, latency against throughput, and serving layouts. The page ends with worked problems with answers in expandable sections; try them before opening the answers. Its figures use TPU examples, so the numbers differ from the GPU figures in this module.
TensorRT LLM overview (documentation) (opens in a new tab)
Repeated on purpose: it is cited in lesson 5. Read it as one engine's own account of its feature set; this overview lists in-flight batching with paged attention, chunked prefill, speculative decoding, guided decoding and disaggregated serving (marked Beta).
Quickstart (opens in a new tab)
Repeated on purpose: it is cited in module 9, lesson 2. Here it starts the hands-on part. The page covers installing vLLM, running offline batched inference with the LLM class and SamplingParams, and starting an OpenAI-compatible server with vllm serve.
Benchmark CLI (opens in a new tab)
Repeated on purpose: it is in lesson 7's further list and in module 9 resources. Finish hands-on: point the benchmark at the server you started. The page says the request rate defaults to inf, which sends all requests at once, and that finite rates use a Poisson process by default. It also warns that repeated runs against the same server can reuse cached prompts and inflate throughput. Then try this: run it at two request rates and write down which of TTFT, TPOT and ITL moved.
CS336: Language Modeling from Scratch (opens in a new tab)
Repeated on purpose: it is also in module 1, module 10 and module 15 resources and in module 9, lesson 2. Close with it as a course map to dip into later. The Spring 2026 schedule lists resource accounting (FLOPs, memory, arithmetic intensity), GPUs and TPUs, kernels and Triton, parallelism and a lecture titled Inference, so you can pick the lectures that match each lesson.
All resources
Official documentation
Reducing latency (opens in a new tab)
Repeated on purpose: it is also in module 11 resources. It shows the same latency vocabulary from the API user's side: it defines time to first token, then lists choosing a faster model, trimming prompt and output tokens, and streaming. Read it to see which of the levers in this module an API consumer can and cannot reach.
Batch processing (opens in a new tab)
The Message Batches API page describes submitting many requests for asynchronous processing, with most batches finishing in under an hour and costs cut by 50 percent. It is a contrast case: work that tolerates delay can trade latency for cost, which is the same lever the lessons call batching.
TensorRT LLM overview (documentation) (opens in a new tab)
Repeated on purpose: it is cited in lesson 5. The overview, dated 19 October 2026, lists FP8 on H100 and later and FP4 on B200, in-flight batching, KV cache management and disaggregated serving (Beta). Compare the feature list with the other engines' documents.
Histograms and summaries (opens in a new tab)
Repeated on purpose: it is cited in module 9, lesson 4. Says summary quantiles cannot be meaningfully averaged across instances while histogram buckets can be summed before estimating a quantile, and prefers native histograms. Relevant when you aggregate latency metrics from several replicas.
Further reading
Large Transformer Model Inference Optimization (opens in a new tab)
A broad survey that covers distillation, quantization (including activation outliers in larger models), pruning, sparsity with mixture-of-experts, and architectural changes to the attention and network design. It is a wide-angle companion to the lesson-level engine material, and the post is from early 2023.
All About Transformer Inference (How To Scale Your Model, Part 7) (opens in a new tab)
Part 7 of an online book from Google DeepMind authors, published February 2025. It treats prefill and generation as different problems, estimates KV cache size for LLaMA 2-13B, and ends with worked problems with answers, including one on a modified variant of that model. Its examples use TPUs.
Building A Generative AI Platform (opens in a new tab)
Repeated on purpose: it is in module 9 and module 11 resources. The article steps through a platform around the model (guardrails, router and gateway, caching, observability). It does not explain how to serve models and defers inference optimization to an upcoming book by the author, so use it for the layers around a serving engine.
Hands-on
Quickstart (opens in a new tab)Essential
Repeated on purpose: it is cited in module 9, lesson 2. Covers pip or uv installation, offline inference, an OpenAI-compatible server, choosing an attention backend with a flag, and install tabs for several hardware platforms.
Courses
CS336: Language Modeling from Scratch (opens in a new tab)
Repeated on purpose: it is listed in module 1, module 10 and module 15 resources and in module 9, lesson 2. The Spring 2026 page lists a lecture titled Inference, lectures on GPUs and kernels, and an Assignment 2 on systems that includes a Triton FlashAttention2 implementation. Use it as a syllabus for going deeper.