← Back to Foundations

Topic Tokens

Foundations · How models work · 7 min read

AI models don't read words, so what do they read?

Updated November 28, 2026: Added a note for every reader card.

Tokens · Part 1 of 3 · 3 min

How text becomes numbers

The most capable AI models in the world have never read a letter the way you do. Before your text reaches ChatGPT, or any other language , a small program chops it into chunks and swaps each chunk for a number. That program is the , and the chunks are tokens. A model can only do arithmetic, so from that point on, numbers are all it ever works with. A token, OpenAI says, can be a single character, part of a word, a whole word or a punctuation mark. And because different models use different tokenizers, they chop the same text in different ways, which Artificial Analysis, an independent group that tests models, singles out as the detail with the biggest practical effect.

You can watch it happen. When we ran the sentence "Cloo explains AI research." through o200k_base, the tokenizer OpenAI uses for its recent models, it came out as 6 . " explains", " AI" and " research" each stayed whole, with the space in front attached, and the period became a token of its own, but "Cloo" was split into "C" and "loo", because the tokenizer had never learned it as a unit. What the model actually received was six numbers. The numbers themselves, 34 for "C" for instance, are just ID numbers, like seat numbers in a theater. The point is that there were six of them.

That may look like trivia, but tokens are the unit of almost everything practical about AI. Prices are set per token. How much a model can read at once, its , is measured in tokens, and so is speed, in tokens per second. Once tokens make sense, a lot of confusing chatbot pricing and behavior starts to make sense too.

Nobody decides by hand where the cuts go. The chunks are learned from data by repeatedly merging the letter pairs that appear together most often, a method called that most modern tokenizers build on. It came to language models through a 2015 paper by Rico Sennrich, Barry Haddow and Alexandra Birch. They were working on translation, and their problem was rare words. A translation model with a fixed of whole words gets stuck the moment it meets a word that isn't on the list, like a new name or a technical term. So they let rare words be spelled out from smaller, common pieces, the way "Cloo" became "C" and "loo", which means no word is ever impossible. They called this open-vocabulary translation. Splitting all the way down to single letters would also make every word possible, but text would then become many times longer, and since the model does a full pass of work for every token, longer text means slower and more expensive answers. Common chunks give the best of both.

The recipe is simple enough to do by hand. You start with every single character as its own symbol, count every pair of neighboring symbols across a huge amount of text, merge the most frequent pair into one new symbol, and then count again and repeat. Common letter pairs merge first, then common syllables, and eventually whole frequent words become single symbols. The number of merges is the method's only setting, and it decides how big the vocabulary ends up.

The result is that common words cost one token and rare words cost several. In OpenAI's tokenizer, " unbelievable" is one token because it shows up often, while the rarer "unbelievably", on its own, becomes three, "un", "bel" and "ievably".

In short

Models read numbers, not letters. A tokenizer cuts text into chunks it learned from data and swaps each chunk for a number, so common words cost one token and rare ones cost several.

  1. Your text
  2. The tokenizercuts it into chunks learned from dataSet during training, then fixed
  3. Token IDsone number per chunk
  4. What the model reads
Example "Cloo explains AI research." becomes 6 tokens, with the unfamiliar "Cloo" split into "C" and "loo".

Quick check (optional)

In OpenAI's tokenizer, " unbelievable" is one token but "unbelievably" is three. Why?

Go deeper2 short reads · 2 min
Why pieces beat a giant word list1 min

It would seem simpler to give a model a huge dictionary of whole words, so it is worth seeing why the field chose pieces instead. Sennrich, Haddow and Birch pointed to whole kinds of words that can be translated piece by piece. Names can be copied or transliterated character by character, compound words can be built from their parts, and words borrowed between languages change in predictable ways. Their tests bore that out. Models built on subword pieces translated rare words more accurately than models with large vocabularies or with a dictionary to fall back on, and they could produce new words never seen in training. That is the same property you see in o200k_base splitting "Cloo" into pieces it does know.

Reading letter by letter doesn't fix the unfairness1 min

If tokenizers treat languages unequally, an obvious fix is to drop learned chunks and feed models single characters or raw bytes, the basic units computers store text in. The 2023 fairness study checked that too. It found that character-level and byte-level models still show over four times the difference in encoding length for some pairs of languages, because some writing systems simply need more characters or bytes to say the same thing. The authors' conclusion is that the answer lies in designing tokenizers to be fair across languages from the start, which is why a tokenizer's treatment of non-English text is worth checking before building a product for readers who don't write in English.

For your work · Generalist

Say you're choosing between two AI plans, one that reads "100,000 tokens" and one that reads "50 pages". Convert before you compare. For English, 100,000 tokens is roughly 75,000 words, and less for many other languages. Prices and limits are both counted in tokens, so that one conversion tells you whether a plan fits your documents and your budget.

Your toolkit · Tokens to words. 100,000 tokens is roughly 75,000 English words. Convert before comparing plans.

For your career · Thinking in tokens lets you follow any conversation about AI cost or limits. Next: Training and weights (what the model does with tokens), then Inference and context.

Career paths are getting more detailed and more tailored to you soon.

People to know

Andrej Karpathy

A founding member of OpenAI and later Director of AI at Tesla.

In Let's build the GPT Tokenizer, part of his free Zero to Hero course, he builds the tokenizer GPT uses from scratch and shows that it has its own training data and its own training method, Byte Pair Encoding.

Let's build the GPT Tokenizer ↗
Words in this lesson (10)
byte pair encoding
A way to learn a tokenizer from data by repeatedly merging the most frequent pair of neighboring symbols into one new symbol.
context window
The most a model can take in at once, counted in tokens, including your message, the conversation so far and any documents.
model
A program that has learned from examples to turn an input, such as your question, into an output, such as an answer. Inside, it is a large set of learned numbers.
output tokens
The tokens a model writes back. They usually cost more than the tokens you send.
reasoning tokens
Hidden working a reasoning model writes before its visible answer. They are billed as output even though you never see them.
tokenizer
The program that chops text into tokens and swaps each one for a number before it reaches the model.
tokens
The small chunks of text a model reads and writes, such as a word, part of a word or a punctuation mark. Prices, limits and speed are all counted in them.
training
The stage where a model learns. It guesses on examples with known answers, and its numbers are nudged until the guesses improve. It happens before the model is put to use.
training compute
The amount of computing work spent training a model, a major part of its cost.
vocabulary
The full list of tokens a tokenizer knows. Larger vocabularies can pack more text into each token.

Sources

Original research and official documents used for this version.

help.openai.com ↗artificialanalysis.ai ↗arxiv.org ↗ar5iv.labs.arxiv.org ↗platform.claude.com ↗platform.claude.com ↗arxiv.org ↗arxiv.org ↗karpathy.ai ↗karpathy.ai ↗

Core path · 3 of 25

Before this · What a neural network is (Coming soon)

Next · Training and weights

See all of Core path

Where things stand now (2026-11-21)

Anthropic's Claude 4.7 and later models use a newer tokenizer that makes about 30% more tokens for the same text than earlier Claude models. Keep that in mind when comparing Claude prices across versions. OpenAI's tool for counting input tokens before you send a request is free to use. Independent price comparisons, like Artificial Analysis, quote prices in each model's own tokens.

Version history

Earlier lessons remain available when the evidence changes.

Version 2 · Added a note for every reader card.

Version 1 · Written from original sources