Skip to content
Back to chapters

How LLMs Generate Text

Watch step by step how a language model produces text token by token

Tokenization

LLMs see the world in sub-words — tokens, not whole words. Type text and see the tokens.

Type text to see its tokens

Next-Token Prediction

Based on all previous tokens, the statistically best next token is selected.

This demo runs on prepared examples. In the course you work with your own input.

Output

Click "Generate" to see the output.