A free course you do, not just read
Machine learning, from one gradient to the Jacobian lens
Twelve modules. In each one you train or break something live in your browser, then write a few lines of Python that are checked on the spot. The course starts with the derivative of a single number and ends with reading concepts out of the middle layers of a transformer.
- Who it is forSTEM graduates who know linear algebra, multivariable calculus and basic probability, and can read Python.
- What you needA browser. Nothing to install and no account. Python runs on your own device.
- Where it endsThe Jacobian lens from Anthropic’s 2026 interpretability research, rebuilt on a transformer small enough to train in a tab.
How each module works
- Why it matters, in two or three sentences.
- The idea, with the maths written out.
- A live demo you can drag, slide and retrain, with “try this” prompts that each change one thing.
- A graded exercise in Python. Hidden tests run in your browser; a hint and a reference solution are one click away.
- Three questions to check yourself, and a pointer to where the idea goes next.
Every demo on the site runs on one small automatic-differentiation library that you learn to build in module 0. When the course reaches transformers and their Jacobians, they are computed by the same code.
Course map
-
Gradients and a tiny autograd
You build: A 60-line reverse-mode autodiff engine (the
Valueclass). Live demo: A computation graph that lights up as gradients flow back. Exercise: Implement the backward step fortanhand*, checked against finite differences. -
Linear and logistic regression
You build: Gradient descent on squared loss and on cross-entropy loss. Live demo: Drag the data points and watch the fitted line and the loss surface move. Exercise: Write the gradient of the logistic loss; it must match autograd to 10⁻⁶.
-
Neural networks
You build: A multi-layer perceptron, assembled from neurons and layers. Live demo: A two-moons playground: change width, depth and activation. Exercise: Fit XOR with the fewest hidden units that reach 100%.
-
Backpropagation
You build: Backpropagation in matrix form for a whole network. Live demo: Step through the forward values, then each layer’s gradient. Exercise: Vectorised backprop that passes a gradient check on random networks.
-
Optimisation and generalisation
You build: SGD, momentum and Adam; L2, dropout and early stopping. Live demo: A race of optimisers on a Rosenbrock-style surface; train and test curves. Exercise: Implement Adam; reproduce an overfitting curve, then fix it.
-
Support vector machines and kernels
You build: Hinge loss, the maximum margin and the kernel trick. Live demo: The margin and support vectors update as you drag points; an RBF width slider. Exercise: A kernel SVM by subgradient descent on a ring dataset.
-
Convolutions
You build: Convolution and pooling layers by hand. Live demo: Edge filters on small images; a tiny CNN on 8×8 digits. Exercise: Write
conv2dand its gradient. -
RNNs and LSTMs
You build: A vanilla RNN, then the LSTM gates. Live demo: Vanishing gradients against sequence length; gate activations on a toy sequence. Exercise: The LSTM cell’s forward pass; learn to remember one bit across 30 steps.
-
Autoencoders
You build: An autoencoder, then a variational autoencoder. Live demo: A 2-D latent space of digits: click anywhere to decode. Exercise: The reparameterisation trick and the ELBO.
-
Attention and transformers
You build: Scaled dot-product attention, multiple heads and a 2-layer transformer. Live demo: Attention heatmaps; train a tiny transformer in the browser. Exercise: Causal masking and one attention head from scratch.
-
Interpretability foundations coming soon
You build: Linear probes, the logit lens, activation patching and sparse autoencoders. Live demo: The logit lens across the layers of the tiny transformer; patch a head and watch the answer change. Exercise: Train a probe; find the head that patching breaks.
-
The Jacobian lens coming soon
You build: Averaged Jacobians and the J-lens readout. Live demo: The logit lens and the J-lens side by side at every layer. Exercise: Compute the averaged Jacobian by autodiff and see where it beats the logit lens.