LESSON 10.09 · 6 STAGES · 2 CONTROLS · 3 CHECKSPRO · PREVIEW
Encoder-only, decoder-only and encoder–decoder
Follow one sentence through BERT-, GPT- and T5-style transformers.
Pro lesson. Stage 1 is free to watch. Pro opens all 6 stages, 2 controls and 3 checks, in this lesson and every other.
Go Pro · $8.25/moEXPLAINER · 10.09 · FAMILY BAYGPT-STYLE · 1 STACK · CAUSAL MASK
01
Stage 1 of 6 · The stacks
A GPT-style decoder-only model has one stack. Each output row predicts the next token.
Explain it simply
On the left you see one box, the decoder stack. The six words go in at the bottom. On top, each position guesses the word that comes next. Chat models like GPT work this way.
One decoder stack with causal self-attention and an MLP. Six tokens go in; each output predicts the next token. On the right, three cards name the families; decoder-only is picked.
Weights are random, not trained. The toy runs only the attention parts.
tokens, targetsattention weights, outputsweightschange after a new tokenblocked cell
Toy: 6 tokens · width 4 · one head, one layer per stack
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
Each output row adds the attention result to its token vector.
PRO LESSON · YOU WATCHED STAGE 1 OF 6
Unlock the full explainer
- 5 more stages and 2 live controls
- 2 mix-up cards and 3 predict-then-reveal checks
- Watch it as a narrated video, in three voices
- Every Pro lesson and capstone · 656 in total
$99 a year, or $15 a month. Cancel any time.