Reading the paper and preregistering the replication
Extract scaling-law claims and preregister a feasible small-scale replication.
After this lesson you can
- Extract the paper's quantitative claims and the details supporting them.
- Identify methodological differences between Kaplan et al. and Chinchilla.
- Plan compute budgets and run counts within available GPU hours.
- Write a preregistration with numerical predictions and success criteria.
Before you start
A claim that can be lost in reproduction
You have an 8 GB GPU and want to repeat a conclusion about training large language models. You cannot train Chinchilla at its original scale. You can formulate a smaller question, record its limits and produce evidence another person can inspect. The difference determines what the final report can say.
The question is: for a given training budget, what combination of parameters and tokens achieves the lowest loss? A model that is too small will have little capacity; one that is too large will consume the budget before seeing enough tokens. There is a trade-off in the space of possibilities, and its position can shift as the budget changes. The compute optimum refers to that position for a particular task, model family and training procedure, not the best model for every deployment cost.
The figure lets you explore the cost of studying that trade-off before turning on the GPU. The plane is logarithmic: the horizontal axis is the number of parameters; the vertical axis is the number of training tokens. With the approximation (two FLOPs per parameter and token in the forward pass and four in the backward pass), a fixed budget is a line with slope in that plane, because . Each line is an isoFLOP profile; each blue point, a planned run at a grid size. The dashed line marks where the optimum would fall if the optimal ratio of tokens per parameter were , and the hollow marker on each profile is that prediction.
The initial state already shows two lessons. First, a grid from 5 to 60 million parameters, reasonable at first glance, leaves out the predicted optimum for the two smallest budgets, which with is about 2.9 and 5 million. Those profiles cannot locate their minima, only extrapolate them. Second, moving the grid endpoints does not change the hours, because at fixed each change in is offset by (assuming a common effective rate); what multiplies cost is the number of sizes and seeds. Try two seeds and check that the same plan no longer fits in 24 hours. This lesson ends with a preregistration that turns those constraints into an evaluable experiment.
Extract a claim together with its conditions
Critical reading is not copying the abstract. A sentence such as “optimal size and data grow equally” leaves decisive questions open: what counts as a parameter? What loss is measured? Is a learning-rate schedule fitted to each duration? Is the prediction inside or outside the measured range? Complete one row per claim, keep the exact quotation in your notes and record unavailable information. Do not turn an omission into a silent assumption.
Hoffmann and colleagues study dense autoregressive models and pretraining loss. Their abstract describes more than 400 models, from roughly 70 million to over 16 billion parameters, trained on quantities of tokens from billions to hundreds of billions. In that context they conclude that, approximately, optimal size and tokens grow at similar rates as compute increases. Their Chinchilla model uses 70 billion parameters and 1.4 trillion tokens, a ratio of 20 tokens per parameter for that particular configuration. That ratio is not a universal constant or a value to impose on an experiment with different architecture and data.
The relationship of interest can be written as and . If is a valid approximation and both laws are exact over an interval, then . If also , each exponent is and is constant in that interval. Equality is an empirical hypothesis, not a consequence of the compute constraint. The constraint imposes only the sum.
Proof
Substitute the two powers into : the right-hand side is proportional to . If the equality holds for more than one positive budget, the powers of must match, so . If also , both equal . The ratio of two functions proportional to does not depend on , although it does depend on their constants of proportionality.
∎In contrast, Kaplan and colleagues conclude that efficient allocation favors increasing size more than data and stopping before convergence. Hoffmann summarizes the difference using approximate factors for a tenfold budget increase: 5.5 for size and 1.8 for tokens, versus approximately equal increases in their analysis. The factors are consistent with the exponents Hoffmann’s table 2 attributes to Kaplan, and : and , whose product is exactly , as required by . These are conclusions from different procedures, not two mathematical laws incompatible independently of the task.
The central claim can thus be extracted with the uncertainty published by the paper itself (Hoffmann’s table 2; 10th and 90th bootstrap percentiles in parentheses):
| Source | Method | (parameters) | (tokens) |
|---|---|---|---|
| Hoffmann, approach 1 | Minimum of training curves | 0.50 (0.488, 0.502) | 0.50 (0.501, 0.512) |
| Hoffmann, approach 2 | isoFLOP profiles, 9 budgets from to | 0.49 (0.462, 0.534) | 0.51 (0.483, 0.529) |
| Hoffmann, approach 3 | Parametric fit of | 0.46 (0.454, 0.455) | 0.54 (0.542, 0.543) |
| Kaplan, according to Hoffmann | Their own fit, without embeddings | 0.73 | 0.27 |
Read the table with the definition in hand. The intervals come from bootstrapping points in each analysis, not repeated training runs. The approach 3 interval is one thousandth wide, much smaller than the discrepancy among the three approaches, and does not even contain the published point estimate, 0.46. These are two warning signs that critical reading should record without resolving yet; the next section describes what those who investigated them found. And Kaplan’s row measures without embedding parameters, a difference in definition that, as we shall see, is not a detail.
A useful table for the record separates these rows:
| Element | Original paper | Question for our experiment |
|---|---|---|
| Response variable | Language modeling loss | Which set, tokenizer and reduction do we use? |
| Constraint | Training budget | Are embeddings, attention and output included in the count? |
| Estimate | Three frontier approaches | Do the sizes cover each profile’s minimum? |
| Scope | Models and corpus of the study | How much smaller is our scale? |
| Uncertainty | Depends on fitting method | What variation do seeds and bootstrap capture? |
Treat the first row as a measurement contract. Cross-entropy per token depends on how text is tokenized: changing the vocabulary changes both the denominator and prediction units. For an internal comparison, freeze the tokenizer and validation split and specify whether losses are averaged over all valid tokens or first within each sequence. In the former case a long sequence weighs more; in the latter each sequence weighs equally. If there is padding, document how it is excluded. A lower loss with another tokenizer cannot automatically be interpreted as a comparable improvement.
The scope row also protects against unintended extrapolation. The paper provides a family of results at the sizes and budgets it investigated. If we train much smaller models here, a different slope may indicate a regime transition or a procedural difference, but does not on its own identify which is responsible. Save the figure, range and a sentence stating whether the number is observed, fitted or extrapolated for each claim. If the chart shows an inferred optimum, do not describe it as if every point on that frontier were an independent run.
Why procedures may disagree
Hoffmann’s three approaches extract the frontier differently. The first compares envelopes of training curves at fixed sizes; the second trains different sizes for each fixed budget and finds the minimum of the isoFLOP profile; the third fits a parametric loss surface. You will study and compare them in the following lessons. All three share data and experimental decisions, so their agreement is not equivalent to three independent replications.
The comparison requires keeping at least four decisions separate. First, can include all parameters or exclude embeddings: recording only “20M” without that definition prevents comparison. Second, is a training proxy, not an exact count of all operations; attention, the output layer and other costs can matter depending on shape and context length. Third, the learning-rate schedule depends on the horizon: comparing an intermediate point of a long run with the end of a short one may compare states with different rates. Fourth, corpus, token repetition, architecture and scale change the statistical problem.
Which explains the discrepancy? The history is instructive because the first explanation proved incomplete. Hoffmann attributed it mainly to the schedule: Kaplan used one learning-rate schedule and a fixed token count for all models, so short runs were evaluated with a poorly calibrated schedule. Two later works, which controlled factors one by one, point to other mechanisms:
- Pearce and Song attribute much of the discrepancy to Kaplan counting parameters without embeddings, combined with analysis at small scale. Simulating the Chinchilla study under those conditions yields biased coefficients close to Kaplan’s. The mechanism is arithmetic: in a small model the embedding table is a large fraction of the total and nearly constant with size, so the relationship between without embeddings and total is not a power law and distorts the apparent slope.
- Porian and colleagues reproduce Kaplan’s law on two corpora and identify three factors: the cost of the final layer (which with without embeddings omits), warmup duration and scale-dependent optimizer tuning. Correcting all three yields good agreement with Chinchilla. Contrary to Hoffmann’s hypothesis, they find that careful learning-rate decay is not essential for the Chinchilla law to hold.
Neither invalidates adjusting the schedule to the horizon in one’s own experiment; they show that it was not the main cause of that particular discrepancy. The consequence for us is direct: at 10 million parameters embeddings carry enormous weight, so the conventions for and must be fixed and recorded before training. The methodology also generalizes: a controlled comparison changes one factor at a time, keeps the others fixed and records which conclusion changes. If data and schedule change together, the difference cannot be attributed cleanly to the schedule.
“Replication” also needs precision. Besiroglu and colleagues reconstruct 240 points from figure 4 of the paper (size, FLOPs and loss encoded in color) and refit the third approach. They do not retrain Chinchilla. They find that published estimates fit the extracted data poorly, that their intervals are implausibly narrow (they would require over 600,000 experiments, versus the fewer than 500 likely performed) and that their own fit gives and about 20 tokens per parameter, consistent with approaches 1 and 2, whereas the published approach 3 fit implies roughly 70. Reconstruction from colors and positions also introduces digitization error. Their conclusion about the fit is relevant evidence, not a direct measurement of variability across new runs. Reproducibility terminology helps distinguish reanalyzing data, repeating training and testing the same relationship under different conditions.
What scale is achievable with 8 GB
Before choosing sizes it helps to know where we expect the optimum. If the Chinchilla claim held at our scale with a constant ratio , substitution into gives , that is,
This is the case of the previous proof, with the constant fixed by . With , a starting hypothesis rather than a fact about our architecture, the five planned budgets give:
| (FLOPs) | |||||
|---|---|---|---|---|---|
| Predicted | 2.9 M | 5.0 M | 9.1 M | 15.8 M | 28.9 M |
| Predicted | 58 M | 100 M | 183 M | 316 M | 577 M |
Multiplying by 100 multiplies predicted size by only 10. A shared grid covering the optimum of all five profiles with a margin of factor 2.5 on each side must span approximately 1 to 75 million parameters, which the interactive makes you discover. An alternative is a different grid per profile, centered on its predicted : it costs the same and concentrates points where they matter.
Three checks decide whether that is achievable here. The first is memory: with AdamW and mixed precision, weights, gradients and the optimizer’s two moments occupy on the order of 16 bytes per parameter, about 1.6 GB for 100 million. Parameters fit comfortably in 8 GB; activations are the limiting factor, growing with batch size, context length and depth, so the memory pilot is run at the large end of the grid.
The second is the definition of , where small scale bites. With the GPT-2 tokenizer (50,257 tokens) and width , the embedding table has parameters, while transformer blocks contribute about :
| Configuration | Without embeddings () | Embeddings | Total | Embedding fraction |
|---|---|---|---|---|
| , | 3.1 M | 12.9 M | 16.0 M | 80 % |
| , | 10.6 M | 19.3 M | 29.9 M | 65 % |
| , | 25.2 M | 25.7 M | 50.9 M | 51 % |
The same model is “16 M” or “3 M” depending on the convention. This is precisely Pearce and Song’s mechanism: if parameters are counted without embeddings, the ignored fraction changes from 80 % to 51 % across the grid and the fitted exponent is biased. Therefore the record fixes a convention (the current recommendation is to count the total, as Chinchilla does) and saves both counts for reanalysis. A smaller vocabulary reduces the problem, but changes the loss and its comparability.
The third is scale distance. Hoffmann’s smallest isoFLOP budget is and the largest ; our range lies between 1.8 and 6.5 orders of magnitude lower. What can be replicated is not “the Chinchilla number” but the relationship: whether in our range grows as with close to when all parameters are counted, and whether that conclusion changes when counting without embeddings.
From FLOPs to a feasible plan
The approximation expresses training FLOPs in terms of the number of parameters and processed tokens. Here and are counts, is a number of operations and effective throughput is expressed in FLOP/s. For , a budget implies
For example, with 12 million parameters and FLOPs, the formula gives approximately tokens. This is a continuous target: actual training uses whole batches and must record both the target and tokens actually processed. If the dataset is small, a large number of processed tokens can mean repeating data, not seeing that many unique tokens. The comparison with a study using a different corpus then changes.
With five budgets , , , and , six sizes per profile and one seed per configuration, there are 30 runs. The budgets sum to FLOPs per size and the full plan totals FLOPs. At a hypothetical effective throughput of 15 TFLOP/s the quotient is 16 training hours. This is a planning calculation, not a measurement or guaranteed prediction on the reader’s machine.
Effective throughput must be measured with the same model, precision, context length, batch and pipeline. Divide estimated FLOPs by elapsed time in a representative run, after warmup and with appropriate device synchronization. Measure several sizes: a single number may conceal utilization and memory differences. The figure’s estimator uses a common rate; for a final plan sum hours per configuration with the corresponding rate. Add validation, preparation, saving, recovery and failure margin separately. Do not confuse the card’s theoretical peak rate with effective throughput.
The 8 GB limit is a memory constraint, not a list of guaranteed sizes. Weights, gradients, optimizer states, activations, buffers and context occupy memory; precision and batch size change the balance. Run a memory and stability pilot at each end of the grid before committing to the sweep. If memory is insufficient you can reduce the microbatch or accumulate gradients, recording the effective batch and modification; this does not guarantee every size will fit or automatically preserve throughput.
Choose sizes on both sides of the expected minimum for each budget, not just seven arbitrary sizes. If all lie on the same side, the parabola extrapolates and its minimum is not identified by the profile. The initial prediction may come from a reference law, but the range must be declared as a hypothesis and expansion rules as a contingency. Reserve budget for several seeds, hyperparameter tuning and out-of-sample validation. If the pilot shows the plan does not fit, change the record before observing confirmatory results and retain the previous version.
One concrete way to prepare the grid is to choose a predicted central size for each budget and explore lower and higher sizes spaced approximately logarithmically. With fixed , each size determines a different token target. Before running, check that the smallest model does not require data repetition incompatible with the question and that the largest processes enough batches for an interpretable comparison. A single size grid shared by all budgets may be convenient, but does not guarantee minimum coverage for all of them.
The total budget must include decisions made during the project, not only the ideal table. If there are two seeds per configuration, that table’s training cost doubles. A learning-rate search has its own number of runs and can consume a considerable percentage of the budget. Record how many trials are allowed, how the rate is selected and whether those same runs enter the main analysis. Reusing them without acknowledging selection may favor configurations that were lucky in the pilot.
Rate measurement also has practical uncertainty. A short test may yield a useful estimate, but captures little variation in a shared system and may not reflect validation or pauses. Keep tokens, steps, time and configuration with each pilot; calculate a prudent interval of hours using plausible rates, rather than presenting one number as a guarantee. If a run is interrupted, record resources consumed even if it resumes from a checkpoint: the project’s real cost also includes lost work.
Lab: an auditable calculator
First build the table with Python. The example uses the five budgets above and three illustrative sizes. Code indices start at zero; the number of profiles and sizes is the length of each list. The lab calculates FLOPs, tokens and time, but does not check whether the model fits in memory.
budgets = [1e15, 3e15, 1e16, 3e16, 1e17]
sizes = [10e6, 20e6, 40e6]
throughput = 15e12 # FLOP/s efectivo hipotético
def make_plan(budgets, sizes, throughput, seeds=1):
if throughput <= 0 or seeds < 1:
raise ValueError("Rendimiento y semillas deben ser positivos")
rows = []
for c in budgets:
for n in sizes:
if c <= 0 or n <= 0:
raise ValueError("Presupuestos y tamaños deben ser positivos")
rows.append({"flops": c, "params": n, "tokens": c / (6*n),
"hours": c * seeds / throughput / 3600})
return rows
plan = make_plan(budgets, sizes, throughput)
print("Configuraciones:", len(plan))
print("Horas:", round(sum(row["hours"] for row in plan), 4))
print("Tokens del último modelo:", round(plan[-1]["tokens"]))Each row groups the cost of all seeds for a configuration. The configuration count is not the run count if there is more than one seed. The function assumes every run reaches exactly the same and rate, and does not round tokens to batches. In production, save a row per seed and account for steps actually completed. External parameter validation prevents a plan with negative times, but does not show that one seed’s duration represents another’s.
Now check the sum with a library and use six sizes. Size values do not affect cost under this approximation, but do affect feasibility and tokens per run.
import numpy as np
six_sizes = np.array([5, 10, 15, 20, 30, 40]) * 1e6
costs = np.repeat(np.asarray(budgets), len(six_sizes))
print("Ejecuciones:", len(costs))
print("FLOPs totales:", f"{costs.sum():.3e}")
print("Horas:", round(costs.sum() / throughput / 3600, 4))The second plan has twice as many sizes as the first, so its cost is double: 16 hours versus 8. Checking that relationship helps detect unit or multiplicity errors. It does not validate the FLOP approximation or assumed rate. A later step will compare this calculation with the actual architecture and save configuration and measurements alongside each run.
Register before looking
Preregistration practice guards against choosing a hypothesis after seeing which result turned out well. It does not make the design correct: it makes it visible and allows prediction to be separated from exploration. A falsifiable hypothesis needs a possible observation that counts against it. “The curve will have some trend” is not enough; “the exponent will lie between two values chosen before training, with the method and criterion fixed” can fail.
Use this template as a starting point and fill each field with your actual decisions:
- Question and scope. Validation loss per token for an identified GPT family and corpus; specify tokenizer, split, precision and architecture. The study tests a local relationship at small scale, not the absolute result of the original model.
- Numerical prediction. As a working hypothesis, for example, between 0.4 and 0.6 for the fit of against , and an interior minimum in at least four of five profiles. These limits are an illustrative choice, not a published interval. A second directional prediction derived from Pearce and Song: when repeating the fit with without embeddings, the estimated exponent will be larger than with total . Also record the prediction and range for a validation run before training it.
- Design. Five budgets, specific sizes on both sides of the predicted optimum, seeds, horizon and schedule per run, hyperparameter search, exclusion rules and the and FLOP conventions. Identify which pilot data will be used only for sizing and not to evaluate the hypothesis.
- Analysis. Fit of each profile, uncertainty method and resampling unit, exponent fitting, treatment of minima outside the grid and sensitivity analysis. Declare whether a seed or a complete configuration is the independent unit; do not resample correlated points as though independent.
- Decision. For example, with an interior minimum in at least four profiles, define success when the entire uncertainty interval for lies within [0.4, 0.6] and failure when it lies completely outside. If the interval crosses a boundary, or coverage or runs are insufficient, declare the result inconclusive. Specify the interval level and construction in advance. This illustrative rule distinguishes compatible evidence from an imprecise estimate.
- Resources and contingencies. Hours per configuration and margin, GPU availability, memory test, stopping and failure rules. Separate costs of pilots, tuning, training and validation. If the budget is insufficient, reduce or redesign the plan before opening confirmatory results.
- Integrity. Save the document’s date, version and hash, code and configurations. The hash detects subsequent changes but does not itself prove when the document existed: also preserve an independent timestamp or repository.
The example criterion evaluates a property of this experiment, not the universal truth of the law. An estimate within a preset interval does not demonstrate statistical equivalence or confirm every detail of the paper. An equivalence claim would require appropriate margins and an interval rule chosen in advance. A result outside the range may reflect an actual change of regime, data or method; investigating it requires additional experiments, not choosing an explanation after the fact.
A good record also preserves the decision trail. Suppose two profiles have no interior minimum and extending the grid would consume more hours than available. The recorded rule may declare the result inconclusive and reserve the extension for later analysis. If instead the grid is extended after observing losses, record the change and do not present the new grid as if it had been chosen without that information. This history lets another person distinguish what was planned from what was discovered, even when both analyses are useful.
The verifiable deliverable for this lesson is a dated registration document containing claims and their sources, numerical predictions and ranges, grid and seeds, hours estimated from your own measurements, and success, failure and indeterminate criteria. Writing this template alone does not count as executing a replication. The next lessons will build the system that saves configurations and results, and ultimately test the registered prediction.
Exercises
isoflop_grid(C, r, k, factor): return a list of k pairs (N, D) ordered by N in increasing order, with sizes in geometric progression between and , where , and with so that every run spends exactly . Raise ValueError if k < 2, factor <= 1 or any numeric argument is not positive.import math
def isoflop_grid(C, r, k, factor):
# tamaños geométricos alrededor de N* = sqrt(C / (6 r)); D = C / (6 N)
passA scaling law is a claim conditioned on data, architecture, compute and method. A small replication begins by extracting those conditions, planning measured resources and setting predictions and rules before observing results. Its value lies in making both success and failure interpretable and reproducible.