6 Hours of YouTube and 85 handtyped pages of notes on LLM Inference – Start here...
HN Best 200 @best
6 Hours of YouTube and 85 handtyped pages of notes on LLM Inference – Start here github.com · 33 points · 4 comments · HN thread
TL;DR The author presents samir-vllm, a learning project that builds a small Llama 3.2 1B inference engine in C++17 and CUDA, with an accompanying 6-hour YouTube series and 80+ pages of handwritten notes. The repo covers safetensors loading, a BPE tokenizer, GPU transformer kernels, prefill/decode, static and continuous batching, and paged KV-cache attention. The post is a self-promotional launch with the author also seeking summer 2027 internship leads.
- Engine loads model.safetensors weights directly into GPU memory in BF16 and runs all 16 layers of Llama 3.2 1B on the GPU, with a fixed 2,048-token context.
- Includes a local Unicode-aware BPE tokenizer (ICU), an embedding-gather kernel, an FP32-reducing RMSNorm kernel, and cuBLAS for matrix multiplies.
- KV cache uses a shared BF16 page pool of 16-token pages with a block table per sequence and layer; default pool is 128 MiB and adjustable via --kv-cache-mib.
- Admission control reserves each request's maximum page budget up front, queuing FIFO when it doesn't fit, which avoids preemption and deadlock but can limit concurrency for large output budgets.
- Batched outputs can differ from single-request outputs because BF16 rounding varies with batch size when logits are nearly tied.
- Released under MIT for engine code, while notes, PDFs and bundled Llama tokenizer are rights-reserved or under Meta's Llama license.
Discussion The thread is very small, with only the author's own posts. The top comments are self-introductions and promotional links, plus a long post describing the series, its scope, and the author's transparency about writing the notes and code by hand, with AI used only for some extra per-video notes. There is no independent technical debate or critique in the visible comments, so the mood is promotional and the discussion is mostly the author describing the project.
- Author promotes the series and notes as a free beginner resource (most): The author says the videos were made to replace beginner YouTube content that is becoming less common, and points readers to the repo and channel. The writing is presented as the author's own.
- Author is seeking summer 2027 internship leads (some): The author invites recruiters or hiring managers focused on inference or MLE roles to get in touch, linking LinkedIn and X profiles.
Links from the comments