BLOG ILLUSTRATION / EXECUTION STORY

Token IDs become next-token logits

Formatted text becomes IDs, embedding vectors and contextual states. Sampling appends a new ID for embedding at the next position. The loop does not carry one unchanged token through all stages.

Token IDs become next-token logitsFormatted text becomes IDs, embedding vectors and contextual states. Sampling appends a new ID for embedding at the next position. The loop does not carry one unchanged token through all stages. Text → IDs format + tokenize Embeddings embedding lookup Transformer contextual hidden states Prediction state last input position Vocabulary logits scores for next token New token ID sample from logits append ID → next input
Tokenization gives IDs, embeddings give vectors, and Transformer blocks add context. Vocabulary projection and sampling give a new token ID. Each step embeds the newly appended ID, and no single token travels unchanged through the loop. The author made this explanatory diagram. The playback is an example. Animation time is not measured runtime. Open full-size SVG