Skip to content
Forward Deployed

Forward Deployed

Model Development and Post-Training

Design a maths model from checkable data through SFT and scored post-training, where only a checkpoint that passes a clean held-out gate is released.

Kind
Case study
Level
Advanced
View
Interview prep
Sections
4
By
Sourav Banerjee
Last updated
20 Nov 2026

Report an issue

Interview view. The case brief, design walkthrough, technical deep dives and quick review, condensed into bullets, tables and lines to say out loud, with interactive diagrams to step through.

Want to go deep? The full casebook has the complete reasoning in prose, the original diagrams, practice questions with worked answers and the sources.

Case brief

The case in one line: train a model that solves maths problems, and prove its score describes problems it has never seen.

30-Second Cheat Sheet

  • The prompt: "design a model that solves maths problems", walking data collection, SFT, post-training and evaluation.
  • What decides the case: whether the reported score describes problems the model has never seen.
  • The score that lied: 94% held-out vs an 81% baseline, then about 78% in production.
  • Why: a random split over heavily duplicated traces put near-copies of test problems in training.
  • The fix: deduplication, a time-based split and human relabelling gave an honest ~83% offline, and production landed within two points of it.
  • The dangerous constraint: a checkpoint advances only through a held-out gate built from problems that share nothing with training.
  • Who approves: never the model. Programs, calibrated graders and people label; a written release policy decides.
  • Three variants change one stage each: compute budget, harm vs helpfulness, phone deployment.

1. A model that solves maths problems, and the score that lied

The product

  • A team asks for a model that solves maths problems.
  • The interview walks the whole training pipeline:
    • Collecting data.
    • Supervised fine-tuning (SFT).
    • Post-training.
    • Evaluation.
  • Most candidates can name those stages. The case is decided by something less obvious: is the score honest about unseen problems?

The worked failure (source-reported)

Stage Number What it meant
Fine-tuned model, held-out set 94% Looked like a big win
Baseline 81% The comparison point
Production about 78% Below the baseline
Retrained after the fix, offline about 83% The honest number
Later production result within two points of 83% The fixed score held
  • Cause: the held-out set was split at random from traces with heavy duplication.
    • Near-copies of test problems sat in the training data.
    • The offline number measured memory, not skill.
  • Fix: deduplication, a time-based split and human relabelling.

The dangerous constraint

  • A checkpoint advances only through a held-out gate built from problems that share nothing with training.
  • The model is the thing being trained. It never approves its own release.
    • Programs, calibrated graders and people supply the labels.
    • A written release policy decides which checkpoint moves forward.

Checkpoint = a saved copy of the model's weights at one point in training.

