Service 09

Model Fine-Tuning

Adapting a model to your domain when prompting has genuinely run out of room, and not before. What it fixes, what it cannot fix, the dataset work, and the arithmetic that justifies it.

On this page
  1. What fine-tuning is
  2. What fine-tuning cannot fix
  3. Who it is for, and who it is not for
  4. What we actually build
  5. How it works technically
  6. The gate we apply before accepting the work
  7. The dataset is the project
  8. The build process, stage by stage
  9. What you get at handover
  10. Where fine-tuning projects go wrong
  11. What it costs to run once it is live
  12. How to tell whether you need this
  13. How to start

What fine-tuning is

The short answer

Fine-tuning continues training a pretrained model on your own examples, so it learns a behaviour rather than being instructed into it each time. It changes how the model responds: the format it produces, the register it writes in, the labels it chooses, the things it refuses. It does not reliably install new facts, and it is the right move only after prompting and retrieval have failed on a written test you can show somebody.

The mental model that avoids most disappointment: prompting is instruction, retrieval is memory, fine-tuning is habit. If your problem is that the model has not been told something, fix the prompt. If the problem is that it does not know something specific about your world, fix retrieval. If the problem is that it has been told correctly, repeatedly, and still drifts back to a generic behaviour, that is habit, and habit is what training changes.

  • 0 new factsFine-tuning teaches behaviour, not knowledge. Facts belong in retrieval, where they can be corrected without another training run.
  • Data is the jobNearly all the effort is dataset construction, deduplication and split hygiene. The training run itself is the short part.
  • 2 modelsYou now maintain a base and a tuned variant, and every provider update restarts qualification for both.
  • Evaluate firstIf you cannot demonstrate the base model failing on a written test, you cannot demonstrate the tuned model passing it.
Terms used on this page
Supervised fine-tuning
Training on pairs of inputs and the outputs you want, so the model learns to produce that style of response. It is the form most teams mean when they say fine-tuning.
Parameter-efficient fine-tuning
Training a small set of added weights, commonly low-rank adapters, instead of updating the whole model. Cheaper, faster, and easy to swap or roll back because the base model is untouched.
Catastrophic forgetting
The loss of general capability caused by training hard on a narrow dataset. A model tuned only on successful cases can lose the ability to refuse, hedge or handle anything off-distribution.
Leakage
The same underlying case appearing in both training and holdout data, usually through near-duplicate rows. It inflates your score and hides the failure until production finds it.
Distillation
Using a large model to generate training data for a smaller one, so the small model learns to imitate the large one on your specific task at a fraction of the running cost.

What fine-tuning cannot fix

This section exists because most fine-tuning enquiries we receive describe a problem that fine-tuning does not solve. Reading the table below saves people a month.

SymptomFine-tune?The better fix
The model does not know your products, policies or pricesNoRetrieval, so facts update without retraining. See RAG and Knowledge Systems.
Answers are out of date within weeksNoRetrieval plus a refresh pipeline. Weights are the worst place to store anything that changes.
Output format drifts despite a schemaSometimesTry schema-constrained decoding first. Tune only if drift survives a properly constrained decode.
Tone and register are wrong for the domainYesThe strongest case. Style is behaviour, and examples teach it far better than adjectives in a prompt.
Classification into a large bespoke taxonomyYesEspecially where fifty labels and their edge cases cannot fit in a prompt alongside the input.
The model refuses safe, in-domain requestsYesTargeted examples of correct handling, with genuine refusals kept in the set so it does not lose the ability to decline.
The prompt has grown long and expensiveYesDistil instructions and examples into weights, then measure whether the saving repays the training and maintenance.
Multi-step reasoning is weakRarelyDecompose the task into smaller calls, or change model. Training rarely buys reasoning you did not already have.
Symptom, verdict, and the fix that actually works
Facts in weights are facts you cannot correct

The most expensive mistake in this field is training a model on company knowledge to make it know things. When a price changes you cannot edit a weight, so you retrain, requalify and redeploy for a change that retrieval would have handled with a document update. Facts go in the index. Behaviour goes in the weights.

