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

Everything Is Numbers

Computation

2

The Power of Incremental Improvement

Optimization

3

Building a Brain

Neural networks

4

Describing the World with Numbers

Vectors

5

From Words to Meanings

Embeddings

6

Understanding by Predicting

Next-word prediction

7

Paying Attention

Attention

8

Where Am I?

Positional encoding

9

One Architecture to Rule Them All

Transformers

10

Thinking by Rotating

Matrix math

Coming soon

11

Why Training Almost Doesn't Work

Making training work

Coming soon

12

Only Wake the Specialists You Need

Mixture of experts

Coming soon

13

Remembering a Million Words

Long context

Coming soon

14

Running Models Fast

Inference and hardware

Coming soon

15

Looking Inside the Mind

Interpretability

Coming soon

16

Learning from Experience

Reinforcement learning

Coming soon

17

Getting Better by Beating Yourself

Self-play

Coming soon

18

Thinking by Talking to Yourself

Reasoning models

Coming soon

19

Teaching AI Right from Wrong

Alignment

Coming soon

20

Models Teaching Models

Distillation and synthetic data

Coming soon

21

Teaching Machines to See

Image comprehension

Coming soon

22

Drawing Pictures

Image generation

Coming soon

23

Simulating Reality

World models

Coming soon

24

Listening, Speaking, and Singing

Audio

Coming soon

25

Getting Things Done

Agents and tool use

Coming soon

26

Making Stuff Up

Hallucination and grounding

Coming soon

27

Getting the Right Information

Context management

Coming soon

Appendixes

A1

PyTorch from Scratch

A hands-on introduction to the code behind AI