The same sentence costs 5.6× more tokens in Hindi
GPT-2’s tokenizer needs 62 tokens for a Hindi line that takes 11 in English. A 2024 tokenizer brings it down to 15.
Before training anything, I wanted to see what a model actually reads. Language models never see letters. They see tokens: chunks of text from a fixed vocabulary that was learned once, before training, from whatever data the tokenizer’s authors had.
I took one line and wrote it three ways: English, Hindi and Sanskrit.
Your prediction: GPT-2 needs 11 tokens for the English line. How many for the same line in Hindi?
62 tokens. GPT-2’s vocabulary was learned mostly from English web text, so it has almost no Devanagari pieces. It falls back to raw bytes, and each Devanagari character is three bytes in UTF-8.
Try it yourself
GPT-2 tokenizer (2019)
Loading…
o200k tokenizer (2024)
Loading…
The numbers
| Text | Characters | GPT-2 tokens | o200k tokens |
|---|---|---|---|
| English | 54 | 11 | 11 |
| Hindi | 41 | 62 | 15 |
| Sanskrit | 36 | 61 | 15 |
Why it matters
More tokens means more compute per sentence, a shorter effective context window and a higher API bill. It also makes the model’s job harder, because it has to learn to assemble meaning from byte fragments. The newer tokenizer fixes most of this because its vocabulary was learned from more multilingual data.
What I’d try next
- Train a small BPE tokenizer on Hindi text myself and compare its compression.
- Check how well open-weight models I can fine-tune on Tinker tokenize Devanagari.
- Measure whether a better tokenizer actually improves a small model’s Hindi loss at the same compute.