Courses · Level 5 Frontier
Train a Transformer in Your Browser
Watch a real model learn, in a tab, on your own machine.
Watch a real model learn, in a tab, on your own machine.
Not an animation of training. Training. A real char-level transformer, built in pure browser JavaScript, learns from a corpus while you watch the loss fall — then you sample from the model you just trained and watch gibberish turn word-shaped. Every piece is taught as it is used: tokenization, embeddings, attention, the MLP, softmax, gradient descent.
Press play and a teacher talks you through the whole build, with a read-along transcript that highlights as it speaks.
Working, offline interactives — not screenshots. When the narration says "try it", the thing is right there.
No account, no app, no subscription. It runs from a single HTML file and will still run in ten years.
Every number is computed live on the page from inputs you can edit. Nothing is asserted that cannot be checked.
Written for the curious who want to see it actually learn.
Train a real transformer end to end without a GPU or framework
Read an attention heatmap computed from your own trained model
Explain what a gradient step is doing to the weights
Compute the parameter count and see the honest gap to frontier models
13 chapters, the first four free
The free preview is not a teaser: those chapters are complete, and the paid chapters are physically absent from the preview file rather than hidden behind a script.
What this hour is, how to use the page, and the interactive demo you will keep coming back to.
Part of the free preview — the full narration, page content and exercises, nothing held back.
Part of the free preview — the full narration, page content and exercises, nothing held back.
Part of the free preview — the full narration, page content and exercises, nothing held back.
Narrated in full, with the on-page build and exercises for this idea.
Narrated in full, with the on-page build and exercises for this idea.
Narrated in full, with the on-page build and exercises for this idea.
Narrated in full, with the on-page build and exercises for this idea.
Narrated in full, with the on-page build and exercises for this idea.
Narrated in full, with the on-page build and exercises for this idea.
Narrated in full, with the on-page build and exercises for this idea.
Narrated in full, with the on-page build and exercises for this idea.
Narrated in full, with the on-page build and exercises for this idea.