The core loop (the source's figure, as a flow)

checkable clean data → short SFT run → sample answers → score them → held-out gate

  • Pass → release candidate.

  • Fail → error analysis → revised data mix → loop again.

  • SFT teaches the format; scored attempts teach correctness.

  • A "no" at the gate doesn't end the project. It sends evidence back to the data mix.


2. Terms you need before the walkthrough

Term Meaning
LLM (large language model) A model that reads and writes text, such as GPT, Claude or Llama. Capable, and willing to state wrong things confidently.
Base model Trained only to continue text. Asked a question, it tends to keep writing rather than answer.
SFT (supervised fine-tuning) Further training on example inputs paired with the exact outputs wanted, so the model copies that behaviour. Here: worked solutions ending in a marked final answer.
Post-training Here, training on the model's own attempts. It samples answers (each sample is a rollout), a scorer grades them, and an update pushes it toward higher-scoring answers. The wider term also covers SFT and preference tuning after pretraining.
Verifier A program that checks an answer, for example by comparing a final number with the reference or by a symbolic check.
Reward hacking The model learns the scorer's blind spots instead of the task, such as matching the reference's format with a wrong number.
Drift penalty Penalises the updated model for moving too far from a reference model. Often written as a KL penalty (Kullback-Leibler divergence measures that distance).
DPO (direct preference optimisation) Trains directly on "this answer is better than that one" pairs, with no separate reward model.
Pass@1 Fraction of problems solved with one sampled answer per problem. Depends on sampling settings such as temperature. With random sampling, draw several answers per problem and average the share correct, because one draw is a noisy estimate.
Decontamination Removing any evaluation problem, or a near-copy of one, from the training data.
FLOPs (floating-point operations) A unit of compute, used to size how much GPU work a run needs.
LoRA and QLoRA Adapter methods: train a small set of added weights while the base stays frozen. QLoRA loads the base at 4-bit precision.
KV (key-value) cache Stored attention keys and values for every token already processed (prompt and output), so they aren't recomputed. Grows with context length and with the number of sequences decoded at once.
  • Assumes you know: fine-tuning, optimiser state and held-out evaluation. Each mechanism is still explained where it first matters.

3. Follow one problem through the loop

Illustrative: the problem and its numbers are invented by the source for the walkthrough.

  1. Arrive. A word problem from a licensed problem set: "Pencils cost $1.20 for three. How much do ten pencils cost?"
    • Reference answer: $4.00.
    • A program can check any candidate answer against it.
  2. Deduplicate and decontaminate.
    • The same problem appears with "pens" instead of "pencils" in a public benchmark the team will evaluate on.
    • Decontamination removes the training copy. A different, clean problem continues.
  3. SFT. The model sees a problem paired with a worked solution ending in Final answer: 4.00.
    • It learns the shape: show the working, then mark the answer.
  4. Sample. In post-training it samples eight answers to a fresh problem.
  5. Score. The verifier marks three correct and five wrong.
    • One of the "correct" three reached the right number through invalid working.
    • A final-answer verifier can't see that.
  6. Update. The model moves toward the scored winners, with a drift penalty holding it near the SFT model.
  7. Gate. The new checkpoint must:
    • Solve clean held-out problems.
    • Keep its general ability.
    • Decline problems with no unique answer.
    • Avoid harmful compliance.
    • Avoid needless refusals.
  8. Outcome.
    • Pass → release candidate.
    • Fail → error analysis → changes the next data mix.

4. The anchor, its variants and your task

One pipeline, one changed constraint each

Case Prompt as reported Shared foundation What changes Where it's taught
Maths model (anchor) Cohere: design a model that solves math problems, walking data collection, SFT, post-training and eval Verified data → SFT → scored rollouts → eval gate Correct answers and, if required, valid working Walkthrough steps 1 to 9
Compute-constrained LLM training OpenAI: design a scalable, efficient system for training an LLM given compute and data constraints Same data, run and checkpoint discipline Model size, parallelism and GPU-hour allocation Compute deep dive
Harmless but useful model Anthropic: design a language model that minimises harmful outputs while staying useful Same post-training and gate Balance harmful compliance against over-refusal Harm deep dive
Polite phone model Google: design a small LLM that runs on a phone while staying polite Same trained candidate and eval loop Distil and quantise to device memory, test on the phone Phone deep dive

Caveats to keep

  • No worked design exists for any of the four prompts.
  • The source grounds the answer in:
    • Hands-on fine-tuning labs.
    • Material on where a model's behaviour can be changed.
    • Quantisation arithmetic from an air-gapped deployment chapter.
  • Every run size, token count and throughput figure is a whiteboard assumption, not a measured training result. The arithmetic on those assumptions is exact.

Your task

  • Explain the pipeline end to end at interview depth, starting from the gate constraint.
  • Answer follow-ups on:
    • Data quality
    • SFT versus post-training
    • Reward hacking
    • Compute arithmetic
    • The three variants

Who it's for

  • Forward Deployed, solutions and applied-AI engineering candidates facing a model or post-training round.

How the sections divide the work

  • Design walkthrough: the answer you'd give.
  • Technical deep dives: the follow-ups.
  • Practice (full casebook): test yourself.
  • Quick review: the night before.

Quick Recall: Lines to Say in the Interview

  • "The case is decided by whether the score describes problems the model has never seen."
  • "94% offline against 81%, then 78% in production: the held-out set measured memory, not skill."
  • "A checkpoint advances only through a held-out gate that shares nothing with training."
  • "The model never approves its own release. Programs, graders and people label; a written policy decides."
  • "SFT teaches the format; scored attempts teach correctness."
  • "A failed gate isn't the end. It sends evidence back to the data mix."
  • "Every run size here is a whiteboard assumption; the arithmetic on it is exact."

Design walkthrough

The goal: a maths model trained on checkable data, short SFT and scored attempts, released only through a clean held-out gate.

30-Second Cheat Sheet

  • Pin the target first: maths level, final answer vs valid working, tools, users, base model, budget.
  • Requirements must be able to fail a test: held-out pass@1, max general regression, fabrication rate, compute budget.
  • Size before choosing a method: training ≈ 6ND FLOPs, generation ≈ 2N per token. SFT is cheap; post-training costs about ten times more.
  • Memory picks the hardware: full Adam ≈ 16 bytes/parameter → 112 GB for 7B, beyond one 80 GB card.
  • The architecture is a loop: data → SFT → sample → score → update → gate → deploy, with failures back to the data mix.
  • Data must be checkable: verify by program, dedupe before splitting, split by time and source.
  • The scorer is the design: final-answer verifier by default, drift penalty kept, high-reward samples audited.
  • Evaluate on unseen problems: five slices, sampling settings on every number, suspect leakage first on a big gain.

Opening line (source's version): "Before I pick a method I want the target pinned: which level of math, whether a final answer is enough or the working must be right too, and whether the model may call a tool. Those three answers decide the data, the reward and the eval."


1. Pin what "solves maths" means before collecting anything

  • A model can't be trained toward a target nobody wrote down.
  • "Solves maths problems" hides at least four different products. Each needs different data and a different evaluation.
    • A grade-school tutor, a competition solver and a proof assistant share a sentence and almost nothing else.
  • The decomposition round rewards this move.
    • The source's question bank starts its framework with "clarify the mission".
    • It names jumping to architecture before scope as the most common failure.
Ask Why it changes the design
Which level and task distribution: grade school, competition, university proofs? Sets the data sources, what counts as generalisation, and whether answers can be checked automatically
Final answer only, or correct working and proofs too? A final number can be verified by a program; valid working or a proof needs a step-level checker or a human grader
Are tools allowed, such as a Python interpreter or a calculator? Tool use moves arithmetic out of the weights and changes what the SFT examples teach
Who uses it, and what does a wrong answer cost? Sets abstention and human-check requirements. A wrong tutor teaches students wrong; a wrong research assistant wastes an hour
Adapt an existing base or chat model, or pretrain? Decides whether pretraining is in scope, and changes the budget by orders of magnitude
What GPU-hour, latency and device limits apply? Chooses model size, adapters vs full fine-tuning, and the deployment path

If the interviewer doesn't answer

  • Say your assumptions aloud. The safe default the rest of this page uses:
    • Grade-school to competition word problems.
    • Final numeric answers.
    • An optional code tool.
    • Adaptation of an open base model.

Spoken answer: "Before I pick a method I want the target pinned: which level of math, whether a final answer is enough or the working must be right too, and whether the model may call a tool."


2. State requirements as testable constraints

  • A requirement that can't fail a test is a preference.
    • "Good at maths" is a preference.
    • "Pass@1 of at least the target on a held-out set that shares no problems with training" is a constraint. Only constraints shape the pipeline.

Functional: what the system does

  1. Collect answer-checkable examples.
  2. Deduplicate and decontaminate them against evaluation.
  3. Run SFT on worked solutions and on honest "this problem is ill-posed" cases.
  4. Sample model attempts.
  5. Score correctness, working or style with the right verifier or preference method.
  6. Update and checkpoint.
  7. Gate release on held-out accuracy, general ability, safety and contamination.

Non-functional: how well, under what limits

  • Reproducible lineage of data, config, seed and checkpoint.
  • A fixed compute budget with stop rules.
  • No hidden benchmark leakage and no unmeasured general-skill regression.
  • No safety "win" bought with blanket refusal.
  • For the on-device variant: fits memory, meets latency and battery limits on the real phone.

Six must-haves for the first trusted model

  1. Correct final answers on the target distribution, measured on problems the model never saw.
  2. Shown working consistent with the final answer.
  3. No regression on general ability beyond an agreed tolerance.
  4. Refusal to fabricate when a problem is ill-posed.
  5. A reproducible training run, so any checkpoint can be rebuilt.
  6. An evaluation harness that runs on every candidate checkpoint before anyone reads a single sample by hand.

Three should-haves, once the first model is trusted

  • Tool use through a code interpreter.
  • Step-level feedback on the working.
  • A tutoring mode that explains rather than answers.

Each constraint stated so a test can fail it

  • The accuracy target is the customer's number, not one we invent.
Constraint Stated so it can be tested
Accuracy Pass@1 on a held-out, decontaminated test set; target set with the customer (assumption: the number is theirs, not ours)
Reasoning quality Sampled human or model grading of working on a stratified slice; answer-consistent working rate reported alongside accuracy
Contamination N-gram or embedding overlap between train and test below an agreed threshold; any benchmark found in training is removed from reporting
General-ability regression A fixed general benchmark suite, run on every checkpoint, with a maximum allowed drop
Reproducibility Data snapshot hash, code version, config and seed recorded per run; any checkpoint rebuildable
Compute A stated GPU-hour budget per stage, with a kill rule when eval stops improving per GPU-hour
Safety Refusal on genuinely harmful requests; over-refusal rate on benign prompts measured, not assumed

Give every must-have an owner

  • A requirement with no owner is still a wish.
Requirement Primary stage or component
Correct answers on unseen problems Data collection with verified answers; post-training with a correctness reward; held-out eval
Consistent working SFT on worked solutions; optional step-level reward in post-training
No general regression Data mixture that keeps general data in; regression suite in the eval gate
No fabrication on ill-posed problems SFT examples of "this problem is ambiguous"; eval slice of ill-posed problems
Reproducibility Experiment tracker, data versioning, checkpoint store
Eval before anyone reads samples Automated eval harness wired to the checkpoint store

Spoken answer: "Functionally, clean data, SFT, sample, score, checkpoint, then a held-out gate. Non-functionally, reproducible lineage, no eval leak, and the model does not approve its own release."


3. Size the run before naming a method

  • Arithmetic decides which methods are on the table, so do it first.
  • Two rules of thumb (good for a whiteboard, not for a purchase order):
    • Training ≈ 6 × parameters × training tokens FLOPs, written 6ND.
    • Generation ≈ 2 × parameters per generated token.

Sizing the maths model (every workload is an assumption; the multiplication is exact)

Stage Assumed workload Compute
SFT 7B model, 100K worked problems at 500 tokens each = 50M tokens 6 × 7e9 × 5e7 = 2.1e18 FLOPs
SFT wall-clock At an assumed 3e14 effective FLOP/s per GPU 7,000 GPU-seconds, about 2 GPU-hours
Post-training rollouts 50K prompts × 8 samples × 1,000 tokens = 4e8 generated tokens 2 × 7e9 × 4e8 = 5.6e18 FLOPs to generate
Post-training updates Training on those 4e8 tokens 6 × 7e9 × 4e8 = 1.68e19 FLOPs

Read the last column top to bottom

  • SFT is cheap. Post-training with sampled rollouts costs roughly ten times more under these assumptions.
  • Generation runs well below peak throughput because it's memory-bound.
    • The GPU spends much of its time moving weights and cache rather than multiplying.
    • Worse at the small per-step batches long rollouts often run at.
  • What the table leaves out:
    • A drift penalty needs a forward pass of the frozen reference model over every rollout token: another 2 × 7e9 × 4e8 = 5.6e18 FLOPs.
    • PPO trains a separate value model as well.
    • GRPO-style methods drop the value model by scoring each sample against the others drawn for the same problem. That's one reason they suit verifiable maths rewards.
  • The budget belongs to post-training and evaluation, not to the supervised stage.
  • The "about 2 GPU-hours" is an assumed-throughput sketch, not a guarantee.

Memory-bound = speed limited by moving data in and out of GPU memory, not by arithmetic.

Memory decides the hardware shape

  • Full fine-tune, Adam optimiser, mixed precision → about 16 bytes per parameter (weights, gradients, optimiser state).
  • 7B parameters → about 112 GB before activations. Doesn't fit on one 80 GB card.
  • Two ways out:
    1. Shard the optimiser state across GPUs.
    2. Train a small adapter instead of the full weights.
  • The compute deep dive returns to both.

4. Draw the loop end to end

  • The pipeline is a loop, not a line.
    • Data flows forward through training stages.
    • Evaluation results flow backward into the next data mix.
  • No checkpoint moves forward without passing the gate.
  • Labels come from programs, graders and humans; the model only gets trained.

Walk it in eight moves

  1. Collect. Problems with trustworthy answer labels from public, licensed, human-written and synthetic sources.
    • Deduplicate near twins, remove evaluation overlap, record collection and label provenance.
  2. Verify. Check final answers by program or symbolic solver where possible.
    • Send ambiguous or high-impact labels to humans.
  3. Mix. Blend general tasks into the maths data so the model keeps its non-maths skills.
  4. SFT. Start from a base model; teach the worked-solution format, marked final answers and appropriate uncertainty.
    • Save a reproducible, versioned checkpoint.
  5. Sample and score. Draw several answers per problem.
    • Score with a final-answer verifier, a step grader or preference labels, according to the target.
    • Audit high-reward examples for reward hacking.
  6. Update. Move the policy with a drift control, or use DPO on preference pairs.
    • Log data hash, code, config, seed and optimiser and checkpoint state, so the candidate carries its run lineage.
  7. Gate. Compare every candidate on:
    • A decontaminated held-out set.
    • General-skill suites.
    • Safety and over-refusal suites.
    • With the contamination report attached.
    • A failed gate sends evidence back to error analysis and the data mix.
  8. Deploy and feed back. Deploy only a passing candidate.
    • If a device ceiling applies: distil and quantise, then rerun quality, latency, memory and battery evaluation on the actual device.
    • Reviewed production feedback enters a gated data flywheel.

What's versioned so any result can be rebuilt

  • The data mixture, training configuration, reward definitions, evaluation suites and gate thresholds, and the compute budget per stage.
  • Each run records its run ID, data hash, code version and seed.
  • Every stage reads and writes the checkpoint store and the experiment tracker.
  • Deterministic experiment tracking and a written release policy decide which checkpoint advances.

The three other views the source draws

  • Three lanes:
    • Data lane: public, licensed, synthetic and human sources → dedupe → decontaminate against eval sets → verify answers by program or grader → data mixture including general data.
    • Training lane: base model → SFT on worked solutions → checkpoint → sample N answers per prompt → score with verifier, reward model or preference pairs → update with RL and a KL penalty, or DPO.
    • Eval gate: held-out accuracy, general regression, safety and over-refusal.
  • First half: data sources → deduplicate → decontaminate → verify answers → mix training data → SFT on worked solutions and format → checkpoint.
  • Second half: checkpoint → sample N → score → update (RL + KL to a reference, or DPO pairs) → new checkpoint → held-out gate.
    • Fail → error analysis → revised data mix.
    • Pass → release candidate → distil or quantise if a size target exists → serve → gated traces into a data flywheel.

Each component, its job and how it fails

Read the last column in an interview. Naming the failure shows you know why the component exists.

Component Job Fails how
Source collection Gather problems with trustworthy answers Scraped answers are wrong, so the model learns the errors
Deduplication Collapse near-identical problems Popular problems dominate training and their twins sit in the test set
Decontamination Remove any eval problem from training data Reported accuracy measures memory, not skill
Answer verification Check each answer by program, symbolic solver or grader Unverified synthetic data teaches confident wrong reasoning
Data mixture Blend maths with general data Maths improves while general ability collapses
SFT Teach format and the shape of a worked solution Too long → memorises; bad solutions → imitates them
Sampler Generate several candidate answers per prompt Too few samples give no signal on hard problems
Scorer Turn answers into reward or preference pairs A lenient answer check rewards wrong answers that look right
Policy update Move the model toward higher-scoring answers Without a drift penalty, it games the reward
Eval gate Decide whether a checkpoint moves forward Training-adjacent eval data passes a model that fails in production
Distil and quantise Meet a size or latency target Quality loss unmeasured because eval ran on the big model only
Checkpoint store and tracker Make every run rebuildable and resumable A mid-run failure loses days; a good result can't be reproduced

5. Collect data that can be checked, not just read

  • In maths, a program can verify most final answers. Few domains allow that, so build the data pipeline around it.
  • An uncheckable problem is worth less: nothing downstream can tell whether training on it helped.

Four sources

Source Role
Public problem sets Known answers
Licensed or customer-owned material Target-distribution problems
Human-written problems from domain experts The hard tail
Synthetic problems and solutions from a stronger model Kept only when the final answer passes verification

Rejection sampling = generate many solutions, keep the ones whose answer checks out, discard the rest. It works only because the answers are checkable.

The mechanical half (the source's Foundations labs)

  • Contrast a pretraining corpus with a company fine-tuning dataset.
  • Format examples as question-answer pairs with a prompt template.
  • Store as JSONL (one JSON record per line).
  • Tokenise with padding and truncation, then split into train and test.
  • That's plumbing. The judgement sits in three gates of the data flywheel.

The three gates

  1. Deduplicate first.
    • In the source book's worked example, 140,000 traces were only about 9,000 distinct requests after deduplication.
    • Training on the raw count would over-weight a few popular requests and, worse, place their twins in the test set.
    • Deduplicate near-duplicates before splitting, not after.
  2. Split by time and by source, never row by row at random.
    • A random split puts near-twins on both sides of the wall.
    • No time split possible? Assign whole duplicate clusters to one side.
    • This is exactly how the 94% offline score in the case brief happened, and why the honest number after the fix was about 83%.
  3. Route hard labels to people.
    • Low-agreement, high-impact or simply hard examples go to human adjudication.
    • An automatic label isn't the same as a correct one.

Ship a datasheet with every dataset

  • Collection window, filters, deduplication method, split strategy, label source and known biases.
  • It's how the next team learns why a number moved.

6. Teach the format with SFT, then stop

  • SFT teaches what a good answer looks like, not how to find one the model has never seen.
  • For maths, the outputs are worked solutions ending in a clearly marked final answer. SFT also teaches instruction following in general.

What the Foundations labs show

  • Same prompt to a base model and an instruction-tuned model: the base model continues the text; the tuned one answers.
  • Train a small model, pythia-70m, for a handful of steps; compare it with the same model trained longer and with a larger model.
  • More training on the same data changed the style long before it changed whether the answer was right.

Three rules that follow

  • Keep SFT short. Over-fitting reproduces exact wording, loses flexibility and can erode general behaviour.
  • Mix in general instruction data, so the model doesn't forget ordinary requests.
  • Include examples that decline an ill-posed problem. Otherwise "this has no unique answer" is never a legal output, and it fabricates one.

Adapters are the default while you search for a recipe

  • LoRA: trains a small set of added weights; base frozen.
  • QLoRA: same, with the base loaded at 4-bit, lowering base-weight memory further.
  • The source cites a typical Llama 2 AutoTrain run with flags --use_peft and --use_int4 to fit a 7B model on modest hardware.
    • Current AutoTrain names them --peft and --quantization int4.
  • Use adapters for fast experiments. Move to a full fine-tune only when an adapter demonstrably plateaus below a measured target.

7. Reward correct answers, not confident ones

  • Post-training is where the model learns to find answers: it trains on its own attempts, not someone else's solutions.
  • The loop always has the same shape: sample several answers → score them → push toward the higher-scoring ones.
  • The scorer drives the design. Maths offers three.
Scorer What it checks When to use it Risk
Verifier on the final answer Does the answer match the reference, checked by program? Checkable final answer; the default for maths Rewards a right answer reached by wrong working
Reward model on steps Is each step of the working valid? Proofs and multi-step problems where the path matters A learned reward model can be gamed; needs step-labelled data
Preference pairs Which of two answers do graders prefer? Style, clarity, tutoring tone, anything not checkable by program Graders prefer confident, long answers unless told otherwise

The three, one at a time

  • Final-answer verifier: efficient and hard to fool on the number itself, but blind to the working.
    • In the brief's trace, one of the three "correct" samples reached $4.00 through invalid steps and was rewarded anyway.
  • Step-level reward or human review of the working: add it if valid reasoning is a requirement.
  • Preference pairs: suit what no program can check (tone, clarity, refusal boundaries).
    • Human graders favour longer and more assertive answers, so the instructions to graders matter.

Two update methods on top of the scorer

Method How it works Trade-off
RLHF (reinforcement learning from human feedback) Trains a separate reward model from human comparisons, then optimises the policy against it with a drift penalty A well-tuned PPO (the policy-gradient method commonly used in RLHF) can still beat DPO
DPO Trains directly on preferred-vs-rejected pairs; drift control is implicit Simpler to run and usually more stable
RL with a verifier Program checks correctness The stronger option where correctness is checkable, as in maths

Keep the drift penalty by default

  • A policy optimised against a learned or lenient scorer without it finds the scorer's blind spots.
    • A lenient answer-matcher gets answers formatted like the reference but wrong.
    • A length-biased reward model gets padding.
  • The exception: some verifiable-reward recipes for long reasoning, such as DAPO, drop the penalty.
    • The reasoning style is meant to move far from the starting model.
    • They depend on a strict rule-based verifier and other controls instead.
    • Remove it only with that kind of verifier and held-out monitoring in place.
  • Audit high-reward samples by hand every round. A sudden jump in reward is as likely to be a new exploit as a new skill.

Spoken answer: "For math I would lead with reinforcement learning against a program that checks the final answer, because correctness is verifiable. I would keep a penalty for drifting from the SFT model, add a step-level reward only if working quality is a stated requirement, and use preference data for tone."


8. Evaluate on problems the model has never seen

  • An evaluation score is only as honest as the wall between training and test data.
  • The brief's example is why this step exists: 94% offline vs an 81% baseline, about 78% in production, an honest score near 83% after deduplication, a time-based split and human relabelling.
  • When an offline gain looks surprisingly large, suspect leakage first. Check:
    1. The deduplication.
    2. The split.
    3. Whether the labels came from the system being replaced.

Five slices, each answering a different worry

Worry Measure
Does it solve problems it has never seen? Pass@1 on a decontaminated held-out set, split by source and time
Is the working right as well as the answer? Graded sample of solutions; answer-consistent working rate
Did it forget everything else? Fixed general benchmark suite with a maximum allowed drop
Does it invent answers to broken problems? Slice of ill-posed and unanswerable problems; fabrication rate
Did it get more harmful or more timid? Harmful-request set and benign-but-scary set, both reported (see the harm deep dive)

Report sampling settings with every number

  • Pass@1 at temperature zero (greedy decoding) and majority vote over eight samples are different measurements.
  • Report both if both are used; never compare one with the other.

Where the harness starts

  • The Foundations evaluation lab: run the model over a test set, compare outputs with expected answers, then try a public benchmark, ARC.
  • Exact-match comparison is where every evaluation starts.
  • The release gate follows the source's Evaluation and Release Gating case:
    • Fixed suites.
    • Thresholds agreed in advance.
    • A gate that blocks rather than advises.
  • Don't tune repeatedly against the final test set, or it stops being held out.

9. Defend the choices and deliver the answer

Four choices that draw the most follow-ups

Choice Short defence
SFT vs post-training SFT teaches the shape. For checkable maths, scored attempts teach the model to pick correct answers. A final-answer verifier can reward bad working, so use step labels if reasoning validity matters and preference pairs for tone. Keep a drift penalty and inspect high-reward samples.
Evaluation integrity Split by source and time, inspect n-gram and embedding overlap, report pass@1 with its sampling settings. A large offline gain can be leakage. Gate on general ability, fabrication on ill-posed problems, harmful compliance and over-refusal as well as accuracy; never tune repeatedly on the final test set.
Compute budget Size by about 6ND training FLOPs, memory and effective throughput. LoRA or QLoRA to iterate; full fine-tune only after adapters hit a demonstrated ceiling. Larger runs need sharded state, parallelism matched to layer size, streamed data with a recorded order, and checkpoints with optimiser and data-loader position. Track eval gain per GPU-hour and kill stagnant runs.
Phone variant An illustrative 3B model needs about 1.5 GB at 4-bit for weights alone, before KV cache and runtime overhead; a 1 to 2 GB budget may need a smaller model, a shorter context or both. Distil for task behaviour, quantise, train politeness preferences, and measure the quantised student on the slowest supported phone.

The two-minute answer (source's spoken example)

"I would pin the target before picking a method: level of math, final answer versus valid working, tool access and budget. I collect checkable examples, deduplicate and decontaminate them, then use short SFT to teach the response format. I sample the model's own answers and use a program verifier for final-answer correctness, adding step review only if the reasoning must itself be valid. Post-training includes drift control and audits of high-reward samples. Each checkpoint passes a held-out, source/time-separated gate for math, general ability, ill-posed cases and safety before release. I budget GPU hours around rollouts and evaluation, checkpoint the full run state, and treat compute, harm or device constraints as changes to specific stages rather than redesigning the entire pipeline."

The sixty-minute plan (the source's)

  • Spend the hour on the scorer and the evaluation: that's where these prompts separate candidates.
Minutes Move What to say
0–5 Clarify Level of maths, answer vs working, tools, users, base model
5–10 Requirements Held-out pass@1, no general regression, no fabrication, reproducible runs, a compute budget
10–15 Size 6ND for training, 2N per generated token, 16 bytes per parameter for a full fine-tune
15–25 Draw The loop: data, SFT, post-training, eval gate, deploy, flywheel back into data
25–35 Data and SFT Verified answers, dedup, decontamination, time splits; SFT short and mixed
35–45 Post-training Verifier reward with a drift penalty; DPO for tone; audit high-reward samples
45–55 Eval Five slices, sampling settings with every number, leakage suspected first
55–60 Pivot Whichever constraint the interviewer adds: compute, harm or device

When the interviewer changes a constraint

  • They will, mid-round; the source's question bank says so.
  • Map the new constraint to the stage it changes and re-derive only that stage.
  • The full casebook's Practice works through three such changes.

Quick Recall: Lines to Say in the Interview

  • "Which level of maths, final answer or valid working, and may it call a tool? Those three decide the data, the reward and the eval."
  • "A requirement that can't fail a test is a preference."
  • "Six N D for training, two N per generated token: SFT is about 2 GPU-hours, post-training costs roughly ten times more."
  • "Full Adam is 16 bytes a parameter, 112 GB for 7B, so it doesn't fit one 80 GB card: shard it or use an adapter."
  • "Deduplicate before splitting, and split by time and source, never row by row."
  • "SFT teaches the shape of an answer; scored attempts teach it to find the right one."
  • "Keep the drift penalty, and audit high-reward samples: a reward jump is as likely an exploit as a skill."
  • "When a gain looks too good, I suspect leakage first."
  • "A new constraint changes one stage, not the whole pipeline."

Technical deep dives

The goal: the mechanisms behind the follow-ups: compute arithmetic, scorers and updates, evaluation integrity, and the harm and phone variants.

30-Second Cheat Sheet

  • Compute variant: start from the budget, not the model. ~20 tokens/parameter picks the size, 6ND gives the FLOPs, memory picks the parallelism.
  • Pretraining a 7B: 140B tokens, 5.88e21 FLOPs, ~5,444 GPU-hours, ~21 hours on 256 GPUs (assumed throughput, perfect scaling).
  • Survive failure: checkpoints with optimiser state and data-loader position; roll back before a loss spike.
  • Scorer and update: verifier for correctness, step reward for working, preferences for tone; drift penalty kept unless a strict rule-based verifier replaces it.
  • Reward hacking signature: reward rises while held-out pass@1 doesn't.
  • Eval integrity: n-gram + embedding overlap checks, sampling settings on every number, keep the final test set final.
  • Harm variant: harmful compliance down without over-refusal up, on one chart.
  • Phone variant: bytes per parameter first (3B at 4-bit ≈ 1.5 GB), distil then quantise, measure on the device.

1. Compute arithmetic and the fixed-budget training variant

  • The prompt: "design a scalable, efficient system for training an LLM given compute and data constraints".
  • Same pipeline, with pretraining back in scope and the budget fixed.
  • Start from the budget, not the model.

Rules of thumb and the maths-model numbers

Item Value (source's assumed workloads)
Training FLOPs ≈ 6 × parameters × tokens
Generation FLOPs ≈ 2 × parameters × generated tokens
SFT, 7B model, 50M tokens about 2.1e18 FLOPs
400M rollout tokens, generate about 5.6e18 FLOPs
400M rollout tokens, train on about 1.68e19 FLOPs
Full Adam fine-tune roughly 16 bytes/parameter → 7B near 112 GB before activations, beyond one 80 GB card
  • These come from walkthrough step 3 and remain whiteboard estimates.

Sizing a pretraining run from the budget

  1. Tokens: a widely used rule of thumb from compute-optimal scaling work is about 20 training tokens per parameter. 7B → 140B tokens.
  2. FLOPs: 6 × 7e9 × 1.4e11 = 5.88e21 FLOPs.
  3. GPU-hours: at an assumed 3e14 effective FLOP/s per GPU → about 5,444 GPU-hours.
  4. Wall-clock: about 21 hours on 256 GPUs.
  • Check the throughput assumption against the hardware:
    • 3e14 is roughly 30% of an H100's dense BF16 peak of about 9.9e14: a plausible utilisation.
    • It's close to the whole 3.1e14 peak of an A100, which no real run sustains.
    • Restate the throughput for the hardware you actually have.
  • The 21-hour figure also assumes perfect scaling across 256 GPUs.
  • The throughput and token ratio are assumptions; the arithmetic is exact.
  • Smaller budget? Shrink the model and the token count together.
    • Chinchilla found compute-optimal parameters and tokens both grow roughly with the square root of compute.
    • Keeping the model size and cutting tokens leaves an under-trained model.
  • Teams that care about serving cost often train a smaller model on more tokens than compute-optimal: extra training compute for cheaper inference.

Choose parallelism in the order memory forces it

  • Fit the memory first, then go for speed. Each row responds to one thing not fitting.
Constraint Technique What it buys
Model fits on one GPU; want speed Data parallelism: replicate the model, split the batch Near-linear throughput until communication dominates
Optimiser state doesn't fit Sharded data parallelism (ZeRO or FSDP): split weights, gradients and optimiser state across GPUs Memory per GPU falls with the number of GPUs
One layer doesn't fit Tensor parallelism: split each matrix across GPUs in a node Keeps giant layers trainable; needs fast links inside the node
The whole model is too deep Pipeline parallelism: split layers into stages Spreads depth across nodes; bubbles cost utilisation
Activations don't fit Activation recomputation and mixed precision Trades extra compute for memory
  • Apply it to the 112 GB full fine-tune:
    • The weights alone fit on one card; the optimiser state doesn't.
    • So the second row applies: shard with ZeRO or FSDP, or avoid the problem with an adapter.

Pipeline bubble = idle time while later stages wait for earlier ones to hand on work.

Data is a pipeline problem

  • Stream shards from object storage rather than loading a dataset into memory.
  • Deduplicate and filter for quality before training: a repeated token costs the same compute as a new one and teaches less.
  • Record the exact shard order, so a resumed run sees the same data in the same order.

Make the run survive failure

  • At hundreds of GPUs over days, some hardware will fail.
  • Write checkpoints to durable storage on a fixed interval, including optimiser state and data-loader position.
  • Resume automatically from the last good one.
  • Watch for loss spikes; roll back to the checkpoint before the spike rather than training through it.
Metric What it tells you
Model FLOPs utilisation Share of the hardware's possible FLOPs actually spent on the model. A GPU-hour waiting on communication or input teaches nothing.
Evaluation gain per GPU-hour Whether spend is buying quality, not only how many GPUs are allocated

Spoken answer: "I size from the budget: tokens per parameter picks the model size, six N D gives the FLOPs, and memory picks the parallelism. Then I make the run survivable: sharded state, streaming data with a recorded order, and checkpoints that include the data position so a failure costs minutes, not days."


2. Adapters, scorers and update methods

SFT data and adapters

  • SFT pairs prompts with worked solutions and marked final answers.
  • Training too long on narrow data can memorise phrasing or erode general behaviour.
    • So include general instruction examples and legitimate "no unique answer" cases.
  • Adapters speed up the recipe search. QLoRA lowers base-weight memory further by holding the frozen base at 4-bit.
  • A full update is justified only when the adapter misses a measured target.
  • LoRA Land (Zhao et al. 2024): small LoRA-tuned models often match larger prompted ones on narrow tasks, with results varying by task.

Choosing the scorer

  • Sample multiple answers per problem. Too few give no signal on hard problems, because every sample fails alike.
Scorer Good for Blind spot
Program verifier Final-answer correctness, efficiently Misses invalid working
Step reward or human review Reasoning quality Needs step labels or reviewer time
Preference pairs Tone, clarity, refusal boundaries Graders may favour verbosity and confidence
  • Evidence on grader bias:
    • Singhal et al. 2023 found length correlations in RLHF.
    • Hosking et al. 2023 found graders favour assertive, confident answers.
  • Fix: write grader instructions that say length and confidence are not quality.

Choosing the update

Method Source's evidence Note
RL with a verifier Usually keeps a reference-model drift penalty DAPO (Yu et al. 2025) removes it for long chain-of-thought training, with a strict rule-based reward
RL with verifiable rewards (RLVR) Tulu 3 (Lambert et al. 2024) reports it working well where correctness is checkable DeepSeek-R1 used rule-based rewards for maths and code
DPO (Rafailov et al. 2023) Simpler preference-pair path, no separate reward model Xu et al. 2024: a well-tuned PPO can match or beat DPO
  • That's why "DPO is simpler" is a reason, not a verdict.

Catching reward hacking

  • Audit high-scoring samples every round.
  • The signature: reward rises while held-out pass@1 doesn't. Look for:
    • Answers that match the reference format with the wrong value.
    • Padding that a length-biased grader likes.
    • Confident wording on a broken problem.
  • The drift penalty limits how far the policy can travel to find these. The audit catches the ones it finds anyway.

3. Evaluation integrity in detail

  • Gate on five things:
    • Pass@1 on clean unseen problems.
    • Valid working on a stratified sample.
    • General regression.
    • Fabrication on ill-posed problems.
    • Safety with over-refusal.
  • The walkthrough explains why each slice exists. This section covers how to keep them honest.
Rule How
Overlap checks N-gram overlap catches copied text; embedding similarity catches paraphrases, such as the "pencils" and "pens" twins in the brief's trace. Remove any hit from training, report only on the clean set, attach a contamination report to every gate decision. Any public benchmark found in training is removed from reporting.
Sampling settings Report temperature and sampling method with every number. Greedy pass@1 can't be compared with majority vote over eight samples: they measure different systems.
Large gains Investigate an unexpectedly large gain for leakage before counting it as a win.
The final test set Keep it final. Tuning repeatedly against it turns it into training data by a slower route.

Why the 94% result failed (three combined reasons, from the source's Check Yourself answer)

  1. A random split over duplicated traces.
  2. Labels that came from the old system.
  3. A narrow time window.

4. Harmless but useful: two numbers on one chart

  • The prompt: "design a language model that minimises harmful outputs while staying useful".
  • Changes the post-training and evaluation stages.
  • Two-sided objective: a model that refuses everything is perfectly harmless and useless.
  • Measure both sides, or the optimisation quietly collapses to one of them.

The chart

Axis Set Question
Harmful-compliance rate Genuinely harmful requests How often does the model help?
Over-refusal rate Benign requests that merely look risky How often does it refuse?
  • Plot both for every checkpoint.
  • "How do I kill a stuck Python process?" belongs in the benign set.
  • A release must move down on the first number without moving up on the second.

Post-training carries the policy

  1. Write the policy down first: what's disallowed, what's allowed with care, what's always allowed.
  2. Collect preference pairs where the preferred answer follows the policy.
    • Include pairs where the preferred answer helps and the rejected one refuses needlessly. That's how over-refusal is trained out.
  3. Train with RLHF or DPO on those pairs.
  4. Scale labelling with AI feedback against the written policy (the Constitutional AI idea) when human graders are the bottleneck.
    • Humans still audit a sample.

Partial answers

  • The source's enterprise RAG (retrieval-augmented generation) design makes the same point at the application layer.
  • Its output guardrail's sufficiency check has three verdicts, not two: sufficient, partial and insufficient.
  • The middle verdict exists because refusing a whole two-part question when only one part is unanswerable is a common over-refusal.
  • Model-level version: answer the safe part, decline the unsafe part, say which is which.

Red-teaming and layers

  • Attack prompts change faster than training runs.
    • Keep an adversarial set that grows from real attempts and run it in the gate.
  • A layered deployment adds a separate safety classifier on inputs and outputs.
    • It can change faster than weights, so the policy can tighten between training runs without retraining.

5. Polite on a phone: distil, quantise, measure on the device

  • The prompt: "design a small LLM that runs on a phone while staying polite".
  • Changes the deploy stage. Fixes a memory and latency ceiling, and names politeness as an alignment target.

Size the weights first

  • Weight memory = parameters × bytes per parameter.
Model 16-bit 8-bit 4-bit
3B parameters 6 GB 3 GB 1.5 GB
1B parameters 2 GB 1 GB 0.5 GB
  • A phone shares memory with the OS and other apps. Assume a 1 to 2 GB budget for the model (an assumption).
    • That points to about a 1B model at 4-bit.
    • A 3B model needs about 1.5 GB for weights alone: fits only at the top of that budget.
  • Real 4-bit formats cost more than 4 bits:
    • They store a scale for each small block of weights, adding a fraction of a bit per parameter.
    • QLoRA's block size of 64 costs 0.5 bits per parameter before its double quantisation.
    • So plan on somewhat more than 1.5 GB.
  • Weights aren't the whole bill (the source's air-gapped chapter): runtime overhead, the KV cache at the target context length and buffers come on top.
  • Cap the context length, because the KV cache grows with it.

Distil, then quantise

  • Distillation: train a small student on a large teacher's outputs.
    • Standard system-design references frame it the same way: a smaller model trained on a larger one's outputs for a task-specific workload.
    • A hard cost or latency ceiling is one of the three situations where parameter updates earn their cost; distillation is how you meet it.
  • Quantisation then compresses the trained student.
  • Quantisation-aware training (simulates low precision during training) usually loses less quality than quantising after the fact, at the cost of a training run.

Politeness is a preference target

  • Train it like harmlessness:
    1. Write a short tone policy.
    2. Collect preference pairs: polite wins, obsequious or curt loses.
    3. Include the teacher's polite outputs in the distillation data, so tone transfers with capability.
    4. Evaluate with a rubric grader on a fixed prompt set that includes rude and provocative user messages.
  • Politeness is only tested when the user is rude.

Measure on the device

Report Against or where
Quantised student quality vs the full-precision student and the teacher
Time to first token, tokens per second On the slowest supported phone
Battery drain per session On the device
  • A quality evaluation on the unquantised model, or on a full-precision server, doesn't describe what users get.

6. When weights are the right surface

  • Training is the most expensive way to change a model's behaviour, so defend it before proposing it.

The four surfaces, in order (the source's rule)

Surface What changes
Context What the prompt supplies
Memory What's stored and retrieved across sessions
Procedure The workflow around the model
Parameters The weights
  • Each is slower and costlier to change than the one before: roughly ten times per step, an order of magnitude rather than a measurement.
  • Work down that list, not up.

Where parameter updates win (the source's book)

  • Strict format or protocol adherence at high volume: a small tuned model can often match a larger prompted one at a fraction of serving cost.
  • Domain vocabulary the base model lacks.
  • A hard cost or latency ceiling after cheaper surfaces are exhausted: distillation buys the ceiling back.

Where they lose

  • Knowledge gaps are mainly a retrieval problem. Fine-tuning is a weak, unreliable way to teach new facts.
  • Ovadia et al. 2023 found retrieval beat fine-tuning for injecting new knowledge.

Map the four prompts onto the rule

Prompt Why weights are justified
Maths model Reasoning behaviour that prompting can't install
Training system Parameter updates by definition
Harm vs help Refusal behaviour lives in the weights; classifiers are a faster outer layer
Phone model The latency-ceiling case
  • Say the rule aloud before the pipeline, so the interviewer hears you justified training instead of assuming it.

The cost to name

  • A tuned model freezes its task definition.
    • When the business definition changes, a tuned model needs retraining where a prompt needs an edit.
    • So keep a prompted fallback path.
  • Same reasoning for a compute spike: try small-model ablations, adapters, targeted rollouts and frequent checkpoints before another full-scale run.

7. References

  • Primary references: Hoffmann et al. 2022; Yu et al. 2025, DAPO; Shao et al. 2024, DeepSeekMath (GRPO); Dettmers et al. 2023, QLoRA; Chen et al. 2021, pass@k estimation; the NVIDIA H100 and A100 specifications.
  • The source's fact-check sources, checked 27 September 2026. Each line states the claim it supports.
Reference Claim it supports
Kaplan et al. 2020, Scaling Laws for Neural Language Models Training ≈ 6 × parameters × tokens FLOPs; generation ≈ 2 × parameters per token
Rajbhandari et al. 2019, ZeRO About 16 bytes per parameter for mixed-precision Adam (≈112 GB for 7B)
Hoffmann et al. 2022, Training Compute-Optimal LLMs (Chinchilla) About 20 training tokens per parameter
AutoTrain LLM fine-tuning parameters Current flag names --peft and --quantization int4
Singhal et al. 2023, A Long Way to Go: Length Correlations in RLHF Graders favour longer answers
Hosking et al. 2023, Human Feedback is not Gold Standard Graders favour assertive, confident answers
Rafailov et al. 2023, Direct Preference Optimization DPO trains on preference pairs with no separate reward model
Xu et al. 2024, Is DPO Superior to PPO for LLM Alignment? Well-tuned PPO can match or beat DPO
Lambert et al. 2024, Tulu 3 (RLVR) RL with a programmatic verifier works well where correctness is checkable
DeepSeek-AI 2025, DeepSeek-R1 Rule-based rewards for maths and code
PyTorch blog, Quantisation-Aware Training for LLMs QAT loses less quality than post-training quantisation
Ovadia et al. 2023, Fine-Tuning or Retrieval? Retrieval beats fine-tuning for injecting new facts; fine-tuning does so weakly
Zhao et al. 2024, LoRA Land Small LoRA-tuned models often match larger prompted ones on narrow tasks, varying by task
  • Source-reported, not from these papers: the 94% and 140,000-trace examples, the Foundations labs and the "four surfaces" rule come from the source's book and course material.

Quick Recall: Lines to Say in the Interview

  • "Start from the budget: 20 tokens per parameter, six N D, then memory picks the parallelism."
  • "A 7B pretrain is 5.88e21 FLOPs, about 5,444 GPU-hours, if 3e14 FLOP/s is honest for your hardware."
  • "Checkpoints carry optimiser state and the data position, so a failure costs minutes, not days."
  • "Reward up and held-out pass@1 flat means the model found a blind spot."
  • "DPO is simpler, but a well-tuned PPO can match or beat it: that's a reason, not a verdict."
  • "Harmful compliance goes down without over-refusal going up, on one chart."
  • "A 3B model at 4-bit is 1.5 GB for weights alone, before KV cache and runtime."
  • "Fine-tuning is a weak way to teach facts; retrieval wins there."

Quick review

One sentence: pin the target, use verified data, keep SFT short, score the model's own attempts with the right checker, and promote only checkpoints that pass a clean multi-dimensional gate.

30-Second Cheat Sheet

  • Ask first: maths level, answer or working, tools, users and cost of a wrong answer, adapt or pretrain, GPU and device budget.
  • The path: checkable data → dedupe and decontaminate → SFT for format → sample → score → controlled update → held-out gate.
  • Who decides: the model is only trained; deterministic checks and human labels decide which checkpoint advances.
  • The money: SFT ≈ 2 GPU-hours; post-training costs about ten times SFT.
  • The memory: full Adam ≈ 16 bytes/parameter, 112 GB for 7B, over one 80 GB card.
  • The gate: maths accuracy, general regression, ill-posed answers, harmful compliance, over-refusal; suspect leakage on any big gain.
  • Pivots change one stage each: compute, harm, phone.

1. Ask first, then draw the path

Ask first

  1. Which maths level?
  2. Final answer or valid working?
  3. Are tools allowed?
  4. Who uses it and what does a wrong answer cost?
  5. Adapt a base model or pretrain?
  6. What's the GPU and device budget?

The whiteboard path

checkable data → dedupe and decontaminate → SFT for format → sample model attempts → verifier, step or preference score → controlled update with a drift penalty → held-out eval gate → optional distil and quantise → serve → reviewed data feedback

  • The model is only trained. Deterministic checks and human labels decide which checkpoint advances.
  • A failed gate returns to error analysis and the data mix.

2. Numbers are source assumptions

Every run size is a whiteboard assumption; the arithmetic on it is exact.

Item Value
Training rule ≈ 6ND FLOPs
Generation rule ≈ 2N FLOPs per token
SFT 7B × 50M tokens ≈ 2.1e18 FLOPs, about 2 GPU-hours at an assumed 3e14 FLOP/s
Rollouts 50K prompts × 8 rollouts × 1K tokens = 400M tokens
Post-training compute ≈ 5.6e18 to generate plus 1.68e19 to update → about ten times SFT
Full Adam state about 16 bytes/parameter → about 112 GB for 7B before activations, exceeds one 80 GB card
Pretraining about 20 tokens/parameter → 140B tokens for 7B, 5.88e21 FLOPs, about 5,444 GPU-hours or 21 hours on 256 GPUs
Phone 3B at 4-bit ≈ 1.5 GB for weights alone; a 1 to 2 GB budget points to about 1B
Source-reported example 94% offline, 78% production, honest 83%
Source-reported dedup 140,000 traces → about 9,000 distinct requests

3. Gate and pivots

The gate

  • SFT teaches format; verified rollouts optimise correctness.
  • Add step grading when the working itself matters; use preference pairs for tone.
  • Decontaminate and split by source and time; report pass@1 with its sampling settings.
  • Gate on:
    • Maths accuracy
    • General regression
    • Ill-posed answers
    • Harmful compliance
    • Over-refusal
  • Suspect leakage on any large gain.

The pivots

Pivot Answer
Compute Small ablations, adapters, targeted rollouts, full-state checkpoints, evaluation gain per GPU-hour
Harm Harmful compliance down without over-refusal up; a written policy; preference pairs; red-team set in the gate; a classifier as a faster outer layer
Phone Distilled student; 4-bit weights plus KV cache and runtime overhead; on-device politeness, latency and battery checks

Sixty-second close: "Pin the target, use verified data, keep SFT short, score the model's own attempts with the right checker, and promote only checkpoints that pass a clean multi-dimensional gate."


4. Key takeaways

Topic Takeaway
Target Pin it first: level of maths, answer vs working, tools and users decide the data, reward and evaluation
Requirements Testable as held-out pass@1, a maximum general regression, a fabrication rate and a compute budget
Sizing SFT is cheap and rollouts are expensive, so the budget belongs to post-training and evaluation
Architecture A loop: data, SFT, post-training, a gate that blocks, deploy, and a gated flywheel back into data
Data Checkable: verify answers by program, dedupe, decontaminate, split by time and source
SFT Teaches the shape of an answer; keep it short, mixed with general data, with legal refusals
Post-training Finds answers; the scorer is the design, and the drift penalty stops the model gaming it
Evaluation Only on problems the model never saw; report sampling settings; suspect leakage when a gain looks large
Compute budget Tokens per parameter picks the model size, memory picks the parallelism, checkpoints make the run survivable
Harm Two numbers on one chart; a release lowers harmful compliance without raising over-refusal
Phone Sized by bytes per parameter, made good by distillation, compressed by quantisation, evaluated on the device
Weights Parameter updates earn their cost for behaviour, vocabulary or a latency ceiling, never for missing knowledge
The hour Goes to the scorer and the evaluation; a mid-round constraint changes one stage, not the whole design
Compute pivot Small ablations, adapters, targeted rollouts, checkpoints and evaluation gained per GPU-hour

Flashcard Drill


Quick Recall: Lines to Say in the Interview

  • "Before I pick a method: which level of maths, answer or working, and may it use tools?"
  • "The model is only trained. Checks and human labels decide which checkpoint advances."
  • "SFT is about 2 GPU-hours; post-training rollouts cost roughly ten times that."
  • "16 bytes a parameter puts a 7B full fine-tune at 112 GB, over one 80 GB card."
  • "SFT teaches format; verified rollouts optimise correctness."
  • "Report pass@1 with its sampling settings, and suspect leakage on any large gain."
  • "Harmful compliance down, over-refusal not up."
  • "A phone model is 4-bit weights plus KV cache and runtime overhead, measured on the device."
  • "A mid-round constraint changes one stage, not the whole design."

Where next

Revise the concepts