Who it is for, and who it is not for

Fine-tuning suits a team with one narrow, high-volume, repeatable task, where a written evaluation already shows the base model failing in a consistent way, and where enough correct examples exist or can be produced.

  • High volume on a single task, so a shorter prompt and a smaller model repay the work quickly.
  • A behaviour you can demonstrate on a holdout set, not a feeling that outputs are a bit generic.
  • At least a few hundred correct examples, ideally drawn from work your team has already done and reviewed.
  • Somebody who can adjudicate labels, because a dataset with two labellers who disagree teaches the model to be inconsistent.

Who should not buy this

  • Anyone who has not written an evaluation set. Without a holdout score for the base model, there is no way to prove a tuned model is better, and every judgement collapses into taste.
  • Anyone whose task changes monthly. Each change means new data, a training run and requalification, and the treadmill costs more than the prompt you were avoiding.
  • Anyone with fewer than roughly a hundred clean examples, unless a larger model can generate them and a human will review every one.
  • Anyone hoping to make a small model as capable as a large one in general. Distillation transfers a narrow task, not broad ability.

What we actually build

Four things, and only one of them is a model. The pipeline is the deliverable, because you will train again.

  1. A dataset pipeline: extraction from your systems, normalisation, deduplication, labelling workflow, provenance on every row, and a split that cannot leak.
  2. An evaluation harness that scores the base model and every candidate on the same holdout, per behaviour class rather than as a single average.
  3. The training configuration itself, version controlled, with hyperparameters, seed and data snapshot recorded so any run can be reproduced.
  4. A serving path with the tuned model behind a flag, so traffic can be split, compared and reverted without a deployment.

The evaluation harness is the part that outlives the model. It is what tells you next quarter whether a new base model has made your tuned variant redundant, which happens more often than vendors like to mention. See Evaluation and Guardrails.

How it works technically

Training adjusts weights so your examples become more likely. Everything interesting is in what you train, how much you change, and how you prove it worked.

Full fine-tuning against adapters

Full fine-tuning updates every weight and produces a complete new model, which is expensive to train, expensive to store and awkward to roll back. Parameter-efficient methods train a small number of added weights, typically low-rank adapters, and leave the base untouched. Adapters are the default for nearly all business tasks: cheaper, faster to iterate, and swappable, so you can hold three variants and route between them while comparing.

The hyperparameters that actually matter

Learning rate and epochs, in that order. Too high or too many and the model memorises your examples and loses its general ability, which shows up as brittle behaviour on anything phrased unusually. Too low and nothing changes and you conclude fine-tuning does not work. Start conservative, evaluate after each epoch, and keep the checkpoint that scores best on holdout rather than the last one, because the last one is frequently overfitted.

Serving and rollback

The tuned model goes behind the same interface as the base, selected by configuration. Route a small share of live traffic to it, compare outputs against the base on identical inputs, and keep both running until the comparison is boring. Rollback is a flag flip. If rolling back requires a deployment, the design is wrong.

Prompting plus retrievalFine-tuning
What it changesWhat the model is told and what it can seeWhat the model tends to do without being told
Time to first resultHoursWeeks, and most of that is dataset work
Cost of a changeEdit a file, rerun the evaluationNew data, a training run, requalification, redeployment
Facts that changeHandled, update the documentHandled badly, requires retraining
Per-request costHigher, the instructions travel every timeLower, the instructions live in the weights
Honest defaultWhere every project should start and most should stayWhere you go when the evaluation says prompting has stopped improving

The gate we apply before accepting the work

We turn down more fine-tuning briefs than we accept, and this is the test. All five conditions must hold. If one fails, the work below it is cheaper and usually sufficient.

Framework

The ChatGPTalker Prompt Exhaustion Gate

Five conditions, all required. Each is a question with a documentary answer, not a judgement call, which is what makes the gate usable by your team without us.

01
1. A written evaluation exists and the base model fails it

