Lesson 11 ยท Chips & LLMs

Scaling Laws

Why each frontier model generation demands exponentially more chips โ€” and how to calculate exactly how many

๐Ÿ“ Scaling laws ยท Kaplan โ†’ Chinchilla ยท 6ND formula ยท H100 translation ยท Test-time compute ~25 min
The Central Question

Why doesn't there come a day when the chips are "enough"?

Every year, hyperscalers announce ever-larger GPU clusters. Google guided $75B in capex for 2025. Microsoft committed $80B. Meta operates 350,000+ H100-equivalent GPUs. Investors who ask "when does this end?" are asking the wrong question. The correct question is: what is the mathematical relationship between compute and model quality?

The answer comes from a two-page empirical result published in 2020 โ€” and a correction that arrived two years later. Together they explain why chip demand is not a cyclical trend but a mathematically predictable, compounding demand driver.

Core Thesis
Model quality (cross-entropy test loss) decreases as a smooth power law of training compute. This relationship has been verified across more than seven orders of magnitude of compute. There is no saturation point on the horizon. More compute โ†’ better model, always โ€” the returns are diminishing but never zero. Scaling laws are the demand equation behind every GPU purchase order.
Section 1

What a power law means: diminishing but endless returns

The relationship between test loss L and training compute C (measured in FLOPs) follows:

L(C) โ‰ˆ (Cโ‚€ / C)ฮฑ ฮฑ โ‰ˆ 0.05โ€“0.07 across architectures. Each 10ร— increase in compute reduces loss by roughly 11โ€“15%.

In log-log space this is a straight line. The practical implication: you can always buy a better model โ€” it just gets more expensive. Going from GPT-2 quality to GPT-3 quality required ~1,000ร— more compute. Getting from GPT-3 to frontier-2024 quality required another ~100โ€“1,000ร—. The law has not broken down at any scale tested.

Loss vs. Compute โ€” Power Law (log-log, schematic)
Test Loss (log scale) Training Compute โ€” FLOPs (log scale) high mid low 10ยฒโฐ 10ยฒยฒ 10ยฒยณ 10ยฒโด 10ยฒโต GPT-2 GPT-3 Chinchilla Llama 3 70B Llama 3 405B 10ร— compute ~14% less loss L โˆ Cโปโฐยทโฐโท
A straight line in log-log space is a power law. The relationship holds from 10ยฒโฐ to beyond 10ยฒโต FLOPs with no sign of saturation. Chinchilla and GPT-3 have similar compute; the difference between them is how compute was allocated between model size and data โ€” not total compute.
Section 2

The Kaplan โ†’ Chinchilla paradigm shift

Kaplan et al. (OpenAI, 2020) discovered the power law and drew an operational conclusion: for a fixed compute budget, prioritize model size. Scale parameters faster than data. GPT-3 followed this: 175B parameters on 300B tokens.

Hoffmann et al. (DeepMind, 2022) โ€” the Chinchilla paper โ€” ran a more controlled experiment with 400 models across a wider compute range and found Kaplan's conclusion was wrong. The correct allocation: model size and data tokens should scale equally. The empirical rule of thumb:

Dopt โ‰ˆ 20 ร— N Optimal training tokens โ‰ˆ 20 per parameter. GPT-3 (175B params) needed ~3.5 trillion tokens, not 300 billion โ€” it was undertrained by 11ร—.

DeepMind trained Chinchilla โ€” 70B parameters, 1.4T tokens โ€” for the same compute as Gopher (280B params, 300B tokens). Chinchilla outperformed Gopher on every benchmark. Half the parameters, 20ร— more data, identical compute. This reshaped how every major lab trains frontier models.

2020
GPT-3
175B params
300B tokens
1.7 tok/param
undertrained data
2022
Chinchilla
70B params
1.4T tokens
20 tok/param
compute-optimal
2024
Llama 3 8B
8B params
15T tokens
1,875 tok/param
inference-optimal
Section 3

The 6ND formula: FLOPs for any training run

For a transformer with N parameters trained on D tokens, total training compute is:

C โ‰ˆ 6 ร— N ร— D Derived as: 2 FLOPs/MAC ร— 3 passes (1 forward + 2 backward) ร— N MACs/token. Accurate within 2ร— for standard transformers.

