Skip to content

Scaling Laws for Neural Language Models

Authors: Jared Kaplan, Sam McCandlish, Tom Henighan, et al. (OpenAI) Published: January 2020 Paper: arxiv.org/abs/2001.08361


Why This Matters

This paper provided the mathematical foundation for the "scaling is all you need" era of AI. It showed that model performance follows predictable power laws, answering critical questions:

  • Should we build bigger models or collect more data? (Answer: Both, but in specific ratios)
  • How much will performance improve if we 10× compute? (Predictable!)
  • When should we stop training? (When compute-optimal)

Real-world impact: - Justified GPT-3's 175B parameters - Guided development of GPT-4, PaLM, Chinchilla, LLaMA - Enabled efficient allocation of massive compute budgets - Predicted the capabilities explosion we're witnessing

This paper transformed AI from "trial and error" to "principled scaling."


The Problem

Before Scaling Laws: - No systematic understanding of how model size, data, and compute interact - Resource allocation was guesswork: - Should we train a 1B param model on 100B tokens? - Or a 10B param model on 10B tokens? - Unclear if performance gains would continue with scale - Expensive experiments often yielded disappointing results

The questions: 1. How does loss scale with model size, dataset size, and compute? 2. What's the optimal model size for a given compute budget? 3. Can we predict performance before expensive training?


Core Innovation

Power Laws Govern Everything

The breakthrough: Test loss follows simple power-law relationships with three factors:

  1. Model size (N) - number of parameters
  2. Dataset size (D) - number of training tokens
  3. Compute budget (C) - FLOPs for training

Mathematical form:

L(N) ∝ N^(-α_N)     [Loss vs model size]
L(D) ∝ D^(-α_D)     [Loss vs dataset size]
L(C) ∝ C^(-α_C)     [Loss vs compute]

Where α values are empirically measured exponents (around 0.05-0.1).

Critical Findings

1. Performance is predictable across 7+ orders of magnitude - Tested from 768 params to 1.5B params - From 22M tokens to 23B tokens - Laws hold with remarkable consistency

2. Compute is the limiting factor - Given enough compute, optimal allocation is deterministic - Other factors (architecture, learning rate) matter much less

3. Early stopping predicts final performance - Can extrapolate from early training - Saves wasting compute on doomed experiments


The Three Scaling Laws

1. Scaling with Model Size (N)

When compute and data are not bottlenecks:

L(N) = (N_c / N)^α_N

Key findings: - α_N ≈ 0.076 (for autoregressive language models) - N_c ≈ 8.8 × 10^13 parameters (critical scale) - Performance improves smoothly with size

Practical implication: Larger models are fundamentally better (given sufficient data/compute).

2. Scaling with Dataset Size (D)

When model is large enough:

L(D) = (D_c / D)^α_D

Key findings: - α_D ≈ 0.095 - D_c ≈ 5.4 × 10^13 tokens (critical scale) - Diminishing returns from data alone

Practical implication: Cannot fix a small model with more data.

3. Scaling with Compute (C)

Optimal allocation of compute budget:

L(C) = (C_c / C)^α_C

Key findings: - α_C ≈ 0.050 (compute is least efficient alone) - Must balance between model size and training tokens - Doubling compute → ~5% loss reduction

Practical implication: There's an optimal model size for each compute budget.


Compute-Optimal Training

The Optimal Allocation

Given compute budget C, how should we split between N and D?

Key result:

N_opt ∝ C^0.73
D_opt ∝ C^0.27

Ratio: N_opt / D_opt ∝ C^0.46

What this means: - Larger budgets favor bigger models (but not linearly!) - Should increase dataset size, but more slowly - Most projects overtrain small models on too much data

Example (rough estimates): | Compute Budget | Optimal Model Size | Optimal Tokens | |----------------|-------------------|----------------| | 1× | 1B params | 20B tokens | | 10× | 5.5B params | 50B tokens | | 100× | 32B params | 120B tokens |

GPT-3's Deviation

GPT-3 (175B params, 300B tokens): - Used WAY more parameters than compute-optimal - Should have been ~10B params with 10× more tokens - Why overtrain? Large models are more useful at inference time

The trade-off: - Compute-optimal: Best loss per training FLOP - Large models: Better inference efficiency, few-shot learning, emergent capabilities


Empirical Methodology

Experimental Setup

Models tested: - Transformer decoders (GPT-style) - 768 parameters to 1.5B parameters - 4 layers to 24+ layers - Trained on WebText dataset

Key controls: - Fixed architecture family (Transformer) - Same optimization (Adam) - Consistent hyperparameters when possible - Systematic variation of N, D, C

Measuring Scaling

Three complementary experiments:

  1. Fixed compute, vary N and D
  2. Use different model sizes
  3. Stop when compute budget exhausted
  4. Find optimal N for each C

  5. Fixed D, vary N

  6. Train models of different sizes to convergence
  7. Isolate effect of model size

  8. Fixed N, vary D

  9. Train same model on different dataset sizes
  10. Isolate effect of data

Validation: All three methods yield consistent power-law exponents.


Key Insights

1. Smooth Power Laws (No Surprises)

No phase transitions observed: - Loss decreases smoothly - No sudden jumps or drops - Predictable across orders of magnitude

Implication: Can safely extrapolate to larger scales (which OpenAI did for GPT-3).

2. Architecture Details Don't Matter Much

Tested variations: - Depth vs width - Number of attention heads - Feed-forward dimension - Embedding size

Finding: Within the Transformer family, these have minor effects compared to total parameter count.

Practical takeaway: Don't obsess over architecture search—scale matters more.

3. Convergence is Inefficient

