Tokenizer Benchmark · Optimized Pipeline · 4 Scripts
1.20×

English hits its target exactly — and every other language dropped along with it.

Grapheme-aware pre-tokenization (keeping matras and conjuncts glued to their base consonant) plus phrase-level merging brought all four languages within 0.26 of each other, using only 62% of the total vocabulary budget.

Fertility (X) — generated tokens ÷ raw word count, after PMI phrase-merging and BPE run to full convergence, per language.

The optimization journey

Original shared tokenizer
Vocab budget10,000 (fixed, shared)
English X1.422
Spread (max − min)5.859
Score170.7
Optimized pipeline (this report)
Vocab budget used6,224 of 10,000
English X1.200
Spread (max − min)0.257
Score3,897.1

Ranked by fertility

X = tokens / raw words
1
EnglishEN
English
1.200tok / word
2
TeluguTE
తెలుగు
1.363tok / word
3
HindiHI
हिन्दी
1.398tok / word
4
MalayalamML
മലയാളം
1.457tok / word

Vocabulary budget usage

6,224 of 10,000 tokens allocated

3,776 unused
English — 4,413 Hindi — 703 Telugu — 555 Malayalam — 553 Unused — 3,776

The full ledger

LanguageRaw wordsVocab usedTokensFertility (X)
English11,8904,41314,2681.200
Telugu6,6685559,0901.363
Hindi14,42070320,1531.398
Malayalam10,01855314,5921.457

English was tuned to land exactly at its 1.2 ceiling — no more vocabulary spent than needed. Telugu, Hindi, and Malayalam were run to full convergence with grapheme-aware pre-tokenization (matras and conjuncts pre-glued to their base consonant) and PMI-based phrase merging; each stopped only when no mergeable pair remained.

Spread
0.257
Score
3,897.1
Combined vocab
6,224 / 10,000

Get the tokenizer

tokenizer.json

The original tokenizer artifact this whole analysis started from — vocabulary, merges, and the four-language ratio metadata included.

1.36 MB JSON Custom multilingual BPE export
Download file ↓