Skip to main content

How models are made training pipeline · stage 2

SFT: teaching a completion machine to answer wellpractitioner-perspective methodology · key facts carry official sources

What supervised fine-tuning adds after pre-training — where instruction data comes from, why quality beats quantity, and the limits of memory-savers like LoRA. Practitioner depth; the one-page explainer lives on the Learn site.

What this guide covers

SFT means continuing to train a pre-trained model on demonstration pairs of “question → good answer”.

A pre-trained model can continue text but cannot hold a conversation: ask it a question
and it may continue the question into “This question has the following answers…” instead of answering directly.
What SFT teaches is form and judgement: answer in conversational format, don't fabricate, refuse when refusal is due.

Where the data comes from

InstructGPT (arXiv 2203.02155) went with outsourced annotators writing the demonstration answers —
expensive and small-scale (a little over ten thousand examples in the SFT stage).

FLAN (arXiv 2109.01652) took another route:
rewriting hundreds of classic NLP datasets into instruction templates so the model sees every task shape.

LLaMA 2 (arXiv 2307.09288) mixes both and adds bootstrapping:
its own models generate candidates, humans filter them, scaling the data volume up.

Today most open-weight families publish only the quantity of their SFT recipe, not the source breakdown;
this site transcribes what the official statements say and does not guess at what they leave out.

Quality beats quantity: the LIMA result

LIMA (arXiv 2305.11206) did SFT on just 1,000 hand-curated samples,
with output quality close to pipeline data of tens of thousands.

The conclusion is not “1,000 examples are enough” but this: SFT mostly teaches form — the knowledge was already there from pre-training.
How much knowledge sits inside the demonstration pairs does not matter; what the model learns is the style, structure and boundaries of the answers.

Practitioner corollary: when wrong facts slip into SFT data, what the model learns is not the fact itself
but the style of “this kind of wrong claim is an acceptable answer”. Data review should focus on demonstration quality, not on counts.

Memory-savers: LoRA and QLoRA

Full-parameter fine-tuning has to store every gradient and optimiser state — memory more than doubles.

LoRA (arXiv 2106.09685) freezes the base weights and trains only injected low-rank matrices.
Trainable parameters drop to a fraction of a percent, the artefact is tens of MB, and adapters can be hot-swapped.

QLoRA (arXiv 2305.14314) squeezes the base to 4-bit before attaching LoRA,
making single-GPU fine-tuning of 30B/65B models possible — quite a few community fine-tunes listed on this site follow exactly this route.

State the limits honestly: LoRA is efficient at changing “expression and style” but weak at injecting new knowledge compared with full-parameter training.
A low-rank delta cannot hold many new facts. “Training a private knowledge base into the model with LoRA” is usually the wrong tool;
retrieval (RAG) is the standard answer.

What comes after SFT

SFT teaches form, but for “which answer is better” it can only imitate the demonstrations — it cannot judge.
Judging quality belongs to the next step — reward models and preference optimisation (RLHF/DPO), covered in the next guide.

The Learn site's three-stage training term page
covers all three steps in one explainer page; this guide is the practitioner deep-dive for each step.

How this differs from the Learn site

The user-perspective explainers live on the Learn site: supervised learning
and three-stage training.

This guide covers the trade-offs between data routes, how LIMA changed the consensus, and where LoRA applies —
same term, different depth on each side, cross-linked without duplication.

Sources

Base source snapshot: 2026-10-20; item-specific additions and check scope appear in the text and source labels. Check original specifications, methods and conditions.