AI Dictionary of Terms

Scaling Laws

Empirical relationships describing how AI model performance improves predictably as you increase model size, dataset size, and computational resources — the mathematical principles that guide the development of increasingly capable foundation models.

The Simple Version

Imagine baking cookies. If you double the ingredients, you get roughly twice as many cookies. If you use a bigger oven, you can bake more at once. There are predictable relationships between inputs (ingredients, oven size) and outputs (cookies).

Scaling laws in AI are similar. They describe predictable relationships between:

These laws allow researchers to predict how well a model will perform before training it, and to allocate resources optimally.

Detailed Explanation

Scaling laws were formalized by Kaplan et al. (OpenAI, 2020) and extended by Hoffmann et al. (Chinchilla, 2022). They reveal power-law relationships between model performance and resources.

Key Findings:

1. Kaplan et al. (2020):

2. Hoffmann et al. (Chinchilla, 2022):

The Scaling Equation (simplified): L(N, D) ≈ (A / N^α) + (B / D^β) + E

Where:

Implications:

Key Characteristics

Business Context

Scaling laws have profound implications for enterprise AI strategy:

Strategic Implications:

Practical Applications:

The “Chinchilla Rule”: For a given compute budget, the optimal model size (in parameters) is approximately: N ≈ 20 × D (where D is dataset size in tokens)

Example: If you have 10 billion tokens of training data, the optimal model size is ~200 billion parameters (for that compute budget).

Real-World Analogy

Building a race car. There are predictable relationships between engine size, weight, aerodynamics, and speed. You can use these relationships to design a car that maximizes speed for a given budget. Scaling laws are the “physics” of AI model development — they tell you how to allocate resources for optimal performance.

Code Example

# Estimating optimal model size using Chinchilla scaling
def chinchilla_optimal(compute_budget_flops):
    """
    Estimate optimal model size and data size for a given compute budget.
    Based on Hoffmann et al. (2022).
    """
    # Approximate constants from Chinchilla paper
    # These are simplified for illustration
    C = compute_budget_flops  # Total compute budget in FLOPs
    
    # Optimal parameters: N ≈ (C / 6)^(1/2)
    # Optimal data: D ≈ (C / 6)^(1/2) / 20
    # (Simplified - actual formulas are more complex)
    
    N_optimal = (C / 6) ** 0.5  # Number of parameters
    D_optimal = N_optimal / 20  # Dataset size in tokens
    
    return N_optimal, D_optimal

# Example: Compute budget of 10^24 FLOPs (roughly GPT-3 scale)
compute_budget = 1e24
N, D = chinchilla_optimal(compute_budget)

print(f"Compute Budget: {compute_budget:.2e} FLOPs")
print(f"Optimal Model Size: {N:.2e} parameters")
print(f"Optimal Dataset Size: {D:.2e} tokens")
print(f"Chinchilla Ratio: N/D = {N/D:.1f} (target: ~20)")

Common Misconceptions

Sources & Further Reading