John Lam · Inference Engineeringmy learning journal
Inference Engineering
Bridging from the ops layer down into the GPU internals, taught
against a real 4×H100 cluster. Start with Lesson 1, or open the Lab.
The running analogy: compute is a line cook; the weights live in a pantry across town; the one road between them is memory bandwidth.
Choose your path
Already operate inference systems? Start from a symptom.
The numbered course builds from model fundamentals upward. The operator path starts from
familiar production pain, then traces downward until the cause is explainable from first principles:
Return to operations:
route, scale, deploy, and cost the system using the internals you just recovered.
New to LLM internals? Follow Lessons 1–36 in order; both paths cover the same material.
Studied a few? Lock them in.
Spaced Review → resurfaces the recall
questions from across every lesson on a spacing schedule, interleaved across topics. Retrieval
practice is what turns "I read it" into "I remember it." (Press / on any lesson to jump here too.)
Your progress
A quick journal of where you are: opened lessons fill in, and they highlight once you have cards in spaced review.
Part I transfer: Given a chat request, draw the token-to-token loop and mark exactly where tokenization, embeddings, attention, logits, and sampling occur. Then identify which work repeats for every generated token.
Part II transfer: A service has good TTFT but poor TPOT and low batch occupancy. Choose three measurements, predict the bottleneck, and rank batching, quantization, prefix caching, and speculative decoding by likely impact.
Part III transfer: Compare BF16, FP8, and weight-only INT4 for one workload. State what shrinks, what may speed up, what requires hardware/kernel support, and what quality evidence you would demand.
Part IV transfer: A model fits on one GPU but misses its single-stream latency target. Decide whether to use replicas, TP, or prefill/decode disaggregation, and name the communication cost that could reverse your choice.
Part V transfer: Place one compute-heavy prefill workload and two latency-sensitive decode workloads on the available GPUs. Defend the generation, interconnect, and MIG/time-slicing choices.
Part VI capstone: Given a workload distribution and TTFT/TPOT SLO, propose routing, concurrency, autoscaling, rollout, and cost assumptions. Report goodput and $/1M tokens, then name the measurement most likely to invalidate your plan.