Tokenizer
The system that converts text into the token units used by an model.
Save conceptWhat it means
A tokenizer is the system that converts text into the smaller units a language model can process. It maps pieces of text to numerical identifiers from a vocabulary. Those pieces may be whole common words, fragments of less common words, spaces or punctuation. Decoding performs the reverse mapping so generated identifiers become readable text.
How it works
Many modern text models use subword tokenization. Instead of needing a separate vocabulary entry for every possible word, they reuse smaller pieces to represent unfamiliar words. Different algorithms and learned vocabularies choose different boundaries. The tokenizer must match the model: sending the numerical identifiers from one vocabulary to a model trained on another would change what those numbers mean.
A hypothetical example
Consider an illustrative vocabulary containing “farm”, “ers” and a space. It could represent “farmers” using two tokens, while another vocabulary might contain “farmers” as one. This is a made-up demonstration of the principle, not the output of a particular commercial tokenizer. If 100 occurrences require two tokens each, they use 200 token positions; a one-token representation uses 100, before spaces or other formatting.
What to distinguish
Splitting a word into tokens is not the same as understanding its meaning, and a tokenizer is not a translation system. Token boundaries need not match syllables or grammatical units. A provider changing tokenizer can change billed usage or context consumption even when the submitted text stays identical. Compare counts using the tokenizer actually attached to the model, rather than assuming every provider's “token” is interchangeable.