Predicting Model Performance › Loss Extrapolation
Language AI HandbookAll chapters Predicting Model Performance › Loss ExtrapolationOne section · Sections in this chapter2 / 10 ↓
Reading tools Definitions & inline links
Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.
Article links
Make inline references clickable
The most direct application of scaling laws is predicting the test loss a model will achieve at a given scale. This prediction task asks a simple question: if we train a model with parameters on tokens of data, what loss should we expect? The answer comes from the mathematical relationships we've established between scale and performance.
From the Chinchilla scaling law we covered in Part XXIII, Chapter 3, we know that loss follows:
To understand what this formula captures, let's examine each component and the intuition behind the mathematical structure:
- : the predicted test loss for a model with parameters trained on tokens
- : the number of model parameters (capturing model capacity)
- : the number of training tokens (capturing data scale)
- : the irreducible loss, the theoretical minimum achievable even with infinite compute, determined by the entropy of natural language
- : the parameter scaling coefficient, controlling how much model size reduces loss
- : the data scaling coefficient, controlling how much training data reduces loss
- : the parameter scaling exponent (typically ~0.34), determining how quickly returns diminish as models grow
- : the data scaling exponent (typically ~0.28), determining how quickly returns diminish as data grows
The formula captures an important property: loss decomposes into three independent terms, each telling us something different about where performance comes from and what limits it. The irreducible loss sets a floor that no amount of scaling can breach. This represents the basic unpredictability in language itself, the entropy that remains even when we know all the patterns. If someone asks "What word comes next?", sometimes multiple words are plausible, and no model can do better than chance on these cases.
The power-law terms and represent reducible error that diminishes as we scale, but with diminishing returns governed by the exponents. The mathematical form of power laws encodes a important property: each doubling of scale produces a constant fractional improvement rather than a constant absolute improvement. When , doubling model size reduces the parameter-dependent loss term by a factor of , or roughly 21%. This same 21% reduction applies whether we're going from 1B to 2B parameters or from 100B to 200B. The absolute loss reduction shrinks, but the proportional improvement remains constant.
The additive structure, simply summing the three terms, reflects an important empirical finding: the contributions from model size and data size appear to be approximately independent. A larger model benefits equally from more data regardless of its starting size, and more data helps equally regardless of model capacity. This separability is what makes extrapolation tractable; if the terms interacted in complex ways, prediction would require understanding those interactions at scales we haven't tested.
Given these fitted parameters, extrapolating to larger scales seems straightforward: plug in your target and , compute . However, the practical challenge lies in fitting these parameters reliably from limited training runs. We need enough data points to constrain a five-parameter model, but we're typically trying to minimize how many expensive training runs we perform.
Fitting Scaling Laws from Small-Scale Experiments
The standard approach trains a series of models at small scales, measures their final losses, then fits the scaling law parameters. The key insight is that the exponents and appear stable across model families, so we primarily need to estimate the coefficients. This stability helps. It means that even if our small-scale experiments can't pin down the exponents exactly, we can borrow values from published research on similar architectures and focus our fitting effort on the coefficients that capture our specific training setup.
The fitting process treats our scaling law as a regression problem: we have observed data points (pairs of scale and achieved loss) and want to find parameters that best explain those observations. The nonlinear form of the power laws requires iterative optimization rather than closed-form solutions, but modern optimization libraries handle this efficiently.
import numpy as np
# Simulated training runs at various scales
# Format: (parameters in millions, tokens in billions, final loss)
training_runs = [
(10, 2, 3.45),
(10, 5, 3.28),
(10, 10, 3.15),
(50, 10, 2.95),
(50, 25, 2.78),
(50, 50, 2.65),
(100, 20, 2.75),
(100, 50, 2.58),
(100, 100, 2.48),
(300, 60, 2.52),
(300, 150, 2.35),
(300, 300, 2.25),
]
# Convert to arrays
N_params = np.array(
[r[0] * 1e6 for r in training_runs]
) # Convert to actual count
D_tokens = np.array(
[r[1] * 1e9 for r in training_runs]
) # Convert to actual count
losses = np.array([r[2] for r in training_runs])
import numpy as np
from scipy.optimize import curve_fit
def chinchilla_loss(X, E, A, B, alpha, beta):
"""Chinchilla scaling law for loss prediction.
Args:
X: Array of [N, D] where N is parameters and D is tokens
E: Irreducible loss
A: Parameter scaling coefficient
B: Data scaling coefficient
alpha: Parameter scaling exponent
beta: Data scaling exponent
Returns:
Predicted loss value
"""
N, D = X
return E + A / np.power(N, alpha) + B / np.power(D, beta)
# Prepare data for curve fitting
X_data = np.array([N_params, D_tokens])
# Initial guesses based on typical values from literature
p0 = [1.5, 400, 400, 0.34, 0.28]
# Bounds to keep parameters physically meaningful
bounds = (
[0, 0, 0, 0.1, 0.1], # Lower bounds
[3, 1e6, 1e6, 0.8, 0.8], # Upper bounds
)
# Fit the scaling law
params, covariance = curve_fit(
chinchilla_loss, X_data, losses, p0=p0, bounds=bounds, maxfev=10000
)
E_fit, A_fit, B_fit, alpha_fit, beta_fit = paramsFitted scaling law parameters: E (irreducible loss): 0.7311 A (parameter coefficient): 95.15 B (data coefficient): 19.25 α (parameter exponent): 0.3282 β (data exponent): 0.1000 Fit RMSE: 0.0123
The fitted parameters reveal the structure of our scaling relationship. The irreducible loss represents the theoretical minimum achievable with infinite compute, determined by the entropy of natural language itself. When we fit this parameter, we're essentially asking: "If we extrapolate the trend of diminishing returns to infinity, where does it asymptote?" The answer gives us a sense of how close we are to basic limits and how much room for improvement remains.
The coefficients and capture the "magnitude" of each scaling dimension's contribution. Larger coefficients mean that dimension has more reducible error, more room for improvement. The ratio between them indicates the relative importance of model size versus data size for our particular training setup.
The exponents and quantify how quickly performance improves as we scale each dimension. The asymmetry between them (typically ) suggests that parameter scaling has slightly better returns than data scaling, though both exhibit strong diminishing returns. These exponents determine the steepness of our improvement curve: larger exponents mean faster initial gains but also faster saturation.

