Abstract
Large multilingual language models typically rely on a single vocabulary shared across 100+ languages. As these models have increased in parameter count and depth, vocabulary size has remained largely unchanged. This vocabulary bottleneck limits the representational capabilities of multilingual models like XLM-R. In this paper, we introduce a new approach for scaling to very large multilingual vocabularies by de-emphasizing token sharing between languages with little lexical overlap and assigning vocabulary capacity to achieve sufficient coverage for each individual language. Tokenizations using our vocabulary are typically more semantically meaningful and shorter compared to XLM-R. Leveraging this improved vocabulary, we train XLM-V, a multilingual language model with a one million token vocabulary. XLM-V outperforms XLM-R on every task we tested on ranging from natural language inference (XNLI), question answering (MLQA, XQuAD, TyDiQA), to named entity recognition (WikiAnn). XLM-V is particularly effective on low-resource language tasks and outperforms XLM-R by 11.2% and 5.8% absolute on MasakhaNER and Americas NLI, respectively.
Introduction: The Vocabulary Bottleneck
Most state-of-the-art multilingual models, such as XLM-R or mT5, utilize a shared vocabulary of approximately 250,000 tokens to cover over 100 languages. While model depth and parameter counts have scaled significantly, vocabulary sizes have remained static. This creates a "vocabulary bottleneck": on average, each language is allocated only about 2,500 unique tokens.
For languages with complex scripts (e.g., Chinese) or low-resource languages, this leads to "over-tokenization," where words are fragmented into tiny, semantically meaningless sub-words or individual bytes. This fragmentation hinders the model's ability to learn semantic relationships and increases sequence lengths, negatively impacting performance on downstream tasks like Named Entity Recognition (NER) and Question Answering (QA).
Methodology: Scaling the Multilingual Vocabulary
To address this, we introduce XLM-V, which scales the vocabulary to one million tokens. Our approach relies on three key innovations:
- Lexical Fingerprinting: Rather than simple binary presence/absence of tokens, we represent each language using "unigram log probabilities." This provides a statistical signature of sub-word frequencies within each language.
- Language Clustering: We employ K-Means clustering to group 116 languages into 8 clusters based on these fingerprints. This ensures that languages with similar scripts share vocabulary, while dissimilar languages do not compete for capacity.
- Smart Capacity Allocation: We use the Average Log Probability (ALP) metric to determine the optimal number of tokens for each cluster, ensuring robust representation for diverse and low-resource languages.
The resulting XLM-V model is a 12-layer Transformer trained on 2.5TB of CC100 data. We found that standard training with a 1M vocabulary was stable, despite the increased parameter count.
Experimental Results
XLM-V was evaluated across a wide range of benchmarks, including XNLI (Natural Language Inference), MLQA/XQuAD/TyDiQA (Question Answering), and WikiAnn (NER).
Performance Gains
XLM-V consistently outperformed the XLM-R baseline across all tasks, with an average absolute improvement of 3.5 points. The gains were most pronounced in low-resource settings, where XLM-V achieved an 11.2% F1 improvement on MasakhaNER and a 5.8% accuracy boost on Americas NLI.
Efficiency and Semantics
Beyond accuracy, the larger vocabulary improves tokenization efficiency. XLM-V produces sequences that are, on average, 11.5% shorter than those of XLM-R. This allows the model to process more context within its fixed sequence length. Furthermore, tokenization becomes more semantically cohesive; for instance, complex Chinese phrases that were previously fragmented are now represented as single tokens.
Discussion: The Zipf Ceiling and Compute Efficiency
Our analysis revealed a "Zipf Ceiling": scaling beyond 1M tokens (to 1.5M or 2M) resulted in performance degradation. This is due to the long-tail nature of token distributions; extremely rare tokens do not appear frequently enough for the model to learn high-quality embeddings.
Interestingly, while the 1M vocabulary increases total parameters by 3.3x (primarily in the embedding matrix), training time per iteration only increases by approximately 25%. This suggests that large vocabularies act as a form of efficient conditional computation, where only a small fraction of parameters are activated for any given input.
Conclusion
XLM-V demonstrates that scaling vocabulary is a critical, yet often overlooked, dimension for improving multilingual models. By moving past the 250k token bottleneck, we achieve significant gains in both performance and efficiency, particularly for under-represented languages. Future work will explore hierarchical clustering and the application of these techniques to large-scale autoregressive models.
Summary updated