A holdout set of real cases, a scored run, and a specific pattern of failure. Without this the project has no before, so it can never demonstrate an after, and any improvement is indistinguishable from a good week.

02
2. The failure is behavioural, not factual

Read ten failures. If the model was missing information, this is a retrieval problem and training will bury the fault deeper. If the model had everything it needed and still answered in the wrong shape or register, that is behaviour.

03
3. Retrieval and prompting have been tried and the failure survived

Run the same holdout with the correct context supplied directly and with a properly constrained output schema. Failures that disappear under those conditions are not fine-tuning problems, and roughly half of them do disappear.

04
4. You can produce the examples

A few hundred correct cases, drawn from real work, that two people would label the same way. If they must be invented, the model learns your invention. Generated data is acceptable only when a human reviews every row before it enters the set.

05
5. There is a rollback path and a reason to bother

Somewhere to serve both models, a flag to switch, and arithmetic showing the saving or the quality gain repays training plus the requalification you now owe on every provider update. If the volume is small, the honest answer is a longer prompt.

What happens when a condition fails

We say so and quote the smaller piece of work instead, which is usually an evaluation set, a retrieval fix or a prompt system. See When Fine-Tuning Beats Prompting for the same decision written for someone doing it themselves.

The dataset is the project

Model quality tracks dataset quality almost exactly, so the artefacts below are the ones we treat as the real deliverable. Here is the training format, with the two conventions that catch teams out: the system prompt must be identical to production, and every row carries provenance.

Training example format, with provenancejsonl
# One training example per line. Keep the system prompt IDENTICAL to the one
# you will use in production, or you are training for a world that never ships.

{"messages":[
  {"role":"system","content":"You triage support tickets for a payments platform. Reply with one label and one sentence of reason."},
  {"role":"user","content":"Card declined at checkout, code 51, customer says funds are available."},
  {"role":"assistant","content":"issuer_decline. Code 51 is an issuer-side insufficient-funds response, so the merchant integration is not at fault."}
],"meta":{"source_ticket":"T-88213","labelled_by":"rmk","split":"train","behaviour":"declines"}}

{"messages":[
  {"role":"system","content":"You triage support tickets for a payments platform. Reply with one label and one sentence of reason."},
  {"role":"user","content":"Can you tell me what our monthly volume was in March?"},
  {"role":"assistant","content":"out_of_scope. Triage does not have access to account reporting, so this routes to the account team."}
],"meta":{"source_ticket":"T-88907","labelled_by":"rmk","split":"holdout","behaviour":"refusals"}}

Then the rules the dataset is built under. Splitting by row rather than by underlying case is the single commonest cause of a model that scores well and behaves badly, because near-duplicate tickets land on both sides of the split and the holdout is quietly measuring memorisation. See Building a Golden Dataset from Real Work.

Dataset contract, enforced by the buildjson
{
  "dataset": "ticket_triage_v4",
  "min_examples_per_behaviour": 50,
  "behaviours": ["declines", "chargebacks", "integration_errors",
                 "refusals", "out_of_scope"],

  "hygiene": {
    "dedupe": "normalise whitespace and casing, hash the user turn, drop exact
               and near duplicates above 0.95 similarity",
    "split_by": "source_ticket customer_id, NEVER by row",
    "leakage_check": "no customer_id may appear in both train and holdout;
                      build fails if any does",
    "holdout_fraction": 0.2,
    "label_provenance": "every example records who labelled it and when"
  },

  "balance": {
    "refusal_examples_min_fraction": 0.1,
    "note": "a dataset of only successes teaches the model to never decline,
             which is how a tuned model loses the ability to say no"
  },

  "gates_before_training": [
    "base model scored on the same holdout, result recorded",
    "two labellers agree on a 30-example sample above 0.9",
    "no example longer than the production context budget",
    "system prompt byte-identical to production"
  ]
}
Keep the refusals in

Datasets get built from successful cases because those are the tidy ones. Train only on successes and the model learns that every input has a good answer, so it stops declining, stops hedging and starts inventing. Reserve a tenth of the set for correct refusals and out-of-scope handling, and evaluate those separately.

