Training a Large Language Model (LLM) is a bit like raising a child: it’s not just about how much they eat, but what they eat. In the world of AI, this is the "data mixture" problem—deciding the right ratio of code, math, and general knowledge to feed a model during training. Traditionally, finding the perfect recipe required expensive trial-and-error on massive models.
A new paper, "Capacity-Aware Mixture Law Enables Efficient LLM Data Optimization," introduces a framework called CAMEL that predicts the ideal data diet for a giant model by looking at how its smaller "siblings" perform.
TL;DR
The authors propose CAMEL, a scaling law that accounts for the non-linear relationship between model size and data mixtures. By training a few small models using a specific "Hourglass" sampling strategy, they can accurately predict the best data mixture for models up to 55B parameters, cutting optimization costs by 50% while boosting benchmark performance by up to 3%.
What Problem Does This Paper Address?
As LLMs move from general pre-training to "mid-training" (where they hone specific skills like reasoning and coding), the data mixture becomes critical. However, we face a "Goldilocks" problem:
- Direct Search is too expensive: You can't afford to train a 50B+ parameter model dozens of times just to test different data ratios.
- Proxy models are unreliable: A data mixture that works for a tiny 500M model often doesn't work for a 50B model.
- Existing scaling laws are too simple: Previous methods assumed that model size and data mixture were "separable" factors. In reality, a larger model "digests" certain types of data (like complex knowledge) more efficiently than a smaller one.
Methods
The researchers introduced a three-part pipeline to bridge the gap between small-scale experiments and large-scale deployment:
- The CAMEL Law: Unlike previous laws, CAMEL is "capacity-aware." It models validation loss as a joint function of model size ($M$) and mixture ratios ($r$). It assumes data consists of "intrinsic domains" (latent components like factual recall or reasoning) and calculates how a model of a specific size allocates its "capacity" across them.
- Loss-to-Benchmark Mapping: Since researchers care about benchmark scores (like MMLU) more than raw validation loss, the authors developed a logistic mapping that predicts actual task accuracy based on the losses across different data domains.
- Hourglass Sampling Strategy: To fit their scaling law efficiently, they investigated how to pick which small models to train. They found that an "Hourglass" strategy—prioritizing the smallest and largest available proxy models while skipping the middle—provides the most accurate extrapolation for the least amount of compute.
Datasets
The authors used a diverse mid-training corpus consisting of five broad domains:
- English & Chinese: General web and narrative text.
- Knowledge: Educational materials, textbooks, and academic papers.
- Code: Programming corpora across multiple languages.
- Math: Problem-solution pairs and reasoning-heavy questions.
For evaluation, they tested on 14 popular benchmarks, including MMLU (general knowledge), GSM8K/MATH (mathematics), HumanEval/MBPP (coding), and ARC-C/BBH (reasoning).
Key Insights and Ideas
- Knowledge Absorption Scales Differently: One of the most striking findings is that as models get larger, they become significantly better at absorbing "Knowledge" data, while the relative benefit of "Math" and "Code" data slightly decreases. This means a 50B model actually needs a different ratio of data than a 1B model to reach peak performance.
- Non-Separability Matters: The "aha moment" here is that you cannot treat model size and data mixture as independent variables. The "interplay" between the two is non-linear.
- The Hourglass Wins: When you have a limited compute budget, don't spread your experiments evenly. By focusing on the "extremes" of your available model scales, you capture the "curvature" of the scaling law more effectively, leading to better predictions for the target model.
Key Results
- Cost Efficiency: CAMEL identified high-quality data mixtures using less than 50% of the compute cost required by baseline methods. In some cases, the optimization cost was less than a single full training pass on the target model.
- Performance Boost: On a 55B-parameter Mixture-of-Experts (MoE) model, the CAMEL-derived mixture outperformed human-designed recipes and prior scaling laws by up to 3% across various benchmarks.
- Stable Extrapolation: The law proved robust across different training objectives (e.g., making a model "Math-Specialized" vs. "Balanced"), showing that it doesn't just find one good mixture, but can navigate the trade-offs between different skills.
Limitations and Future Work
- Intrinsic Domain Assumption: The model relies on the idea that data can be decomposed into a fixed number of "intrinsic domains" ($k=5$ in this study). If the data is extremely high-dimensional or messy, this decomposition might become a bottleneck.
- Static Mixtures: The current law assumes a fixed data mixture throughout the training process. The authors suggest that "curriculum learning"—where the mixture changes as the model grows—is a promising but more complex direction for future research.
- Parametric Forms: While the logistic mapping for benchmarks works well, the authors note that exploring non-parametric models could lead to even more precise predictions.
Reference: Li, J., Gu, X., & Zhang, J. (2026). Capacity-Aware Mixture Law Enables Efficient LLM Data Optimization. Proceedings of the 43rd International Conference on Machine Learning (ICML).
Summary updated