Modern AI learns by rolling downhill.
Latent is a hands-on field guide to modern AI. Start with what AI is and how it learns from examples, then work up to embeddings, attention, and the inside of a transformer. Every idea comes with something to play with, running real math in your browser.
This is a loss landscape. Click anywhere to drop a ball and watch gradient descent find a low point.
Lossn/a
Where should you start?
Pick the line that sounds most like you. You can jump anywhere later.
Eight tracks, one route
Each track builds on the ones above it. After the machine learning track the route forks: language and neural networks can be taken in either order, and both lead into transformers. From there you can look inside models, learn how agents learn from rewards, or head to the frontiers.
Your progress is saved in this browser only. Nothing is uploaded.
AI from zero
What AI is, how it learns from examples, and how a chatbot picks its next word.
Start with What is AI, really?
How machines learn
Loss, gradients, and generalization: the loop behind every trained model.
Start with The learning loop
Neural networks
Neurons, layers, and backpropagation, built up one piece at a time.
Builds on How machines learn
Start with Layers are matrix multiplications
Language as vectors
Tokens, embeddings, and similarity: how text becomes geometry.
Builds on How machines learn
Start with Tokens
Transformers and LLMs
Attention, the transformer block, and how large language models are trained.
Builds on Neural networks and Language as vectors
Start with Predicting the next token
Learning by trial and error
Rewards, exploration, and how agents learn to act, from bandits to RLHF.
Builds on How machines learn and Neural networks
Inside the model
Look inside a real language model, watch circuits form, and steer what it says.
Builds on Transformers and LLMs
Frontiers
Diffusion, multimodal models, agents, and reasoning.
Builds on Transformers and LLMs
Start with Diffusion: from noise to data
Or just play
All 42 labsLabs are the interactive pieces of each lesson, on their own. Each links back to the lesson that explains it.
- Next-word predictorA tiny language model trained on Aesop's fables. See its next-word probabilities, pick words yourself, and change the temperature.Novice
- Gradient descentDrop a starting point on a loss surface and watch gradient descent find its way down, or overshoot and diverge.Beginner
- Neural network playgroundTrain real neural networks in your browser. Change depth, width, activation, and learning rate, and watch every neuron and the loss curves respond.Intermediate
- Word embeddings explorerExplore 10,000 real GloVe word vectors. Find neighbors, solve analogies with vector arithmetic, and map word pairs in 2D.Intermediate
- Attention calculatorDrag queries, keys, and values on a plane and watch scaled dot-product attention compute scores, weights, and outputs for every token.Advanced
- Diffusion from noise to dataWatch noise turn into a 2D dataset using the exact reverse diffusion process, with the score field drawn as arrows.Advanced