The build process, stage by stage

Week 0
Gate and baseline

We run the five conditions against your case, build or review the holdout set, and score the base model on it. This week frequently ends with a recommendation not to fine-tune, and that outcome is reported rather than buried.

Week 1
Dataset construction

Extraction from your systems, deduplication, a labelling pass with two reviewers on a sample to measure agreement, and the split by underlying case with an automated leakage check that fails the build.

Week 2
First training run and honest comparison

A conservative adapter run, evaluated per behaviour class against the base on the same holdout. The first result is often mixed, better on the target behaviour and slightly worse elsewhere, which is exactly the trade to examine.

Weeks 3 to 4
Iteration on data, not hyperparameters

Failures are traced back to missing or contradictory examples, and the dataset is repaired. Most of the gain in this window comes from data repair rather than from tuning knobs.

Weeks 4 to 5
Shadow and split traffic

The tuned model runs on a share of live traffic behind a flag, with outputs compared against the base on identical inputs and disagreements reviewed by a person.

Weeks 5 to 6
Handover and requalification plan

The pipeline, the harness and a written procedure for the next base model release, because the question is never whether a new one arrives, only when.

What you get at handover

Handover artefacts
0 of 7 done

The dataset is yours and is not reused for other clients or for any other model. Where a provider hosts the tuned model, we document exactly what that means for your data under their current terms, and you sign it off before any training begins.

Where fine-tuning projects go wrong

FailureWhat it looks likeWhat prevents it
Split by row, not by caseHoldout scores look excellent and production behaviour does not improve at all.Split by the underlying entity, and fail the build when an identifier appears on both sides.
No baselineNobody can say whether the tuned model is better, so the decision is made by whoever is most confident.Score the base model on the holdout before training and record the number.
Only successes in the dataThe model stops refusing anything and answers out-of-scope questions with total assurance.Reserve a tenth of the set for correct refusals and score them separately.
OvertrainingStrong on the training distribution, brittle on anything phrased unusually.Conservative learning rate, evaluate each epoch, keep the best checkpoint rather than the last.
Training prompt differs from productionResults in the lab do not reproduce once the system prompt is the real one.Byte-identical system prompt in data and production, checked by the build.
Facts baked into weightsA price change requires a retraining cycle instead of a document edit.Facts in retrieval, behaviour in weights, with the boundary written down.
No requalification planA new base model appears and nobody knows whether the tuned variant is still worth its maintenance.A scheduled comparison of tuned model against current base on the same holdout.
Averaged scoresA single accuracy number hides that the target behaviour improved while three others degraded.Score per behaviour class and read all of them before shipping. See Catching Regressions.
The failures that recur, and what stops them

What it costs to run once it is live

Fine-tuning is usually justified by running cost rather than by quality, so the arithmetic decides it. The saving comes from a shorter prompt, a smaller model, or both, and it has to repay the training run plus the requalification you now owe forever.

Work it through with stated assumptions you should replace. Suppose 2,000 requests a day. Before tuning, the prompt carries instructions and eight examples, about 2,500 input tokens, on a larger model at a stand-in 3 per million input tokens, which is 0.0075 a request. After tuning, the examples live in the weights, so the prompt drops to about 400 tokens on a smaller tuned model at a stand-in 0.60 per million, which is 0.00024 a request. The saving is roughly 0.0073 a request, about 15 a day and 435 across thirty days. If the training run plus engineering time costs 300, it repays in around three weeks at that volume.

Halve the volume and the payback doubles. Drop to 200 requests a day and it takes most of a year, at which point maintenance costs more than the saving and the correct decision is a longer prompt. This is the whole reason the gate exists.

Fine-tuning break-even estimator

Defaults are stand-in figures, not quoted prices. Replace them with your provider's current numbers and your measured token counts. Training cost covers the run plus the engineering time you will spend on the dataset.

