This repository contains tools and analysis for exploring language model scaling laws, particularly focusing on the relationships between compute, dataset size, and model performance as described in Gadre et al., 2024.
main.py: Implements core scaling law equations and optimization for compute/dataset relationshipsscaling_explorer.py: Visualization and analysis tools for model scaling behaviorscaling/: Submodule from mlfoundations/scaling containing experimental data and evaluation resultsexp_data/: Raw experimental data including model configurations and evaluation resultsscaling_law_dict.pkl: Pre-fitted scaling law parameters
- Clone the repository:
git clone https://github.com/kevinniechen/scalinglaws.git
cd scalinglaws
- Initialize and update the scaling submodule:
git submodule add https://github.com/mlfoundations/scaling.git scaling
git submodule update --init --recursive
- Install requirements:
pip install -r requirements.txt
- Python 3.8+
- NumPy
- Matplotlib
- Pandas
- SciPy
- Kevin Niechen
- Justin Rose
- Gadre et al. (2024). "All Laws are Not Equal: Isolating Factors in Scaling Laws"