Abstract
Modern Large Language Models (LLMs) are predominantly English-centric, leading to significant inefficiencies when applied to non-English languages. These models often suffer from high "fertility"—requiring more tokens to represent text—and catastrophic forgetting of original knowledge during adaptation. This paper introduces a streamlined adaptation pipeline using "tokenizer surgery" and balanced data mixing. By replacing only 10% of the model's vocabulary and maintaining a 50/50 data split, the researchers achieved state-of-the-art performance in Hungarian and Thai while preserving English reasoning capabilities and significantly increasing inference speed.
Introduction
The dominance of English in LLM training data creates two primary barriers for global accessibility. First, tokenizer inefficiency acts as a "compute tax." Because vocabularies are optimized for English, words in other languages are fragmented into numerous sub-tokens, making processing slower and more expensive. Second, catastrophic forgetting occurs when a model loses its original reasoning abilities after being fine-tuned on a new language.
To address these, this research proposes a two-stage adaptation pipeline: Adaptive Pretraining (PT) followed by Instruction Tuning (IT), utilizing specific architectural and data-centric strategies.
Methodology
Tokenizer Surgery
Rather than expanding the vocabulary—which increases parameter count and memory overhead—the authors performed "tokenizer surgery." They identified the 5,000 least-frequent tokens in the original English tokenizer and replaced them with the most frequent tokens from the target language.
As shown in the figure above, replacing just 5,000 tokens (roughly 10% of the vocabulary) drastically reduces fertility. For Hungarian, fertility improved by 42%, while Thai saw a 73% improvement. This efficiency gain directly translates to faster training and inference speeds, effectively tripling throughput for Thai text.
Balanced Data Mixing
To combat catastrophic forgetting, the authors implemented a balanced data-mixing strategy. During both pretraining and instruction tuning, English and target-language data were mixed at a 50/50 ratio. This approach ensures the model retains its "cross-lingual transfer" capabilities—applying logic learned in English to the new language.
The evaluation of different mixing ratios demonstrates that as the percentage of target-language data increases, performance on native tasks improves significantly. Crucially, by maintaining a substantial portion of English data, the regression on English benchmarks was limited to a negligible 1-2%.
Results and Evaluation
The adapted 13B parameter models demonstrated superior performance compared to both general-purpose multilingual models and those trained from scratch:
- Hungarian: The adapted model achieved 54.9% accuracy on multi-choice tasks, outperforming Llama2-7B (43.9%) and XGLM-7.5B (42.8%).
- Thai: The model reached 49.9% accuracy, surpassing the specialized
openthaigpt-7b-chat(43.7%). - Efficiency: Due to the improved tokenizer, the Thai model's inference speed effectively tripled, representing text with 73% fewer tokens than the base English model.
Conclusion
The "10% rule" for vocabulary replacement combined with a 50/50 data-mixing strategy provides a highly efficient recipe for language adaptation. This method allows researchers to leverage the massive compute invested in English-centric LLMs to create high-performing models for new languages with minimal additional cost and no loss of original capabilities.
Reference: Csaki, Z., Pawakapan, P., Thakker, U., & Xu, Q. (2023). Efficiently Adapting Pretrained Language Models to New Languages. Presented at the Efficient Natural Language and Speech Processing Workshop @ NeurIPS 2023.
Summary updated