[Paper Review] TREX: Tokenizer Regression for Optimal Data Mixture
TREX introduces a regression-based framework that predicts optimal multilingual data mixtures for tokenizer training using small proxy tokenizers, enabling scalable search and improved compression efficiency without extensive large-scale tuning.
Building effective tokenizers for multilingual Large Language Models (LLMs) requires careful control over language-specific data mixtures. While a tokenizer's compression performance critically affects the efficiency of LLM training and inference, existing approaches rely on heuristics or costly large-scale searches to determine optimal language ratios. We introduce Tokenizer Regression for Optimal Data MiXture (TREX), a regression-based framework that efficiently predicts the optimal data mixture for tokenizer training. TREX trains small-scale proxy tokenizers on random mixtures, gathers their compression statistics, and learns to predict compression performance from data mixtures. This learned model enables scalable mixture search before large-scale tokenizer training, mitigating the accuracy-cost trade-off in multilingual tokenizer design. Tokenizers trained with TReX's predicted mixtures outperform mixtures based on LLaMA3 and uniform distributions by up to 12% in both inand out-of-distribution compression efficiency, demonstrating strong scalability, robustness, and practical effectiveness.
Motivation & Objective
- Motivate and address how data mixture affects multilingual tokenizer compression and performance.
- Propose a regression-based method to predict optimal data mixtures without large-scale retraining.
- Demonstrate that small proxy tokenizers can guide large-scale tokenizer design effectively.
- Show robustness and scalability of TREX across multilingual and domain-specific settings.
Proposed method
- Sample N data mixtures from the mixture space W using a Dirichlet distribution.
- Train proxy tokenizers on each sampled mixture with small-scale configurations (S, V) and measure compression C.
- Fit a regression model f mapping mixture w to compression C using the proxy tokenizer results.
- Use the trained model to predict compression for candidate mixtures and identify the optimal w*.
- Train a large-scale tokenizer using the predicted optimal mixture w*.
Experimental results
Research questions
- RQ1RQ1: Can TREX effectively approximate an optimal multilingual data mixture for tokenizer training?
- RQ2RQ2: Is the relationship between data mixture and compression consistent across different data and vocabulary scales?
- RQ3RQ3: Can TREX maintain robust compression performance under diverse linguistic and domain-specific settings?
Key findings
- A regression model achieves mean absolute percentage error (MAPE) of 1.989 and Spearman rank correlation ρ > 0.97 at 1GB/64K scale.
- Tokenizers trained with TREX-predicted mixtures outperform baselines by up to 12% in compression efficiency on in-distribution and out-of-distribution data.
- TREX demonstrates rank invariance across scales, with high Spearman correlations (ρ ≥ 0.96) between configurations spanning 1GB/64K to 30GB/200K.
- The TREX-predicted mixtures yield strongest robustness to out-of-distribution data (FLORES) and improved non-Latin language efficiency.
- In large-scale training (S=30GB, V=200K), TREX's wTREX tokenizer achieves the best compression and shortest estimated training time among baselines.
- TREX shows domain adaptability, maintaining high predictive reliability in medical-domain text (Spearman ρ > 0.965, MAPE ≈ 0.921).
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.