This formula is the Rosetta Stone between AI research and chip demand. Every time a lab publishes a model's parameter count and token count, you can compute the training budget โ€” and from that, the H100 cluster required.

Model N (params) D (tokens) C = 6ND (FLOPs) Tokens / param vs. Chinchilla
GPT-2 1.5B 40B 3.6ร—10ยฒโฐ 27 โ‰ˆ optimal
GPT-3 175B 300B 3.2ร—10ยฒยณ 1.7 11ร— too few tokens
Chinchilla 70B 1.4T 5.9ร—10ยฒยณ 20 optimal โœ“
Llama 2 70B 70B 2T 8.4ร—10ยฒยณ 29 1.4ร— beyond optimal
Llama 3 8B 8B 15T 7.2ร—10ยฒยณ 1,875 94ร— beyond optimal
Llama 3 70B 70B 15T 6.3ร—10ยฒโด 215 11ร— beyond optimal
Llama 3 405B 405B 15.6T 3.8ร—10ยฒโต 38 2ร— beyond optimal
Chinchilla Optimal Frontier โ€” Model Size vs. Training Compute (log-log)
Model Size N (log scale) Training Compute C = 6ND (FLOPs, log scale) 10โธ 10โน 10ยนโฐ 10ยนยน 10ยฒโฐ 10ยฒยน 10ยฒยฒ 10ยฒยณ 10ยฒโด 10ยฒโต 10ยฒโถ Chinchilla optimal: N = โˆš(C/120) (D โ‰ˆ 20 ร— N) overtrained on params (data-starved) inference-optimized (smaller N, more data) GPT-2 GPT-3 โ†‘ above frontier Chinchilla โœ“ Llama 3 8B Llama 3 70B
Chinchilla Frontier: Model Size vs. Training Compute (corrected)
10โธ 10โน 10ยนโฐ 10ยนยน 10ยนยฒ 10ยฒโฐ 10ยฒยน 10ยฒยฒ 10ยฒยณ 10ยฒโด 10ยฒโต 10ยฒโถ Model params N Training compute C (FLOPs) Chinchilla frontier (D = 20N) overtrained on params (data-starved, GPT-3 era) inference-optimized (overtrained on data) GPT-2 (1.5B, 40B tok) GPT-3 (175B, 300B tok) Chinchilla โœ“ (70B, 1.4T tok) Llama 3 8B (8B, 15T tok) Llama 3 70B (70B, 15T tok) Llama 3 405B (405B, 15.6T tok) GPT-3: 11ร— too few tokens for its compute budget
Models above the frontier have too many parameters for their training data โ€” overtrained on params, undertrained on data. Models below the frontier train smaller models on proportionally more data โ€” the modern inference-optimized strategy. Chinchilla sits exactly on the frontier. Note GPT-3 is 11ร— above the optimal token count for its compute budget.
Section 4

From FLOPs to H100 clusters: the hardware translation

An NVIDIA H100 SXM delivers 989 TFLOPS BF16 peak. Real training runs achieve Model FLOPs Utilization (MFU) of 35โ€“45% due to inter-GPU communication, gradient synchronization, and memory bottlenecks. Effective throughput: ~376 TFLOPS per H100. Use C รท (376 TFLOPS ร— training seconds) to find the required cluster size.

989 TFLOPS
H100 peak BF16
38%
Typical MFU
real training runs
376 TFLOPS
Effective per H100
at 38% MFU
3.25ร—10ยนโน
FLOPs/H100/day
376T ร— 86,400s
Training Run Calculator โ€” enter N and D to get cluster requirements
Section 5

The inference-optimal correction

Chinchilla defines "compute-optimal" as the (N, D) allocation that minimizes loss for a given training compute budget. This ignores the cost of serving the model after training.

If you deploy a model to millions of users, the total lifetime inference compute โ€” billions of forward passes โ€” typically exceeds training compute by 10:1 or more. A 2ร— larger model costs ~2ร— more per token to serve. This changes the optimization problem fundamentally.

The Llama 3 Strategy
Meta's Llama 3 8B was trained on 15T tokens โ€” roughly 94ร— more data than Chinchilla-optimal for an 8B model. The result: an 8B model with benchmark quality comparable to much larger models trained with fewer tokens. Each inference call is 8โ€“10ร— cheaper to serve than a Chinchilla-optimal 70B alternative. This is not a mistake โ€” it's optimizing for the full cost equation (training + serving), not just training.

