Skip to content
mentoor

Topic 5 of 5 · 5 min read

Held-out evals for fine-tuned models

Goal: Write an evaluation plan that shows whether a fine-tuned model beats its baselines without losing general ability.

A fine-tuned model is only better if it beats the alternatives on data it never trained on, measured the same way for every candidate. Training loss going down proves nothing about that.

Check yourself · 1 of 3

What makes a test split "held out"?

Choose one answer

Why it matters

SFT can make a model memorise its examples, lose general skills or learn a shortcut in the data. A lower training loss or a few good-looking samples can hide all three. Without a fixed test, you cannot tell progress from luck, and you cannot tell whether a good prompt on the base model would have worked as well.

How to do it

  1. Split before anything else. Set aside a test split, often 10 to 20 percent or at least 100 to 200 rows, before curation and generation. Freeze it. Never train on it, tune prompts on it or add to it silently.
  2. Deduplicate across the split. Remove training rows that are near copies of test rows, including synthetic ones. Otherwise the score measures memory.
  3. Pick task metrics that match the job. Exact match or F1 for extraction, schema-valid rate for JSON, pass rate on unit tests for code, a rubric score from humans or a calibrated judge for open answers.
  4. Compare against baselines. At least: the base model with the same prompt, the base model with a well-written prompt and a few examples, and your current production system. If a prompted base model scores the same, fine-tuning may not be worth its cost.
  5. Check for regressions. Run a small general set, such as public benchmarks through a harness like lm-evaluation-harness, plus your own safety and refusal cases. Report how much general ability changed.
  6. Look at failures by hand. Read 30 wrong outputs and group them. A single number hides whether the errors are rare disasters or small slips.
  7. Report uncertainty. With 100 test rows, a 3 point gain may be noise. Say how many rows you used.

Before and after

Weak: "Loss fell from 1.8 to 0.6 and the samples look great."

Better:

Model Test rows Valid JSON Correct queue General benchmark
Base, simple prompt 200 71% 62% 68.0
Base, tuned prompt + 5 examples 200 93% 81% 68.0
Fine-tuned 200 99% 88% 66.5

The tuned model wins on the task and loses 1.5 points on general ability. The team can decide whether that cost is acceptable.

What goes wrong

  • Leakage. Test rows appear in training, so scores are inflated.
  • No prompted baseline. The team credits fine-tuning for gains a better prompt would also give.
  • One average score. A small group of important cases fails badly while the mean looks fine.
  • Re-using the test set to choose settings. After many rounds the test set is no longer held out. Keep a final untouched split.

Examples

Catching leakage

After deduplicating training rows against the frozen test set, 14 of 200 test inputs have near-identical training twins. Remove the twins from training and rerun. The score drops 4 points, and the new number is the honest one.

The prompt that makes tuning unnecessary

A base model with five carefully chosen examples reaches 90 percent on the test set, and the fine-tuned model reaches 91. Prompting is cheaper to maintain, so the team ships the prompt and keeps the dataset for later.

Key points

  • Freeze a test split before curating or generating training data, and never train or tune on it.
  • Compare against the base model, a well-prompted base model and the current system, not only against zero.
  • Choose metrics that match the task, such as valid-output rate, exact match or unit-test pass rate.
  • Run a small general-ability and safety check to catch regressions caused by tuning.
  • Read failures by hand and report how many test rows were used.

Common mistakes

  • Reporting training loss or a handful of sample outputs as evidence.
  • Skipping the prompted-base baseline, so fine-tuning gets credit it did not earn.
  • Letting training rows overlap with test rows, including generated near copies.
  • Tuning settings repeatedly against the same test set until it is no longer held out.

Check yourself · 2 of 3

A fine-tuned model scores 88% on the test set. Which comparison best shows fine-tuning was worth it?

Choose one answer

Check yourself · 3 of 3

After tuning, the task score rises 15 points. What else should be checked before shipping?

Choose one answer

Practice items, not counted towards your mastery.

Start here

More for this topic