the foundations, zero to one

The Basics

Two labs, no prerequisites. First: how a model reads text. Then: how it decides what to pay attention to. Every number in every lab is real; work through them in order.

lab 1

How a Model Reads

Chop text into tokens with byte-pair encoding, look up embeddings, and learn how a model decides that two words are similar.

teach a tokenizer·the embedding calculator·the dart map

open the lab~16 min

lab 2

How a Model Thinks

Matrix multiplication, the attention equation computed by hand with query, key, and value, and every attention variant up to KDA.

the matrix playground·attention, computed in place·the attention family tree

open the lab~19 min

still in the notebook

Mixture of Experts

How 288 specialists and a router replace one giant feed-forward network.

coming soon

The KV cache

What models remember during a conversation, and why it grows.

coming soon

Quantization (FP8, FP4)

Squeezing weights into fewer bits without breaking the model.

coming soon

How models are trained

Prediction, GPUs, and trillions of tokens.

coming soon