Investment implication: inference-optimized training is additive to chip demand. You train for longer (more training GPU-hours) AND you serve a model that generates more queries because it's cheaper per token. Both training and inference chip demand grow.

Section 6

Test-time compute scaling: the new demand axis

Scaling laws originally described training compute. A new scaling axis has emerged: inference-time compute ("test-time compute"). Instead of spending all compute on training a larger model, spend compute during inference to reason through the answer.

OpenAI's o1, DeepSeek-R1, and Claude extended thinking all exploit this. The model generates thinking tokens โ€” an internal reasoning chain โ€” before its final answer. More thinking tokens โ†’ better performance on hard tasks, following its own smooth power law.

MATH-500: Accuracy vs. Inference-Time Token Budget (schematic)
Direct answer
~50%
256 tokens
~68%
1K tokens
~80%
4K tokens
~90%
16K tokens
~96%
Schematic based on OpenAI's o1 scaling results. Performance scales smoothly with inference-time token budget โ€” a power law orthogonal to training compute. Each 4ร— increase in thinking tokens yields roughly another quality step.

Why this matters for chip demand: even a fixed deployed model uses more GPU-hours when queries trigger long reasoning chains. A model generating 16,000 thinking tokens uses roughly 16ร— the inference compute of a direct-answer model. As AI agents proliferate โ€” running multi-step reasoning loops โ€” inference compute demand can grow faster than training compute demand, creating a demand lever entirely independent of new training runs.

Section 7 ยท Investment Lens

Four demand dynamics for the chip investment thesis

1 ยท Exponential Training Demand
Each frontier generation requires 5โ€“10ร— more FLOPs than the previous. GPT-3 to GPT-4 (estimated) was ~70ร—. This translates directly to GPU cluster procurement. As long as scaling laws hold โ€” and they hold to at least 10ยฒโต FLOPs with no sign of breaking โ€” each new model needs a meaningfully larger cluster.
2 ยท The Data Wall
Internet text โ‰ˆ 10โ€“100T tokens of unique high-quality text. At Chinchilla-optimal scaling, we approach this limit in the next 1โ€“3 model generations. Synthetic data (RLHF, self-play), video/multimodal, and domain-specific corpora become critical extensions. Data quality and curation become a moat.
3 ยท Inference Dominates Long-Term
By 2027, inference is projected at 60โ€“70% of total GPU compute demand. Training is a one-time event; inference is the perpetual revenue stream. Test-time scaling amplifies this โ€” each query uses more cycles. The inference chip demand curve is structurally steeper than training.
4 ยท TSMC as the Demand Anchor
Scaling laws provide mathematical grounding for "more chips forever." NVIDIA GPU wafers + Broadcom XPU wafers + AWS Trainium wafers โ€” all manufactured on TSMC advanced nodes. Published model parameters and token counts let you calculate training FLOPs and derive the required cluster, giving a bottom-up demand estimate.

Key signals to watch

The Integrated Thesis
Scaling laws โ†’ training demand grows exponentially with each generation. Inference-optimal training โ†’ more total training compute, smaller deployed models, more inference queries. Test-time scaling โ†’ each query uses more inference compute. Data wall โ†’ synthetic training runs add new compute demand waves. All four dynamics point in the same direction: sustained, compounding chip demand with quantifiable mathematical underpinning.
Primary Sources

Recommended reading

Knowledge Check โ€” Scaling Laws

