Glossary
AI

Fine-Tuning

Also: Model fine-tuning, Domain adaptation, Supervised fine-tuning (SFT)

Fine-tuning adapts a pre-trained model to a specific task or domain by continuing training on a smaller, targeted dataset, improving accuracy and style for that use case.

What It Is

Fine-tuning is the process of taking a model that has already been trained on a large, general dataset (a pre-trained or foundation model) and continuing its training on a smaller, focused dataset. The goal is to specialize the model so it performs better on a particular task, domain, or style without training a new model from scratch.

Because the base model already encodes broad knowledge (language patterns, visual features, or general reasoning), fine-tuning only needs to adjust the model to the new objective. This makes it far cheaper and faster than full training.

Why it matters

  • Lower cost and data needs: You reuse the expensive pre-training, so a few hundred to a few thousand labeled examples can be enough.
  • Better task performance: A fine-tuned model usually beats a generic model on niche tasks (legal summaries, medical coding, brand voice).
  • Consistency: It can lock in a tone, format, or domain vocabulary that prompting alone struggles to enforce reliably.

How it is used in practice

1. Collect data: Assemble high-quality input/output pairs representative of the target task.

2. Choose a method:

  • Full fine-tuning: update all model weights (most flexible, most expensive).
  • Parameter-efficient fine-tuning (PEFT): update only small adapter layers, for example LoRA, leaving most weights frozen.

3. Train: Run additional training epochs with a low learning rate to avoid erasing prior knowledge (a risk called catastrophic forgetting).

4. Evaluate and deploy: Validate on held-out examples, then serve the adapted model.

Concrete Example

A support team has a general language model that answers questions but does not match their product. They prepare 1,500 past tickets paired with approved agent responses. After fine-tuning, the model replies using the company's terminology, escalation rules, and tone. Accuracy on internal evaluations rises from 68% to 91%, and responses need less editing.

When not to use it

If your need is occasional or knowledge changes often, prompt engineering or retrieval augmented generation (RAG) may be cheaper and easier to update than retraining.

From general model to specialized modelPre-trainedbase modelSmall taskdatasetContinuetrainingFine-tunedspecialized model
Fine-tuning continues training a general base model on a small targeted dataset to produce a specialized model.

Frequently asked questions

What exactly does fine-tuning a model mean?

Fine-tuning means taking a model already trained on a large general dataset (a pre-trained or foundation model) and continuing its training on a smaller, focused dataset so it performs better on one task, domain, or style. Because the base model already encodes broad knowledge, only an adjustment is needed rather than training from scratch, which makes it far cheaper and faster. It is also called domain adaptation or supervised fine-tuning (SFT).

When should I fine-tune rather than just improve my prompts or use RAG?

Fine-tune when you need to lock in a tone, format, or domain vocabulary that prompting alone cannot enforce reliably, and when the task is stable over time. If the need is occasional or the underlying knowledge changes often, prompt engineering or retrieval augmented generation (RAG) is cheaper and much easier to update than retraining a model.

How many labeled examples do you need to fine-tune a model?

A few hundred to a few thousand high-quality input/output pairs are often enough, because the expensive pre-training is reused. Quality and representativeness of the pairs matter more than volume: they must reflect the target task as it will actually be used. In one support use case, 1,500 past tickets paired with approved agent responses lifted internal evaluation accuracy from 68% to 91%.

What is the difference between full fine-tuning and LoRA?

Full fine-tuning updates all the model weights: it is the most flexible option and the most expensive. LoRA is a form of parameter-efficient fine-tuning (PEFT) that trains only small adapter layers while most weights stay frozen, which cuts compute and storage costs sharply. Teams with limited budget or several task variants to serve usually start with PEFT.

What is catastrophic forgetting and how do you avoid it?

Catastrophic forgetting is when additional training on a narrow dataset erases the general knowledge the model acquired during pre-training. The standard precaution is to run the extra training epochs with a low learning rate, and to validate on held-out examples before deploying. Parameter-efficient methods that freeze most weights also limit the risk.