You hear 'fertility is 2.5 for Hindi on cl100k_base'. What does that number mean and is it good?
Fertility of 2.5 means Hindi averages 2.5 tokens per word on cl100k_base. English scores around 1.3, so Hindi costs roughly 2x more per word across billing, context capacity, and latency.
Imagine the tokenizer is a translator paid per output word. An efficient translator uses one short symbol per common input word and finishes fast. A clumsy translator needs to spell things out letter by letter, taking more symbols and costing more money. Fertility measures how many output symbols the translator needs per input word. English on most tokenizers scores around 1.3, like a fluent translator. Hindi on cl100k_base scores 2.5, like a translator who knows only basic shortcuts. Tamil can hit 4 to 5 on the same tokenizer, which is why API calls in those languages cost more per character. Newer tokenizers with bigger vocabularies have improved these numbers, but the gap is still there.
Detailed answer & concept explanation~6 min readEverything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
5 min: define fertility as tokens per word on a specific corpus, explain why 2.5 for Hindi on cl100k_base is mediocre by citing English at 1.3, connect to cost and capacity and latency, identify the structural cause in English dominated corpora, and note how o200k_base and Llama 3 have narrowed the gap.
Real products, models, and research that use this idea.
- Ahia et al. 2023 published a 24-language fertility benchmark on cl100k_base showing English at 1.3 tokens per word and Telugu at around 7, a 5.5x cost gap between the two languages.
- OpenAI's jump from cl100k_base (100K vocab) to o200k_base (200K vocab) for GPT-4o and later models was explicitly motivated by improved multilingual and code fertility.
- Meta's Llama 3 tokenizer at 128K vocab measurably reduced fertility on most non-English languages compared to Llama 2's 32K SentencePiece tokenizer.
- Tiktokenizer, an open source web tool, lets you paste arbitrary text and see token counts for any tiktoken encoding, making it trivial to measure fertility on your own corpus before committing to a model.
What an interviewer would ask next. Try answering before peeking at the approach.
QWhy does English fertility differ between cl100k_base and o200k_base?
QIf fertility matters so much, why not make vocabularies very large?
Don't say thisRed flags and common mistakes that signal junior thinking. Click to expand.
Red flags and common mistakes that signal junior thinking. Click to expand.
Confusing fertility with vocabulary size. A larger vocabulary tends to reduce fertility, but they measure different things: fertility is a realized compression ratio on a corpus, vocabulary size is a count of available tokens.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.
Same topic, related formats. Practice these next.