1. For a fixed training compute budget, what does Chinchilla prescribe as the optimal allocation between model size (N) and training tokens (D)?
Scale model size much faster than data: for each 10ร— compute increase, grow N by 8ร— and D by 2ร—, following Kaplan's empirical result from 2020
Scale both equally: both N and D should grow as the square root of compute, keeping D/N โ‰ˆ 20, so a fixed compute budget is split evenly across parameters and training tokens
Scale data much faster than model: for each 10ร— compute increase, grow D by 9ร— and N by 1ร—, maximizing token exposure rather than model capacity
There is no universal optimum: the correct N/D ratio varies by task domain and target deployment hardware, so compute allocation is empirically tuned per project
2. GPT-3 (175B params, 300B tokens) and Chinchilla (70B params, 1.4T tokens) have similar training compute budgets. What does this comparison reveal about GPT-3?
GPT-3 was compute-optimal per Chinchilla: the 1.7 tokens/param ratio was the correct allocation given the available compute in 2020, and Chinchilla simply benefited from more advanced hardware
GPT-3 was data-saturated: it had seen too many repetitions of its 300B-token dataset, degrading performance through overfitting that a smaller dataset would have avoided
GPT-3 was undertrained on data: at 175B params, Chinchilla scaling laws say it needed ~3.5T tokens for compute-optimal training, not 300B โ€” it had 11ร— too few tokens for its parameter count
GPT-3 was overparameterized but nearly optimal: Chinchilla shows the loss difference is minor and mostly attributable to architectural improvements rather than the N/D ratio shift
3. Llama 3 8B was trained on 15T tokens โ€” about 94ร— more data than the Chinchilla-optimal amount for 8B parameters. Why is this economically rational rather than a violation of scaling laws?
Meta believed Chinchilla's scaling exponents were specific to DeepMind's dataset and did not generalize; their own experiments showed data always dominates model size at any scale
Chinchilla optimizes training compute only; inference-optimal training minimizes total cost including billions of future inference calls โ€” a smaller, overtrained model is far cheaper to serve at scale, making the higher training cost worthwhile
Meta had surplus GPU capacity from other projects and chose to use idle H100 time on additional training tokens rather than incurring the opportunity cost of wasted hardware
The 8B parameter architecture requires more tokens to converge than larger models because its smaller attention heads cannot capture long-range dependencies in fewer passes through the data
4. A hyperscaler announces a new model with an estimated 10ร— more training FLOPs than their previous generation. What is the correct way to translate this into GPU demand?
10ร— FLOPs always means 10ร— more GPUs in the cluster, since training time is fixed by business constraints and the only degree of freedom is cluster size
10ร— FLOPs equals exactly 10ร— more GPU-hours total, regardless of how it splits between cluster size and training duration โ€” procurement scales proportionally, and in practice hyperscalers grow clusters to keep training time bounded
10ร— FLOPs requires more than 10ร— GPUs because large clusters suffer superlinear communication overhead, so effective MFU falls as cluster size grows beyond a few thousand chips
FLOPs and GPU procurement cannot be directly compared because hardware efficiency improvements โ€” from H100 to B200 to future generations โ€” absorb most of the compute increase without requiring proportionally more chips
5. What is the primary investment significance of test-time compute scaling (o1, DeepSeek-R1, extended thinking) for semiconductor demand?
Test-time scaling reduces overall chip demand because smarter models answer in fewer tokens on average, lowering total inference compute relative to generating many shorter responses with weaker models
Test-time scaling is primarily a software efficiency gain and does not create incremental hardware demand because the same GPU cycles that were used for training are simply reallocated to inference-time reasoning
Test-time scaling creates an independent demand axis: each deployed query now uses many more GPU-hours for its reasoning chain, meaning inference chip demand grows even without new model training runs โ€” agentic workloads could make this the dominant demand driver
Test-time scaling favors TPUs over GPUs because systolic arrays are more efficient at the autoregressive token generation that long reasoning chains require, shifting inference demand away from NVIDIA's installed base
Questions worth exploring: "Why do scaling laws eventually break down, and do they?" ยท "What is the data wall and how close are we to hitting it?" ยท "How does reinforcement learning (RLHF, GRPO) fit into the scaling picture โ€” does it follow the same laws?" ยท "Can test-time compute scaling replace training scaling indefinitely?" ยท "What happened with GPT-4's scaling โ€” why didn't OpenAI publish a technical report?" Ask your teacher any of these to go deeper.
Coming Up โ€” Lesson 12
HBM and SK Hynix: every accelerator in this course โ€” H100, TPU, XPU โ€” is memory-bandwidth-limited during inference. High Bandwidth Memory (HBM) is the critical enabler. We'll cover HBM architecture, how it achieves 3.35 TB/s bandwidth vs. DDR5's 89 GB/s, the SK Hynix / Micron duopoly, CoWoS integration, and why HBM yield limits how many H100s TSMC can ship per quarter.