Before the First Token
Prefill: Process the Prompt
Before the first new token, a text-generating model processes the supplied prompt. This phase is called prefill. It calculates information about the prompt that will be used to predict the first new token.
- 1
Prompt tokens enter
→ - 2
Compute their representations
→ - 3
Obtain first-token scores
→ - 4
Select the first new token
By the end of this lesson
You’ll explain what happens before the first output token appears.