Week 4: Evaluate, Decode, and Package a Base Model
Hold-out and contamination, checkpoint selection, decoding as an experimental variable, and reproducible submission packaging
15 March 2027
Stage: Build language ability · Project 1 due
Summary#
The final checkpoint is not automatically the best checkpoint, and the lowest loss does not automatically produce the best stories. This lecture treats evaluation, decoding, and packaging as parts of the training system. Students learn how document-level hold-out and contamination checks protect inference, how continuation-only PPL is calculated under the course protocol, and why tokenizer-normalised comparison is required. Temperature, top-k, top-p, repetition, EOS behaviour, and context length are examined as controlled inference choices rather than post-hoc ways to cherry-pick an attractive sample. The lecture ends with a fresh-environment loading test and a claim–evidence checklist for the report.
Learning outcomes#
After this lecture, you should be able to:
- select a checkpoint using pre-declared quantitative and qualitative evidence;
- compute and interpret continuation-only PPL without leaking prompt or evaluation data into training;
- explain how temperature, top-k, and top-p reshape a next-token distribution;
- diagnose repetition, incoherence, premature stopping, and failure to emit EOS; and
- package a checkpoint, tokenizer, configuration, and loading command so another person can reproduce the result.
1. Evaluation separation and contamination#
We revisit source-level splits and distinguish the five diagnostic examples from the ten official tutor prompts. Public prompts are not permission to train on them. Exact and near-duplicate checks must run before training, and any discovered overlap is removed or reported according to policy.
2. Checkpoints and comparable metrics#
Students compare validation evidence across checkpoints generated by the same declared pipeline. Continuation-only reference-token-normalised PPL supports the course threshold even when a student changes tokenizer; bits per byte is introduced as a useful additional diagnostic. Neither metric resolves open-ended narrative quality, so output review remains necessary.
3. Decoding is an experimental variable#
Greedy decoding, temperature, top-k, and nucleus sampling make different probability/variety trade-offs. A fair comparison holds prompts, seeds or seed policy, maximum length, and sampler settings constant. Students inspect how low diversity produces repetition and how excessive randomness breaks local coherence. EOS training and stopping rules are treated separately from arbitrary truncation.
4. Reproducible submission#
A valid model package includes the frozen weights, architecture/ configuration, tokenizer assets, sampler assumptions, revision, checksum, and exact load/evaluate commands. The fresh-process test is compulsory engineering hygiene: success in an in-memory notebook is not evidence that the submitted artifact can be marked.
Required reading#
- Course page, Evaluation Protocol.
- Holtzman et al., The Curious Case of Neural Text Degeneration, abstract and Sections 1–3.
Optional reading#
- Hugging Face, Generation strategies, for terminology and reproducible generation configuration.
This week’s action#
Deadline: Project 1, Sunday 21 March 2027 at 23:59 AET. Run the final loading command in a fresh process before submission.
Teaching team
- Dr Yiwei Easton — convenor