Transformers
Advanced 14 min read Transformers

Scaling Laws

The physics of more

Capability follows predictable power laws of model size, data and compute. Scaling-laws thinking tells you where to spend a fixed budget and why bigger isn't always better.

scaling lawschinchillacomputemodel sizedatadiminishing returns
Before we start

What you will learn

  • State the empirical scaling relationships
  • Compute data/compute/size trade-offs
  • Apply scaling reasoning to fine-tuning budgets
Introduction

What is this?

Empirical studies show model loss drops predictably as you scale parameters, data tokens, or compute, following power laws. Chinchilla's key insight: the compute-optimal ratio spends equal budget growth on params and data. Those laws guide training budgets, explain emergent capabilities, and show sharply diminishing returns per dollar at the top end.

Motivation

Why do you need it?

  • Your judgment 'should we take a 3x model?' reduces to the same loss-vs-cost curve.
  • It explains why data quality/quantity matters as much as size.
  • It reframes fine-tuning: small-target tasks often get more from data than from a giant base.
  • Emergent behavior traces to threshold scaling — capability cliffs rather than smooth gains.
Think about it

Mental model

Imagine

Polishing a stone with time

Think of

Scaling laws

The first 10 minutes of sanding transform the rock; the next 10 hours remove microns. Capability per dollar follows the same diminishing curve — spend at the elbow, not the asymptote.

Mechanics

How it works

  • Loss ≈ a·S^α for size S, and similar in data D and compute C, with fitted exponents.
  • Chinchilla optimality ≈ 20 tokens of data per parameter.
  • Compute-optimal scaling grows params AND data together, not just one.
  • Bigger models with identical data underperform better-fed smaller ones.
  • Frontier behavior is bought with extreme compute; margins shrink per parameter.

Power-law trade-offs.

Params ↑
Tokens ↑
Compute budget
Elbow
Real world

In production

  • Choosing a checkpoint size on a budget — data/tooling often yield more than model size.
  • Fine-tune spent per-task: collect more examples before scaling the base.
  • Explaining 'bigger model sometimes worse' to stakeholders via data adequacy.
Guidelines

Best practices

  • Before buying a bigger model, estimate the gap with a few devset probes.
  • Balance token budget with task data, not vanity parameter count.
  • Use scaling intuition for evals: small runs extrapolate poorly; measure, don't guess.
Watch out

Common mistakes

  • Buying the biggest model when the data/task fix is better.
  • Treating Chinchilla as universal — it governs pre-training budgets, not fine-tuning.
  • Ignoring that gains concentrate at the frontier, where latency/cost live.
Root cause analysis

Common issues

Error
Bigger fine-tune performs worse
Root cause

Overfitting; data too small for the capacity

Fix

Add task data, regularize, or shrink the adapter size.

Error
Costs spiraling for no gain
Root cause

Operating beyond the scaling elbow

Fix

Evaluate gains with dev probes; route back to a smaller tier.

When things break

Debugging tips

  • Larger model doesn't beat small on YOUR task → gap often data/format, not capacity.
  • Overfit strong → the model is far larger than the fine-tune data justifies.
  • Loss curves flatten early → you're on the data-limited side; add tokens before params.
Interviews

Interview checkpoint

Test yourself

Quick quiz

0/2
1

Chinchilla-optimal data roughly requires…

2

Doubling parameters while starving data rarely helps.

Go deeper

Official documentation