★ FOUR BRAND-NEW COURSES ANNOUNCED! ★ Machine Learning End To End  •  Hands-On Deep Learning with Python  •  Generative AI & LLMs with Python  •  AI Agents and Agentic AI with Python  ★  Open the “Educational” menu above to explore them ★  ★  NEW! 5. JOB ASSISTANCE: JD Report • Resume customization • AI Mock Interviews — FREE with course bundles, or just ₹499 / US$5. Single Payment. No Subscription. ★★ FOUR BRAND-NEW COURSES ANNOUNCED! ★ Machine Learning End To End  •  Hands-On Deep Learning with Python  •  Generative AI & LLMs with Python  •  AI Agents and Agentic AI with Python  ★  Open the “Educational” menu above to explore them ★  ★  NEW! 5. JOB ASSISTANCE: JD Report • Resume customization • AI Mock Interviews — FREE with course bundles, or just ₹499 / US$5. Single Payment. No Subscription. ★★ FOUR BRAND-NEW COURSES ANNOUNCED! ★ Machine Learning End To End  •  Hands-On Deep Learning with Python  •  Generative AI & LLMs with Python  •  AI Agents and Agentic AI with Python  ★  Open the “Educational” menu above to explore them ★  ★  NEW! 5. JOB ASSISTANCE: JD Report • Resume customization • AI Mock Interviews — FREE with course bundles, or just ₹499 / US$5. Single Payment. No Subscription. ★★ FOUR BRAND-NEW COURSES ANNOUNCED! ★ Machine Learning End To End  •  Hands-On Deep Learning with Python  •  Generative AI & LLMs with Python  •  AI Agents and Agentic AI with Python  ★  Open the “Educational” menu above to explore them ★  ★  NEW! 5. JOB ASSISTANCE: JD Report • Resume customization • AI Mock Interviews — FREE with course bundles, or just ₹499 / US$5. Single Payment. No Subscription. ★

Not every language pays the same price

Not every language pays the same price
12-10-2026  |  By Tejas Desai, Ecube Analytics  |  Generative AI: Tokenization & decoding (Chapter 2)  |  3 min read
READ 3RD OF 8 IN THIS SERIES

Not every language pays the same price

Tokenization & decoding · Part 3 of 8

Here is a sentence a delivery company might send: “The invoice will be paid next Friday.” Same meaning, five languages. How many tokens does each one cost?

Measure it

I counted tokens for that sentence and four translations with three real, widely used tokenizers. The brackets show the count relative to English for the same tokenizer:

LanguageGPT-2 (50,257 pieces)Qwen2.5 (151,643)XLM-RoBERTa (250,002)
English8810
Spanish16 (2.0×)10 (1.2×)9 (0.9×)
German18 (2.2×)12 (1.5×)7 (0.7×)
Hindi53 (6.6×)32 (4.0×)8 (0.8×)
Arabic34 (4.2×)11 (1.4×)9 (0.9×)
Token counts by languageGrouped bars for three tokenizers across five languages; GPT-2 needs 53 tokens for the Hindi sentence against 8 for English.Tokens needed for the same sentencegpt2Qwen2.5xlm-roberta8810English16109Spanish18127German53328Hindi34119Arabic“The invoice will be paid next Friday.” and its translations. Counts measured on 2026-10-12, special tokens excluded.
The same numbers as the table. GPT-2 pays 53 tokens for the Hindi sentence against 8 for English.

Why does this happen?

A tokenizer’s merges are learned from its training text. A tokenizer built from mostly English text turns English words into one or two tokens, and text in other scripts into many small pieces, sometimes down to individual bytes. The newer Qwen tokenizer, with a bigger and more multilingual vocabulary, cuts the worst gap here from 6.6 times to 4.0 times. XLM-RoBERTa, trained on text in about a hundred languages, is nearly flat on these five sentences.

Why you should care: three bills

  1. Money. Hosted models charge per token, so the identical answer can cost several times more in one language than in another.
  2. Context. A model can only look at a fixed number of tokens at once. If your language needs more tokens, less of your document fits.
  3. Quality. When one word is spread over many tiny pieces, each piece carries little meaning and the model has to put the word back together, often in a language it saw less of in training.

A 2023 study by Petrov and colleagues measured the same content needing up to fifteen times as many tokens in some languages as in others. Five sentences prove nothing general, and the study found large gaps even in tokenizers built for many languages. The safe advice is simple: measure your own text with the tokenizer of the model you plan to use.

from transformers import AutoTokenizer

sentences = {"English": "The invoice will be paid next Friday.",
             "Hindi":   "??? ???? ???????? ?? ?????? ??????"}
for name in ["gpt2", "Qwen/Qwen2.5-0.5B"]:
    tok = AutoTokenizer.from_pretrained(name)
    print(name, {lang: len(tok.encode(s, add_special_tokens=False)) for lang, s in sentences.items()})
# gpt2 {'English': 8, 'Hindi': 53}
# Qwen/Qwen2.5-0.5B {'English': 8, 'Hindi': 32}

Takeaways

  • The same meaning can need very different numbers of tokens in different languages.
  • In this test GPT-2 needed 53 tokens for Hindi against 8 for English.
  • More tokens means more money, less usable context and often lower quality.
  • Always measure your own text with the tokenizer of the model you will use.

Next in the series (Part 4): The one job of a language model: predict the next token

This blog is from chapter 2, course-2-generative-ai of 4 world-class courses on aibits.ecubeanalytics.com
← Previous Article 3 of 8 in this series Next →