Most training runs are wasteful: - Continuing training long after diminishing returns - Better to train bigger model for less time - Early stopping highly recommended

Optimal stopping: When loss reduction per FLOP starts diminishing.

4. Transfer and Fine-tuning Scale Too

Brief experiments on transfer learning: - Scaling laws apply to downstream tasks - Larger pre-trained models transfer better - Fine-tuning data also follows power laws


Limitations

1. Language Models Only

  • Focused on autoregressive LMs
  • Uncertain if laws apply to:
  • Image models
  • Multimodal models
  • Reinforcement learning
  • Classification tasks

2. Extrapolation Risks

  • Power laws hold for tested range
  • May break at extreme scales
  • Emergent capabilities not predicted (e.g., GPT-3 few-shot learning)

3. Chinchilla Revision

2022 Update: DeepMind's Chinchilla paper found: - OpenAI's data scaling was too conservative - Optimal ratio favors more data than originally estimated - New recommendation: N_opt and D_opt should scale more equally

Chinchilla-optimal:

N_opt ∝ C^0.50
D_opt ∝ C^0.50

For the same compute, use smaller models with more data.

4. Doesn't Account For:

  • Model inference costs
  • Few-shot learning ability
  • Emergent capabilities
  • Practical deployment constraints
  • Downstream task performance

Practical Applications

How to Use Scaling Laws

1. Budget Allocation

# Given compute budget C (in FLOPs)
optimal_params = k1 * (C ** 0.73)  # Original scaling law
optimal_tokens = k2 * (C ** 0.27)

# Chinchilla update (equal scaling)
optimal_params = k3 * (C ** 0.50)
optimal_tokens = k4 * (C ** 0.50)

2. Early Stopping - Monitor loss vs compute curve - Stop when slope flattens - Use saved compute for larger model

3. Predicting Performance - Train small model for short time - Fit power law curve - Extrapolate to full training

4. Comparing Experiments - Normalize by compute budget - Compare against predicted power law - Identify outliers (good or bad)


Influence on Later Work

GPT-3 (2020)

  • Used scaling laws to justify 175B parameters
  • Predicted performance before training
  • Confirmed emergent few-shot learning capabilities

Chinchilla (2022)

  • Revisited scaling laws with more data
  • Found optimal allocation favors more tokens
  • Showed 70B Chinchilla > 175B GPT-3

LLaMA (2023)

  • Applied Chinchilla scaling
  • Trained smaller models longer (e.g., 7B, 13B)
  • Achieved GPT-3 performance with 10× fewer params

GPT-4 and Beyond

  • Scaling laws guide compute allocation
  • Enable multi-trillion parameter models
  • Predict capabilities before training

Economic Impact

  • Justified billion-dollar compute investments
  • Made AI scaling a competitive strategy
  • Shaped entire industry trajectory

Theoretical Implications

Why Power Laws?

Possible explanations: 1. Data manifold complexity: Natural language has fractal structure 2. Bayesian interpretation: Models learning hierarchical concepts 3. Optimization landscape: Smooth loss surfaces at scale 4. Information theory: Compressing data follows power laws

Open questions: - Why these specific exponents? - Will laws break at some scale? - How to predict emergent capabilities?

Emergent Capabilities

Scaling laws predict loss, but: - Don't predict qualitative leaps - GPT-3's few-shot learning was surprising - Chain-of-thought reasoning emerged unexpectedly - In-context learning not predicted by loss alone

The gap: Loss ≠ capabilities


Comparison: Scaling Laws vs Chinchilla

Aspect Original (2020) Chinchilla (2022)
N_opt scaling C^0.73 C^0.50
D_opt scaling C^0.27 C^0.50
Implication Favor model size Balance model and data
GPT-3 Slightly undertrained Significantly undertrained
Training cost Higher params, less data Smaller models, more data
Inference cost Higher (big models) Lower (smaller models)

Why the difference? - Chinchilla tested larger scale - Better methodology (more compute budgets) - Corrected for finite-size effects


Key Takeaways

  1. Loss follows predictable power laws with model size, data, and compute
  2. Compute-optimal training requires specific N/D ratios (don't overtrain small models!)
  3. Smooth scaling means we can confidently extrapolate to larger models
  4. Architecture details matter less than total scale
  5. Early stopping is crucial for efficiency
  6. Chinchilla correction: Original laws underestimated optimal data

The profound insight: AI progress is predictable and can be purchased with compute.


Further Reading

Original Papers

  • Scaling Laws for Neural Language Models: https://arxiv.org/abs/2001.08361
  • Chinchilla (Scaling Laws Revision): https://arxiv.org/abs/2203.15556
  • Scaling Laws for Transfer: https://arxiv.org/abs/2102.01293

Follow-up Work

  • Scaling Laws for Reward Models: https://arxiv.org/abs/2210.10760
  • Emergent Abilities of Large Language Models: https://arxiv.org/abs/2206.07682
  • Scaling Laws for Autoregressive Generative Modeling: https://arxiv.org/abs/2010.14701

Practical Guides

  • Chinchilla-Optimal Training Calculator: Hugging Face tools
  • Scaling Law Visualization: OpenAI blog
  • Compute-Optimal Model Selection: EleutherAI guides

Critical Analysis

  • Broken Neural Scaling Laws: https://arxiv.org/abs/2210.14891
  • Beyond the Imitation Game: https://arxiv.org/abs/2206.04615
  • Are Emergent Abilities a Mirage?: https://arxiv.org/abs/2304.15004

Published: January 2020 Impact Factor: 2,000+ citations Legacy: Transformed AI from empirical tinkering to predictable science, enabling the era of foundation models.