Scrapeless Wiki

What Is Fine-Tuning? – Definition and How It Works

Informational P2 what is fine-tuning

Learn what fine-tuning does, how full and parameter-efficient methods differ, what it is good and bad at, and how to prepare a dataset.

Fine-tuning continues training a pre-trained model on a smaller, targeted dataset so it adapts to a style, format, or task. It changes behaviour reliably; it changes knowledge poorly.

1. What It Changes

The model's weights are updated, so the change is baked in rather than supplied at request time.

  • Good at: output format, tone, domain vocabulary, task-specific behaviour, and reducing prompt length.
  • Poor at: teaching new facts, keeping information current, or making a model cite sources.

That split is the whole decision framework, and it is why retrieval and fine-tuning are complements rather than alternatives.

2. Full Versus Parameter-Efficient

Approach What it updates Cost Practical note
Full fine-tuning All weights Highest compute and storage One full model copy per task
LoRA and adapters Small added matrices Much lower Adapters swap per task at serving time
Quantised variants Adapters over a compressed base Lowest Runs on modest hardware

Parameter-efficient methods reach comparable quality for most adaptation tasks at a fraction of the cost, which is why they dominate practice.

3. Preparing the Dataset

Quality dominates quantity. A few hundred consistent, correct examples usually beat tens of thousands of noisy ones.

  • Consistency. Every example should demonstrate the behaviour you want, in the same format.
  • Coverage. Include the variations the model will meet, including edge cases.
  • Correct labels. Errors are learned as readily as correct patterns.
  • A held-out set. Evaluation on training data measures memorisation.
  • No secrets. Anything in the data can surface in outputs.

4. When to Fine-Tune

  1. Prompting has been tried and the gap is consistency, not knowledge.
  2. The output format is strict and repeated at volume.
  3. Prompt length is a material cost, and examples can move into the weights.
  4. Latency matters and a smaller fine-tuned model can replace a larger prompted one.
  5. The domain has vocabulary and conventions a general model handles awkwardly.

5. When Not To

  • The information changes. Retrieval handles freshness; retraining does not.
  • Facts are the problem. Fine-tuning is a poor way to install knowledge and encourages confident errors.
  • Prompting has not been exhausted. Most perceived needs disappear with clearer instructions and examples.
  • Data is thin. Below a threshold, fine-tuning teaches noise.

6. Evaluating the Result

Compare against the prompted baseline on the same held-out set, using task metrics rather than impressions. Watch for regression on general capability β€” a narrowly tuned model can lose breadth, which only a broader evaluation reveals.

7. Operational Considerations

Fine-tuned models are versioned artefacts: they need storage, deployment, rollback, and re-evaluation when the base model updates. Adapters reduce that burden considerably, since the base stays shared.

Budget for periodic re-tuning; a model tuned on last year's conventions drifts as the domain moves.

8. Summary

Fine-tuning adapts behaviour β€” format, tone, task shape β€” by updating weights, and parameter-efficient methods make it cheap enough to be routine.

It is the wrong tool for facts and freshness, which belong in retrieval. Exhaust prompting first, prepare a small consistent dataset carefully, and evaluate against a prompted baseline rather than against expectations.