CyberFreezeDev Loading
  1. Home
  2. AI glossary
  3. Fine-tuning

What is fine-tuning?

Extra training on your own examples so a model does one job your way.

3D render of matte panels of neural network nodes, with activations lighting up layer by layer

The plain definition

You continue training a pretrained model on example inputs and ideal outputs. Most projects train a small add-on such as LoRA, which is far cheaper.

Read more about The plain definition

Fine-tuning means continuing to train a pretrained model, such as a large language model, on a few hundred to a few thousand examples of the input you will give it and the output you want back. The most common form is supervised fine-tuning: pairs of prompt and ideal answer.

You can update every weight (full fine-tuning) or train a small add-on while the base stays frozen, as in LoRA. The second is far cheaper and is what most business projects use.

How it works

  1. 01 Collect examples

    Gather real inputs and the outputs a skilled person would write.

    Read more about Collect examples

    Real inputs and the outputs a skilled person would write, usually stored as JSONL in a chat format.

  2. 02 Clean and split

    Remove errors and unneeded personal data, and hold back a test set.

    Read more about Clean and split

    Remove errors and personal data you do not need, and hold back a test set the model never trains on.

  3. 03 Train

    A few passes on a GPU; a small LoRA run can take hours on one card.

    Read more about Train

    Run a few passes over the data on a GPU. A LoRA run on a small open model can finish in hours on one card.

  4. 04 Evaluate and deploy

    Compare against the base model on the test set and ship only if clearly better.

    Read more about Evaluate and deploy

    Compare the tuned model with the base model on the held-back set. Ship only if it is clearly better. See model evaluation.

Where it matters in business

Strict output formats

The same JSON fields every time, without long instructions in each prompt.

Read more about Strict output formats

Always returning the same JSON fields for an invoice or a lead, without long instructions in every prompt.

House style and domain language

Replies that sound like your firm and use your product names correctly.

Read more about House style and domain language

Replies that sound like your firm and use your product names and abbreviations correctly.

Smaller, cheaper models

A tuned small model can match a larger one on one narrow task, at lower cost.

Read more about Smaller, cheaper models

A tuned small model can match a much larger general model on one narrow task, which cuts inference cost and allows on-premise hosting.

A practical example

A broker tuned a small open model on around a thousand labelled claim emails, so it uses exactly twelve categories and runs on its own server.

Read more about A practical example

An insurance broker classifies incoming claim emails into twelve categories and extracts policy number, date of loss and claim type. A general model prompted with instructions gets the categories mostly right but keeps inventing its own labels. Fine-tuning a small open model on around a thousand past emails labelled by the claims team teaches it the exact twelve labels and field format, and it runs on the broker's own server.

Common mistakes

Fine-tuning to add knowledge

Training on documents does not make facts reliable. Use RAG for facts.

Read more about Fine-tuning to add knowledge

Training on your policy documents does not make the model a reliable source of those facts. For facts, use RAG.

Skipping the prompt baseline

Try a clear prompt with examples first; if it works, tuning only adds cost.

Read more about Skipping the prompt baseline

Try good prompt engineering first. If a clear prompt with examples already works, tuning adds cost for nothing.

Training on messy data

The model copies what it sees, mistakes and inconsistent labels included.

Read more about Training on messy data

The model copies what it sees, including mistakes and inconsistent labels.

Questions

How much data do we need to fine-tune?

For a narrow task, a few hundred high-quality examples can be enough to see a difference; more varied tasks need more. Quality and consistency matter more than raw volume.

Can we fine-tune a hosted model like GPT?

Several providers offer fine-tuning APIs for some of their models. You upload examples and they host the tuned version. With an open-weight model you can tune and host it yourself.

Does fine-tuning make a model safer?

Not by itself. It can even weaken safety behaviour learned by the base model, so test outputs and keep guardrails in place.

Last updated