Fine-Tuning
Fine-tuning adapts a pre-trained model by updating some or all of its parameters using task-specific examples or feedback.
Download Markdown (.md)Soroush’s Product Wiki · https://wiki.soroush.uk/topic/fine-tuning/
01What it means
Fine-tuning continues training a pre-trained model on selected examples or preference signals so its behavior better fits a task, domain, style, or output pattern. It changes learned parameters, unlike prompting or retrieval, which supply request-time context. Methods include supervised fine-tuning and parameter-efficient adaptation; each requires evaluation against a stable baseline.[1][2]
- 01Define behavior gapTask, baseline, success criteria, and risks
- 02Prepare examplesRepresentative inputs, outputs, rights, and quality
- 03Split + versionSeparate training, validation, and held-out evaluation
- 04Update parametersTrain from a named base model and configuration
- 05Evaluate comparativelyQuality, safety, slices, cost, and latency
- 06Deploy + monitorVersion, observe drift, and retain rollback
Fine-tuning can improve consistent task behavior, but it does not reliably inject current facts or remove the need for evaluation, retrieval, prompting, and product safeguards.
02Why it matters
Fine-tuning can improve consistent behavior, reduce long prompts, and adapt smaller models for repeated tasks. It also introduces dataset, training, versioning, safety, and maintenance work that product teams may underestimate.
03When to use it
Consider fine-tuning after prompt and workflow baselines show a repeatable behavioral gap and enough high-quality examples exist. Use retrieval for frequently changing factual knowledge, tools for external actions, and deterministic code for guaranteed rules. Avoid training when success cannot be measured.
04How it works
- Define the target behavior, baseline, evaluation set, acceptable regressions, and deployment constraints.
- Collect, authorize, clean, deduplicate, and split representative examples without evaluation leakage.
- Choose a base model and adaptation method, then train with tracked data and configuration versions.
- Evaluate task quality, general capability, safety, memorization, and subgroup performance against the baseline.
- Release gradually and monitor drift, new failure cases, data deletion obligations, and retraining triggers.
05A practical example
A support platform has thousands of approved examples for classifying issue type and urgency. After prompting plateaus, it fine-tunes a smaller model, holds out recent tickets for evaluation, checks rare critical cases separately, and keeps the previous model available for rollback.
06Where it breaks
Fine-tuning can overfit, memorize sensitive data, amplify annotation bias, or degrade unrelated capabilities. It does not reliably add current facts or eliminate hallucinations and security risks. Training data curation and repeated retraining may cost more than prompt, retrieval, or workflow changes.
Common mistakes
- Fine-tuning before establishing a prompt, model, and non-model baseline.
- Training on noisy production logs without consent, quality review, or leakage checks.
- Using fine-tuning to store changing facts that retrieval should supply.
- Evaluating on examples duplicated from or too similar to the training set.
07Sources
- Model OptimizationOpenAI · Official documentationModel Optimization
- Machine Learning GlossaryGoogle for Developers · Official technical glossaryMachine Learning Glossary