Chapter 4 of 36 · ~1 min

Next-Token Prediction Playground

Now put the two ideas together. The model looks at a sequence of tokens and produces a probability for every possible next token. One is chosen, appended to the sequence, and the process runs again. A paragraph of fluent text is the result of running that loop a few hundred times.

Watching this happen changes how you read model output. Every sentence is a chain of local decisions. There is no plan stored somewhere that the text is being copied from, only a very good sense, at each step, of what plausibly comes next.

Experiment

Live model

Type a few words and ask a live model for its next-token predictions. The bars are the real probabilities. Click any token to append it and watch the distribution move, or keep taking the model's own pick and see a sentence grow one token at a time.

The dog chased the

0 of 40 tokens appended

Runs against a live model through Chatterfly's server. Your text is sent to the model provider and not stored. A leading dot marks a space inside a token.

Big question

Where in this loop would you say the meaning of the output lives?