Exploring Polyglot Harmony: On Multilingual Data Allocation for Large Language Models Pretraining

Ping Guo, Yubing Ren, Binbinliu, Fengze Liu, Haobin Lin, Yifan Zhang, Bingni Zhang, Taifeng Wang, Yin Zheng

TL;DR

Training multilingual Large Language Models (LLMs) is notoriously tricky because languages influence each other during training. For instance, adding more Spanish to a training corpus might unexpectedly change how well the model learns Arabic. This paper introduces CLIMB (Cross-Lingual Interaction-aware Multilingual Balancing), a novel framework that mathematically models these "cross-lingual interactions." By predicting the optimal percentage of each language to include in a training dataset, CLIMB consistently outperforms standard heuristic data-mixing strategies.

The Challenge of Multilingual Pretraining

As LLMs are deployed globally, developers face a massive hurdle: how do you optimally mix different languages in your pretraining corpus?

Currently, most teams rely on heuristics (like temperature sampling) or expensive trial-and-error. This is largely due to two major complexities:

  1. Cross-lingual interactions: Languages do not learn in a vacuum. A model's performance on one language is heavily influenced by the other languages trained alongside it. You cannot optimize them in isolation.
  2. Scale sensitivity: A language mix that works perfectly for a small 1-billion-token test run might be completely suboptimal when scaled up to 1 trillion tokens.
Loss on Arabic when mixed with different languages at a fixed proportion, demonstrating cross-lingual interactions.

The authors sought to determine if it is possible to accurately predict a model's validation performance across any language composition without actually having to train the model, thereby allowing them to mathematically solve for the perfect data mix.

The CLIMB Framework

To solve this, the authors propose CLIMB. The core innovation of this framework is a new metric called the cross-lingual interaction-aware language ratio.

Instead of just looking at the actual percentage of a language in the dataset (e.g., 10% Arabic), CLIMB calculates the effective percentage. Because of cross-lingual transfer, 10% Arabic mixed with a large amount of English might yield the same performance as if the model were trained on 15% Arabic in isolation. CLIMB uses empirical scaling laws to parametrically model this boost or penalty.

Armed with this metric, CLIMB solves the massive, complex optimization problem of data allocation using a clever two-step procedure:

  1. Find the optimal direction: It first determines the ideal relative proportions by equalizing the "marginal benefits" across languages. Essentially, it ensures that adding one more token of Language A reduces the overall loss by the exact same amount as adding one more token of Language B.
  2. Maximize the magnitude: Once the relative balance is locked in, it scales up the allocation to maximize the total "effective" data across all languages, minimizing the final validation loss.

Key Insights on Multilingual Dynamics

  • The "Curse of Multilinguality" fades at scale: Cross-lingual transfer is incredibly strong when a language makes up a tiny fraction of the dataset. However, as you increase a language's absolute proportion—or as you increase the total size of the training run—languages become more self-reliant and cross-lingual transfer weakens.
  • The optimal mix is a moving target: You cannot simply extrapolate small-scale data mixtures. At smaller data scales, simpler or low-resource languages should get higher allocations because they drop the validation loss quickly. At massive scales, the optimal allocation shifts toward linguistically complex and diverse languages that offer sustained loss reduction over time.
  • Some languages are "donors": By analyzing the learned scaling coefficients, the authors found that certain languages (like English, Spanish, and Indonesian) are high-transfer languages. They receive larger shares in the optimal mix because the linguistic gains they provide generalize broadly to other languages.

Key Results

  • Predictive Accuracy: CLIMB's scaling law equations predict validation loss with remarkable accuracy. Compared to baseline scaling laws that assume languages are independent, CLIMB reduces the Huber loss (prediction error) by an order of magnitude across setups ranging from 2 to 16 languages.
Actual vs. predicted loss and effective language ratios across different data scales, highlighting CLIMB's predictive accuracy.
  • Model Performance: The authors trained 1.2B and 7B parameter models on 1 trillion tokens using CLIMB's recommended data mix (sampled from the Fineweb-2 corpus). CLIMB consistently outperformed standard allocation methods (like Uniform, Natural frequency, Temperature Sampling, and UniMax), yielding an average performance boost of +1.85% on the 1.2B model and +3.4% on the 7B model across 18 multilingual benchmarks.
  • Massive Scale: The authors successfully extended CLIMB to a 300+ language setting by grouping them into 58 language families. This proved the method remains stable and superior to standard temperature sampling even in highly complex, massively multilingual environments.

Limitations and Future Work

While highly effective, CLIMB has areas for future expansion:

  • Model Size ($N$) isn't explicitly modeled: While CLIMB models dataset size ($D$) beautifully, the current equations were primarily validated on a 1.2B parameter model. Though it generalized well to a 7B model, explicitly factoring model parameter count into the optimization math could yield even better allocations.
  • Unseen Languages: Currently, CLIMB only accounts for cross-lingual transfer between the languages explicitly included in the training set. Future work will look at how to optimize the training mix to boost zero-shot performance on languages entirely absent from the pretraining data.

Summary updated

BibTeX
@inproceedings{guo2025exploring,
  author = {Ping Guo and Yubing Ren and BINBINLIU and Fengze Liu and Haobin Lin and Yifan Zhang and Bingni Zhang and Taifeng Wang and Yin Zheng},
  title = {{Exploring Polyglot Harmony: On Multilingual Data Allocation for Large Language Models Pretraining}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=mHHrnCWwrD},
}
Figure