Skip to content
Learn Motion
ExploreHow it worksMembership
Log in
Learn Motion

How ChatGPT Writes One Token at a Time

1From Your Words to Tokens2Predicting the Next Token3Choosing a Token and Looping4Why the Answer Reads as Coherent Text
Choosing a Token and Looping

One Bar Wins

1 / 4
The distribution is ranked and waiting, but nothing has been chosen yet. Selection means picking exactly one entry from it.
0:00 / 0:00

The model has produced a probability distribution over the vocabulary, but no token has been chosen. Selection means picking one entry from that distribution. In greedy decoding the highest-probability token is always taken. In sampling, a token is drawn at random with probability proportional to its assigned probability, so a token with 40 percent probability is chosen roughly 40 percent of the time. Once selected, the token is appended to the end of the sequence, making the input one token longer.

Previous1 / 4Next

Learn Motion

Generate a course. Learn it properly.

Operated by Wuhan Daoyin Technology Co., Ltd.

Contact: [email protected]
Privacy PolicyTerms of Service

© 2026 Learn Motion