whatisgithub

What is inference-school?

videlalvaro/inference-school — explained in plain English

Analysis updated 2026-05-18

176SwiftAudience · developerComplexity · 5/5Setup · hard

In one sentence

A hands-on Swift and Metal course that teaches you to build a small LLM inference engine from scratch on Apple Silicon.

Mindmap

mindmap
  root((Inference School))
    What it does
      Teaches LLM inference
      Builds engine step by step
      CPU and Metal versions
    Tech stack
      Swift
      Metal
      macOS Studio app
    Use cases
      Learning attention math
      GPU kernel practice
      Performance profiling
    Audience
      Developers
      Apple Silicon users

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Learn how LLM inference works internally by implementing each step yourself

USE CASE 2

Practice writing and comparing CPU (Swift) and GPU (Metal) implementations of the same math

USE CASE 3

Follow a companion book and native macOS app to work through 47 structured lessons

What is it built with?

SwiftMetalXcode

How does it compare?

videlalvaro/inference-schoolarinltte/lattednakov/kittyfarm
Stars176174180
LanguageSwiftSwiftSwift
Setup difficultyhardeasymoderate
Complexity5/51/53/5
Audiencedevelopergeneraldeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · hard Time to first run · 1h+

Requires an Apple Silicon Mac on macOS 15 or newer with Xcode command-line tools.

So what is it?

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.

Copy-paste prompts

Prompt 1
Help me set up Inference School Studio and start Problem 001 on my Mac
Prompt 2
Explain how the Swift CPU reference implementation for GEMV relates to its Metal version
Prompt 3
Walk me through the KV-cache problems in Inference School's curriculum
Prompt 4
Show me how to run the capstone inference engine benchmark from the command line

Frequently asked questions

What is inference-school?

A hands-on Swift and Metal course that teaches you to build a small LLM inference engine from scratch on Apple Silicon.

What language is inference-school written in?

Mainly Swift. The stack also includes Swift, Metal, Xcode.

How hard is inference-school to set up?

Setup difficulty is rated hard, with roughly 1h+ to a first successful run.

Who is inference-school for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.