6 Hours of YouTube and 85 handtyped pages of notes on LLM Inference – Start here
By hackernews · · Repos
Teaching LLM inference from first principles by building a small engine in C++ and CUDA. The series follows what happens between a prompt and a generated token, from loading model weights to running each part of the transformer on the GPU.
Teaching LLM inference from first principles by building a small engine in C++ and CUDA.
The series follows what happens between a prompt and a generated token, from loading model weights to running each part of the transformer on the GPU.
My inference notes
Read Inference from Scratch (PDF) for 80+ pages of my handwritten notes and diagrams. I developed all of the writing in this PDF myself, with NO AI writing.
Build series | 6+ Hours of footage
Companion notes for every video are in the study-notes index, with separate Markdown and PDF folders. You can also read the complete PDF collection.
What works so far
Part 8 explains Prefill, Decode, and the KV Cache. Part 9 follows with Static and Continuous Batching, including the current paged cache and online-softmax decode attention.
Current scope
The Llama 3.2 1B inference path includes dense causal prefill, paged decode attention, and static or continuous batching. Model dimensions and the 2,048-token context remain fixed for this learning engine. The KV pool defaults to 128 MiB and can be set with --kv-cache-mib N; active request capacity follows the workload's page budgets rather than a fixed two-request limit.
What Hacker News is saying
- “I filmed over 6+ Hours of footage and hand wrote 85+ pages of notes to teach absolute beginners about AI Inference.”
- “if you like what you see, lets connect!”
- “These slides are obviously generated by an llm.”