Why LLMs Can't Tell 3.11 From 3.9 (And It's Not a Reasoning Bug)
Tokenization, not intelligence, explains why LLMs struggle with math, cost more for non-English text, and mangle unfamiliar words. Here's the mechanism.
On this page
Type “Hello world!” into an LLM and it doesn’t see two words and a punctuation mark — it sees something closer to ['Hello', ' world', '!'], and from that point forward, everything the model does happens in terms of those fragments, not the original text. This isn’t a minor implementation detail buried below the interesting part of how LLMs work. It’s the lens the entire model sees through, and a surprising share of what looks like an LLM “reasoning” incorrectly is actually the tokenizer having already discarded the information the model would have needed.
What a token actually is
A token can be a whole word, a fragment of a word, a single character, a punctuation mark, or a run of whitespace — which one depends entirely on the tokenization algorithm and how frequently that exact chunk showed up in training data. "I love machine learning!" might tokenize as ["I", "love", "machine", "learning", "!"] — five clean word-tokens — or as ["I", " love", " machine", " learn", "ing", "!"], six tokens with “learning” split apart, depending on which tokenizer and vocabulary size is in play.
Every token maps to an integer ID, and that ID maps to a dense numerical vector (an embedding) — the actual thing the neural network computes on. Text never touches the model’s math directly; only the numbers derived from tokenization do.
Byte Pair Encoding: building a vocabulary by merging, not splitting
The dominant method behind GPT-family models is Byte Pair Encoding (BPE), and its logic is worth internalizing because it explains why common words survive intact while rare ones fragment:
1. Start with a vocabulary of individual characters.
2. Count every adjacent character-pair's frequency across the training corpus.
3. Merge the single most frequent pair into one new token.
4. Repeat — recount, merge the next most frequent pair — until the
vocabulary reaches its target size (commonly 30K-100K tokens).
A word like “the” gets merged into a single token early, because “t”+“h” and “th”+“e” are extremely frequent pairs. A rare, novel word like “biocatalyst” never accumulates enough frequency for its full form to merge — it stays fragmented into pieces the model has seen elsewhere, like “bio” and “catalyst”, which is actually a feature: the model can still extract useful meaning from familiar subword pieces even for a word it’s never seen whole.
Standard BPE built on Unicode characters can still hit an unrecognized character. Byte-level BPE operates on raw UTF-8 bytes instead, guaranteeing every possible input — any character, in any language, including ones absent from training data — can always be represented, eliminating the “unknown token” failure mode entirely.
The other tokenization families, briefly
Where tokenization becomes an actual capability limit, not just trivia
The 3.11 vs 3.9 problem
Numbers get split into fragments too: "3.11" might become ["3", ".", "11"] and "3.9" might become ["3", ".", "9"]. At that point, the model isn’t comparing two floating-point values at all — it’s continuing a token sequence based on statistical patterns learned from training data, over symbolic fragments that no longer carry the numeric relationship a human reader takes for granted. The model can still get it right — through training on this exact kind of comparison, through system-prompt hints, or by calling an external calculator tool — but “reasoning about magnitude” was never actually happening at the token level.
Non-English text costs more, structurally
Tokenizers are typically built from training corpora skewed toward English, so common English words collapse into single tokens far more often than equivalent words in languages with different scripts or morphology. The practical result: the same sentence, translated, can require meaningfully more tokens in a non-English language — which means higher API cost (billed per token) and less room in a fixed context window, purely as a side effect of vocabulary construction, independent of the model’s actual language competence.
Code generation quality tracks tokenizer alignment
Code depends on precise, consistent structural units — operators, identifiers, indentation — and a tokenizer that splits these inconsistently disrupts the model’s ability to learn and reliably reproduce that structure. A tokenizer well-aligned with a language’s actual syntax measurably improves completion accuracy, formatting consistency, and bug-detection quality, because the model is operating over tokens that correspond to real logical units instead of arbitrary character runs.
The rough numbers worth keeping in your head
Do
Use rough estimates for English text when sizing prompts or budgeting API cost: roughly 1 token per 4 characters, roughly 0.75 words per token, roughly 100 tokens per short paragraph.
Don't
Apply those same English-text ratios to non-English content, code, or heavy numeric/symbolic text — all three commonly consume noticeably more tokens per unit of actual content, and budgeting on English-text assumptions will underestimate real cost.
Takeaway
A meaningful share of what reads as an LLM’s reasoning limitation is actually a tokenization artifact one layer below reasoning entirely — the model doing exactly what it’s built to do (predict likely continuations of a token sequence) over an input that’s already lost information a human reader assumes is preserved. Numbers get fragmented into symbols, unfamiliar words get chopped into unfamiliar pieces, non-English text gets taxed by a vocabulary built around another language, and code gets harder to generate correctly when its syntax doesn’t tokenize cleanly. None of that is a flaw in the model’s intelligence — it’s the lens the model sees through, and understanding the lens explains a surprising number of “why did it get that wrong” moments that have nothing to do with reasoning at all.
Frequently asked questions
Why can't LLMs reliably tell whether 3.11 or 3.9 is bigger?
The model never sees '3.11' and '3.9' as numbers to compare — a tokenizer splits them into fragments like ['3', '.', '11'] and ['3', '.', '9'] first. From that point on, the model is pattern-matching over token sequences it has seen during training, not performing floating-point comparison. It doesn't reason numerically about the fragments; it predicts what's statistically likely to follow, which can produce a wrong answer even though the underlying comparison is trivial for a calculator.
What's the actual difference between a token and a word?
A token is whatever unit the tokenizer's algorithm decided to split text into — which could be a whole word, part of a word, a single character, punctuation, or whitespace, depending on the tokenization method and how common that exact chunk was in training data. Common words are often single tokens; rare or unfamiliar words get split into smaller subword pieces, which is why token count and word count are related but never identical.
Why do non-English languages typically cost more to run through the same LLM?
Most widely-used tokenizers were built with English-heavy training corpora, so common English words often collapse into a single token while equivalent words in other languages — especially those with different scripts or morphology — fragment into multiple tokens. More tokens for the same amount of meaning means higher API cost and less content fitting into the same context window, a structural disadvantage baked into the tokenizer itself, not the model's reasoning ability.
How does Byte Pair Encoding actually build its vocabulary?
BPE starts with a vocabulary of individual characters, then repeatedly finds the most frequent adjacent pair in the training corpus and merges it into a new single token, growing the vocabulary one merge at a time until it reaches a target size. Common words end up fully merged into single tokens because their component pairs kept winning the frequency contest; rare words stay fragmented into smaller pieces because their specific character combinations never occurred often enough to earn a merge.
Why does tokenization affect a model's ability to generate correct code?
Code depends on precise, consistent structure — indentation, operators, identifier boundaries — and a tokenizer that splits these inconsistently disrupts the model's ability to learn and reproduce that structure reliably. A tokenizer well-aligned with a programming language's actual syntax (keeping meaningful units like operators or indentation intact) measurably improves a model's accuracy on completions, formatting, and bug detection, because the model is working with tokens that correspond to logical units of code, not arbitrary fragments.



/* Comments */
Comments are offline right now — we reconnect automatically, nothing is lost.