Abstract
Determining the optimal data mixture for pre-training Large Language Models (LLMs) is a critical yet computationally expensive challenge. Traditional methods require training numerous "proxy" models to evaluate different ratios of data sources. We present Mixture of Data Experts (MDE), a novel approach that predicts the performance of any data mixture without exhaustive trial training. By training a single expert model per data source and ensembling their predictions, MDE accurately estimates the loss of candidate mixtures. Our results demonstrate that MDE achieves state-of-the-art prediction accuracy with 3x lower computational cost compared to existing baselines, and the optimized mixtures successfully scale to 10B parameter models.
Introduction
Training a Large Language Model (LLM) involves balancing diverse datasets—web crawls, books, code, and academic papers. The "data mixture" problem—finding the perfect ratio of these ingredients—is one of the most resource-intensive aspects of AI development. Traditionally, researchers must train dozens of small "proxy" models to find a promising recipe. This paper introduces a smarter, more efficient alternative: the Mixture of Data Experts (MDE) framework.
Problem Formulation
Pre-training LLMs is a bi-level optimization problem. The inner level involves training a model on a specific mixture, while the outer level seeks the mixture that minimizes validation loss. Because training even small proxy models is costly, existing methods often rely on heuristics or secondary "regressor" models. However, these regressors frequently fail to generalize across diverse mixtures. MDE addresses this gap by providing a theoretically grounded and computationally efficient proxy for model performance.
Methodology: Mixture of Data Experts (MDE)
The MDE approach consists of three primary steps:
- Train Expert Models: Train $k$ separate "expert" models, each specialized in one of the $k$ data sources (e.g., GitHub, Wikipedia).
- Compute MDE Features: Instead of training a new model for every candidate mixture, MDE creates an ensemble. The probability of the next token is calculated as the weighted average of the experts' predictions, where weights $\lambda$ correspond to the mixture ratios.
- Fit Regression Model: The predicted loss from the MDE ensemble serves as a high-quality feature for a regression model (X-MDE), which maps training mixtures to downstream performance.
Experimental Setup
Experiments were conducted using the SlimPajama dataset, which includes seven domains: CommonCrawl, C4, GitHub, Books, ArXiv, StackExchange, and Wikipedia. Performance was validated on held-out sets and "End-Task" (ET) validation sets like ARC and OpenBookQA. Downstream evaluation spanned 10 tasks, including TriviaQA and HellaSwag.
Results and Key Insights
MDE significantly outperforms traditional regression baselines. By using MDE features, the Spearman’s rank correlation of loss predictions improved from 0.65 to 0.95.
Efficiency and Accuracy
The method achieves performance comparable to state-of-the-art techniques like DoReMi while requiring 3x less computational power. Quantitative analysis shows that MDE-based methods consistently achieve lower Mean Squared Error (MSE) in loss prediction across various domains compared to empirical means or other mixture models.
Scaling and Downstream Performance
A key finding was that optimizing for training loss alone is insufficient; incorporating "End-Task" validation data into the objective significantly boosts few-shot accuracy. Recipes discovered using 280M parameter proxy models transferred effectively to 1B and 10B scales, with the 10B model showing marked improvements on benchmarks like MMLU and GSM8K.
Conclusion
MDE transforms the data recipe problem from an expensive trial-and-error process into an efficient ensemble prediction task. While currently focused on static English text mixtures, future work will explore automatic domain discovery and dynamic data curricula. MDE provides a practical, theoretically sound toolkit for developing more capable language models at a fraction of the traditional cost.
Summary updated