Interactive simulations of how AI systems work, with the math behind each one and the caveats on where toy models stop matching real ones. Try it in your browser in EN/PT. CN soon.
Each module is one simulation. Click to open it.
|
How it works Using AI · 1 of 8 A tiny network reads one word and gives odds for the next, one word at a time. |
Why answers vary Using AI · 2 of 8 The model picks each word like weighted dice, so the same question gets different answers. |
|
Long tasks Using AI · 3 of 8 Small chances of a slip multiply over many steps, and checks between steps win them back. |
Context Using AI · 4 of 8 The more text you paste, the smaller the share of attention the answer gets. |
|
Tokenization Using AI · 5 of 8 The model reads text as numbered chunks, so the letters inside them are hidden from it. |
Calibration Using AI · 6 of 8 How sure a model sounds, compared with how often it is right. |
|
What you want to hear Using AI · 7 of 8 Chat models lean toward agreeing with you, and your opinions and settings tilt the answer most where the model is unsure. |
Retrieval Using AI · 8 of 8 Before the model answers from documents, a search picks the few pages it gets to read. |
|
Shrinking a model Under the hood · 1 of 8 · Local models Rounding every number in a model to fewer values saves memory and costs accuracy. |
Fitting in memory Under the hood · 2 of 8 · Local models A model needs memory for its numbers and for a cache that grows with every token of the chat. |
|
Embeddings Under the hood · 3 of 8 Words used in similar places get similar numbers, which is how search by meaning works. |
Sampling settings Under the hood · 4 of 8 · Local models Before each pick, top-k, top-p and min-p drop unlikely words, and a repeat penalty lowers words already used. |
|
LoRA Under the hood · 5 of 8 · Fine-tuning LoRA trains a thin patch beside a frozen model, and a low rank is enough for most changes. |
Learning rate Under the hood · 6 of 8 · Fine-tuning The learning rate sets how big each training step is: too small barely learns, too big overshoots. |
|
Overfitting Under the hood · 7 of 8 · Fine-tuning Trained too long on too little text, a model learns it by heart and gets worse at everything else. |
Evaluating a model Under the hood · 8 of 8 When test questions leak into training, a model scores well on the test and no better on new questions. |
Pure C, no dependencies beyond the standard library. All math lives here; the web UI only displays what the engine computes.
PT Translation and some of the texts were AI-assisted then reviewed by hand.