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.

  1. Novice13 lessons, 3 hr 21 min

    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?

  2. Beginner11 lessons, 3 hr 8 min

    How machines learn

    Loss, gradients, and generalization: the loop behind every trained model.

    Start with The learning loop

  3. Intermediate7 lessons, 2 hr

    Neural networks

    Neurons, layers, and backpropagation, built up one piece at a time.

    Builds on How machines learn

    Start with Layers are matrix multiplications

    Intermediate8 lessons, 2 hr 15 min

    Language as vectors

    Tokens, embeddings, and similarity: how text becomes geometry.

    Builds on How machines learn

    Start with Tokens

  4. Advanced13 lessons, 4 hr 2 min

    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

    Intermediate5 lessons, 2 hr

    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

  5. Advanced6 lessons, 2 hr 45 min

    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

    Advanced9 lessons, 2 hr 28 min

    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

    an intermediate lesson that needs only Convolutions (Neural networks) and Attention, step by step (Transformers and LLMs).

    Advanced5 lessons, 1 hr 28 min

    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

    an intermediate lesson that needs only Turning things into numbers (AI from zero).

    Advanced12 lessons, 4 hr 27 min

    Frontiers

    Diffusion, multimodal models, mixture of experts, agents, reasoning, and evaluation.

    Builds on Transformers and LLMs

    Start with Diffusion: from noise to data

  6. Advanced6 lessons, 2 hr 31 min

    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 labs

Labs 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.

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

Try "embedding", "softmax", "overfitting", or "backpropagation".