LESSON 5.17 · 6 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW
Embeddings and weight tying
Watch one table turn token IDs into vectors, then score the next token.
Pro lesson. Stage 1 is free to watch. Pro opens all 6 stages, 3 controls and 3 checks, in this lesson and every other.
Go Pro · $8.25/moEXPLAINER · 5.17 · EMBEDDING BAY6 TOKENS · VOCAB 8 · CAT = ID 1
01
Stage 1 of 6 · Tokens to IDs
The prompt has 6 tokens. Cat has ID 1, its row in a vocabulary of 8 tokens.
Explain it simply
A model can't read words, so the text is first split into tokens. Each token gets an ID, its row number in the vocabulary on the left. The prompt the cat sat on the mat becomes six IDs. An ID is only a name tag, and it says nothing about meaning.
Six token chips read the cat sat on the mat, with IDs 0, 1, 2, 3, 0 and 4. The vocabulary list marks cat, ID 1.
tokens and vectorsweightsprobabilities, cosinelosssame table again
Toy: 8 tokens, 4 numbers per row, 1000 steps
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
Each token maps to one whole number, its ID.
PRO LESSON · YOU WATCHED STAGE 1 OF 6
Unlock the full explainer
- 5 more stages and 3 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.