---
title: "What is fine-tuning in LLMs? Methods and use cases"
description: "Fine-tuning continues training a pretrained LLM on task-specific data to change its behavior. Methods like SFT, LoRA, and RLHF, and when to choose it over RAG."
type: "glossary-term"
canonical_url: "https://theaiengineering.com/glossary/fine-tuning"
markdown_url: "https://theaiengineering.com/glossary/fine-tuning.md"
topic: "LLM models and benchmarks"
author: "The AI Engineering Editors"
publisher: "The AI Engineering"
updated: "2026-11-06"
keywords: ["Fine-tuning","fine tuning","finetuning","supervised fine-tuning","SFT"]
citation: "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"
---

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

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

> **Definition of Fine-tuning:** 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](https://theaiengineering.com/glossary/lora) | Same as SFT | Small added matrices; base weights frozen |
| Preference tuning, such as [RLHF](https://theaiengineering.com/glossary/rlhf) or DPO | Rankings of better and worse responses | Weights, shifted toward preferred outputs |
| [Knowledge distillation](https://theaiengineering.com/glossary/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](https://arxiv.org/abs/2106.09685) 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](https://theaiengineering.com/glossary/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](https://theaiengineering.com/articles/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](https://theaiengineering.com/glossary/prompt-engineering), build an evaluation set, and fine-tune only when the evaluation shows prompting has plateaued.

## Related terms

- [LoRA](https://theaiengineering.com/glossary/lora): LoRA (low-rank adaptation) is a parameter-efficient fine-tuning method that freezes a pretrained model's weights and trains small low-rank matrices added to selected layers, cutting trainable parameters and memory use.
- [RLHF](https://theaiengineering.com/glossary/rlhf): RLHF (reinforcement learning from human feedback) is a fine-tuning method that trains a reward model on human rankings of model outputs, then optimizes the language model with reinforcement learning to score highly.
- [Knowledge distillation](https://theaiengineering.com/glossary/knowledge-distillation): Knowledge distillation is a model compression technique in which a smaller student model is trained to reproduce the outputs or output probabilities of a larger, more capable teacher model.
- [Retrieval-augmented generation (RAG)](https://theaiengineering.com/glossary/retrieval-augmented-generation): Retrieval-augmented generation (RAG) is a technique that retrieves relevant passages from an external knowledge source at query time and adds them to a language model's prompt so the answer is grounded in that data.
- [Prompt engineering](https://theaiengineering.com/glossary/prompt-engineering): Prompt engineering is the practice of designing the instructions, examples, and formatting given to a large language model so it produces accurate, consistent output for a task, without changing model weights.
- [Pretraining](https://theaiengineering.com/glossary/pretraining): Pretraining is the first stage of training a language model, in which it learns to predict the next token across a large unlabeled corpus of text and code, producing a general-purpose base model.
- [Direct preference optimization](https://theaiengineering.com/glossary/direct-preference-optimization): Direct preference optimization (DPO) is a fine-tuning method that trains a language model on pairs of preferred and rejected responses with a simple classification loss, without the reward model and reinforcement learning that RLHF needs.

## Guides that cover fine-tuning

- [RAG vs fine-tuning: how to choose for your LLM application](https://theaiengineering.com/articles/rag-vs-fine-tuning): RAG vs fine-tuning: RAG adds knowledge at query time, while fine-tuning changes model behavior. Compare freshness, cost, latency, data needs, LoRA, and hybrids.
- [What is retrieval-augmented generation (RAG)? How RAG works](https://theaiengineering.com/articles/what-is-rag): Retrieval-augmented generation (RAG) grounds LLM answers in your documents. Learn the RAG pipeline, hybrid search, agentic RAG, evaluation, and failure modes.
- [AI engineer roadmap: skills, projects, and resources by stage](https://theaiengineering.com/articles/ai-engineer-roadmap): A practical AI engineer roadmap in seven stages, each with the skills to learn, a project to ship, and resources worth the time, from Python to production.
- [What is AI engineering? The discipline, the stack, and the work](https://theaiengineering.com/articles/what-is-ai-engineering): What is AI engineering? A plain definition, how it differs from ML and software engineering, the layers of the stack, and what AI engineers do day to day.

Part of the [LLM models and benchmarks](https://theaiengineering.com/topics/models) topic hub.

## 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: 2026-11-06
- URL: https://theaiengineering.com/glossary/fine-tuning
- Markdown: https://theaiengineering.com/glossary/fine-tuning.md
