Beyond Text Compression: Evaluating Tokenizers Across Scales

Jonas F. Lotz, António Vilarinho Lopes, Stephan Peitz, Hendra Setiawan, Leonardo EmiliACL 2025

Abstract

Selecting an optimal tokenizer is a critical "day zero" decision in the development of Large Language Models (LLMs), as it dictates how raw text is mapped to the subword units processed by the model. This paper investigates the scalability of tokenizer performance and introduces novel intrinsic metrics based on Zipf’s Law. We demonstrate that 350M-parameter models serve as highly accurate proxies for 2.7B-parameter models, allowing for an 85% reduction in evaluation costs. Furthermore, our proposed Zipfian metrics significantly outperform standard text compression as predictors of multilingual model performance.

Introduction

Tokenizers act as the primary interface between raw text and neural architectures. Once training commences, the tokenizer remains fixed; any subsequent changes necessitate a complete restart of the training process. Traditionally, developers have relied on text compression—the efficiency with which a tokenizer represents a corpus—as the primary metric for selection. However, compression often fails to correlate with downstream "intelligence," particularly in multilingual contexts. This study addresses the need for more robust, cost-effective evaluation methods for tokenizer selection.

Methodology

The researchers trained 12 distinct models across two scales: 350M and 2.7B parameters. Six prominent tokenizers were evaluated, including those from GPT-4 (Tiktoken), Llama (GPT-NeoX), and Aya 23. The experimental setup, including vocabulary sizes and training compute requirements, is detailed in Table 1.

Table 1: Experimental setup showing vocabulary sizes, parameter counts, and training hours for the 350M and 2.7B model scales.

Zipfian Metrics

Beyond standard compression, the study introduces four intrinsic metrics inspired by Zipf’s Law:

  1. Cardinality: The count of unique tokens utilized in a sample.
  2. Rank-frequency AUC: The area under the curve of token frequency versus rank.
  3. Slope: The gradient of the frequency curve.
  4. Power Law Deviation: The degree to which the token distribution deviates from a theoretical Zipfian power law.

These metrics were aggregated using a Bradley-Terry model to create a unified tokenizer leaderboard.

Key Insights and Results

The 350M Proxy

A primary finding is the high correlation in performance between 350M and 2.7B parameter models. This validates a "small-scale pilot" strategy, where tokenizers are evaluated at the 350M scale to predict their efficacy at much larger scales, saving substantial compute resources.

Multilingual Performance and Zipf's Law

While English performance is relatively insensitive to tokenizer choice at these scales, multilingual tasks reveal significant disparities. The Aya 23 tokenizer emerged as a superior choice for multilingual applications, likely due to its token distribution closely following natural language patterns across various scripts.

Figure 1: Log-rank vs. log-frequency plots across English (X-SUM), Czech (CS), Russian (RU), and Chinese (ZH), illustrating how different tokenizers adhere to Zipfian distributions.

The Power Law Deviation metric proved to be a more reliable predictor of multilingual performance than standard compression. Using their combined Zipfian metrics, the authors could predict the "best" tokenizer in pairwise comparisons with an F1 score of up to 0.92. In a notable result, a 350M model equipped with the Aya 23 tokenizer outperformed a 2.7B model using the GPT-2 tokenizer on translation tasks, highlighting that superior tokenization can effectively compensate for an 8x difference in parameter count.

Conclusion

This research establishes that tokenizer performance is consistent across scales and that Zipfian distribution metrics provide a more nuanced understanding of tokenizer quality than simple compression. Future work should extend these findings to frontier models (70B+ parameters) and more morphologically diverse languages to further refine these evaluation frameworks.

Summary updated

BibTeX
@inproceedings{lotz2025beyond,
  author = {Jonas F. Lotz and António Vilarinho Lopes and Stephan Peitz and Hendra Setiawan and Leonardo Emili},
  title = {{Beyond Text Compression: Evaluating Tokenizers Across Scales}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2025},
}
Figure