Making Extrapolated Predictions
With fitted parameters in hand, we can now predict performance at scales we haven't trained. This is where scaling laws earn their keep, transforming expensive experiments into inexpensive calculations. The prediction itself is just arithmetic: substitute our target values into the fitted formula. But understanding what we're doing mathematically helps us appreciate both the power and the limitations of this extrapolation.
When we plug in a target and , we're asserting that the functional relationship we observed at small scales continues to hold at large scales. We're assuming that the same three-term structure, irreducible loss plus two power-law improvements, captures the physics of learning at 70 billion parameters just as well as at 70 million. This is a strong assumption, and one we can never fully verify without training the larger model.
import numpy as np
def predict_loss(N_millions, D_billions, params):
"""Predict loss for given scale using fitted parameters."""
N = N_millions * 1e6
D = D_billions * 1e9
E, A, B, alpha, beta = params
return E + A / np.power(N, alpha) + B / np.power(D, beta)
# Extrapolate to larger scales
target_scales = [
(1000, 500), # 1B params, 500B tokens
(7000, 2000), # 7B params, 2T tokens
(70000, 15000), # 70B params, 15T tokens
]
predictions = []
for N_m, D_b in target_scales:
pred = predict_loss(N_m, D_b, params)
predictions.append((N_m, D_b, pred))
print(f"Predicted loss for {N_m}M params, {D_b}B tokens: {pred:.3f}")Extrapolated loss predictions:
--------------------------------------------------
1B params, 500B tokens → Loss: 2.139
7B params, 2.0T tokens → Loss: 1.920
70B params, 15.0T tokens → Loss: 1.684These predictions extrapolate 1-2 orders of magnitude beyond our training data. The further we extrapolate, the more our predictions depend on the assumption that scaling relationships remain stable, an assumption we'll examine critically later in this chapter. This extrapolation is valuable: we use models that cost thousands of dollars to train in order to predict the behavior of models that cost millions of dollars. That cost difference explains why this technique has become central to AI research planning.
Visualizing the Extrapolation
A visual representation helps build intuition for what extrapolation means geometrically. The scaling law defines a surface in three-dimensional space, where two dimensions represent our inputs (parameters and tokens) and the third dimension represents the output (loss). Our training data points lie somewhere on this surface, and fitting the scaling law means aligning the surface as closely as possible with them. Extrapolation asks: if we extend this surface beyond where we have data, what does it predict?

The surface in @fig-loss-extrapolation shows how loss decreases as we move along either scaling dimension. The curvature of the surface reflects the diminishing returns encoded in our power-law exponents. Improvement slows as we push further along either axis. Our extrapolated predictions (red stars) assume this smooth surface continues beyond observed data, a reasonable assumption given empirical evidence, but one that carries increasing uncertainty at extreme scales. Notice how the red stars sit far from the blue cluster of training points, making visually concrete just how much we're extending beyond our empirical grounding.