LESSON 14.01 · 6 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW
Perplexity
Watch a model's token probabilities turn into one score: the perplexity.
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 · 14.01 · EVALUATION BAY7 TOKENS · LOWEST P 0.172
01
Stage 1 of 6 · Token probabilities
The model predicts each token of a held-out sentence. Each bar is the probability of the true token.
Explain it simply
The model reads a sentence it never saw in training. Before each token, it gives that token a probability. It counts which tokens came after the same context in its 8 training sentences, plus k for every token. A tall bar means the model saw this token coming.
7 bars, one per token of “the dog sleeps on a mat”. The highest probability is 0.618, the lowest 0.172.
test tokensprobability, perplexitybits, cross-entropyvocabulary
Toy: an n-gram model counted on 8 short sentences
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
Each probability is the smoothed share of times the token followed its context.
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.