AI Made Simple · 4 min read
Language models do not read words the way you do. They read tokens, and knowing what a token is explains several odd behaviors, from strange spellings to usage limits.
Text cut into pieces
Before a language model can work with text, the text is chopped into small pieces called tokens. A token can be a whole common word, part of a longer word, a single character or a bit of punctuation. As a rough rule for English, one token is about four characters, so 100 tokens come to around 75 words.
Tokens become numbers
Each token has an ID number from a fixed list called the vocabulary. The model never sees letters. It sees a sequence of numbers, and everything it does is arithmetic on them. Its job, at every step, is to predict which token is likely to come next.
Why this explains odd behavior
- Counting letters in a word can go wrong, because the model sees pieces, not individual letters.
- Rare names, new words and other languages are often split into more pieces, so they cost more.
- Numbers can be split in odd places, which makes careful arithmetic harder.
- Prices and limits are usually counted in tokens, not words.
What to do with this
When a tool says you are near a limit, think in tokens: long pasted documents use a lot of them. If a model slips on spelling or counting, ask it to work step by step or use a tool built for the job, such as a calculator or a spreadsheet.
