From Zero to Model: A Complete Course in AI Development
Module 5 of 7

Scaling and Evaluation

Making a model bigger does not automatically make it better — but it does, reliably and predictably, if you know the rules. This module covers the surprising science of scaling laws, what it actually means to measure a model's capability, and why a model that tops every benchmark can still fail badly in practice.

By the end of this module you will be able to

Why Size Alone Is Not Enough

A common assumption about AI is that bigger always means better: more parameters, more power. The reality is more nuanced. A large model trained on poor data will underperform a smaller model trained on good data. A model with many parameters but trained for too few steps has not had enough exposure to learn well. A model trained on too much data relative to its size may squeeze out every bit of signal the architecture can absorb, but no more.

Getting the balance right between model size, data volume, and training compute is one of the most important decisions in building a capable AI system. And since training a large model can take weeks and cost millions of dollars, you do not want to discover you got the balance wrong after the fact.

This is where scaling laws come in.

Scaling Laws: Predicting Capability Before You Train

In 2020, researchers published a study titled "Scaling Laws for Neural Language Models" (Kaplan et al., arXiv:2001.08361) showing something remarkable: the performance of a language model can be predicted with high accuracy before training begins, using a simple mathematical relationship between three quantities: the number of model parameters, the number of training tokens, and the total compute used.

The key finding was that loss, the measure of how wrong the model's predictions are, decreases smoothly and predictably as any of these three quantities increases. The relationship follows what mathematicians call a power law: double the compute and the loss drops by a predictable amount; double it again and it drops by roughly the same fraction again. This held across many orders of magnitude, from tiny models to the largest systems tested.

What made this practically useful is that you can run small, cheap experiments, measure the loss curve, and extrapolate to predict what a much larger model would achieve before spending the compute to build it. The recipe scales.

Analogy: the recipe that scales

Imagine you have a recipe for bread, and through careful experimentation you discover that doubling the flour and proofing time consistently produces a loaf that is a measurable amount better on every quality metric you care about. You do not need to bake the large loaf first to predict what it will taste like. The relationship between input and output is reliable enough to plan with.

Scaling laws give AI researchers the same ability. Before committing to a months-long, multi-million-dollar training run, they can run small experiments and read the curve to predict where a much larger model will land. It turns an intuition into an engineering discipline.

The Three Ingredients

The 2020 scaling laws paper established that three quantities jointly determine how capable a model will be:

The 2020 paper suggested that, given a fixed compute budget, you should prioritise making the model larger, even if that means training it on less data. But this turned out to be incomplete advice.

In 2022, a follow-up study known as the Chinchilla paper (Hoffmann et al., arXiv:2203.05843) reran these experiments more carefully and reached a different conclusion: for a fixed compute budget, the optimal strategy is to scale model size and data volume equally. Prior models had been significantly undertrained relative to their size — they had many parameters but had not seen enough tokens to fill that capacity.

The practical takeaway: a smaller model trained on more data can outperform a larger model trained on less, if the larger model was undertrained. Size and data are both essential, and they need to grow together.

Why this matters for enterprise AI Scaling laws explain why organisations deploying AI should not simply chase the largest available model. A well-trained smaller model, with better data for the specific domain, may outperform a larger general-purpose model at a fraction of the inference cost. Module 6 covers how fine-tuning achieves exactly this.

What Does It Mean to Evaluate a Model?

Once you have trained a model, you need to know how good it is. This sounds simple. It is not.

The loss metric from training tells you how well the model predicts the next token on average across its training distribution. But what users and organisations actually care about is whether the model is useful: can it answer questions correctly, generate safe outputs, follow instructions, reason through problems, write working code?

These are different questions. A model can have excellent loss and still be useless in practice, because loss measures average prediction accuracy across a huge and varied dataset, while usefulness is specific to a task and a user population. Evaluation is the process of measuring what actually matters for the purpose you have in mind.

Benchmarks: What They Are and What They Measure

The standard way to compare AI models is through benchmarks: standardised test sets where each example has a known correct answer. A model's benchmark score is the fraction of questions it answers correctly. High score means capable model, right?

Not necessarily. Benchmarks are useful for comparing models on specific, well-defined tasks. But they come with important limitations that every practitioner should understand.

Interactive 1 — Scaling Curve Explorer Adjust sliders

Drag the sliders to see how increasing model parameters and training data affects the predicted loss. Both axes use a logarithmic scale, which is standard for scaling law plots — on a log scale, the power-law relationship appears as a straight line. Lower loss means better predictions. This is a directional illustration based on the shape of empirical scaling curves; exact values vary by architecture and task.

1B
20B
Directional illustration — shape based on Kaplan et al. 2020 (arXiv:2001.08361) and Hoffmann et al. 2022 (arXiv:2203.05843)
Interactive 2 — Benchmark Explorer Click to expand

Click any benchmark below to learn what it actually tests, and what it does not tell you. Understanding what a benchmark measures — and what it misses — is essential for interpreting model comparisons honestly.

