Lesson 8.1 · 23 min · video lesson
Fine-Tuning: Adapting a Pre-Trained Model to Your Task
A model that has read half the internet still does not know how your support team answers a refund question, so how do we teach it that without starting from scratch?
In short: Fine-tuning takes a model that is already trained (pretrained) and continues training it on a small, focused dataset so it behaves the way our task needs. We reuse everything the model already knows and only nudge its weights. We can nudge all weights (full fine-tuning) or train a tiny add-on such as LoRA, which is far cheaper.
What you will learn
- What is Fine-tuning?
- Why do we need Fine-tuning?
- How does Fine-tuning work step by step?
- A simple worked example with numbers
- Full Fine-tuning vs LoRA
- When to use Fine-tuning
- Tips before we Fine-tune
- Summary
In this lesson
- What is fine-tuning?
- Why do we need fine-tuning?
- How fine-tuning works, step by step
- A simple worked example with numbers
- Full fine-tuning vs LoRA
- When to use fine-tuning (and when not to)
- Tips before we fine-tune
- Common mistakes and how to spot them
- Practice: try it yourself
- Summary
Key terms in this lesson
- Pretrained model
- A model already trained on a large general dataset, used as the starting point.
- Fine-tuning
- Continued training of a pretrained model on a smaller, task-specific dataset.
- Epoch
- One full pass over the training dataset.
- Learning rate
- How big each weight update step is; kept small during fine-tuning.
- PEFT
- Parameter-efficient fine-tuning: freezing the base model and training a small number of new weights.
- Catastrophic forgetting
- Losing previously learned skills when training on new data.
- Overfitting
- Memorising training examples so performance on new data gets worse.
This lesson is part of the Generative AI Engineering and Complete AI Engineer tracks. See plans and pricing to open the full lesson, its video, labs and quiz, or try the free lesson first (free account needed).
← 7.5 Jev and System One: Fast vs Deliberate AI Thinking · 8.2 LoRA: Parameter-Efficient Fine-Tuning via Low-Rank Matrices →