3Blue1Brown: Large Language Models explained briefly — notes

Updated 2026-10-02 · Video: 3Blue1Brown, published 2024-11-20 · 8 min

Watch the video (8 min)

Watch the original video on YouTube

This is 3Blue1Brown’s eight-minute, non-technical overview of large language models (LLMs). It covers what an LLM computes, how chatbots are built on it, how training works at a high level, and where transformers, attention and feed-forward layers fit. It needs no background and works as a starting point for the whole series. If you have watched chapters 1–4, you will see the same ideas (parameters, cost, backpropagation) at a much larger scale. The detailed follow-ups are the chapters on transformers, attention and how LLMs store facts.

Key takeaways

  1. An LLM outputs a probability for every possible next word, not a single word (0:33).
  2. A chatbot is a prompt plus repeated sampling. The randomness in sampling is why answers vary (0:53).
  3. Behavior lives entirely in the parameters, hundreds of billions of them, set by training rather than by hand (1:51).
  4. Training is two stages: pretraining on internet text, then reinforcement learning with human feedback (3:47).
  5. Transformers read all the text at once and use attention to let word vectors refine each other in context (4:38).

Chapter notes

0:00 – 0:53 A machine that predicts the next word

The video opens with a movie script whose AI reply has been torn off. With a machine that predicts the next word, you could complete it one word at a time. That, Grant says, is exactly what happens when you use a chatbot. The model does not commit to a single word: it assigns a probability to every possible next word.

The prompt Paris is a city in feeding into a box labelled Large Language Model, which outputs a bar chart of next-word probabilities with France highest, followed by words like and, the and Logan
0:48 — The core output: a probability distribution over the vocabulary. "France" is most likely, but every other word still gets some probability.

This is the same kind of object as the 10 output neurons in chapter 1, just with one output per vocabulary item instead of per digit.

0:53 – 1:51 From predictor to chatbot

To build a chatbot, lay out text describing a conversation between a user and a helpful AI assistant, insert what the user typed, and let the model predict the assistant’s reply word by word.

Text reading What follows is a conversation between a user and a helpful, very knowledgeable AI assistant, then User: Give me some ideas for what to do when visiting Santiago, then AI Assistant: blank, feeding into the Large Language Model box
0:53 — A chatbot is a framing prompt plus the user's message. The model just continues the document, playing the assistant's part.

Two details here are often misunderstood. First, the output looks more natural if the system sometimes picks less likely words at random. So although the model is deterministic, the same prompt usually gives different answers. Second, the scale of data: reading the text used to train GPT-3 non-stop would take a person over 2,600 years, and newer models train on much more.

1:51 – 3:20 Parameters and how training sets them

Grant reuses the dial metaphor from chapter 1. The model’s behavior is entirely determined by continuous values called parameters or weights. What makes it “large” is having hundreds of billions of them. Nobody sets them by hand. They start random, so the model outputs gibberish, and are refined using example text.

The language model drawn as a machine covered in small dials, taking It was the best of times it was the and outputting probabilities for worst, age, worse and other words
1:51 — Parameters as dials on a machine. Turning any dial changes the next-word probabilities. Training is the search for good dial settings, as in chapter 2's 13,002 knobs.

Each training example works the same way: feed in all but the last word, compare the prediction with the true last word, and use backpropagation to make the true word slightly more likely and the others slightly less.

Training example It was the best of times it was the worst, with the last word worst held out; the model's probabilities are shown and the bar for worst is pushed up
2:33 — One training step: hide the last word, predict it, then nudge every parameter so the true word's probability goes up.

If you have seen chapters 3 and 4, this is the same algorithm. Only the network and the cost differ. LLMs score the probability given to the correct word, typically with cross-entropy, rather than squared error over ten digits. Repeat this over trillions of examples and the model also predicts sensibly on text it has never seen.

3:20 – 3:47 How much computation?

Grant poses a quiz. If you could do one billion additions and multiplications every second, how long would all the operations for training the largest models take? A year? Ten thousand years?

Panel headed 1 Billion computations per Second listing rows of large multiplications and additions
3:20 — The setup for the compute quiz. The answer, "well over 100 million years," is why training needs huge clusters of specialized chips.

3:47 – 4:22 Pretraining versus RLHF

All of the above is pretraining. Completing random internet text is not the same goal as being a good assistant, so chatbots also go through reinforcement learning with human feedback (RLHF). Workers flag unhelpful or problematic predictions, and their corrections further change the parameters.

Slide titled Training showing Step 1: Pretraining, with a text passage feeding into a grid of tunable parameters that outputs the next word, beside a robot icon with a speech bubble
3:47 — Step 1 is pretraining on raw text. The assistant behavior comes from a second step, RLHF, which the video calls "just as important."

