Do All Languages Cost the Same? Tokenization in the Era of Commercial Language Models

Orevaoghene Ahia, Sachin Kumar, Hila Gonen, Jungo Kasai, David R. Mortensen, Noah A. Smith, Yulia Tsvetkov

Abstract

Commercial Large Language Models (LLMs) typically charge users per "token," a unit of text processing. This paper identifies a systemic "token tax" where speakers of non-Latin script languages (such as Telugu or Amharic) pay significantly more—up to 15 times the cost—than English speakers for the same semantic content. Furthermore, these users receive lower-quality results due to reduced context window capacity, a phenomenon the authors describe as "double unfairness."

Introduction: The Tokenization Problem

Most commercial LLMs interact with text through tokenization, breaking strings into subwords or tokens. API vendors then charge based on the volume of these tokens. However, because tokenizers are data-driven and trained predominantly on English and Latin-script corpora, they are highly efficient at representing Western languages while struggling with others.

For languages with different writing systems or less representation, tokenizers "fragment" text into numerous small pieces, sometimes down to individual bytes. This creates a massive disparity: a sentence that costs pennies in English can cost several times more in another language, even if the information conveyed is identical.

Visualizing the tokenization disparity and cost difference between English and Greek.

Methodology

The researchers conducted a three-stage systematic analysis of ChatGPT (gpt-3.5-turbo) and the open-source BLOOMZ model:

  1. Fragmentation Analysis: Comparing token counts for identical sentences across different languages using the FLORES-200 parallel corpus.
  2. Cost-Utility Evaluation: Measuring model performance on multilingual benchmarks (XNLI, XFACT, XQUAD, XLSUM) and assessing how fragmentation limits the effective context window for "few-shot" learning.
  3. Socio-Economic Correlation: Correlating tokenization efficiency with the Human Development Index (HDI) of regions where the languages are spoken.

Key Insights: Script Bias and the Context Tax

The study reveals that script type is a primary driver of cost. Even when controlling for data size, scripts like Telugu, Tamil, and Georgian are inherently more "expensive" under standard Byte-level BPE tokenization than Latin or Hangul.

Beyond financial cost, there is a "Context Tax." LLMs have a fixed token limit for their context window. A language that is five times more fragmented effectively has a five times smaller "memory." This makes in-context learning—providing examples within a prompt to improve performance—nearly impossible for many languages, as the examples quickly exhaust the available token limit.

Key Results and Socio-Economic Impact

The quantitative results highlight a stark digital divide:

  • Cost Disparity: Languages like Telugu can require 5x to 15x more tokens than English to convey the same information.
  • Performance Degradation: In tasks like summarization, while English prompts can accommodate multiple few-shot examples, languages like Amharic often cannot fit even a single example, forcing a reliance on zero-shot prompts which yield inferior results.
  • Regressive Taxation: The authors found a strong negative correlation (~ -0.5) between a country's HDI and its language's fragmentation rate. The "token tax" effectively acts as a regressive tax on the Global South, where API access is already less affordable.
Impact of fragmentation on context window availability for in-context learning across various languages.

Conclusion and Future Directions

The paper highlights a critical inequity in the current LLM ecosystem. While open-source models like BLOOMZ show more equitable tokenization due to balanced training data, commercial models remain heavily biased.

The authors urge API vendors to adopt more equitable pricing models, such as character-based pricing or language-specific tiers. They also advocate for the development of "tokenization-free" models or script-agnostic algorithms to ensure that the benefits of AI are accessible to all, regardless of their native script.

Summary updated

BibTeX
@inproceedings{ahia2023do,
  author = {Orevaoghene Ahia and Sachin Kumar and Hila Gonen and Jungo Kasai and David R. Mortensen and Noah A. Smith and Yulia Tsvetkov},
  title = {{Do All Languages Cost the Same? Tokenization in the Era of Commercial Language Models}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2023},
  doi = {10.18653/v1/2023.emnlp-main.614},
}
Figure