Compute-Optimal Model Size Calculator
Inputs
| Compute budget | 6,000 |
|---|---|
| Tokens per parameter | 20 |
Compute-Optimal Model Size Calculator
Given a training compute budget in petaFLOP/s-days, find the Chinchilla compute-optimal parameter count and token count by inverting the 6ND rule under a fixed tokens-per-parameter ratio.
Inputs
Compute budget
Results
Enter a value to see results.
Details
Compute-Optimal Model Size
Given a fixed amount of training compute, the Chinchilla scaling laws answer how large a model that compute should build and how many tokens it should train on. The compute-optimal allocation pairs parameters and data in step rather than spending the whole budget on size. This calculator takes a compute budget in petaFLOP/s-days, holds the tokens-per-parameter ratio fixed, and inverts the 6ND rule to return the optimal parameter count and token count.
Allocating a compute budget
Training compute is well approximated by the 6ND rule: about six floating-point operations per parameter per token. The Chinchilla study showed that, for a fixed budget, loss is minimized when model size and dataset size grow together, with roughly twenty training tokens per parameter. Fixing that ratio turns the compute equation into a relation in the parameter count alone, which can be solved for the model size a given budget supports.
The formula
Let the budget be in petaFLOP/s-days and the tokens-per-parameter ratio. Converting the budget to FLOPs and substituting into the rule gives , so the parameter count and token count are
ND=10916rC⋅8.64×1019=r⋅Nwhere is the optimal parameter count in billions and the optimal token count in billions. The factor converts petaFLOP/s-days to FLOPs, and dividing by expresses in billions. The square root appears because compute grows with the square of the parameter count once tokens are tied to it.
Worked example
Take a budget of 6,000 petaFLOP/s-days at the central ratio of twenty tokens per parameter:
ND=10916×206000×8.64×1019≈65.7 billion=20×65.7≈1314.5 billion=1.31 trillionThe budget is best spent on a model of about 65.7 billion parameters trained on roughly 1.31 trillion tokens. Doubling the budget would raise the optimal parameter count by about the square root of two, not by a factor of two, because of the square-root dependence.
Limits
This reflects compute-optimal training loss for a fixed training budget and nothing more. It does not weigh the cost of serving the model, which often makes a smaller model trained on more tokens the better practical choice, so deployed models frequently sit below the parameter count this returns. The fixed ratio is itself an estimate that shifts with dataset and architecture, and real runs sustain only a fraction of peak hardware throughput. The dataset side of the same trade-off is covered by the Chinchilla Optimal Tokens Calculator, and the raw compute of any chosen configuration by the Training FLOPs Calculator.
Frequently Asked Questions (FAQ)
How should a fixed compute budget be split between model size and data?
The Chinchilla scaling laws show that for a fixed training budget, loss is minimized when parameters and training tokens are scaled together rather than spending most of the budget on parameters. Holding the tokens-per-parameter ratio near twenty and solving the 6ND compute equation for that budget gives the model size and dataset size that make the most of the available compute. Larger budgets support proportionally larger models and datasets.
Why does the model size scale with the square root of compute?
Training compute under the 6ND rule is six times parameters times tokens. Holding tokens at a fixed ratio r per parameter makes tokens equal to r times N, so the compute becomes six times r times N squared. Because compute grows with the square of the parameter count, recovering the parameter count from a compute budget requires taking a square root: N equals the square root of the compute divided by six r. Tokens then follow as r times N.
What is a petaFLOP/s-day?
A petaFLOP/s-day is the amount of compute produced by sustaining one petaFLOP/s — 10¹⁵ floating-point operations per second — for a full day. Multiplying by the 86,400 seconds in a day gives 8.64 × 10¹⁹ operations. It is the standard unit for reporting and comparing the compute budgets of large training runs, since raw operation counts reach awkward magnitudes.
Disclaimer
This inverts the first-order 6ND rule under a fixed tokens-per-parameter ratio and reflects compute-optimal training loss only. It does not account for inference cost, which often favors smaller models trained longer, nor for hardware utilization below peak. Treat the result as a planning estimate.