L

Learn AI

Track progress · learn offline

Open

Lesson 6 of 7

Fine-tuning to follow instructions

8 min read

Your base model can finish any sentence — but ask it a question and it just writes more questions. How do you make it answer?

From predictor to assistant

A base model predicts text; it doesn't know it's supposed to help. Instruction fine-tuning (SFT) fixes that with a small dataset of example pairs — a prompt and a good response — and a few rounds of the same training loop. Nothing about the architecture changes; you're just practising the model on what a helpful answer looks like.

Fine-tuning is the same predict-and-correct loop, aimed at a tiny, curated set of instruction → response examples.

Cheap, fast, and it stacks

Compared to pretraining this is tiny — hours, not weeks; thousands of examples, not trillions of tokens. It builds on top of the base model you already trained, so all that general language ability stays and just gets pointed at following instructions. A later round of preference tuning can sharpen tone and safety further.

You don't retrain from scratch. Fine-tuning is a light layer of practice on top of everything pretraining already taught.

Fine-tuning shapes behaviour, not facts. It won't teach the model new knowledge it never saw in pretraining — it teaches it how to respond.

What you built

How is instruction fine-tuning different from pretraining?

Continue in the app

Take the whole Build an LLM from Scratch course — tracked

Get your personalized path, progress and streaks in the app — this lesson and every next one, in order.