What is fine-tuning in LLMs? Methods and use cases

Also called fine tuning, finetuning, supervised fine-tuning, SFT

Definition

Fine-tuning is the process of further training a pretrained model on a smaller, task-specific dataset so its weights change to improve performance on a particular task, domain, style, or output format.

Fine-tuning is the process of training a pretrained model further on examples of the behavior you want, after it has already learned general language patterns during pretraining. The result is a new set of weights, or a small adapter on top of the original weights, that performs better on the target task. Fine-tuning is how base models become chat assistants, and how teams adapt open-weight or provider-hosted models to a specific domain, tone, or format.

How fine-tuning works#

Fine-tuning methods differ in the data they train on and in how many parameters they update:

Method Training data What changes
Supervised fine-tuning (SFT) Prompts paired with ideal responses All weights, or an adapter
Parameter-efficient, such as LoRA Same as SFT Small added matrices; base weights frozen
Preference tuning, such as RLHF or DPO Rankings of better and worse responses Weights, shifted toward preferred outputs
Knowledge distillation Outputs from a larger teacher model A smaller student model's weights

Full fine-tuning updates every parameter and needs GPU memory for the weights, their gradients, and the optimizer state. Parameter-efficient methods train far fewer parameters: the LoRA paper reports 10,000 times fewer trainable parameters and a threefold reduction in GPU memory compared with full fine-tuning of GPT-3 175B using Adam. The training examples should match the format the model will see in production, including the system prompt.

Fine-tuning vs RAG#

Fine-tuning changes how a model behaves; retrieval-augmented generation changes what information the model can see at answer time. Fine-tuning fits a consistent tone, a strict output format, a narrow classification task, or a need to shorten prompts at high volume. RAG fits knowledge that changes often, must be cited, or is too large to train into the weights. Many production systems combine the two. The RAG vs fine-tuning comparison walks through the trade-offs.

Why fine-tuning matters#

Fine-tuning is the main way to get behavior that prompting cannot reliably produce, and it can let a smaller, cheaper model match a larger one on a narrow task. Fine-tuning also carries costs beyond compute. Every base model upgrade means retraining and re-evaluating, and narrow training can reduce performance on tasks outside the training data, an effect known as catastrophic forgetting. A good default is to start with prompt engineering, build an evaluation set, and fine-tune only when the evaluation shows prompting has plateaued.

Cite this definition

The AI Engineering Editors. "What is fine-tuning in LLMs? Methods and use cases." The AI Engineering, updated Nov 06, 2026. https://theaiengineering.com/glossary/fine-tuning

Title
What is fine-tuning in LLMs? Methods and use cases
Author
The AI Engineering Editors
Publisher
The AI Engineering
Updated
View as Markdown

Part of the LLM models and benchmarks hub · Updated