Fine-tuning is the process of taking a pretrained AI model and training it further on a smaller, task-specific dataset so it performs better for a particular purpose. Instead of building a model from scratch, you start from one that already understands language or images and adjust it for your domain, format or style. It is one of the main ways organisations customise LLMs and other foundation models.
Key takeaways
- Fine-tuning builds on pretraining rather than replacing it.
- Main types: supervised fine-tuning, preference tuning and continued pretraining.
- Methods include full fine-tuning and parameter-efficient fine-tuning such as LoRA.
- Fine-tuning is best for behaviour, format and style; retrieval is usually better for changing facts.
- Try prompt engineering and retrieval before fine-tuning.
Fine-tuning explained in simple terms
Hiring an experienced accountant is faster than training someone from school. But on their first day, they still need to learn your company’s reports, codes and way of working. Fine-tuning is that onboarding for an AI model: it keeps its general expertise and adapts to your specific needs.
Types of fine-tuning
| Type | Data | Goal |
|---|---|---|
| Supervised fine-tuning | Prompt-response examples | Teach tasks, formats and style |
| Instruction tuning | Instruction examples across many tasks | General instruction following |
| Preference tuning (RLHF, DPO) | Preferred vs rejected responses | Improve quality and alignment |
| Continued pretraining | Large unlabelled domain text | Deepen domain knowledge or language |
| Reinforcement fine-tuning | Tasks with checkable outcomes | Improve reasoning on specific problems |
Full vs parameter-efficient fine-tuning
| Aspect | Full fine-tuning | PEFT (e.g. LoRA) |
|---|---|---|
| Weights updated | All | A small added set |
| GPU memory | Very high | Much lower |
| Storage per version | A full model copy | Small adapter files |
| Risk of forgetting | Higher | Lower |
| Quality | Highest ceiling | Close to full in many tasks |
Fine-tuning vs prompting vs RAG
| Need | Best first approach |
|---|---|
| Quick changes to behaviour | Prompt engineering |
| Answers from current or private documents | Retrieval-augmented generation (RAG) |
| Consistent format, tone or narrow task at scale | Fine-tuning |
| Lower cost by using a smaller model | Fine-tune a small model |
| New language or deep domain vocabulary | Continued pretraining plus fine-tuning |
Many production systems combine all three: a fine-tuned model, a clear system prompt and retrieval.
A worked example: when fine-tuning pays off
An e-commerce company generates 50,000 product descriptions a month. With a large model and a long prompt full of style rules and examples, each request is expensive and outputs still drift. They fine-tune a smaller model on 3,000 approved descriptions using LoRA. The fine-tuned model follows the style with a short prompt, runs faster and costs far less per description. Facts such as prices and specifications still come from the product database, not from the model’s memory.
The fine-tuning process
- Define the task and success metrics.
- Build a high-quality dataset; split into training, validation and test sets.
- Choose a base model and method (full or PEFT).
- Train, monitoring validation loss to avoid overfitting.
- Evaluate on real-world prompts against the base model.
- Deploy, monitor and retrain as needs change.
Limitations
- Needs quality data and evaluation effort.
- Can reduce general abilities (catastrophic forgetting).
- Fine-tuned knowledge becomes outdated as facts change.
- Must be repeated when switching to a newer base model.
- Fine-tuning can weaken safety behaviours if data is not carefully chosen.
