Modern AI learns by Gradient descentAn optimization method that repeatedly moves the parameters a small step in the direction that lowers the loss fastest, the opposite of the gradient.Taught in Gradient descentOpen in glossary.
Training a model means adjusting its numbers, often billions of them, until its mistakes get small. Picture every possible setting of those numbers as a place on a landscape whose height is how wrong the model is. Training starts somewhere on that landscape and takes step after step downhill. Drop a ball on the map to watch it.
Latent is a hands-on field guide to modern AI. 95 lessons in eleven tracks take you from what AI is to how language models, agents, image generators, and models that see and hear work, and then inside a real model. Every idea comes with something to play with: 104 labs that run real math, and real models, in your browser.
This is a loss landscape. Click anywhere to drop a ball and watch gradient descent find a low point. With the keyboard: Arrow keys move the drop point (Shift for bigger moves). Enter or Space drops a ball, S steps it, R replays the last drop.
Lossn/a
Where should you start?
Pick the line that sounds most like you. You can jump anywhere later.
Eleven tracks, one route
Each track builds on the ones above it. After the machine learning track the route forks: neural networks and language as vectors can be taken in either order, and both lead into transformers. Learning by trial and error branches off after neural networks. After transformers, four branches open: look inside a real model, learn how models see, learn how they hear and speak, or head to the frontiers. From the frontiers the route continues to securing AI, how these systems are attacked and what defenses catch.
Your progress is saved in this browser only. Nothing is uploaded. To see every lesson and concept at once, open the curriculum atlas.
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
Start with Explore or exploit: bandits
Inside the model
Look inside a real language model, watch circuits form, and steer what it says.
Builds on Transformers and LLMs
Start with Reading a model layer by layer
Models that see
How models turn pixels into labels, boxes, masks, depth, matches with words, and answers to questions.
Builds on Transformers and LLMs
Start with How computers see
Entry point: an intermediate lesson that needs only Convolutions (Neural networks) and Attention, step by step (Transformers and LLMs).
Models that hear and speak
How models turn sound waves into spectrograms, labels, and text, and text back into speech.
Builds on Transformers and LLMs
Start with How computers hear
Entry point: an intermediate lesson that needs only Turning things into numbers (AI from zero).
Frontiers
Diffusion, multimodal models, mixture of experts, agents, reasoning, and evaluation.
Builds on Transformers and LLMs
Start with Diffusion: from noise to data
Securing AI
How AI systems are attacked, what defenses catch, and what they miss.
Builds on Frontiers
Start with Attacks on AI systems
Or just play
All 104 labsLabs are the interactive pieces of each lesson, on their own. Here is one from each track; each links back to the lesson that explains it.
- AI from zeroNext-word predictorA tiny language model trained on Aesop's fables. See its next-word probabilities, pick words yourself, and change the temperature.Novice
- How machines learnGradient descentDrop a starting point on a loss surface and watch gradient descent find its way down, or overshoot and diverge.Beginner
- Neural networksNeural 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
- Language as vectorsWord embeddings explorerExplore 10,000 real GloVe word vectors. Find neighbors, solve analogies with vector arithmetic, and map word pairs in 2D.Intermediate
- Transformers and LLMsAttention calculatorDrag queries, keys, and values on a plane and watch scaled dot-product attention compute scores, weights, and outputs for every token.Advanced
- Learning by trial and errorLearn a gridworld by trial and errorWatch Q-learning and SARSA learn a maze and a cliff walk from rewards alone, one move at a time, with no map of the world.Intermediate
- Inside the modelModel microscopeLook inside a real language model in your browser. Read its guess at every layer, see all 270 attention heads, and switch parts off.AdvancedDownloads about 272 MB
- Models that seeRecognizing objectsRun a real image classifier and a real object detector on sample photos, your own pictures, or your camera, and see what their labels and scores mean.IntermediateDownloads a 24 MB classifier and a 27 MB detector, each on request
- Models that hear and speakSpeech to textRun Whisper in your browser on clean speech, five speakers, added noise, silence, or your own voice, and see the spectrogram it reads and when it heard each word.AdvancedDownloads an 80 MB model
- FrontiersDiffusion from noise to dataWatch noise turn into a 2D dataset using the exact reverse diffusion process, with the score field drawn as arrows.Advanced
- Securing AIInstructions hidden in an emailAttack a toy email assistant running SmolLM2-135M-Instruct with lines hidden in emails, and test what prompt wording, allowlists, confirmation, and privilege separation catch.AdvancedDownloads about 272 MB
How we got here
123 milestones from a logical model of the neuron in 1943 to reasoning models today, each with its sources. Explore the history of AI





















