Skip to content

08Chapter 08 of 09· 6 min ·

How the model generates text

At each step the model predicts the next word from everything written so far. It uses over that history.

Generation is next-word prediction. The model looks at the words so far and gives every possible next word a percent. It picks one — usually a high-percent option — adds it to the text, and repeats. is how each new word uses the history.

That loop, after enough data and training, can look like reasoning, personality, or refusal. The loop is next-word prediction.

Pick a candidate next word. These percents are examples for likely next words.

The annotator caught the error because █

Highlighted words are the ones with the highest in this example.

The list of likely next words comes from training. Later scores and example replies change that list.

Quiz

7 questions

Before moving forward, test your knowledge of what you’ve just learned!

  1. 1.When a model generates a sentence, it is primarily:

  2. 2.Why can this still look like reasoning?

  3. 3.A distribution here is:

  4. 4.Argmax means:

  5. 5.Sampling means:

  6. 6.Attention during generation is:

  7. 7.Your labels change:

0 of 7 answered

8 / 9