Skip to content
mentoor

Topic 3 of 5 · 4 min read

Scaling compute, data and parameters

Goal: Explain the trade-off between model size and training tokens for a fixed compute budget using published scaling results.

For a fixed training budget, a model gets best results when its size and the amount of text it trains on grow together, not when one is pushed alone. This is the main lesson of the scaling-law studies.

Check yourself · 1 of 3

What did the Chinchilla study conclude about large models of its time?

Choose one answer

Why it matters

News about models is full of "billions of parameters" and "trillions of tokens". Those two numbers, plus the compute spent, describe the run. Knowing how they trade off tells you why a smaller model can beat a bigger one, and why training costs far more than using the model.

The three knobs

  • Parameters: the number of weights. More parameters give more capacity to store patterns.
  • Tokens: how much text the model trains on.
  • Compute: the total arithmetic, roughly proportional to parameters times tokens.

What the studies found

An early study by Kaplan and colleagues (2020) showed that loss falls smoothly and predictably as size, data and compute rise. This made large runs a reasonable bet: you could forecast the gain before paying for it.

In 2022, the Chinchilla paper re-measured the trade-off. It found that many large models of the time were under-trained: too many parameters for the tokens they saw. Their 70-billion-parameter model, trained on about 1.4 trillion tokens, beat larger models trained on far less data, including the 280-billion-parameter Gopher, using the same compute as Gopher. Parameters and tokens should scale in step.

Since then, many builders train smaller models on far more tokens than the compute-optimal point. The reason is cost after training: a smaller model is cheaper to run for every user request, so extra training is paid once and saved many times.

Before and after

Weak: "This model has more parameters, so it must be better."

Better: "This model has more parameters, but I should ask how many tokens it trained on and what it scores on my kind of task. A smaller model trained longer may do as well and cost less per request."

What goes wrong

  • Equating size with quality. Data quality, training length and later tuning all matter.
  • Assuming smooth gains forever. The laws describe loss, which is not the same as skill on your task, and good data may run out.
  • Forgetting running cost. Training is paid once; serving is paid on every call.

A small code branch can make the compute rule concrete. A common estimate is compute of about six times parameters times tokens:

params = 70e9
tokens = 1.4e12
flops = 6 * params * tokens  # rough training compute

Examples

Same compute, two designs

Design Parameters Tokens
Gopher 280 billion about 300 billion
Chinchilla 70 billion about 1.4 trillion

The two used about the same compute. The smaller model with more data scored better on many benchmarks in the Chinchilla paper.

Choosing a model for a help desk

A support team compares a very large model and a smaller one trained on more text. They test 50 real tickets. The smaller model answers 46 acceptably and costs a fraction per call, so they choose it. The decision came from their own test, not from the parameter count.

Key points

  • Compute is roughly parameters times tokens, so a fixed budget forces a choice between size and data.
  • Early scaling laws showed loss falls smoothly with size, data and compute, which made big runs a predictable bet.
  • The Chinchilla study found many large models were under-trained and that size and tokens should grow together.
  • Builders often train smaller models on more tokens because a small model is cheaper to serve.
  • Lower training loss is not the same as better performance on your own task.

Common mistakes

  • Judging a model by parameter count alone.
  • Ignoring how many tokens a model was trained on.
  • Treating a scaling law as a guarantee of better results on every task.
  • Forgetting that serving cost scales with every request, not just with training.

Check yourself · 2 of 3

Roughly, training compute is proportional to what?

Choose one answer

Check yourself · 3 of 3

Why might a builder train a smaller model on more tokens than the compute-optimal point?

Choose one answer

Practice items, not counted towards your mastery.

Start here

More for this topic