A token is the unit a language model reads and writes. It might be a common word with its leading space, part of a longer word, a punctuation mark or a single byte. Each token has an ID, a whole number that points to its entry in the model’s vocabulary.
Tokens are not words. A short, common word is often one token, but a long or unusual word may be several, and a letter outside plain English, such as a macron vowel, is stored as more than one byte. Underneath, text is bytes, almost always in UTF-8, and modern tokenisers build their vocabularies on top of those bytes so that nothing is ever unknown.
Everything a model does is counted in tokens. The context window is a number of tokens, and the memory a runtime sets aside grows with every token it holds. Speed is measured in tokens a second, and hosted services usually charge by the token too.
When a model writes, it produces one token at a time. It gives every token in its vocabulary a raw output called a logit, a sampler picks one, and that token is added to the text before the next step. A model’s vocabulary is fixed when it is trained, so the same text can be a different number of tokens for different models.
The explainer shows the same sentence as bytes and as tokens, so you can see how many positions a model really pays for.