Fine-tuning
A pretrained model arrives knowing a great deal and belonging to nobody in particular. Fine-tuning is the step where you keep training it on your own, much smaller dataset until its behaviour is specifically yours.
What actually happensTraining resumes from the released weights at a low learning rate on examples of the behaviour you want, typically a few thousand prompt-and-response pairs. Full fine-tuning updates every parameter, which means optimiser state several times the size of the model and a whole new copy to store and serve. Parameter-efficient methods dominate in practice: LoRA and QLoRA freeze the base model and train small low-rank matrices, so an adapter weighs megabytes, trains on a single GPU, and can be swapped per customer at serving time.
What it is good and bad at- Right tool for form and behaviour: a consistent voice, a strict output schema, a domain's phrasing, a refusal policy.
- Wrong tool for facts — knowledge taught this way is unreliable and stale the moment the data changes. That is retrieval's job.
- Done carelessly it degrades the model: narrow data causes catastrophic forgetting, and a few hundred mediocre examples teach confident nonsense.
Try prompting, then retrieval, then fine-tuning, because each costs more to build and keep alive than the last. Example quality beats example count — curated sets in the low thousands routinely beat noisy sets ten times larger — and most of this work happens in Hugging Face's Transformers, TRL and PEFT libraries.
Fine-tuning continues training a pretrained model on a smaller, task-specific dataset so its behaviour matches a particular use. Full fine-tuning updates every parameter; parameter-efficient methods such as LoRA train small added matrices and leave the base weights frozen. It reliably shapes format, tone and task behaviour, but is a poor way to add facts — that belongs to retrieval. Narrow or low-quality data degrades the model's general ability.
A big AI model comes out of the box like a very well-read graduate: broadly knowledgeable, but not trained for your office. Fine-tuning is the short apprenticeship. You show it a few thousand examples of exactly how you want things done, and it settles into that style — your tone of voice, your format, your way of answering customers. It is good at teaching habits and bad at teaching facts; if the model needs to know your current prices, you hand it the price list instead. Overdo it on a narrow set of examples and it gets worse at everything else.