videlalvaro/inference-school — explained in plain English
Analysis updated 2026-05-18
Learn how LLM inference works internally by implementing each step yourself
Practice writing and comparing CPU (Swift) and GPU (Metal) implementations of the same math
Follow a companion book and native macOS app to work through 47 structured lessons
| videlalvaro/inference-school | arinltte/latte | dnakov/kittyfarm | |
|---|---|---|---|
| Stars | 176 | 174 | 180 |
| Language | Swift | Swift | Swift |
| Setup difficulty | hard | easy | moderate |
| Complexity | 5/5 | 1/5 | 3/5 |
| Audience | developer | general | developer |
Figures from each repo's GitHub metadata at analysis time.
Requires an Apple Silicon Mac on macOS 15 or newer with Xcode command-line tools.
Inference School is a structured course that teaches how large language models actually run on a computer, by having you build a small working inference engine from scratch, piece by piece, on an Apple Silicon Mac. Rather than being made of separate, disconnected coding puzzles, every exercise builds on the last: you start with a simple dot product, that grows into matrix math, then into the pieces that make up attention, and eventually you have code that loads a model and generates text one word at a time. For most exercises you write two versions of the same operation: a plain Swift version that runs on the CPU and acts as the reference for correctness, and a version written for Metal, Apple's language for programming the graphics chip, so you can see how the same math behaves differently when it runs on specialized hardware. The course does not stop once your code passes its tests. It also asks you to guess how fast something should run, measure it, and look at why the real result matches or does not match your guess. You work through the material either in a dedicated Mac app called Inference School Studio, which has a lesson reader, an editor for the Swift and Metal code, built in checks, and progress tracking, or through command line tools that expose the same lessons and checks. There is also a full companion book available as a PDF and EPUB, covering the same material in prose form with diagrams and exercises. The curriculum runs 47 numbered problems, moving from basic tensor storage and matrix multiplication through activation functions, attention mechanisms, memory caching strategies, weight compression, and finally model loading, text generation, and performance profiling, ending in a capstone project that ties the pieces into one working engine. Running it requires an Apple Silicon Mac on a recent macOS version with Xcode's command line tools installed.
A hands-on Swift and Metal course that teaches you to build a small LLM inference engine from scratch on Apple Silicon.
Mainly Swift. The stack also includes Swift, Metal, Xcode.
Setup difficulty is rated hard, with roughly 1h+ to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.