LevelUpWith

Explore / AI Engineering

Post-Training LLMs: Reward Models, RL and Scale

Train reward models, run PPO, GRPO and multi-turn agent RL on several GPUs, distil and merge models, and keep a tuned model safe. You will finish by showing, with evidence, that your own reward model and RL loop improved a small model on one task.

Read lesson 1 free →

Levels 1 and 2 are free to read, no account needed. Levels 3 and 4 are free with a free account, and so are 20 answers from the AI tutor.

Photographic 3D course artwork for Post-Training LLMs: Reward Models, RL and Scale

Expert · 60 levels · 4 free · Created Nov 2026 · Professionally curated by levelupwith.com

What's inside

  1. Level 1: Anatomy of a Modern Post-Training PipelineFree
    Learn the stages that current open models go through after pre-training (SFT, preference tuning, RL with verifiable rewards, distillation), using the openly published Tulu 3 and Olmo 3 recipes as reference designs.
    • Draw the stage-by-stage post-training pipeline of an open model from its technical report and say what each stage is meant to improve
    • Explain what each stage changes in model behaviour and why its position in the order matters
    • Name the artefacts each stage consumes and produces: datasets, checkpoints, reward models and evals
  2. Level 2: Reading Technical Reports Like an EngineerFree
    Compare the post-training sections of several recent open-model reports to find the decisions that recur, the details that are left out, and the claims you cannot reproduce.
    • Pull data mixtures, stage order, thinking versus non-thinking modes and RL domains out of two or three recent reports
    • Tell apart claims a report backs with ablations from claims it simply asserts
    • Write a one-page recipe card for a report that you could hand to a teammate
  3. Level 3: Building a Rented Multi-GPU Workbench
    Set up a reproducible environment on a rented node with several GPUs: a pinned container, a check that the GPUs can talk to each other, shared storage and experiment tracking.
    • Start a pinned training container on a rented multi-GPU node and confirm all GPUs are visible with a torchrun smoke test
    • Measure GPU-to-GPU bandwidth with an NCCL all-reduce test and read the result
    • Wire up checkpoint storage and experiment tracking so a run survives losing the instance
  4. Level 4: An Evaluation Harness You Can Trust
    Build the evaluation harness used for the rest of the course: task benchmarks, held-out in-domain sets, win-rate evals and a measure of how much scores vary between runs.
    • Run a base model and an instruct model through a standard eval harness plus your own held-out task set
    • Measure run-to-run variance across seeds and sampling settings, so you know how big a gain must be to be real
    • Check eval sets for contamination and leakage before you trust a number
  5. Level 5: Compute Budgets in GPU-Hours and Dollars
    Estimate the GPU-hours and cost of SFT, preference tuning and RL runs before launching them, and see why the rollouts that RL generates usually dominate its cost.
    • Estimate the training compute and wall-clock time of a fine-tune from model size, tokens and measured throughput
    • Split the cost of an RL run into rollout generation versus training updates using a small benchmark
    • Write a budget with a stop-loss point for a planned post-training project
  6. Level 6: When Not to Post-Train
    Decide whether a problem needs post-training at all by comparing tuning against prompting, retrieval, larger models and better tooling on cost, risk and upkeep.
    • Set up prompting and retrieval baselines that a tuned model must beat to justify its cost
    • Score a proposed post-training project on expected gain, data readiness, maintenance and safety risk
    • Make and defend a go or no-go call on a realistic case using your harness and budget
  7. Level 7: Preference Data: Sources, Noise and Agreement
    Understand where preference pairs come from (human labels, AI labels, on-policy samples) and how annotator disagreement and label noise limit any reward model trained on them.
    • Profile a public preference dataset for length gaps, ties, duplicates and topic skew
    • Estimate label noise from annotator agreement and say what accuracy ceiling it implies
    • Build a cleaned, deduplicated train/validation split of preference pairs for reward modelling
  8. Level 8: Training a Bradley-Terry Reward Model
    Train a scalar reward model from preference pairs with the Bradley-Terry loss, and learn which choices in the model head, padding and pooling actually matter.
    • Implement the Bradley-Terry pairwise loss in PyTorch and check it against a library reward trainer
    • Train a reward model on a small base model with a scalar head and track its pairwise accuracy
    • Spot common bugs such as wrong end-of-sequence pooling, truncated responses and leakage between splits
  9. Level 9: Evaluating Reward Models Beyond Accuracy
    Test a reward model with held-out pairs, RewardBench 2 and best-of-N reranking, and learn why a benchmark score does not guarantee good results in RLHF.
    • Score your reward model on RewardBench 2 subsets and on your own held-out pairs
    • Run a best-of-N experiment to see whether higher reward actually tracks better outputs
    • Explain why a reward model that scores well on a benchmark can still be a poor RL signal in your setup
  10. Level 10: Reward Calibration, Length Bias and Ensembles
    Check whether reward gaps mean what they claim, find biases toward length and style, and reduce them with normalisation, margins and reward model ensembles.
    • Plot a calibration curve comparing predicted preference probability with observed win rate
    • Measure how strongly reward correlates with response length and apply a correction
    • Train a small reward model ensemble and use disagreement between members as an uncertainty signal
  11. Level 11: Measuring Reward Over-Optimisation
    See Goodhart's law in action by optimising a policy against a proxy reward model and watching a held-out 'gold' reward rise, peak and then fall as the policy drifts.
    • Set up a proxy reward model and a held-out gold reward model to judge it against
    • Plot proxy and gold reward against how far the policy has moved from where it started, using best-of-N
    • Name the warning signs of reward hacking and decide where to stop optimising
  12. Level 12: PPO RLHF Architecture: Four Models and a KL
    Understand the classic PPO-based RLHF setup with policy, reference, reward and value models, and what the KL penalty to the reference model is protecting.
    • Diagram the data flow and GPU memory needed for policy, reference, reward and value models in one PPO step
    • Explain how adding the KL penalty to the reward keeps the policy close to the reference model
    • Estimate the memory and compute cost of PPO compared with a DPO run on the same model
  13. Level 13: Running PPO: Advantages, Clipping and Values
    Run a real PPO RLHF loop on a small model and see how advantage estimation (GAE), value-function training and the clipped objective behave in practice.
    • Launch a PPO RLHF run on a small model with your own reward model and a KL target
    • Read the advantage, value-loss and clip-fraction curves to judge whether learning is healthy
    • Run controlled tweaks to rollout batch size, learning rate and KL coefficient and record what each changes
  14. Level 14: Debugging PPO and Catching Reward Hacking
    Diagnose failing PPO runs from their metrics and samples: KL blow-ups, value collapse, reward hacking and degenerate outputs, plus the fixes that tend to work.
    • Match common metric patterns in a PPO run to their likely causes
    • Catch reward hacking by reading samples alongside reward and KL curves
    • Apply and confirm fixes such as reward whitening, KL tuning and value warm-up
  15. Level 15: Where DPO Breaks and What IPO Fixes
    Look at how direct preference methods fail (overfitting to deterministic preferences, likelihood displacement, sensitivity to beta) and how IPO's regularised objective addresses overfitting.
    • Reproduce a case where the chosen response's likelihood falls during a DPO run
    • Train IPO on the same data and compare its training dynamics and held-out win rate with DPO
    • Explain when IPO's assumptions suit your preference data
  16. Level 16: KTO: Learning from Thumbs Up and Down
    Use KTO to learn from unpaired good/bad labels such as production feedback, and understand how its prospect-theory-inspired loss treats desirable and undesirable examples.
    • Turn logged thumbs-up and thumbs-down feedback into a KTO dataset without inventing pairs
    • Train KTO and tune the weights on desirable and undesirable examples when the labels are imbalanced
    • Compare KTO with a paired method on the same base model and task
  17. Level 17: Reference-Free Methods: ORPO and SimPO
    Learn how ORPO folds preference learning into SFT, and how SimPO drops the reference model by using a length-normalised reward with a target margin, plus the trade-offs of both.
    • Train ORPO in a single stage from a base model and compare it with SFT followed by DPO
    • Train SimPO and tune its margin and beta while watching response length
    • Explain the memory savings and stability risks of dropping the reference model
  18. Level 18: Choosing a Preference Method Head-to-Head
    Run a controlled comparison of preference methods on one task and budget, and turn the results into a decision guide based on data shape, compute and risk.
    • Run several preference methods on the same model, data and compute budget with fixed seeds
    • Judge the results by in-domain win rate, regressions on general benchmarks and length drift, with error bars
    • Write a decision guide that maps data shape and constraints to a method, and note where published results disagree
  19. Level 19: RLAIF: Model Judges and Rubric Rewards
    Replace human labels with AI feedback: use a model judge to label pairs, and use rubric-based rewards to score answers against explicit criteria.
    • Write a judging prompt and a rubric, then generate AI preference labels for a task
    • Measure how often the judge agrees with a small human-labelled gold set
    • Use rubric scores as a reward for best-of-N or preference training and compare them with your reward model
  20. Level 20: Failure Modes of Model Judges
    Find and reduce judge biases (position, length, self-preference, style over substance) and watch a policy learn to game a judge when the judge is its reward.
    • Measure position, length and self-preference bias in a judge with controlled swap and padding tests
    • Apply fixes such as order swapping, reference answers, multiple judges and rubric anchoring
    • Show a policy exploiting a judge reward and add checks that catch it
  21. Level 21: From First GRPO Script to a Real RLVR Run
    Take apart a GRPO training step: group sampling, group-relative advantages, the clipped ratio and the optional KL term. Learn which metrics show whether an RL with verifiable rewards run is actually learning.
    • Trace one GRPO step in code from prompts to rollouts, rewards, advantages and loss, and say what each tensor holds
    • Set up logging for reward mean and spread, the share of groups where every answer scored the same, response length, clip fraction and entropy on a small GSM8K-style run
    • Tell a stalled run from one that is learning by reading those curves
  22. Level 22: Verifiers and Reward Functions for RLVR
    Design the reward functions RLVR depends on: math answer checkers, sandboxed code execution with unit tests, and format rewards. Learn how loose verifiers get gamed.
    • Write a math answer verifier that normalises answers and a code reward that runs unit tests in a sandbox with time and memory limits
    • Audit a verifier by sampling rollouts that got high rewards and finding false positives such as guessed answers, empty code or format-only wins
    • Choose between binary, partial-credit and format-shaped rewards for a task, and justify the trade-off
  23. Level 23: GRPO Variants I: Loss Aggregation and Length Bias
    See how normalising the loss per response and dividing advantages by the group's standard deviation bias GRPO by length and difficulty. Learn how Dr. GRPO and DAPO's token-level loss fix this.
    • Switch a GRPO loss between averaging per sequence and per token, and toggle std normalisation, from config or with a few lines of code
    • Run a short A/B test on the same small model and data, then compare how long wrong answers grow and how accuracy moves
    • Explain which correction you would use by default, and where the published comparisons still disagree
  24. Level 24: GRPO Variants II: Clipping, GSPO and CISPO
    Compare how DAPO's clip-higher, GSPO's sequence-level importance ratios and CISPO's clipped importance weights change which tokens get gradient and how stable training is.
    • Implement token-level and sequence-level importance ratios side by side, and measure their variance as responses get longer
    • Turn on asymmetric clip-higher bounds and see how clip fraction and entropy respond
    • Pick a variant for a dense model or a mixture-of-experts model, citing what the papers report and what is still unverified
  25. Level 25: Rollout Design: Group Size, Sampling and Length
    Tune the rollout side of RL: group size, temperature, maximum generation length, overlong filtering or penalties, and dynamic sampling of groups whose answers got different rewards.
    • Estimate how group size and maximum length set GPU-hours per step for a given model and rollout engine
    • Set up overlong filtering or a soft overlong penalty, and see how it changes truncation rate and accuracy
    • Decide whether dynamic sampling earns its extra generation cost on your task, given mixed published results
  26. Level 26: Data Curation and Curricula for RL
    Choose and order RL prompts by measured difficulty. Filter by pass rate so that each group produces a learning signal, and build curricula that move as the policy improves.
    • Profile a prompt set by sampling k answers per prompt and computing each prompt's pass rate under the starting policy
    • Build a filtered or staged curriculum that drops prompts the model always solves or never solves, and re-profiles them during training
    • Compare a curriculum run with a random-order run under the same compute
  27. Level 27: Diagnosing and Treating Entropy Collapse
    Learn why policy entropy collapses during RL and how that caps exploration and pass@k. Use the main levers against it: clip bounds, temperature, entropy bonuses and selective updates on high-entropy tokens.
    • Monitor token-level entropy and pass@k against pass@1 to spot collapse early
    • Apply and compare at least two interventions, such as clip-higher, a higher rollout temperature or an entropy term, on a run that is collapsing
    • Explain the evidence on whether RL widens a model's reasoning or narrows it, and say plainly what is unsettled
  28. Level 28: Training-Inference Mismatch and Off-Policy Fixes
    Learn why log-probs from a fast rollout engine such as vLLM or SGLang differ from the trainer's, how that silently biases updates, and how truncated importance-sampling corrections handle it.
    • Measure per-token log-prob gaps between rollout-engine and trainer outputs for the same sequences
    • Add a truncated importance-sampling correction to the loss and check its effect on stability
    • Name the precision, kernel and mixture-of-experts routing settings that make the mismatch worse
  29. Level 29: Anatomy of a Distributed RL Framework
    Map how RL frameworks split work between a trainer backend, a rollout engine, reward workers and weight synchronisation. Learn where the time goes in each step.
    • Draw the dataflow of a colocated setup and of a disaggregated setup, showing which GPUs train and which generate
    • Profile one RL step into generation, reward, log-prob recompute, training and weight-sync time
    • Estimate how many GPUs to give rollout versus training for a target model size and response length
  30. Level 30: Running GRPO at Scale with verl
    Move an RLVR job onto verl across several GPUs: configure the FSDP or Megatron trainer, a vLLM or SGLang rollout, custom reward functions and checkpoints.
    • Launch a multi-GPU verl GRPO run on a 1–4B model with a custom reward function
    • Tune rollout batch size, micro-batch size and memory utilisation settings to avoid out-of-memory errors and idle GPUs
    • Resume a run from a checkpoint and confirm the metrics carry on where they stopped
  31. Level 31: Asynchronous Rollouts, Staleness and Frameworks
    Separate generation from training with asynchronous rollouts, control how stale the policy is allowed to get, and compare current asynchronous stacks: prime-rl, slime, OpenRLHF and verl.
    • Configure a run that allows one or two steps of off-policy lag, and measure the throughput gain against the change in reward curve
    • Explain how importance correction keeps stale rollouts usable, and when too much lag hurts
    • Choose a framework for a given team, hardware and workload, using current docs rather than talk slides
  32. Level 32: Tool Environments for Agent RL
    Build environments where an agent calls tools across several turns, such as code execution, search or a shell, with episode rewards that can be verified. Package them for an RL framework.
    • Write an environment with reset, step and reward logic around a sandboxed Python or shell tool
    • Plug the environment into a framework's multi-turn rollout interface and produce full trajectories
    • Harden the environment against reward hacking, tool timeouts and sandbox escapes
  33. Level 33: Multi-Turn Agent RL: Masking and Credit Assignment
    Train on multi-turn trajectories correctly: mask tool and environment tokens out of the loss, give credit across turns, and keep long-horizon episodes affordable.
    • Build loss masks so that only tokens the policy generated receive gradient, and check them on sample trajectories
    • Compare outcome-only rewards with per-turn or shaped rewards on a short agent task
    • Manage context growth and episode length limits so rollout cost per step stays within budget
  34. Level 34: Long Chain-of-Thought SFT as a Cold Start
    Prepare a base model for reasoning RL with supervised fine-tuning on long chain-of-thought traces. Cover trace sourcing, filtering, length and formatting choices, and their effect on the RL that follows.
    • Curate a long-CoT dataset by filtering traces for correctness, length and format
    • Fine-tune a small model on the traces and measure accuracy, output length and repetition
    • Explain from current technical reports why a cold-start SFT stage comes before RL
  35. Level 35: RL on Reasoning Models: Length and Thinking Budgets
    Run RL on a cold-started reasoning model while managing response-length growth, truncation and thinking-budget control. Use length-aware rewards where they help.
    • Run RL on top of a long-CoT checkpoint and track accuracy and length curves together
    • Add a length penalty or a budget-conditioned reward, and compare tokens spent per correct answer
    • Spot overthinking and loops in sampled outputs, and pick a fix
  36. Level 36: Test-Time Compute Trade-offs
    Compare spending compute at inference (best-of-n, majority voting, verifier reranking, longer thinking) with spending it in training, measured by cost per correct answer.
    • Plot accuracy against inference tokens for majority voting, best-of-n and thinking-budget settings on a held-out set
    • Calculate cost per correct answer for each strategy, including the training compute it needs
    • Recommend a training and inference mix for a given latency and cost constraint
  37. Level 37: Distilling Reasoning from a Teacher
    Transfer reasoning from a large teacher to a small student by SFT on sampled teacher traces. Learn how it compares with running RL directly on the small model.
    • Generate, verify and filter teacher traces, then distil them into a small student
    • Compare the distilled student with an RL-trained student of the same size and compute
    • Explain the reported limits of trace distillation, such as format copying and weak out-of-distribution transfer
  38. Level 38: On-Policy Distillation
    Train a student on its own samples, scored token by token with the teacher's log-probs, which combines RL's on-policy data with distillation's dense signal. Learn where the evidence is still unsettled.
    • Implement an on-policy distillation loop with a per-token reverse-KL loss against teacher log-probs
    • Compare its compute efficiency and accuracy with off-policy trace distillation and with GRPO on the same task
    • Name the requirements and failure modes, such as a shared tokenizer, teacher serving cost and teacher errors
  39. Level 39: Full Fine-Tuning vs Adapters: Making the Call
    Choose between full fine-tuning and LoRA-style adapters using evidence on capacity, forgetting, RL suitability, serving and cost, rather than habit.
    • Run the same task with full fine-tuning and with a high-rank LoRA, then compare task gain against forgetting on a general benchmark
    • Explain current findings on when LoRA matches full fine-tuning, for example in RL and small-data settings, and when it falls short
    • Write a decision checklist covering data size, compute, serving and merging needs
  40. Level 40: GPU Memory Maths for Full Fine-Tuning
    Calculate the memory a full fine-tune needs: weights, gradients, optimiser states, activations and buffers under mixed precision. Use the numbers to predict out-of-memory errors before you rent GPUs.
    • Calculate memory per GPU for a given model size, precision, optimiser, batch size and sequence length
    • Check the estimate against measured peak memory on a 1–3B model and explain any gap
    • Show how activation checkpointing, an 8-bit optimiser and sequence length change the total
  41. Level 41: Sharding a Full Fine-Tune with PyTorch FSDP
    Wrap a 7-8B model in PyTorch FSDP so its parameters, gradients and optimiser state are split across GPUs, and check that the memory you measure matches the maths from the previous levels.
    • Configure FSDP with a transformer-layer wrap policy, mixed precision and full sharding for a full fine-tune launched with torchrun or Accelerate
    • Compare the peak memory per GPU you measure with your own calculation, and explain any gap (activations, fragmentation, communication buffers)
    • Diagnose common FSDP failures such as out-of-memory on the first step, hangs from processes doing different work, and tied-weight wrapping errors
  42. Level 42: DeepSpeed ZeRO Stages and Offload in Practice
    Run the same fine-tune under DeepSpeed ZeRO stages 1, 2 and 3, with and without CPU/NVMe offload, and learn when each stage is worth its communication cost.
    • Write DeepSpeed configs for ZeRO-1, ZeRO-2 and ZeRO-3 and plug them into a Hugging Face Trainer or TRL run
    • Measure throughput and memory per GPU for each stage and offload setting on a rented multi-GPU node
    • Choose between FSDP and DeepSpeed ZeRO for a given model size, GPU count and network link, and justify the choice
  43. Level 43: Sharded Checkpointing, Resuming and Export
    Save and resume sharded training state safely across preemptions, then turn sharded checkpoints into a single set of weights you can evaluate and serve.
    • Save and reload sharded model, optimiser, scheduler, RNG and data-loader state so a resumed run continues exactly where it stopped
    • Convert FSDP or ZeRO-3 sharded checkpoints into consolidated safetensors and confirm the weights match
    • Plan checkpoint frequency, storage size and retention for spot or preemptible GPUs
  44. Level 44: Squeezing Throughput: Packing, Recompute, Profiling
    Find where a multi-GPU training step spends its time and recover throughput with sequence packing, activation checkpointing and fused kernels.
    • Estimate model FLOPs utilisation (MFU) from tokens per second and model size, and profile a training step with the PyTorch profiler
    • Apply sequence packing with correct attention masking, plus selective activation checkpointing, and measure the speed and memory trade-off
    • Tell apart a slowdown caused by compute, by communication and by the data loader, and fix the one that is actually limiting you
  45. Level 45: Continued Pre-Training: Domain Data and Mixtures
    Prepare a domain corpus for continued pre-training: cleaning, deduplication, tokeniser fit and a data mix with general text, then set the learning-rate schedule for the run.
    • Build a deduplicated, filtered domain corpus and measure how well the base tokeniser compresses it
    • Design a token budget and a domain-to-general data mix, and choose a warm-up and decay schedule suited to restarting from a pre-trained checkpoint
    • Run a short continued pre-training job and track domain perplexity against general perplexity
  46. Level 46: Measuring and Limiting Catastrophic Forgetting
    Measure what continued pre-training and fine-tuning cost you on general skills, and limit that loss with replay data, a lower learning rate and re-applying instruction tuning.
    • Set up a forgetting check that runs general benchmarks and instruction-following evals before and after domain training
    • Compare replay ratios and learning-rate settings, and read the trade-off curve between domain gain and general loss
    • Restore chat behaviour after continued pre-training, either by re-running post-training or by transferring the change between base and instruct weights, and say plainly where evidence for each is still thin
  47. Level 47: Model Merging with mergekit: Linear and SLERP
    Combine fine-tuned checkpoints that share a base model using mergekit's linear and SLERP methods, and learn when merging helps and when it quietly breaks a model.
    • Write mergekit YAML configs for linear and SLERP merges, including weights that vary by layer, and run them on CPU or one GPU
    • Check that the inputs can be merged at all: same architecture, same tokeniser and a shared base model
    • Compare a merge with each parent on your eval harness and spot regressions that averaging hides
  48. Level 48: Task Arithmetic, TIES and DARE Merges
    Treat each fine-tune as a task vector (its weight change from the base) and combine several skills with task arithmetic, TIES and DARE, handling interference between them.
    • Extract task vectors and add, scale or subtract them to add or remove a behaviour
    • Run TIES and DARE merges in mergekit and tune density and weight settings against a held-out eval
    • Explain sign conflicts and interference between tasks, and decide when a multi-task fine-tune beats a merge
  49. Level 49: Fine-Tuning Embedding Models for Retrieval
    Adapt a text embedding model to your domain with contrastive training on query-passage pairs, using hard-negative mining and retrieval metrics.
    • Build training pairs and mine hard negatives from your own corpus while avoiding false negatives
    • Train an embedding model with an in-batch-negatives contrastive loss, using sentence-transformers or plain PyTorch, and size batches for multiple GPUs
    • Measure recall@k and nDCG on a held-out retrieval set before and after tuning, including on queries outside your domain
  50. Level 50: Fine-Tuning Rerankers: Cross-Encoders and LLMs
    Train a cross-encoder or LLM-based reranker that rescores retrieved candidates, and measure what it adds on top of your tuned embedder.
    • Train a cross-encoder reranker with pointwise and listwise losses on mined candidate lists
    • Distil relevance labels from a larger judge model into a small reranker, and audit the labels for judge bias
    • Measure the trade-off between latency and nDCG for embedder-only and embedder-plus-reranker pipelines
  51. Level 51: Supervised Fine-Tuning of Vision-Language Models
    Fine-tune an open vision-language model on image-text tasks, choosing which parts to train (vision encoder, projector, language model) and handling image token budgets.
    • Prepare multimodal chat data with the model's processor and correct image-token masking in the loss
    • Compare freezing and training the vision encoder, projector and language model on memory, speed and task accuracy
    • Control image resolution and image-token count to fit batches on rented GPUs
  52. Level 52: Preference and RL Tuning for Vision-Language Models
    Apply preference optimisation and verifiable-reward RL to a vision-language model, and evaluate visual grounding and hallucination honestly.
    • Run a preference or GRPO-style RL pass on a VLM, using rewards you can check such as chart QA answers or grounding boxes
    • Measure visual hallucination and the drop in text-only skills alongside task gains
    • Explain which parts of the RL framework setup change when rollouts include images
  53. Level 53: How Post-Training Erodes Safety Behaviour
    Learn why even harmless fine-tuning and RL can wear away refusals and safety behaviour, and build a safety eval suite to catch it.
    • Run a before-and-after safety eval that covers refusals of harmful requests, over-refusal of harmless ones, and jailbreak robustness
    • Show safety drift on your own model after a harmless fine-tune, and trace it to data, learning rate or reward design
    • Summarise what published research shows about fine-tuning attacks and safety loss, and where results are still unsettled
  54. Level 54: Preserving Refusals Through Fine-Tuning and RL
    Keep safety behaviour intact while you tune: mix in safety data, add safety terms to rewards, keep the KL anchor, and set release gates.
    • Mix safety and over-refusal data into SFT and preference sets, and tune the ratio against both helpfulness and safety evals
    • Add safety penalties or safety rubrics to an RL reward without teaching the policy to refuse everything
    • Define a safety regression gate with thresholds that every checkpoint must pass before release
  55. Level 55: Red-Teaming Your Tuned Model
    Attack your own tuned model with manual, automated and multi-turn red-teaming, then turn what you find into data and evals.
    • Run an automated red-teaming loop in which an attacker model and a judge model probe your model across harm categories
    • Test multi-turn and tool-use attacks, including prompt injection through tool outputs, against an agent-tuned model
    • Triage findings by severity and feed them back into training data and the regression gate
  56. Level 56: Hosted Reinforcement Fine-Tuning vs Doing It Yourself
    Compare current hosted reinforcement fine-tuning services with your own RL stack on cost, control, grader design, data handling and portability of the weights.
    • Map your task's reward to the grader formats hosted RFT services accept, using each provider's current docs
    • Estimate the total cost and time of a hosted run versus a self-run verl or OpenRLHF job of similar size
    • Decide on build or buy for a given task, weighing control over the weights, data residency and risk of depending on one provider
  57. Level 57: Final Project I: Task, Baseline and Eval Plan
    Choose one task for the final project, define what a gain means, and lock down baselines, held-out evals and a compute budget before training anything.
    • Write a one-page project spec: task, success metric, held-out and contamination-checked eval sets, and a budget in GPU hours
    • Measure baselines from prompting, the base and instruct models, and a cheap SFT or DPO run, with confidence intervals
    • Decide in advance which ablations and significance tests will count as proof
  58. Level 58: Final Project II: Train and Validate a Reward Model
    Collect or build preference data for your task, train a Bradley-Terry reward model, and stress-test it before any policy optimises against it.
    • Train a reward model on your preference data and report held-out accuracy and calibration
    • Probe the reward model for exploitable shortcuts such as length, format and sycophancy, using adversarial examples
    • Combine the learned reward with any verifiable checks into a final reward function and document why
  59. Level 59: Final Project III: Run and Debug the RL Loop
    Run a multi-GPU RL loop (PPO or a GRPO variant) on a small model against your reward, watching for reward hacking, entropy collapse and safety drift.
    • Launch the RL run with a framework you choose, with logging of reward, KL, entropy, response length and safety metrics
    • Spot over-optimisation early by comparing reward-model scores with held-out judge or human scores, and act on it
    • Produce a checkpoint selected by a rule you fixed in advance, not by the best-looking score
  60. Level 60: Final Challenge: Prove the Gain End to End Exam
    Defend your final model against the course's full toolkit: held-out evals with significance tests, ablations, safety and red-team gates, forgetting checks and a cost case for post-training at all.
    • Present statistically supported gains over every baseline, with ablations that separate the reward model's contribution from RL's
    • Show the model passes the safety, red-team and forgetting gates, and consider whether distillation, merging or a hosted service would have done the job more cheaply
    • Write a technical-report-style summary covering recipe, compute spent, failures, open questions and when not to repeat this approach

Access

Levels 1 and 2 are free to read, no account needed. Levels 3 and 4 are free with a free account, and so are 20 answers from the AI tutor. Every level, the podcast edition and the AI tutor come with All Access at £4.99/month or any Creator plan — see pricing.

Read lesson 1 free →

More like this