LESSON 29.23 · 5 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW
Stop sequences, EOS and log probabilities
Watch a server decide when a reply ends and how sure the model was.
Needs29.22 Beam search
Pro lesson. Stage 1 is free to watch. Pro opens all 5 stages, 3 controls and 3 checks, in this lesson and every other.
Go Pro · $8.25/moEXPLAINER · 29.23 · DECODE LOOPSTEP 1 · THE · LN P −0.24
01
Stage 1 of 5 · Pick a token
The model gives each of its 10 tokens a probability. Greedy decoding picks “The” and keeps its log probability.
Explain it simply
The bars under the tokens show how likely each next token is after the prompt. The tallest bar wins, so the reply starts with The. The server also writes down the log of its chance, minus 0.24 here. A log of a chance is never above zero.
Ten probability bars. The token The has probability 0.79 and log probability minus 0.24.
promptreply tokens, log probabilitiesEOS, stop sequence, token limit
Toy: a 10-token bigram model, greedy, max 12 tokens
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
The log probability is the natural log of the chosen token's probability.
PRO LESSON · YOU WATCHED STAGE 1 OF 5
Unlock the full explainer
- 4 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.