0Saving per 1,000 requests
0Saving per 30 days
0Days to repay the training cost

One cost the estimator cannot hold: every base model release starts a requalification. Budget a day of engineering per release to rerun the harness and decide whether the tuned variant is still ahead of a plain prompt on the current base. Sometimes it is not, and retiring a tuned model is a good outcome rather than a failure.

How to tell whether you need this

Run the five conditions. If all five hold, fine-tuning is probably the right call and the arithmetic will confirm it. If any fail, the cheaper work below is the honest recommendation.

  • If there is no evaluation set, build one first. It is a week of work, and it frequently solves the problem by revealing that the failures are three separate issues.
  • If the failures are factual, build retrieval instead, and keep the facts where you can edit them.
  • If the prompt was never properly tested, try constrained output and a handful of well-chosen examples before touching weights.
  • If you hold fewer than a hundred examples, collect for a month with the current system, capturing corrections, then reconsider.
  • If the volume is low, accept the longer prompt. It is cheaper than owning a model.
The most common outcome

The gate is passed less often than people expect, and the usual finding is that a shorter, better-structured prompt with constrained output closes most of the gap for none of the maintenance. We would rather tell you that in week zero than in month three.

How to start

  1. Send twenty failures30 minutes

    Twenty real cases where the current output is wrong, with what you wanted instead. Failures tell us in an afternoon what a specification cannot tell us in a fortnight.

  2. Gate call60 minutes

    We walk the five conditions against your case together, and read a sample of the failures to decide whether they are behavioural or factual.

  3. Written verdict and priceAbout a week

    Either a fine-tuning plan with the dataset work, the evaluation design, the timeline and the break-even arithmetic, or a written recommendation to do something cheaper and what that is.

  4. Baseline before anything elseWeek 0

    The holdout set is built and the base model is scored on it. Every later claim is measured against that number, including ours.

Cite this

ChatGPTalker on model fine-tuning: fine-tuning teaches behaviour rather than facts, and is justified only when a written evaluation shows the base model failing after prompting and retrieval have been tried.

Questions we get asked

How many examples do we need to fine-tune a model?
Fewer than most people expect for a narrow behaviour, and more than most people have for a broad one. A few hundred clean, consistent examples covering each behaviour class is a workable starting point, with at least fifty per class. Consistency matters more than volume, because two thousand examples labelled by people who disagree teaches the model to be inconsistent.
Will fine-tuning make the model know our company data?
No, and this is the most expensive misunderstanding in the field. Training shifts behaviour and can make facts more likely to appear, but it gives no guarantee of accuracy and no way to correct an individual fact afterwards. Put knowledge in retrieval, where a document edit fixes an error in minutes rather than requiring a retraining cycle.
Is fine-tuning cheaper than using a bigger model with a long prompt?
Only above a volume threshold you can calculate. The saving per request comes from a shorter prompt and a smaller model, and it has to repay the training run, the dataset work and the requalification owed on every base model release. Run the estimator on this page with your own token counts and prices before committing.
What happens when the provider releases a new base model?
You rerun your evaluation harness on three candidates: the tuned model, the new base with your production prompt, and the old base. Sometimes the new base beats your tuned variant outright, at which point retiring the tuned model is the correct decision. Without a harness, that comparison is guesswork and teams keep paying for models they no longer need.
Can we fine-tune an open-weights model and run it ourselves?
Yes, and it is the usual choice where data cannot leave your environment or where volume makes per-token pricing unattractive. It adds serving infrastructure, capacity planning and an upgrade path to the work. The architecture stays the same either way, so the decision can be made on measured cost and measured quality rather than on preference.
How do we know the fine-tuned model is actually better?
By scoring both models on the same holdout set, per behaviour class rather than as one average, and then splitting live traffic between them and reviewing the disagreements. An average hides the common pattern where the target behaviour improves while two others quietly degrade, which is why we report the classes separately.

Tell us what is eating the hours.

Send the process, the volume and the tools it touches. You get a scoped plan with a build shape and a timeline, not a brochure.

Start a project