TL;DR
This paper introduces a "Neural Configuration-to-Performance Scaling Law" (NCPL) that uses a large language model (LLM) to predict the training performance of large language models (LLMs) based on their entire training configuration, not just model and data size. NCPL significantly improves prediction accuracy over existing methods and enables more effective hyperparameter tuning and loss curve prediction.
What Problem Does This Paper Address?
Training large language models is incredibly expensive. Researchers have developed "scaling laws" (like the Chinchilla law) to predict how a model's performance (specifically, its training loss) will change based on its size (number of parameters, N) and the amount of training data (D). However, these laws typically assume that all other training hyperparameters (like learning rate, batch size, optimizer choice, etc.) are already optimally set. This is a major limitation because:
- Optimal hyperparameters are hard to find: Finding the best combination of these hyperparameters can be a costly and time-consuming process, often requiring extensive hyperparameter sweeps.
- Suboptimal configurations are common: In practice, researchers often have to use suboptimal configurations due to hardware constraints or other limitations, and existing scaling laws don't account for this.
- Interactions are complex: The interplay between different hyperparameters and their effect on performance is highly complex and non-linear, making it difficult to capture with simple functional forms.
This paper aims to bridge this gap by creating a more comprehensive scaling law that directly maps the full training configuration (including all hyperparameters) to the predicted performance.
Methods
The core idea is to use a neural network, specifically a fine-tuned LLM (Qwen3-1.7B), as a "Configuration-to-Performance Scaling Law" (CPL) predictor. Here's how it works:
- Input: The LLM takes the entire training configuration as input. This includes not only N and D but also details like the optimizer type, learning rate, batch size, weight decay, number of layers, hidden dimension, and more. Numerical values are processed by a two-layer MLP, while categorical features are handled by the LLM's standard tokenizer.
- Output: The LLM predicts the training performance, primarily the final pretraining loss.
- Training Objective: Instead of directly predicting the loss, NCPL is trained to predict the residual relative to a Chinchilla-law baseline. This helps the model focus on configuration-specific effects beyond the coarse dependence on N and D, improving extrapolation.
- Two-Stage Fine-tuning: To stabilize training, a two-stage fine-tuning process is used, first updating only the numerical encoders and prediction head, then fine-tuning the entire model.
- Loss Curve Prediction: The framework is flexible enough to be extended to predict not just the final loss but the entire training loss curve over time.
Datasets
The researchers trained and evaluated their NCPL model using data from two open-source pretraining projects:
- Marin Dataset: Collected from the Marin Fantastic Optimizers Project, this dataset involves extensive hyperparameter sweeps across various model sizes and data scales.
- Steplaw Dataset: From the Steplaw Project, this dataset focuses on fine-grained sweeps of learning rate and batch size for models of varying sizes and data scales, primarily using the AdamW optimizer.
The combined dataset comprises over 3,200 training runs, with specific splits for training, in-distribution (ID) validation, and out-of-distribution (OOD) validation. The OOD validation set specifically includes runs with model sizes larger than those seen during training, testing the model's extrapolation capabilities.
Key Insights and Ideas
- LLMs as Universal Regressors: The paper demonstrates that LLMs can effectively act as general-purpose regressors for complex, multi-dimensional prediction tasks like forecasting LLM training performance, going beyond their typical NLP applications.
- Configuration is King: The full training configuration, not just N and D, is crucial for accurate performance prediction. NCPL's ability to incorporate all these factors leads to significant improvements.
- Residual Prediction Boosts Extrapolation: Training NCPL to predict the difference from a baseline (like Chinchilla) rather than the absolute loss significantly improves its ability to generalize to unseen configurations and scales.
- NCPL Enables Smarter Hyperparameter Tuning: By providing a fast proxy for the true loss, NCPL allows for efficient joint tuning of multiple hyperparameters, saving considerable computational resources compared to traditional sweep methods.
- Beyond Final Loss: The framework's flexibility to predict entire loss curves opens up new avenues for understanding and optimizing training dynamics.
Key Results
- Improved Final Loss Prediction: NCPL achieves 20-40% lower prediction error than the configuration-agnostic Chinchilla law on both in-distribution and out-of-distribution validation sets.
- Effective Hyperparameter Selection: NCPL matches the performance of specialized hyperparameter scaling law baselines when jointly tuning learning rate and batch size, and it closely aligns with true optima found through exhaustive sweeps.
- Generalization to Larger Scales: NCPL generalizes to runs using up to 10x more compute than any run in the training set.
- Loss Curve Prediction: NCPL accurately predicts the entire training loss curve, capturing optimizer-specific shapes and generalizing to unseen configurations.
- Qualitative Understanding: NCPL qualitatively learns nuanced interactions between hyperparameters, such as the differing weight decay preferences of Lion and AdamW optimizers.
Limitations and Future Work
- Data Accessibility: The study's reliance on open-source pretraining logs is a limitation, as these logs may not cover the full diversity of configurations (e.g., missing MoE models, linear attention variants). The current dataset is also limited in the maximum model size (up to 1.2B parameters in OOD validation).
- Hyperparameter Tuning Limitations: For some hyperparameters (e.g., AdamW's $\beta_1, \beta_2, \epsilon$), the available data had limited variation, making it harder to reliably learn their effects.
- Extrapolation Limits: At the largest extrapolation scales (e.g., 1073M parameters), NCPL's predictions can be higher than ground truth, partly due to the Chinchilla baseline overpredicting and potential limitations in learning optimal learning rates for very large N with small D/N ratios.
- Future Work: The authors suggest that as more open-source pretraining logs become available, the community can build a more robust, shared NCPL. They also envision NCPL being able to ingest orders of magnitude more data than individual researchers and potentially learn principled understanding comparable to human researchers. While NCPL might not extrapolate to entirely novel scenarios (e.g., new architectures), it can be further trained on data from these new scenarios for improved performance.
Summary updated