Visual mode
The Lab
Chapter 2 · The Math Toolkit
Dot Product Lab
Drag two vectors and watch their dot product and cosine similarity change with the angle between them.
Know well5 minChapter 7 · Transformers
Attention from Scratch
One short sentence, one question: which words should each word pay attention to? Build attention step by step — similarity, softmax, weighted sum, then queries and keys.
Know well10 mintoy modelChapter 7 · Transformers
Transformer Explorer
Step through a real forward pass of one GPT-style Transformer block — embeddings, positions, multi-head attention, residuals, the MLP and the output softmax — with the tensor shape at every stage.
Know well15 mintoy modelChapter 2 · The Math Toolkit
Gradient Descent Playground
Drop a point on a loss landscape and watch gradient descent, momentum and Adam race to the bottom. Push the learning rate until training diverges; add noise to see stochastic gradient descent.
Know well15 mintoy modelChapter 2 · The Math Toolkit
Matrix as Transformation
Edit a 2×2 matrix and watch it stretch, rotate, shear or collapse the plane — then add ReLU and see how a neural-network layer folds space.
Know well8 minChapter 2 · The Math Toolkit
Bayes with 1,000 People
A rare condition, an imperfect test: see why a positive result can still mean you're probably fine — Bayes' theorem as counting.
Know well6 minChapter 2 · The Math Toolkit
Slopes and Steps
Shrink a secant line until it becomes the tangent — the derivative — then use it to take a gradient-descent step downhill.
Know well6 minChapter 2 · The Math Toolkit
Confident and Wrong
Adjust a model's scores for the next word and watch cross-entropy loss and perplexity respond — the exact quantity language models are trained to minimize.
Know well6 mintoy modelChapter 2 · The Math Toolkit
How Sure Is That Accuracy?
Evaluate the same model on hundreds of random test sets and watch the measured accuracy wobble — why small benchmarks can't separate close models.
Understand5 mintoy modelChapter 1 · What Is Artificial Intelligence?
Write the Rules
Build a spam filter the 1980s way — by writing rules — then watch it meet new messages. Finally, let a learning algorithm work it out from examples instead.
Understand8 mintoy modelChapter 1 · What Is Artificial Intelligence?
Search: Blind vs Guided
Draw walls on a grid and watch breadth-first, depth-first and A* search find their way — and count how much each has to explore.
Know well8 minChapter 3 · Machine Learning
Overfitting Lab
Fit curves of increasing complexity to 12 noisy points. Training error keeps falling; error on new data falls, then soars. Then add regularization.
Know well8 mintoy modelChapter 3 · Machine Learning
Logistic Regression Lab
Train a linear classifier with gradient descent and watch its decision boundary settle — then see it fail on XOR.
Implement8 mintoy modelChapter 3 · Machine Learning
Precision, Recall and the Threshold
A fraud detector on imbalanced data: move the threshold and watch precision, recall, the confusion matrix and the ROC curve respond.
Know well8 mintoy modelChapter 4 · Neural Networks
Neural Network Lab
A real two-layer network you can train, edit and dissect: watch activations flow forward, the decision boundary bend, and backpropagation send each example's error back to every weight.
Implement15 mintoy modelChapter 4 · Neural Networks
Vanishing and Exploding Gradients
Send a gradient backwards through up to 40 layers and see it shrink to nothing or blow up — and how ReLU and good initialization fix it.
Know well6 minChapter 6 · Language Before Transformers
Count the Next Word
Build a sentence with a count-based model: see exactly which words it looks at, which corpus lines it counts, and how the chain rule multiplies each step.
Know well8 mintoy modelChapter 6 · Language Before Transformers
Train Word Vectors
Train a tiny 2-D word2vec live in your browser and watch words that share neighbours drift together; compare with one-hot IDs, where nothing transfers.
Understand8 mintoy modelChapter 6 · Language Before Transformers
How Long Does a Word Last?
Read a long sentence one word at a time and watch how much of an early clue survives in a plain RNN versus a gated memory cell.
Understand7 mintoy model