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

Matrix Math

Thinking by rotating

Coming soon

11

Making Training Work

Why training almost doesn't work

Coming soon

12

Mixture of Experts

Only wake the specialists you need

Coming soon

13

Long Context

Remembering a million words

Coming soon

14

Inference and Hardware

Running models fast

Coming soon

15

Interpretability

Looking inside the mind

Coming soon

16

Reinforcement Learning

Learning from experience

Coming soon

17

Self-Play

Getting better by beating yourself

Coming soon

18

Reasoning Models

Thinking by talking to yourself

Coming soon

19

Alignment

Teaching AI right from wrong

Coming soon

20

Distillation and Synthetic Data

Models teaching models

Coming soon

21

Image Comprehension

Teaching machines to see

Coming soon

22

Image Generation

Drawing pictures

Coming soon

23

World Models

Simulating reality

Coming soon

24

Audio

Listening, speaking, and singing

Coming soon

25

Agents and Tool Use

Getting things done

Coming soon

26

Hallucination and Grounding

Making stuff up

Coming soon

27

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