Scaling Laws for Multilingual Language Models

Yifei He, Alon Benhaim, Barun Patra, Praneetha Vaddamanu, Sanchit Ahuja, Parul Chopra, Vishrav Chaudhary, Han Zhao, Xia Song · Submission to ICLR 2025 · Rejected

TL;DR

Researchers have developed a novel scaling law that predicts the performance of multilingual language models based on model size, dataset size, and—crucially—the ratio of languages in the training mix. By focusing on language families rather than individual languages, they’ve created a way to determine the optimal data mixture for a 1.2-billion-parameter model by training models 14 times smaller.

What Problem Does This Paper Address?

Training a multilingual Large Language Model (LLM) is a delicate balancing act. Including too much English can cause the performance of other languages to suffer, while including too little risks losing the benefits of "cross-lingual transfer"—the phenomenon where learning one language helps the model understand a related one.

Historically, scaling laws (such as the well-known Chinchilla laws) have primarily focused on monolingual models. When researchers did investigate multilingual scaling, they typically focused on translation tasks using older encoder-decoder architectures. Until now, there has been no clear mathematical framework for general-purpose, decoder-only models (the architecture behind GPT-4 or Llama) to predict how changing the "sampling ratio" (the percentage of each language in the training set) affects final performance.

Methods

The authors propose a comprehensive scaling law that links three critical variables to the test loss ($L$): model size ($N$), dataset size ($D$), and sampling ratios ($p$).

The core innovation of their approach is Hypothesis 1: Language Family Independence. Instead of attempting to track over 100 individual languages, they grouped them into five broad families: Germanic, Romance, Slavic, Indic, and Sino-Tibetan. They hypothesized that the performance of a language family depends almost entirely on its own sampling ratio, regardless of the other families present in the mixture.

They formulated this relationship as: $$L_i(N, D, p) = \left( E_i + \frac{A_i}{N^{\alpha_i}} + \frac{B_i}{D^{\beta_i}} \right) p_i^{-\gamma_i}$$

Where:

  • $E, A, B, \alpha, \beta$ are constants similar to those in standard scaling laws.
  • $p_i$ is the sampling ratio for family $i$.
  • $\gamma_i$ is the "decay rate," representing how much a family benefits from an increased proportion of data.
Scaling behavior of test loss with respect to model size (N), dataset size (D), and sampling ratio (p) across five language families.

Datasets

The study utilized the Common Crawl dataset, specifically selecting 23 languages across the five designated families. For English, a high-quality in-house dataset was used. To prevent the Germanic family from being entirely dominated by English, its inclusion was capped at 50% of that family's total data. The models were evaluated on a 10% held-out test set for each language.

Key Insights and Ideas

  • The Power of Families: Grouping languages into families effectively mitigates the "low-resource" problem. While a single language like Catalan might lack sufficient data to exhibit a clear scaling trend, the Romance family as a whole provides a stable, predictable signal.
  • Independence is Scalable: Because each family’s loss is independent of the others, researchers do not need to run a new experiment every time a language is added. They only need to determine that specific family's parameters.
  • $\gamma$ is Invariant: A crucial finding is that the exponent $\gamma$ (which dictates how much loss drops as a language's proportion increases) remains constant regardless of model size. This invariance is what allows researchers to predict the behavior of massive models using much smaller, cheaper ones.
  • Optimal Mixing: The authors derived an analytical solution to find the "optimal" sampling ratio. To minimize the total loss across all languages, there is a mathematically "correct" proportion of each language to include in the training mix.

Key Results

  • Predictive Accuracy: The proposed scaling law demonstrated an incredibly high fit (high R-squared values) across various model sizes, validating the mathematical framework.
  • Generalization: Sampling ratios optimized on a small 85M parameter model remained near-optimal when applied to a much larger 1.2B parameter model. This represents a massive saving in computational resources for pretraining.
  • Performance Gains: Using the derived "Optimal" sampling strategy consistently outperformed standard baselines like "Uniform sampling" (equal amounts of everything) or "Proportional sampling" (based on available raw data) in terms of total cross-entropy loss.
  • The "Indic" Exception: In normalized settings, the law suggested allocating much higher ratios to the Indic family. It exhibited a higher decay rate ($\gamma$), meaning it benefits significantly more from additional data compared to families like Germanic.

Limitations and Future Work

  • The Zero-Data Problem: The current formula breaks down if a sampling ratio is exactly zero, as it predicts infinite loss. In reality, models exhibit "zero-shot" capabilities due to cross-lingual transfer, which this law does not yet quantify.
  • Small Dataset Risks: The law does not explicitly model the risk of overfitting when the total dataset size ($D$) is very small.
  • Family Granularity: While grouping by families works well, there is still inherent variation within a family (e.g., French vs. Romanian) that a family-level law might smooth over.
  • Future Direction: The authors suggest extending this work to include "downstream" task performance (such as coding or reasoning) rather than relying solely on cross-entropy loss.

Summary updated

BibTeX
@misc{he2024scaling,
  author = {Yifei He and Alon Benhaim and Barun Patra and Praneetha Vaddamanu and Sanchit Ahuja and Parul Chopra and Vishrav Chaudhary and Han Zhao and Xia Song},
  title = {{Scaling Laws for Multilingual Language Models}},
  year = {2024},
  eprint = {2410.12883},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2410.12883},
}
Figure