MMLU Academic knowledge
What it tests: Multiple-choice questions drawn from 57 academic subjects, including mathematics, law, medicine, history, and science. Covers both factual recall and basic reasoning within each domain.
What it missesQuestions are multiple-choice, so the model just needs to pick A, B, C, or D — not generate a correct answer from scratch. A model can score well by eliminating wrong answers without truly understanding the subject. It also does not test whether the model can apply this knowledge to novel, open-ended problems.
HumanEval Code generation
What it tests: 164 Python programming problems with unit tests. The model must write code that passes the tests. Developed by researchers at OpenAI and published in arXiv:2107.03374. Pass@k measures whether at least one of k generated solutions is correct.
What it missesAll problems are self-contained short functions. Real software engineering involves understanding large codebases, coordinating across files, handling edge cases, debugging, and writing maintainable code. A model that scores well on HumanEval may still struggle with the kind of software work that engineers actually do day-to-day.
HellaSwag Commonsense reasoning
What it tests: Given a short description of a situation, the model picks which of four continuations makes most sense. Tests whether the model has commonsense knowledge about how everyday activities unfold. Published by Zellers et al. at ACL 2019.
What it missesWhen this benchmark was introduced, models scored around 40% — close to random chance. Modern large language models now score above 90%, making it nearly saturated. A saturated benchmark no longer distinguishes between models. The benchmark has become too easy to be informative for state-of-the-art systems.
TruthfulQA Factual accuracy
What it tests: 817 questions designed to be answered incorrectly by humans due to common misconceptions. Tests whether the model propagates false beliefs or overcomes them. Published by Lin et al. at ACL 2022.
What it missesThe questions are fixed and known. A model can be tuned specifically to answer these 817 questions correctly without becoming more truthful in general. This is a form of benchmark overfitting: optimising for the test rather than the underlying quality it was designed to measure.
GPQA Expert-level reasoning
What it tests: Graduate-level multiple-choice questions in biology, chemistry, and physics, written and validated by domain experts. Humans with Google access score around 34%; PhD-level domain experts score around 65%. Published by Rein et al. at NeurIPS 2024.
What it missesEven expert-hard multiple-choice questions are still multiple-choice. The model still benefits from process of elimination. And graduate-level scientific reasoning in constrained domains does not directly transfer to the messy, ambiguous, under-specified problems that characterise most real enterprise use cases.

Three Ways Benchmarks Can Mislead

Benchmark saturation. When a benchmark is released, frontier models typically score far below perfect. Over time, as models improve, scores creep upward. Eventually the best models all cluster near the ceiling, and the benchmark can no longer distinguish between them. At that point it stops being informative — a model that scores 95% looks the same as one that scores 97%, even though they may differ substantially in real-world capability. HellaSwag, shown above, is a well-known example.

Data contamination. If a model's training data includes examples from a benchmark's test set, the model has seen the answers during training. It is not reasoning on the benchmark — it is recalling. This is the evaluation equivalent of the test set leakage problem from Module 3. It inflates benchmark scores without reflecting genuine capability, and it is difficult to detect because training datasets are enormous and not always fully disclosed.

Benchmark overfitting. When benchmark scores are published and used to rank models, there is pressure to optimise specifically for those benchmarks during fine-tuning. A model might be tuned to produce the right answer format on a specific test, without becoming more capable in the underlying skill the test was designed to measure. The score goes up; the real-world performance may not.

The most important evaluation question The most honest question to ask about any model is not "what is its benchmark score?" but "does it perform well on the specific task I care about, with the specific users I serve, on data that looks like what I will actually give it?" That means building your own evaluation set from real examples in your domain, which is something no general benchmark can substitute for.

What Good Evaluation Looks Like

Researchers and practitioners increasingly combine several approaches to get a more complete picture:

Held-out task-specific sets. A custom evaluation set drawn from the actual domain the model will operate in. If you are building a model for contract review, your evaluation set should contain real contracts with known correct answers, not law-school exam questions.

Human preference ratings. For open-ended tasks where there is no single correct answer, trained raters compare model outputs side by side and indicate which they prefer. This captures qualities like helpfulness, clarity, and tone that multiple-choice benchmarks cannot.

Adversarial and edge-case testing. Deliberately constructing inputs designed to expose failure modes: ambiguous instructions, rare vocabulary, conflicting context, sensitive topics, or the kinds of prompts that real users will eventually discover and share. If you only test on easy, representative inputs, you will not discover failures until they happen in the field.

Longitudinal monitoring. Measuring model performance over time on real production inputs, not just at launch. Models can degrade as the world changes and their training data becomes stale, or as users find new patterns that expose weaknesses.

Module 5 Quiz · 4 Questions
1. Two models were trained with roughly similar compute budgets: Model A has 280 billion parameters trained on 300 billion tokens; Model B has 70 billion parameters trained on 1.4 trillion tokens. Based on what the Chinchilla scaling research found, which is likely to perform better?
2. A model scores 94% on a popular academic benchmark, up from 82% two years ago. A colleague says this proves the model is dramatically better. What is the most important thing to check first?
3. Why is a model's training loss not a sufficient measure of how useful it will be in practice?
4. You are building an AI assistant for medical documentation. What is the most reliable way to evaluate whether it is ready to use?
← Module 4: The Transformer Architecture Module 6: Fine-tuning and Alignment →