Fine-tuning is taking a model that has already been trained and training it further on your own examples. The model keeps everything it knew and adjusts toward your task.
It changes behaviour rather than knowledge. Fine-tuning is how you get consistent tone, a reliable output format, or a specialised task done well. It is a poor way to teach the model new facts.
Think of it like this. Think of hiring an experienced writer and showing them a hundred pieces from your company. They already know how to write. What they learn from you is how you write.
How it works
- Start from a pretrained model rather than from nothing.
- Collect example pairs. Inputs alongside the outputs you actually want.
- Train gently. Much lower learning rates than original training, so existing knowledge is not destroyed.
- Adjust the weights. Either all of them, or a small set of adapters.
Types
- Full fine-tuning. Updates every weight. Most capable, most expensive, produces a whole new model to host.
- LoRA. Freezes the original weights and trains small adapter matrices instead. Far cheaper, and you can swap adapters per task.
- QLoRA. LoRA on a quantized model, which brings fine-tuning within reach of a single GPU.
- Adapters. Small trainable modules inserted between transformer blocks, with the base frozen.
- Prefix and prompt tuning. Learn a short sequence of vectors prepended to the input, leaving every weight untouched.
- Instruction tuning. Teaching a model to follow instructions, often effective with only hundreds to thousands of examples.
Typical values
- Full fine-tuning a 7B model: roughly 28GB of VRAM at fp16, which puts it beyond a single consumer GPU.
- LoRA rank: commonly 4, 8, 16 or 32. Higher rank means more capacity and more parameters to train.
- LoRA alpha: commonly 16 or 32, scaling the adapter's influence by alpha divided by rank.
- Learning rate: 1e-5 to 1e-4, far lower than training from scratch.
- Prefix length: 10 to 100 tokens for prefix tuning.
Common mistakes
- "Fine-tuning teaches the model new facts." It teaches patterns and style. Facts belong in retrieval, where they can be updated and cited.
- "It always costs a fortune." Full fine-tuning does. LoRA and QLoRA are dramatically cheaper.
- "It replaces prompt engineering." A fine-tuned model still responds to good instructions.
- "You need millions of examples." Hundreds of high-quality examples often outperform thousands of sloppy ones.