Finding the perfect "recipe" of training data for Large Language Models (LLMs) has long been a manual, intuitive process. RegMix automates this by training hundreds of tiny 1M-parameter models on different data blends and using regression to predict which mixture will perform best on models 1,000x larger. It matches state-of-the-art methods like DoReMi while using only 10% of the compute.
The Challenge of Data Mixing
Pre-training an LLM isn't just about the amount of data; it’s about the mixture. Should your model see 10% code and 90% web text, or an even split? Currently, these ratios are often set by human intuition or by training expensive "proxy" models that are nearly as large as the final target.
The challenge is two-fold:
- Scalability: As we move toward training on tens of trillions of tokens, running large-scale experiments to find the best mixture is prohibitively expensive.
- Complexity: Domains interact in counter-intuitive ways. Adding more "high-quality" data like Wikipedia doesn't always lead to better downstream performance, and human intuition often fails to capture these nuances.
The RegMix Pipeline
The authors propose a four-step pipeline called RegMix:
- Train Ultra-Small Proxies: Train a large number (e.g., 512) of "ultra-small" models—just 1 million parameters—on 1 billion tokens each. Each model gets a unique, randomly sampled data mixture.
- Fit a Regression Model: Treat the data mixture (percentages of different domains) as input features and the model's validation loss as the target label. The authors tested both simple Linear Regression and LightGBM (a tree-based model).
- Simulate and Predict: Using the trained regression model, simulate millions of potential data mixtures in seconds to identify the one predicted to have the lowest loss.
- Train the Large Model: The "winning" mixture is then used to train the actual large-scale model (up to 7B parameters).
The core of this approach is the Rank Invariance Hypothesis: the idea that if Mixture A is better than Mixture B for a tiny 1M model, it will also be better for a giant 7B model.
Key Insights
- The Power of Tiny Models: The most surprising insight is that 1M-parameter models are sufficient to predict the behavior of 1B or 7B models. This "rank invariance" holds remarkably well across three orders of magnitude in model size.
- Web Data is King: Contrary to the popular belief that curated sources like Wikipedia are the most valuable, the authors found that web crawl data (like Pile-CC) had the strongest positive correlation with downstream performance.
- Common Sense is Often Wrong: Domain interactions are complex. For instance, the regression model revealed that the PhilPapers domain provided gains for almost all other domains—a relationship a human expert would likely never guess.
- Beyond Scaling Laws: While traditional scaling laws focus on model size and token count, RegMix shows that data mixture effects are non-linear and transcend simple power laws, requiring more sophisticated modeling like LightGBM.
Key Results
RegMix was evaluated using datasets like The Pile and FineWeb, and tested across diverse downstream benchmarks including HellaSwag, PiQA, WinoGrande, and ARC-Easy.
- Efficiency: RegMix achieved performance on par with or better than DoReMi (the previous gold standard) while using 10x less compute.
- Predictive Accuracy: The LightGBM regression model achieved a Spearman correlation of 0.97 to 0.98 between predicted and actual performance across different model scales.
- Performance Gains: On a 7B model trained for 100B tokens, the RegMix mixture consistently outperformed human-selected mixtures across benchmarks. On specific tasks like HellaSwag, the improvement was as high as 8%.
Limitations and Future Work
- The Tokenizer Constraint: Currently, the proxy models must use the same tokenizer and vocabulary as the large model, limiting flexibility in early-stage experimentation.
- Infinite Data Assumption: The method assumes enough data exists in each domain to fulfill the "optimal" mixture. In reality, high-quality domains are finite and can be exhausted.
- Extreme Scales: While tested up to 7B parameters, it remains to be seen if rank invariance holds for frontier models at the 70B or 400B+ scale.
Summary updated