A useful way to hold this: pretraining gives the model knowledge of language and the world, and RLHF shapes how it uses that knowledge in a conversation. The video stays at this level; it does not describe how the human feedback is turned into parameter updates.

4:22 – 4:57 GPUs and the transformer

Pretraining at this scale is only possible on GPUs, chips built to run many operations in parallel. But older language models read text one word at a time, which does not parallelize well. In 2017 a team at Google introduced the transformer, which takes in the whole text at once.

A GPU chip icon above many parallel lines running from Input to output
4:22 — GPUs do many operations at once. The transformer's design choice was to make language models fit that parallel hardware.

4:57 – 6:10 Inside a transformer: vectors, attention, feed-forward

The first step is turning each word into a long list of numbers. Training only works with continuous values, so language has to be encoded as numbers. Each list may somehow capture the word’s meaning.

The words of Down by the river bank ... until they jumped into the, each with an arrow down to its own column of numbers
4:57 — One vector per word (strictly, per token). These columns are the "activations" that flow through the whole model.

What sets transformers apart is attention: it lets these vectors “talk to one another” and refine their meanings from context, all in parallel. The example is “bank,” whose vector should shift toward riverbank in “down by the river bank” and toward a financial bank in “deposit a check at the bank.”

Attention block in the model, with two phrases: Down by the river bank, with an arrow from river to bank and a picture of a riverbank, and Deposit a check at the bank, with arrows to bank and a picture of a bank building
5:23 — Attention in one picture. Context words update the vector for "bank" so it carries the right meaning. The attention chapter shows the actual computation.

The second block type is a feed-forward neural network, which gives the model extra capacity to store patterns learned in training. It is the same kind of layer as the digit classifier in chapter 1, applied to each vector. Data passes through many alternating rounds of attention and feed-forward layers, and each vector is enriched with whatever is needed to predict the next word. The how LLMs store facts chapter looks inside those feed-forward blocks.

6:10 – 7:01 The final prediction, and why it is hard to explain

At the end, one last function maps the final vector, now informed by the whole context and by what was learned in training, to a probability for every possible next word. Grant stresses that researchers design the framework, but the specific behavior is “an emergent phenomenon” of how the parameters are tuned. That is why it is so hard to say why a model predicts what it does. It is the same lesson as chapter 2, where the digit network’s hidden layers did not learn the parts anyone expected.

7:01 – 7:58 Where to go next

Grant points to his deep learning series for the details of transformers and attention, and to a talk on the same topic on his second channel.

Skip list

  • 0:00 – 0:33 The torn-script story. It is a nice hook, but the takeaway is restated right after.
  • 7:01 – 7:58 Series plug and Patreon credits. The follow-up chapters are linked above.

Glossary

  • Large language model (LLM) — a neural network that assigns probabilities to the next word (token) of a text.
  • Parameters / weights — the continuous values that fully determine a model’s behavior; set by training.
  • Pretraining — training on large amounts of text to predict the next word.
  • RLHF — reinforcement learning with human feedback; tunes a pretrained model toward answers people prefer.
  • Transformer — the architecture introduced in 2017 that processes all words in parallel and relies on attention.
  • Attention — the operation that lets each word’s vector update itself using the other words in context.
  • Feed-forward network — the per-vector neural network block in a transformer, which adds capacity to store learned patterns.
  • Sampling — picking the next word at random according to the model’s probabilities, which makes chatbot answers vary.

FAQ

What is a large language model, according to 3Blue1Brown?

A large language model is a mathematical function that takes a piece of text and assigns a probability to every possible next word. A chatbot repeatedly samples a next word from that distribution and appends it to the text.

Why does a chatbot give different answers to the same prompt?

The model itself is deterministic, but the chatbot samples the next word at random from its probabilities, sometimes picking less likely words. The video notes this makes the output look more natural, and it means the same prompt usually gives a different answer each time.

How much compute does training a large language model take?

The video's illustration: at one billion additions and multiplications per second, doing all the operations for training the largest models would take well over 100 million years.

What is the difference between pretraining and RLHF?

Pretraining teaches the model to predict the next word on huge amounts of internet text. Reinforcement learning with human feedback then adjusts the parameters based on workers flagging unhelpful or problematic answers, so the model behaves more like a useful assistant.

Studying another course? Paste its YouTube or Bilibili link on the home page to request a handout — or make your own with the desktop app (coming soon).

Updated 2026-10-02 · By Yao

Not affiliated with the creators, universities or companies whose videos are covered here. Videos belong to their creators; this site only adds commentary.

Sources & credits

How these notes were made

A human watched the full video and wrote these notes with AI assistance for drafting. Stills are limited to a handful of frames used for commentary, each linked to its timestamp; no transcript is reproduced. Spot an error? Let us know via the contact page.