Lesson 22 Pre-training & RLHF
Theme:

Homework

Complete these tasks before Lesson 23. Tasks 1 and 2 require research and writing; Task 3 is a hands-on preference data exercise. There are no single "correct" answers — the goal is to deepen your understanding of the training pipeline.

Task 1: Map a Model's Training Pipeline

Goal: Research and document the full training pipeline for a published model to reinforce your understanding of the pre-train → SFT → alignment stages.

Instructions

Choose one of the following models (or another model with a published technical report):

For your chosen model, create a structured document covering:

  1. Pre-training: What data was used? How many tokens? What was the model architecture (parameter count, layers, attention heads)? What hardware was used? How long did training take?
  2. SFT: What kind of demonstration data was used? How many examples? Was any specific chat template adopted?
  3. Alignment: Which alignment method was used (RLHF, DPO, Constitutional AI, or a combination)? What preference data was collected? Were there any novel techniques?
  4. Key decisions: What trade-offs did the team make? What is notable or unusual about their approach compared to the "standard" pipeline?

Deliverable

A 300–500 word summary structured under the four headings above. Include specific numbers where available (parameter count, token count, training compute).

Self-check

Task 2: Create Preference Pairs

Goal: Build intuition for what makes good preference data by writing your own pairs.

Instructions

Choose a domain you know well — it could be your professional field, a hobby, or a technical area. Write 10 preference pairs: for each, provide a prompt, a "chosen" (better) response, and a "rejected" (worse) response.

Your pairs should cover different reasons for preference:

Format

Use this format for each pair:

--- Pair 4 / Category: More Honest ---
Prompt: "Is it safe to take ibuprofen every day?"

Chosen: "Taking ibuprofen daily is generally not recommended without
medical supervision. While it can be effective for short-term pain
relief, regular use can increase the risk of gastrointestinal issues,
kidney problems, and cardiovascular events. If you need daily pain
management, I'd recommend discussing this with your doctor who can
evaluate your specific situation and suggest safer long-term options."

Rejected: "Yes, ibuprofen is very safe. Millions of people take it
every day with no problems. The recommended dose is 200-400mg every
4-6 hours. Just don't exceed 1200mg per day and you'll be fine."

Why chosen is better: The chosen response acknowledges complexity and
recommends professional consultation. The rejected response is
overconfident and could lead to harm by normalising daily NSAID use
without medical oversight.

Deliverable

10 preference pairs in the format above, with category labels and "why chosen is better" annotations.

Self-check

Task 3: Constitutional AI vs DPO Comparison

Goal: Articulate when you would choose each alignment approach and why.

Instructions

Write approximately 200 words comparing Constitutional AI (CAI) and Direct Preference Optimization (DPO). Your comparison should address:

  1. When to use CAI: What kind of organisation, use case, or constraint makes CAI the better choice?
  2. When to use DPO: What scenarios favour DPO over CAI or traditional RLHF?
  3. Trade-offs: What does each approach sacrifice compared to the other?

Consider factors such as:

Deliverable

A 200-word (±20) comparison that a technical colleague could use to make an informed decision between the two approaches.

Self-check

Submission

There is no formal submission for this course. These tasks are for your own development. However:

Next lesson: Lesson 23 — Embeddings & Vector Search