75 minutes · 7 sub-sections: thesis · teacher distillation · Magpie · Evol-Instruct · distilabel · decontamination · filtering
Pillar 1 (Data) · Prereq: FT04. Where SFT/preference data actually comes from.
Pillar 1 — Data
The data-side complement of FT00. Fine-tuning steers via a low-rank update pointed by the data. A noisy direction (unfiltered data) is a noisy steer, no matter the optimizer.
The steering wheel is the curated set, not the raw pile. LIMA's 1k curated beat Alpaca's 52k unfiltered. Magpie's filtering 1M→300K improved quality more than doubling the raw.
| Mystery | Why the thesis explains it |
|---|---|
| Why LIMA worked with 1,000 examples | Hand-curated. Quality and diversity, not volume. The model was already capable. |
| Why "100k GPT-4, ship it" underperforms | Duplicates, low-info responses, style collapses, contamination. Optimizer steers toward all of it. |
| Why Magpie emphasizes its filtering pipeline | "From scratch" generation is half; disciplined filtering is the other half. |
| Why FT06 is load-bearing | This module generates; FT06 cleans. Both required. Neither alone is enough. |
| Approach | Mechanism | When to use |
|---|---|---|
| Strong-teacher distillation | Seed prompts → strong model (GPT-4/Claude/R1/70B) generates responses | You have a target prompt distribution (real user queries, a domain) |
| Magpie self-synthesis | Prompt aligned model with pre-query template alone — it generates both sides, no seeds | You want broad diversity from scratch, no seed prompts |
Both produce (instruction, response) pairs. Both require the same downstream cleaning. The choice: where does the distribution come from — an external teacher, or the aligned model's own prior?
Shines
Target prompt distribution — real user queries, specific domain, specific format (JSON tool calls).
Leaks — style leakage
7B trained on 50k GPT-4 responses adopts GPT-4's verbosity, hedging, list-bias.
Mitigate: mix 2–3 teachers, post-process tells.
RLHF/DPO made instruction-responding the default. With no user content, the model surfaces a plausible query from its instruction prior — diverse, natural, uncontaminated by any seed set.
Same aligned model, both passes. No seeds, no external teacher.
Pass 1 — instruction generation
feed pre-query template (user turn EMPTY)
<|user|>
<- empty
<|assistant|>
-> model samples: "Explain TCP handshake\n..."
Pass 2 — response generation
place instruction in user turn PROPERLY
<|user|>Explain TCP handshake<|assistant|>
-> model samples: "The three-way handshake...\n..."
Result: a self-consistent (instruction, response) pair — same model generated both sides. Why Magpie beat Alpaca/Evol-Instruct/UltraChat: no seed-prompt bias (samples the full prior), natural self-consistency, and the filtering pipeline still applies (dedup, quality, decontam — half the contribution).
WizardLM (arXiv:2304.12201). Iterative LLM-driven complexification. Still used; now a special case, not a default.
In-depth evolving
Add constraints, deepen reasoning, require more steps.
In-breadth evolving
Topic-related variant → diversify.
Argilla, open-source (MIT), HF-native. Four pluggable pipeline stages:
| Stage | What it does |
|---|---|
| Generate | Magpie step OR teacher step. Encapsulates the pre-query-template trick per model. |
| Judge | Stronger model scores/ranks → preference pairs (DPO) + quality scores (filter). |
| Filter | Length · format · language · regex · decontamination. Where FT06 plugs in. |
| Dedup | MinHash on instruction n-grams; keep one per cluster. Biggest volume reduction. |
Output: a Distiset (HF Dataset) ready for FT11. Use it: reproducibility (DAG w/ checkpointing), non-trivial judge step, fiddly per-model Magpie templates, composes with FT06.
If a training item is near-identical to an eval item, the eval is compromised — the model has seen the answer. The number is fake.
Generate first, pick evals later → you'll pick evals your data does well on. That's a press release, not an eval.
The funnel
Generate 4–10x; filter to clean. The ratio is the price of a clean steering wheel.
Anti-patterns
Generate-without-filter. Ship raw 50k. Cardinal sin.
No decontamination. Eval is fake.
Single-teacher style leakage. Mix 2–3 teachers.
Ignored diversity. 70% one topic. Cap per-cluster.
Lab: generate 500 samples two ways (Magpie + teacher), dedup, compare on 20-sample review.
Next: FT06 — Dedup, Filter, Decontaminate (the cleaning half of the funnel).