What is AI fine-tuning?

Fine-tuning is the further training of a pretrained model on additional data so that its weights adapt to a particular task, style or domain.

It differs from Retrieval-Augmented Generation in where knowledge lives: RAG leaves the weights unchanged and fetches information from documents at query time, while fine-tuning changes the weights to teach behaviour, format or style. Not every weight has to change; parameter-efficient methods train only a small part.

Topic
Machine learning, models and training
Also known as
Finetuning, model fine-tuning

How AI fine-tuning works

  1. A base or instruction-tuned model that has finished pre-training is chosen as the starting point.
  2. A training set fitting the goal is prepared: input and expected output pairs, preference pairs or raw domain text.
  3. The model is trained at a low learning rate; full fine-tuning updates all weights, while methods such as Low-Rank Adaptation update only added adapters.
  4. Results are measured on a separate evaluation set, checking for loss of general ability (catastrophic forgetting).

In more detail

Limiting catastrophic forgetting: data mixing and safety replay

To prevent catastrophic forgetting during domain adaptation, teams mix a small proportion of general instruction or safety replay data (data mixing) into the fine-tuning batch and use regularisation or lower learning rates. Benchmark suites track target-task gains alongside general capability and safety regressions after every checkpoint.

Commonly confused terms

TermHow it differs
Pre-trainingPre-training trains a model from random weights on massive general corpora using self-supervised objectives, whereas fine-tuning starts from those pretrained weights and adapts them to a narrower task or domain with far less data and compute.
QuantisationQuantisation reduces numerical precision of weights or activations (e.g. BF16 to INT4) to shrink memory and speed up inference without necessarily training, whereas fine-tuning updates weight values through training (though QLoRA combines both).

Why AI fine-tuning matters for on-premises AI

Models can be adapted without confidential training data leaving the organisation's servers. A small model tuned for a narrow task can do the same job as a large general model on less inference hardware. Full fine-tuning needs much GPU memory and training time; parameter-efficient methods cut that cost. A tuned model can memorise its training data, so datasets with personal data need minimisation and access control; fine-tuning can also weaken safety behaviour, so safety tests are rerun.

ON-PREMISES EXAMPLE

A bank adapts a model to classify support request types using labelled examples it keeps in-house and measures the results on a separate test set.

Common questions

How much data does fine-tuning need?

There is no fixed number; it depends on task difficulty and method. Data quality and how well it represents the task matter as much as the number of examples.

Fine-tuning or RAG for questions over company documents?

RAG suits changing information and source citations. Fine-tuning is chosen to teach a fixed output format, house style or narrow classification behaviour rather than facts.

Sources

Related page on this site: Related FAQ · In the glossary: Glossary, E to L

What does this term mean for your infrastructure?

We can work out together in a technical assessment how it maps onto your data, hardware and security requirements.

Request a technical assessment →

This site sets no cookies. Visitor numbers are counted in aggregate using a cookieless method that does not identify anyone. See the Privacy Policy for details.