What is fine-tuning an AI model?
Fine-tuning takes an AI model that has already learned from huge amounts of general data and trains it a bit more on a small set of examples for one task or field. The result is a customized model, without building one from scratch.
Updated September 24, 2026
Fine-tuning is extra training for an AI model that already exists. A large model first learns general knowledge from enormous amounts of data (pre-training). Fine-tuning then teaches it one specific job, using a much smaller set of examples, so it gets better at that job without starting from scratch.
How it works
- Start from a trained model. Fine-tuning builds on a model that already understands language, which IBM describes as a form of transfer learning.
- Show it examples. Most fine-tuning uses labeled pairs: an example input and the ideal output. Microsoft calls this supervised fine-tuning and suggests most projects start there.
- Train only a little of it. Parameter-efficient methods (PEFT), such as LoRA, adjust only a small number of settings instead of the whole model. Hugging Face says this cuts computing and storage costs a lot, often with results close to full fine-tuning.
When to use it
Try better prompts first. If that isn't enough, fine-tuning helps when you want a model to:
- follow a strict output format or house style every time
- handle a specialist field like law, medicine or finance
- do one narrow task well on a smaller, cheaper model
- work with shorter prompts, which lowers cost and speeds up answers
If you mainly need the model to know fresh or private facts, RAG is usually the better fit, because it looks information up instead of baking it into the model.
The tradeoffs
- Forgetting. A fine-tuned model can lose some general knowledge, which researchers call catastrophic forgetting.
- Time and compute. It takes rounds of testing and training runs, though LoRA-style methods make it possible on modest hardware.
- Upkeep. When your needs change, you may have to train again.
Availability also shifts: OpenAI's guide says its own fine-tuning service is closed to new users, while cloud platforms such as Microsoft's still offer it.
Quick questions
What is the difference between fine-tuning and RAG?
RAG gives a model current or private information at the moment it answers, with no retraining. Fine-tuning changes the model itself so it gets better at a field or task.
How much data do you need to fine-tune a model?
Microsoft suggests starting with about 50 to 100 high-quality examples to test the idea, then 500 or more for a production model.
What is LoRA?
LoRA (low-rank adaptation) is a cheaper way to fine-tune that trains only a small set of changes to the model's weights. Those small add-ons can be swapped in and out without retraining the base model.
Should I fine-tune or improve my prompts first?
Prompts first. OpenAI's guide recommends building tests, improving your prompts, and fine-tuning only if better prompts aren't enough.
Sources: IBM: What is fine-tuning?, Microsoft Learn: Fine-tuning overview, OpenAI: Model optimization guide, Hugging Face: PEFT documentation