Context window
The prompt and everything generated so far become the model's working memory.
The model creates an answer one piece at a time. Each new piece is added to the input before the model chooses the next one.
Run the scripted response continuously or advance one model step at a time.
The model creates an answer one piece at a time. Each new piece is added to the input before the model chooses the next one.
Scripted telemetry illustrates the operations an actual model performs for every generated token.
| Step | Decoded piece | Token ID iToken ID The vocabulary number assigned to a token. The model receives this number rather than the visible text. | Context pos. iContext position The token’s numbered place in the full input and generated sequence currently visible to the model. | Logit iLogit A raw score produced by the model for a possible next token. Larger scores become larger probabilities after normalization. | P(token) iProbability The model’s estimated chance that a candidate should be selected next, expressed here as a percentage. | Σ log P iCumulative log probability A running score for the likelihood of the generated sequence. More negative values mean the full sequence is less likely. | Stop check |
|---|---|---|---|---|---|---|---|
| Run or step the loop to record its first token. | |||||||
Token IDs, logits, and probabilities are deterministic teaching values; the control flow mirrors autoregressive inference.
Inside this moment
The prompt and everything generated so far become the model's working memory.
The model ranks possible continuations. These bars illustrate the current choice—not hidden model logits.
Sampling turns a weighted possibility into the next concrete piece of the response.
If the answer is unfinished, the new token joins the context and the whole path runs again.