ManiMage.ai

Attention: words talking to each other

How language models workafter The problem attention solves and The only math you need

ManiMage explains how AI works, calculus and statistics in short narrated animations, each one step from the ideas it rests on.

Play2:15

Every lesson

  1. What a language model actually does, 1 min 28 s

    How language models workStart here

  2. Flash attention & the memory wall, 1 min 49 s

    Frontier AIafter Attention: words talking to each other and The KV cache

  3. Functions — the machine metaphor, 2 min 7 s

    CalculusStart here

  4. Probability — measuring maybe, 2 min 23 s

    StatisticsStart here

  5. Tokens and embeddings, 1 min 27 s

    How language models workafter What a language model actually does

  6. Stretching the context window, 2 min 18 s

    Frontier AIafter The KV cache and How the model knows word order

  7. Slope — how steep, how fast, 2 min 24 s

    Calculusafter Functions

  8. Counting the ways, 1 min 58 s

    Statisticsafter Probability

  9. The problem attention solves, 1 min 19 s

    How language models workafter Tokens and embeddings

  10. Transformers that see, 1 min 52 s

    Frontier AIafter Tokens and embeddings, The whole Transformer, assembled

  11. Sine and cosine — the numbers behind rotation, 2 min 18 s

    Calculusafter Functions

  12. Distributions — the shape of chance, 1 min 53 s

    Statisticsafter Counting the ways

Shorts

The first lessons of How language models work, cut vertical for a phone.

  1. What a language model actually does, short, 1 min 5 s
  2. Tokens and embeddings, short, 1 min 11 s
  3. The problem attention solves, short, 1 min 20 s
  4. Attention: words talking to each other, short, 1 min 48 s
  5. Multi-head attention + the MLP, short, 1 min 18 s
  6. The whole Transformer, assembled, short, 1 min 10 s

Courses

Each course is a playlist of short lessons, in the order they build on each other.

  1. How language models work, 20 lessons, 34 minutes

    From What a language model actually does to Opening the black box

  2. Frontier AI, 10 lessons, 18 minutes

    From Flash attention & the memory wall to Diffusion vs autoregression

  3. Calculus, 12 lessons, 27 minutes

    From Functions to The gradient

  4. Statistics, 10 lessons, 21 minutes

    From Probability to Sampling

More lessons

  1. The only math you need, 2 min 7 s

    How language models workStart here

  2. LoRA — fine-tuning at home, 1 min 44 s

    Frontier AIafter How the matrices get filled in and The only math you need

  3. Rates of change — slopes in the wild, 2 min 9 s

    Calculusafter Slope

  4. Expected value — the long-run average, 1 min 43 s

    Statisticsafter Distributions

  5. Neural networks — multiply, add, bend, 2 min 27 s

    How language models workafter The only math you need

  6. Quantization — a giant model on your laptop, 1 min 29 s

    Frontier AIafter The only math you need

  7. The limit — sneaking up on a point, 1 min 33 s

    Calculusafter Rates of change

  8. Spread — when averages lie, 2 min 8 s

    Statisticsafter Expected value

  9. Attention: words talking to each other, 2 min 15 s

    How language models workafter The problem attention solves and The only math you need

  10. Distillation — teaching small models, 1 min 42 s

    Frontier AIafter How the matrices get filled in and Temperature

  11. The derivative — slope at an instant, 2 min 17 s

    Calculusafter The limit

  12. Conditional probability — given that…, 2 min 12 s

    Statisticsafter Counting the ways

  13. Multi-head attention + the MLP, 1 min 50 s

    How language models workafter Attention: words talking to each other and Neural networks

  14. Speculative decoding — a free speedup, 1 min 47 s

    Frontier AIafter No peeking: causal masking and Temperature

  15. The power rule — a beautiful shortcut, 2 min 13 s

    Calculusafter The derivative

  16. Bayes — updating your beliefs, 2 min 23 s

    Statisticsafter Conditional probability

  17. The whole Transformer, assembled, 1 min 31 s

    How language models workafter Multi-head attention + the MLP

  18. Retrieval — the open-book exam (RAG), 1 min 31 s

    Frontier AIafter Tokens and embeddings, The whole Transformer, assembled

  19. Where slopes vanish — maxima and minima, 2 min 7 s

    Calculusafter The power rule

  20. The law of large numbers — why the house wins, 2 min 15 s

    Statisticsafter Expected value

  21. Mixture of Experts (MoE), 1 min 37 s

    How language models workafter Multi-head attention + the MLP

  22. Agents — when words become actions, 1 min 48 s

    Frontier AIafter What a language model actually does and The whole Transformer, assembled

  23. Area under a curve — why accumulate?, 2 min 10 s

    Calculusafter Rates of change

  24. The normal distribution — the bell that rings everywhere, 2 min 21 s

    Statisticsafter The law of large numbers and Distributions

  25. Tokenization and BPE, 1 min 54 s

    How language models workafter Tokens and embeddings

  26. Diffusion vs autoregression, 1 min 51 s

    Frontier AIafter The whole Transformer, assembled and Transformers that see

  27. The integral — infinitely thin slices, 2 min 11 s

    Calculusafter Area under a curve and The limit

  28. Sampling — the spoonful and the soup, 1 min 59 s

    Statisticsafter The law of large numbers

  29. Supervised learning — examples with answers, 2 min 24 s

    How language models workafter Neural networks

  30. The bridge — the fundamental theorem, 2 min 28 s

    Calculusafter The derivative and The integral

  31. How the matrices get filled in, 1 min 50 s

    How language models workafter The only math you need, What a language model actually does and Supervised learning

  32. The gradient — slope grows up, 2 min 48 s

    Calculusafter The derivative

  33. How the model knows word order, 1 min 41 s

    How language models workafter Attention: words talking to each other, Sine and cosine

  34. No peeking: causal masking, 1 min 14 s

    How language models workafter Attention: words talking to each other

  35. The KV cache — what context costs, 1 min 17 s

    How language models workafter Attention: words talking to each other and The whole Transformer, assembled

  36. Pretraining — the internet as flashcards, 1 min 34 s

    How language models workafter How the matrices get filled in and The whole Transformer, assembled

  37. From autocomplete to assistant (RLHF), 1 min 35 s

    How language models workafter Pretraining

  38. Temperature — how models choose, 1 min 31 s

    How language models workafter What a language model actually does and The whole Transformer, assembled

  39. Scaling laws — why bigger got better, 1 min 20 s

    How language models workafter Pretraining

  40. Opening the black box, 1 min 46 s

    How language models workafter Multi-head attention + the MLP, Tokens and embeddings

What do you want to understand?

You get every lesson it rests on, in order. Skip the ones you already know.

If an idea isn't here yet, ask for it. Requests decide what gets drawn next.

Short

Watch the full lesson