How AI works · Tokens
The Model Never Sees Your Words
Before a language model reads anything, a small program chops your text into pieces from a fixed menu. That menu was learned from someone else's text, and it decides what the model can notice, how much of your document fits, and how many units you are billed for.
Take a paragraph in English and the same paragraph professionally translated into Spanish. Send both to a model running on OpenAI's current tokenizer, the one behind GPT-4o and GPT-5. The Spanish version needs about a third more of the units the model reads and you pay for. In 2020, on OpenAI's tokenizer of the time, it needed twice as many. On DeepSeek's tokenizer, Chinese needs fewer than English.
Neither language changed between 2020 and today. What changed is a layer most people never look at.
Before a model reads your text, a small, fixed program cuts it into pieces and swaps each piece for a number. The pieces are called tokens, and the program is the tokenizer. Here is the whole argument in one paragraph: the model never sees your words, only numbered pieces from a menu that records what was common in the text its builders collected. That menu decides what the model can notice, how much of your material fits, and how many units you're billed for. Choosing it is a market decision, even when nobody experiences it as one.
What actually arrives
Here is one sentence, cut the way OpenAI's current tokenizer cuts it, in four languages. Each block is one token.
o200k_base, the tokenizer behind GPT-4o and GPT-5; a dot marks a leading space.MeasuredSource: tiktoken 0.14.0, o200k_base, run 9 Oct 2026; Catalan and Basque translations made for this piece.Three things stand out. The leading space belongs to the token, so " meeting" with its space and "meeting" without one are different pieces. Common words arrive whole and rarer ones are stitched together from fragments: "rescheduled" becomes res + cheduled. And the menu plainly has favorites. It has a single piece for the Spanish reunión but not for aplazó, and almost nothing for Basque.
Then the pieces become numbers. In this tokenizer, " contract" is token 6698 and " the" is token 290. Inside the model, each number points to a row in a huge table of learned values, called an embedding, and everything the model knows about "contract" lives in how that row relates to all the others. The model never looks inside the piece. It has no direct way to see that "contract" starts with a c.
Why build it this way instead of feeding the model letters? Because letters make sequences long, and long sequences are expensive. In English, OpenAI's current tokenizer packs about five characters into each token. Reading letters instead would make every input about five times longer. In a standard Transformer, the architecture behind today's models, the attention step compares every position with every other, so that part of the work grows with the square of the length: roughly 24 times more for the same text. Generating would take about five times as many steps too, since the model writes one piece per step.
So a tokenizer is a compression scheme, a trade between a bigger menu and shorter sequences. Byte-level models show it can be removed, but as of October 2026 the frontier models people use every day still read tokens.
Where the menu comes from
Nobody writes the menu by hand. It's learned from a large pile of text with a procedure simple enough to fit in a paragraph, called byte-pair encoding.
Start with single characters. Count which pair of neighbors appears most often across the whole pile. Glue that pair into a new piece and add it to the menu. Count again, glue again. Stop when the menu reaches the size you chose: about 50,000 pieces for GPT-3's tokenizer, 100,000 for GPT-4's, 200,000 for GPT-4o's.
Here it is running on a toy pile of fifteen words.
The procedure only cares about frequency. "The" becomes one piece because it's everywhere. "On" stays as two letters because, in this pile, it appears once. Scale that up to billions of words and the conclusion follows on its own.
A tokenizer is a record of what was common in the text it learned from.
If most of that text is English, English words get whole pieces and everything else gets assembled from fragments.
Blind below the piece
The first consequence is the famous one. Chatbots struggled for years to count the r's in "strawberry".
Mid-sentence, " strawberry" is a single token. Ask "How many r's are in strawberry?" and the model receives eight numbers, one of which stands for the whole fruit. That puts it roughly where you'd be if someone held up 🍓 and asked how many r's it contains. You can answer, because at some point you learned the spelling. But you can't look. You have to remember, then count inside your head.
Models do learn spelling, from all the spelled-out words, rhymes and crosswords on the internet. Counting is a second operation stacked on a remembered spelling, and that stack was wobbly. Research in 2024 found models could identify a word's letters and still miscount the repeated ones, so the counting itself was part of the problem. The tokenizer makes the task harder; exactly how much of the failure it explains is still unsettled. Newer models mostly get strawberry right, partly because the example became famous and partly because reasoning models often write the word out first: s, t, r, a, w… Once the letters exist as separate tokens, the question changes from memory to reading.
Numbers get the same treatment. On OpenAI's tokenizers, 2026 arrives as "202" followed by "6", and 1234567 without commas as "123", "456", "7". Nothing in those chunks says which digit is the units, and the same digits land in different chunks as numbers grow. The best models still learn arithmetic remarkably well, but they learn it around an awkward representation. Meta's first LLaMA models and Alibaba's Qwen avoid it by splitting every number into single digits.
When a task depends on characters, make the characters visible.
The rule is practical. Character limits, rhymes, anagrams, letter-level edits, word counts, checking that a code has exactly eight digits, exact arithmetic: all of it lives below the level the model sees. Ask it to spell the thing out, or better, to write and run a few lines of code. A model is unreliable at seeing letters and good at writing a program that does.
The language premium is partly a choice
The second consequence is the one that reaches the bill.
Some of the Spanish premium belongs to the language. In the same professionally translated sentences, Spanish uses about 19 percent more characters than English to say the same thing. No tokenizer is obliged to hide that.
The rest belongs to the tokenizer, and you can watch it move by training small tokenizers yourself with the same algorithm and menu size but different diets. Fed 90 percent English, a tokenizer needs 1.46 times as many tokens for the Spanish version. Fed half and half, 1.15, close to the character gap. Fed 90 percent Spanish, the Spanish text needs fewer tokens than the English. Same sentences; only the diet changed.
At scale the picture looks like this.
On OpenAI's current tokenizer, the large Western European languages need 20 to 50 percent more tokens than English for identical content: Spanish 1.32 times, German 1.31, French 1.37, Italian 1.47. Smaller languages of the same region tend to need more than their larger neighbors: Catalan 1.48, Basque 1.60. On the Qwen and DeepSeek tokenizers, built by Chinese labs, the big four European languages need 50 to 63 percent more, while DeepSeek's reads Chinese more compactly than English and Qwen's reads Chinese and English at parity.
Writing systems add a handicap before training even starts. These tokenizers begin from bytes, the raw units computers store text in. A Latin letter takes one byte; a Devanagari letter, used for Hindi, takes three. The same Hindi sentence starts out more than twice as long in bytes as its English equivalent, and the learned merges have to climb back from there.
The menu also moves between model generations. OpenAI's 2024 tokenizer made Hindi roughly three times more compact relative to English than its 2023 one, with no change in price per token. It can move the other way. When Anthropic released Claude Opus 4.7 in April 2026, it said the new tokenizer maps the same input to roughly 1.0 to 1.35 times as many tokens depending on the content, and its pricing page puts it at about 30 percent more for the same text. The rate card didn't have to change for the number of billed units per task to move.
What it does to your bill, and what it doesn't
It's tempting to read "Spanish 1.32" straight onto an invoice. That overstates it for most real work.
Guess first
Your team works in Spanish and runs coding agents. Compared with working in English, does the token bill rise by about a third, by a few percent, or not at all?
The ratio applies to prose. Code costs about the same whatever language your team speaks: def calculate_total(items): is five tokens on OpenAI's current and previous tokenizers and on Qwen's and DeepSeek's. Data formats and numbers are close to language-neutral too. Reasoning models add another wrinkle. Their hidden working, the thinking tokens billed as output, often drifts into English even when the question was asked in another language, so the premium may apply there only partly.
A rough rule for the token part alone: the extra cost is about the prose share of your tokens times the ratio minus one. If prose is 20 to 40 percent of what a coding agent reads and writes, working in Spanish adds a few percent to the low teens. For a customer-service assistant, which is nearly all prose, it's about a third. That's real money at scale and rarely the biggest lever. How a task is framed, how much irrelevant material gets pushed into context and how many times an agent loops before finishing routinely move costs by multiples (Where the AI Money Goes).
The exception is languages the menu barely covers. Amharic needs nearly six times as many tokens as English on OpenAI's current tokenizer. At that ratio, the premium alone shapes what a business can afford to build.
The same premium shows up in two other places. Room: a context window that holds 100 pages of English prose holds about 76 of Spanish, and for English, 200,000 tokens is roughly 160,000 words (What Fits Versus What Gets Used). Time: a model writes a roughly steady number of tokens per second whatever the language, so the Spanish version of an answer takes about a third longer to appear.
Does it think worse in Spanish?
That's the harder question, and the honest answer is that two causes are tangled. Fragmenting is itself a handicap: the model builds meaning from more, smaller pieces, each seen less often. Controlled experiments on smaller models, identical data and different tokenizers, found English-centric tokenizers clearly hurt multilingual performance; nobody has run that test at frontier scale. But the languages that get fragmented are usually the ones with less text in the training data, and less data means less learned. From outside you can't separate the two, which is why a token ratio is a poor measure of quality.
For major languages the news is mostly good. On a translated knowledge test, a stronger reasoning model narrowed the gap between Spanish and lower-resource languages like Swahili and Yoruba, though the language with the least data still trailed furthest. And Anthropic, tracing what happens inside its Claude models, found concepts shared across English, French and Chinese, with language-specific machinery concentrated at the input and output, and a larger shared fraction in a bigger model. Its researchers add that English remains, in a meaningful sense, privileged. Understanding looks largely shared, with a tilt toward the language the model saw most.
So for Spanish, French or German, translating prompts into English as a precaution is usually unnecessary; test it on your own task before paying the cost in clarity. There's a better argument for picking one working language for instructions, documentation and code, and it has little to do with intelligence. Mixed-language instructions create small ambiguities (is "cliente" the same field as "customer"?), and ambiguity costs more than tokens.
Who sets the menu sets the unit
Step back and the tokenizer stops looking like a technical detail. It's one of the places where the economics of AI get decided, quietly, before anyone writes a pricing page.
Per-token pricing passes the builder's data mix on to the customer. A provider that trained its tokenizer mostly on English charges every non-English customer more units for the same content, a surcharge that never appears as a line item. Chinese labs ship tokenizers that favor Chinese. OpenAI cut the relative cost of Hindi by about two thirds in one generation. Whoever wants a language market has to fix this layer first.
Two business consequences follow. Cost models built on English case studies are off for everyone else: a Spanish customer-service deployment should expect around a third more tokens on OpenAI's current tokenizer than the English pilot it was budgeted from, and about half again as many on Qwen's or DeepSeek's, while a Spanish-speaking engineering team running coding agents can mostly ignore the issue. And a model upgrade can quietly be a unit change. Teams that track cost per finished task see it immediately. Teams that track price per million tokens see nothing until the invoice arrives.
Some companies now budget tokens per team the way they once budgeted cloud spend. That's a useful unit in the way a kilowatt-hour is useful: it measures what was consumed. Neither tells you what got done, and both look different depending on who built the meter.
What to do
Make characters and digits visible. When a task depends on letters, exact counts or arithmetic, ask the model to spell it out or, better, to use code.
Compare providers on cost per finished task, with your own material. A price per token only means something once you know the token, and each provider defines its own and can redefine it with a release (Cost per Task, Not Cost per Token).
Measure context in your documents, not in tokens. The useful question is how many of your contracts or tickets fit.
Budget non-English work from its own numbers. Expect roughly 20 to 50 percent more tokens for prose in major European languages on OpenAI's current tokenizer, more on others, much more for many Asian and African languages, and about the same for code and data.
Test quality in your language, on your task. Don't infer it from the token ratio.
The broader habit is the one worth keeping. When an AI system does something oddly stupid, ask what it actually received. Very often the answer sits one layer below the intelligence: in how the text was cut, what was left out of the context, or what the surrounding software chose to show it. The tokenizer is the first of those layers. Same Model, Different Results looks at the rest.
Check yourself
Why did chatbots struggle to count the r's in strawberry?
Mid-sentence the word is a single token, so the model gets one number and cannot look at the letters. It has to remember the spelling and count in its head.
Why can a model upgrade raise your bill when the price per token has not changed?
A new tokenizer can turn the same text into more tokens, so the billed units per task move even though the rate card stays the same.
Why does Spanish add only a few percent for a coding agent but about a third for a customer-service assistant?
The extra tokens apply to prose. Code costs about the same in any language, and a customer-service assistant is nearly all prose.
Notes, sources and method
For readers who want to check the numbers behind The Model Never Sees Your Words. Measurements were run on 9 October 2026 and independently reproduced on 11 October 2026; sources were checked on 11 October 2026.
Key numbers
| Number in the article | Exact value | Source and date | Notes |
|---|---|---|---|
| Spanish needs "about a third more" tokens on OpenAI's current tokenizer | 1.3179 (English 26,873 o200k tokens; Spanish 35,415) | Measured, FLORES-200 devtest, tiktoken, 9 Oct 2026 | o200k_base is assigned by tiktoken's model map to GPT-4o, GPT-4.1, the o-series and GPT-5 models. |
| "Twice as many" in 2020 | 1.98 on r50k_base (GPT-3) | Measured | 1.54 on cl100k_base (GPT-4, 2023). |
| DeepSeek reads Chinese more compactly than English | 0.94× | Measured, DeepSeek-V3 tokenizer.json | Qwen 2.5: 1.00×. |
| " contract" = 6698, " the" = 290, " strawberry" = 101830 | Token IDs on o200k | Verified 11 Oct 2026 | " strawberry" is a single token on all four tokenizers measured. |
| "How many r's are in strawberry?" = eight tokens | How / many / r / 's / are / in / strawberry / ? | o200k | |
| About five characters per token in English; about 0.8 words per token | 4.91 characters; 0.815 words (21,901 words, 131,966 characters) | Measured | Hence 200,000 tokens ≈ 160,000 words. |
| Attention "roughly 24 times more" | 4.91² = 24.1 | Computed | Applies to the attention step of a standard Transformer only. |
| Menu sizes 50,000 / 100,000 / 200,000 | r50k, cl100k, o200k | tiktoken | |
| Toy BPE: fifteen words, 47 symbols to 23 after five merges | "at" appears 9 times | scripts/toybpe.py | 47 → 38 → 32 → 27 → 25 → 23. |
| Spanish uses about 19% more characters than English | 1.190 | Measured | |
| Mix experiment: 1.46 / 1.15 / 0.90 | At 90% / 50% / 10% English, 8,000-piece vocabularies | scripts/mixexp.py, 9 Oct 2026 | 2,000-piece: 1.43 / 1.14 / 0.92. |
| Spanish 1.32, German 1.31, French 1.37, Italian 1.47, Catalan 1.48, Basque 1.60 | o200k ratios | Measured | Galician 1.3352 (rounds to 1.34), about level with Spanish though shorter in characters (1.107 vs 1.190). |
| Qwen and DeepSeek: big four European languages 50–63% more | 1.50–1.63× | Measured | |
| Hindi bytes | 2.55× English bytes; 0.99× characters | Measured | UTF-8: Latin letters one byte, Devanagari three. |
| Hindi "roughly three times more compact" in OpenAI's 2024 tokenizer | cl100k 4.76× → o200k 1.57× (factor 3.02, a cut of about two thirds) | Measured | Generations: Hindi 7.41 / 4.76 / 1.57; Telugu 12.97 / 8.29 / 1.93; Spanish 1.98 / 1.54 / 1.32; Amharic 7.70 → 5.78 (smallest relative change). |
| Claude Opus 4.7: roughly 1.0–1.35× as many tokens; about 30% more | Launch post wording: "the same input can map to more tokens—roughly 1.0–1.35× depending on the content type"; pricing page: "approximately 30% more tokens for the same text" | Anthropic, 16 Apr 2026; pricing page read 11 Oct 2026 [5] | |
def calculate_total(items): = five tokens | 5 on o200k, cl100k, Qwen 2.5, DeepSeek-V3 | Verified | 7 on r50k. |
| Amharic "nearly six times" | 5.7787 | Measured | Burmese 3.1641. |
| 100 pages of English ≈ 76 of Spanish | 1 / 1.318 = 0.759 | Computed | Amharic about a sixth (1 / 5.78 = 0.173). |
| Customer-service deployment: about a third more (OpenAI), about half again (Qwen, DeepSeek) | 1.32 and 1.50–1.52 for Spanish | Measured | Assumes nearly all prose. |
Four tokenizers, four languages (ratio to English)
| Language | OpenAI o200k | OpenAI cl100k (2023) | Qwen 2.5 | DeepSeek-V3 |
|---|---|---|---|---|
| Chinese (Simplified) | 1.25× | 1.87× | 1.00× | 0.94× |
| Hindi | 1.57× | 4.76× | 4.42× | 2.80× |
| Spanish | 1.32× | 1.54× | 1.52× | 1.50× |
| Japanese | 1.66× | 2.27× | 1.40× | 1.42× |
Quality on a translated test (MMMLU, 14 languages)
| Model | Spanish | Swahili | Yoruba |
|---|---|---|---|
| GPT-4o (November 2024 version) | 84.3% | 77.9% | 62.1% |
| o1 | 89.9% | 85.4% | 75.4% |
Swahili trails Spanish by 4.5 points instead of 6.4; Yoruba by 14.5 instead of 22.2. The language with the least data still trails furthest [6].
Method and assumptions
Corpus. FLORES-200 devtest: 1,012 English sentences from Wikinews, Wikijunior and Wikivoyage, professionally translated into each language (Meta AI / NLLB team, CC BY-SA 4.0). Downloaded from dl.fbaipublicfiles.com/nllb/flores200_dataset.tar.gz on 9 Oct 2026.
Tokenizers. r50k_base, cl100k_base and o200k_base via tiktoken 0.14.0. Qwen 2.5 and DeepSeek-V3 from their published tokenizer.json files, via tokenizers 0.23.3, without special tokens. Ratios are total tokens for a language divided by total tokens for English over the same sentences. A reproduction with tiktoken 0.12.0 gave identical counts.
Decomposing the premium. On o200k, 1.318 ≈ 1.19 (characters) × 1.107 (tokenizer), so the tokenizer's share is the smaller part; on cl100k, 1.544 ≈ 1.19 × 1.297, the larger part.
Mix experiment. Byte-level BPE (Hugging Face tokenizers), vocabularies of 2,000 and 8,000, trained on 480 sentences from non-overlapping halves of the FLORES dev split so English and Spanish training text are not translations of each other; evaluated on devtest. These are tiny tokenizers: read directions, not magnitudes.
Cost rule. Token premium = prose share × (ratio − 1). It ignores price differences between input and output, cached input discounts, reasoning tokens and quality effects. The 20–40% prose share for agentic work is an illustrative assumption; measure your own mix.
| Working language (o200k ratio) | Prose share 20% | 40% | 100% |
|---|---|---|---|
| Spanish (1.32×) | +6% | +13% | +32% |
| French (1.37×) | +7% | +15% | +37% |
| Hindi (1.57×) | +11% | +23% | +57% |
| Amharic (5.78×) | +96% | +191% | +478% |
Numbers. On o200k, cl100k and DeepSeek, 2026 → 202|6 and 1234567 → 123|456|7; Qwen splits every digit. OpenAI's tokenizers group digits in chunks of up to three, read left to right.
Example sentences in Catalan and Basque were translated for the piece and are illustrative; all ratios come from FLORES. Anthropic's and Google's tokenizers were not measured; Anthropic offers a token-counting API.
Figures. a01-sentence, a01-bpe and a01-world appear in the article. Three figures from the previous version were dropped from the article in the 19 Oct 2026 rewrite and their numbers are in the tables above: a01-mix (mix experiment), a01-generations (three OpenAI tokenizer generations) and a01-digits (how a date is split). Scripts: measure.py, gen.py, mixexp.py, toybpe.py, splits.py.
Caveats and open questions
- Strawberry. Tokenization makes letter counting harder; how much of the historical failure it explains is unsettled. Fu et al. [10] found models "capable of recognizing the letters but not counting them", with repeated letters the strongest correlate of error.
- Ratio versus bill. The measured ratio is a relation between a corpus and an encoding. Bills depend on input versus output prices, caching, reasoning tokens and the composition of the work. Comments and identifiers written in Spanish count as prose.
- Reasoning tokens. Qi et al. [14] found that even the strongest open reasoning models "often revert to English" when thinking about non-English questions, and that forcing the user's language lowers accuracy. Hosted models that hide or summarize reasoning can't be checked, so how much of the premium applies to reasoning tokens is unknown.
- Quality. Ali et al. [15] trained 24 models at 2.6 billion parameters on identical data with different tokenizers and found English-centric tokenizers degraded multilingual performance. No controlled test at frontier scale has been published. Token ratio and data scarcity are confounded.
- Interpretability. Anthropic [7, 8] found features shared across English, French and Chinese, language-specific features concentrated at the first and last layers, and a larger shared fraction in a bigger model (Claude 3.5 Haiku versus a smaller model); its caveat: "there is a meaningful sense in which English is mechanistically privileged." Wendler et al. [9] found Llama 2's intermediate "concept space" closer to English. Neither shows the model translating into English and back.
- Unverified observations. That some companies budget tokens per team, and that framing, irrelevant context and loop counts routinely move costs by multiples, are judgments consistent with Where the AI Money Goes, not measured here.
- Petrov et al. [1] are listed as using the same corpus (FLORES-200); not re-checked against the paper body.
Sources
- Petrov, La Malfa, Torr, Bibi. Language Model Tokenizers Introduce Unfairness Between Languages. NeurIPS 2023. https://arxiv.org/abs/2305.15425 (differences "up to 15 times").
- Ahia et al. Do All Languages Cost the Same? Tokenization in the Era of Commercial Language Models. EMNLP 2023. https://aclanthology.org/2023.emnlp-main.614
- NLLB Team. FLORES-200. https://github.com/facebookresearch/flores/tree/main/flores200
- OpenAI. tiktoken. https://github.com/openai/tiktoken
- Anthropic. Introducing Claude Opus 4.7. 16 Apr 2026. https://www.anthropic.com/news/claude-opus-4-7 ; Anthropic. Pricing, Claude Platform documentation, read 11 Oct 2026. https://platform.claude.com/docs/en/about-claude/pricing
- OpenAI simple-evals. Multilingual MMLU results. https://github.com/openai/simple-evals/blob/main/multilingual_mmlu_benchmark_results.md
- Anthropic. Tracing the thoughts of a large language model. 27 Mar 2025. https://www.anthropic.com/research/tracing-thoughts-language-model
- Lindsey et al. On the Biology of a Large Language Model. 2025. https://transformer-circuits.pub/2025/attribution-graphs/biology.html
- Wendler et al. Do Llamas Work in English? On the Latent Language of Multilingual Transformers. ACL 2024. https://aclanthology.org/2024.acl-long.820
- Fu et al. Why Do Large Language Models (LLMs) Struggle to Count Letters? 2024. https://arxiv.org/abs/2412.18626
- Touvron et al. LLaMA. 2023. https://arxiv.org/abs/2302.13971 (digit splitting); Bai et al. Qwen Technical Report. 2023. https://arxiv.org/abs/2309.16609
- Pagnoni et al. Byte Latent Transformer: Patches Scale Better Than Tokens. 2024. https://arxiv.org/abs/2412.09871 ; see also ByT5.
- OpenAI, reasoning guide; Anthropic, extended thinking documentation: reasoning tokens billed as output. https://developers.openai.com/api/docs/guides/reasoning
- Qi, Chen, Xiong, Fernández, Bitterman, Bisazza. When Models Reason in Your Language: Controlling Thinking Language Comes at the Cost of Accuracy. Findings of EMNLP 2025. https://arxiv.org/abs/2505.22888
- Ali et al. Tokenizer Choice For LLM Training: Negligible or Crucial? 2023–2024. https://arxiv.org/abs/2310.08754