Introduction
In the development of Large Language Models (LLMs), significant resources are typically allocated to architectural scaling and data curation. However, the tokenizer—the component responsible for segmenting raw text into discrete units—is often treated as a "blind spot." This study challenges the assumption that tokenizer choice is negligible, demonstrating that it is a critical factor influencing both model intelligence and training efficiency. Through a comprehensive ablation study of 24 models, the authors show that suboptimal tokenizer selection can degrade downstream performance by up to 9% and inflate training costs by as much as 68%.
Methodology
The researchers trained 24 decoder-only models, each with 2.6 billion parameters, keeping training data (52.6 billion tokens) and hyperparameters constant. The variables tested included:
- Algorithms: Byte-Pair Encoding (BPE) and Unigram.
- Libraries: HuggingFace (HF) and SentencePiece (SP).
- Vocabulary Sizes: 33k to 100k tokens.
- Language Settings: Monolingual (English) and Multilingual (English, German, French, Italian, Spanish).
The models were evaluated using two massive 70-billion-word datasets (Monolingual and Multilingual) across a suite of standard benchmarks, including XNLI, ARC, and HellaSwag.
Key Findings
The "Fertility" Fallacy
A common metric for evaluating tokenizers is fertility—the number of tokens required to represent a word. While lower fertility implies better compression, this study reveals it is a questionable proxy for model performance. For English models, increasing vocabulary size beyond 33k improved compression but negatively impacted downstream task performance.
The Hidden Cost of English-Centricity
The choice of tokenizer has profound financial implications. Using an English-centric tokenizer for multilingual models leads to "excessive fragmentation" of non-English text. This fragmentation forces the model to process significantly more tokens to capture the same information, increasing training costs by up to 68%.
Library and Linguistic Nuances
The implementation library proved as significant as the algorithm itself. SentencePiece generally outperformed HuggingFace’s BPE implementation, likely due to differences in pre-processing. Furthermore, linguistic preferences emerged: Germanic languages (English, German) favored BPE, while Romanic languages (French, Spanish) performed better with the Unigram algorithm.
Key Results and Performance
- Optimal Vocabulary: The "sweet spot" for monolingual English is a 33k vocabulary. For multilingual models covering five European languages, a larger vocabulary of approximately 100k is necessary to maintain performance.
- Accuracy Gaps: Tokenizer choice resulted in performance variances of up to 9% on tasks like ARC-Easy.
- Top Performer: The SentencePiece BPE implementation with a 100k vocabulary (
BPE-SP-100) was identified as the most effective configuration for multilingual settings.
Conclusion and Future Work
The study underscores that tokenization is a primary design choice in LLM training. Future research should expand these findings to "frontier" scales (70B+ parameters) and more diverse language scripts, such as Cyrillic or Hanzi, to further refine our understanding of optimal tokenization strategies.
Summary updated