Learn AI Layer by Layer

Learn AI Layer by Layer

An interactive guide to understanding AI from first principles.

Subscribe to messyprogress.substack.com to find out when new chapters get released.

Start Learning

Introduction

What this is and how to use it

1

Computation

Everything is numbers

2

Optimization

The power of incremental improvement

3

Neural Networks

Building a brain

4

Vectors

Describing the world with numbers

5

Embeddings

From words to meanings

6

Next-Word Prediction

Understanding by predicting

7

Attention

Letting words look at each other

8

Positional Encoding

Where am I?

9

Transformers

One architecture to rule them all

10

Post-Training

Teaching a model to be useful

11

Conversations

One long document, pretending to be a chat

12

Reasoning

Thinking by talking to yourself

13

Agents

Getting things done

14

Matrix Math

Thinking by rotating

Coming soon

15

Making Training Work

Why training almost doesn't work

Coming soon

16

Mixture of Experts

Only wake the specialists you need

Coming soon

17

Long Context

Remembering a million words

Coming soon

18

Inference and Hardware

Running models fast

Coming soon

19

Interpretability

Looking inside the mind

Coming soon

20

Reinforcement Learning

Learning from experience

Coming soon

21

Self-Play

Getting better by beating yourself

Coming soon

22

Alignment

Teaching AI right from wrong

Coming soon

23

Distillation and Synthetic Data

Models teaching models

Coming soon

24

Image Comprehension

Teaching machines to see

Coming soon

25

Image Generation

Drawing pictures

Coming soon

26

World Models

Simulating reality

Coming soon

27

Audio

Listening, speaking, and singing

Coming soon

28

Hallucination and Grounding

Making stuff up

Coming soon

29

Context Management

Getting the right information

Coming soon

Appendixes

A1

PyTorch from Scratch

A hands-on introduction to the code behind AI

A2

Glossary

Words this tutorial uses, in one place