Fine-Tuning Overview
Teaching with examples, not words
Fine-tuning updates part of a pre-trained model's weights on your data — teaching style, formats, and behaviors no prompt reliably conveys. It's a quality lever with real cost and data requirements.
What you will learn
- Explain what fine-tuning changes
- Recognize when tuning is warranted
- Distinguish tuning from prompting
What is this?
Fine-tuning further trains a pre-trained model on a curated dataset so its weights reflect your domain: output format, tone, tool-call shapes, classification behavior. Unlike prompts, these behaviors persist in weights — consistent but requiring datasets, compute/budget, and eval discipline.
Why do you need it?
- Prompt-only quality plateaus; tuning moves the floor up.
- Format-compliance improves beyond what prompts anchor.
- Smaller tuned models can match bigger prompted ones at lower cost.
- Behavior becomes encoded, not renegotiated each call.
Mental model
Teaching a new hire by example after onboarding docs
Fine-tuning
The handbook (prompt) sets rules everyone reads; but Junior still formats tickets wrong. A training block (fine-tuning) with real examples makes the behavior automatic — they stop reading the handbook and just do it right. The handbook stays, but the training embeds the skill.
How it works
- Collect representative examples of desired behavior.
- Prepare a dataset (input → ideal output).
- Choose tuning type: full, LoRA, or provider API.
- Train against the base model; evaluate on held-out.
- Compare vs prompt-only baseline; A/B rollout.
Tuning journey.
In production
- Support tones + formats become consistent across the fleet.
- Tool-selection models tune on your schema set.
- Classification graders tune for your domain rubric.
Best practices
- Prompt first, tune only when prompted quality plateaus.
- Hold out eval data never seen in training.
- Compare every tuning against the prompt-only baseline.
- Track drift after tuning: it can regress other skills.
Common mistakes
- Tuning on data that's already easy for prompts.
- No held-out eval (the model parrots its own examples).
- Ignoring capability regressions in other domains.
Common issues
Tuned model overfits trainingSmall dataset or high capacity
More diverse samples; regularization; eval on held-out.
No improvement over baselineThe lesson was already learnable via prompt
Re-scope the target; use few-shot check first.
Debugging tips
- Tuned behavior missing → dataset imbalance or your eval leaks.
- Sudden regressions → eval for unrelated skills.
- Format complaints → include format-broken negatives in data.
Interview checkpoint
Hands-on lab
- Split rows into train and validation sets
- Estimate tokens per example
- Compare an epoch's token cost against the budget
Size a Fine-Tuning Dataset
25 min · beginner
Quick quiz
Fine-tuning changes a model's…
Tuning should always beat a prompt baseline.