Guide
What Is Fine-Tuning?
A plain-English guide to fine-tuning AI models: what fine-tuning is, how it works, the main types including LoRA and preference tuning, how it compares with RAG and prompting, where you can fine-tune a model and what it costs, and the risks.
Definition: Fine-tuning is extra training given to an AI model that has already been trained, using a much smaller set of examples chosen for one job. It changes the model’s weights, the numbers that hold what it has learned, so the model behaves differently afterwards: it sticks to a format, takes on a tone or gets better at a narrow task.
Fine-tuning a large language model (LLM) is how a general model is specialised without building a new one. The chat assistants themselves are products of it: Anthropic’s glossary says Claude “is not a bare language model; it has already been fine-tuned to be a helpful assistant”. The short version of when to use it: fine-tune to change how a model behaves, and use retrieval (RAG) to give it facts. Research backs that split. A 2023 study by Ovadia and colleagues found that RAG “consistently outperforms” unsupervised fine-tuning for adding knowledge to a model.
This page explains fine-tuning: how it works, its main types, how it compares with the alternatives and where it can be done. For the models being fine-tuned, see what is an LLM. For the retrieval alternative in depth, see what is RAG. For one-line definitions of the surrounding terms, see the AI glossary.
What is fine-tuning?
Every modern language model is built in stages. The first, pre-training, is the expensive one: the model reads trillions of words and learns to predict the next token, as the machine learning guide explains. Fine-tuning is any training that comes after that, on a narrower set of examples, to point the model at a particular job.
| Pre-training | Fine-tuning | |
|---|---|---|
| Starting point | A model with random weights | A model that is already trained |
| Data | Trillions of tokens of general text | Hundreds to millions of examples chosen for one purpose |
| What it teaches | Language, facts and general skills | A behaviour, format, tone or narrow skill |
| Who does it | The AI lab that builds the model | The lab, or a company or developer adapting the model |
| Cost | Weeks or months on thousands of chips | Minutes to days, often on one to a few chips |
Anthropic’s glossary defines fine-tuning as “the process of further training a pretrained language model using additional data”, which causes the model “to start representing and mimicking the patterns and characteristics of the fine-tuning dataset” (Anthropic).
The idea is older than chatbots. In January 2018, Jeremy Howard and Sebastian Ruder showed with their ULMFiT method that a language model pre-trained on general text and then fine-tuned for one task, “with only 100 labeled examples”, matched “the performance of training from scratch on 100x more data”. Pre-train once, fine-tune many times has been the pattern ever since.
How fine-tuning works
Fine-tuning uses the same learning process as pre-training, run for much less time on much less data.
- Collect examples. Each example shows the model an input and the output you want. For a support bot, that might be a customer question paired with the answer your best agent would write.
- Run the training. The model attempts each example, its output is compared with the target, and its weights are nudged so its next attempt is a little closer. The neural network guide explains how those nudges work.
- Test it. The fine-tuned model is checked against examples it did not train on, to see whether it learned the pattern or only memorised the training set.
- Use it. The result is a new version of the model, which is then run like any other. Every answer it gives after that is ordinary inference.
OpenAI’s documentation lists what a team gets from this that a prompt alone does not give: training on more examples than fit in one prompt, shorter prompts that cut cost and delay, the use of sensitive data without sending it with every request, and a smaller, cheaper model trained to do one task well (OpenAI).
Types of fine-tuning
Fine-tuning methods differ in two ways: what the training data looks like, and how much of the model is changed.
By the kind of training data
| Method | Training data | Typical use | Source |
|---|---|---|---|
| Supervised fine-tuning (SFT) | Example inputs, each with a correct response | Classification, a fixed output format, following instructions more reliably | OpenAI |
| Instruction tuning | Many different instructions, each with a good response | Turning a raw text predictor into an assistant | InstructGPT paper |
| Preference fine-tuning (DPO) | A prompt with a better and a worse response | Getting the tone right, or summaries that stress the right points | OpenAI |
| Reinforcement fine-tuning | Tasks whose answers can be scored automatically | Improving reasoning on problems with a checkable answer | Google Cloud |
| Vision fine-tuning | Images with the desired response | Image classification and other image-understanding tasks | OpenAI |
Instruction tuning and preference training are the steps that turn a raw model into a chat assistant. OpenAI’s InstructGPT paper found that people preferred the answers of a 1.3-billion-parameter model trained this way to those of the 175-billion-parameter GPT-3, a model more than 100 times larger. The LLM guide covers how the labs use these stages.
By how much of the model changes
Full fine-tuning updates every weight in the model. It gives the most room to change the model, but it needs as much memory as training the model in the first place and produces a full-size copy for every task.
Parameter-efficient fine-tuning (PEFT) freezes the original weights and trains a small number of extra ones instead. Hugging Face, which publishes a PEFT library, says the approach cuts computing and storage costs “significantly” while “yielding performance comparable to a fully fine-tuned model”, and makes it possible to train large models “on consumer hardware” (Hugging Face).
LoRA and QLoRA
LoRA, short for low-rank adaptation, is a parameter-efficient method that adds small trainable layers alongside the frozen model and trains only those. Together AI uses it as its default fine-tuning approach (Together AI), and Tinker is built on it (Thinking Machines). Edward Hu and colleagues introduced it in June 2021, reporting that against full fine-tuning of GPT-3 175B, “LoRA can reduce the number of trainable parameters by 10,000 times and the GPU memory requirement by 3 times.”
QLoRA, published by Tim Dettmers and colleagues in May 2023, stores the frozen model in a compressed, lower-precision form before adding the LoRA layers. The authors say this “reduces memory usage enough to finetune a 65B parameter model on a single 48GB GPU”.
LoRA has a trade-off. A 2024 study by Biderman and colleagues, titled “LoRA Learns Less and Forgets Less”, found that “in the standard low-rank settings, LoRA substantially underperforms full finetuning”, but keeps more of the original model’s abilities outside the task it was trained for.
RAG vs fine-tuning
RAG and fine-tuning are both ways to make a general model work better on your own material, and they change different things. RAG changes what the model is shown each time it answers. Fine-tuning changes the model itself.
| RAG | Fine-tuning | |
|---|---|---|
| What changes | The text passed to the model with each question | The model’s weights |
| Best for | Facts: large, changing or private documents | Behaviour: format, tone, style or one narrow skill |
| Keeping it up to date | Add or remove documents | Train the model again |
| Can it cite sources? | Yes, it can point to the passages it used | No |
| Upfront work | Building a search index over your documents | Writing and checking training examples |
| Can you do it with any model? | Yes, with any model that takes a long enough prompt | Only with models whose maker or host offers fine-tuning, or open-weight models |
Why fine-tuning is poor at adding facts
Two studies found that fine-tuning is a weak way to teach a model new facts.
- RAG did better. Ovadia and colleagues compared RAG with unsupervised fine-tuning, training on raw text, for adding knowledge and found RAG “consistently outperforms” it, “both for existing knowledge encountered during training and entirely new knowledge”. They also found that models have difficulty picking up new facts through fine-tuning, and that training on many differently worded versions of the same fact may help.
- New facts can raise hallucination. A team led by Zorik Gekhman reported in 2024 that “large language models struggle to acquire new factual knowledge through fine-tuning”, and that once a model does learn examples containing new facts, they “linearly increase the model’s tendency to hallucinate”. The authors conclude that models learn most of their knowledge in pre-training, and that fine-tuning mostly teaches them to use it.
When to use which
- Use RAG when the model needs to answer from documents, especially ones that change, or when answers must cite their sources. The RAG guide explains how it works.
- Use fine-tuning when the model knows enough but behaves wrongly: it misses a strict output format, uses the wrong tone, or needs long instructions in every prompt to do one task.
- Use both when you need a model with a set behaviour that also answers from current documents. A fine-tuned model can be the one that reads the retrieved passages.
Most companies use neither. Menlo Ventures’ December 2025 survey of 495 US enterprise AI decision-makers found that “prompt design remains the dominant technique, followed by retrieval-augmented generation”, while fine-tuning was “still niche and used primarily by frontier teams”.
Fine-tuning vs prompting
A better prompt is the cheapest thing to try first, and the providers say so. OpenAI’s documentation recommends writing tests to measure how well a model does, then improving the prompt, and treats fine-tuning as an extra step “for some use cases” (OpenAI). The prompt engineering guide covers what makes a prompt work.
| Better prompt | Fine-tuning | |
|---|---|---|
| Time to try | Minutes | Hours to days, plus time to prepare the data |
| Cost | None beyond normal use | Training cost, plus the cost of running the fine-tuned model |
| Examples it can use | As many as fit in the prompt | Thousands or more |
| Prompt length afterwards | Long, with instructions and examples in every request | Shorter, because the behaviour is built in |
| Works on the newest models | Yes | Only where fine-tuning is offered for that model |
Where can you fine-tune a model?
Of OpenAI, Google and Anthropic, only Google offers fine-tuning of its models to new customers, on its cloud platform. Open-weight models can be fine-tuned by anyone, through a hosting company or on their own hardware.
| Provider | What can be fine-tuned | Methods | Status |
|---|---|---|---|
| OpenAI | GPT-4.1, GPT-4.1 mini and GPT-4.1 nano; GPT-4o for images | Supervised, preference (DPO), vision | Closed to new customers since 7 May 2026; active existing customers can create jobs until 6 January 2027 (OpenAI) |
| Gemini 3.5 Flash, Gemini 3.5 Flash-Lite, Gemini 3.1 Flash-Lite and the Gemini 2.5 models | Supervised; preference on Gemini 2.5 Flash and Flash-Lite; reinforcement on Gemini 3.5 Flash and 3.1 Flash-Lite | Available on Gemini Enterprise Agent Platform, formerly Vertex AI (Google Cloud); not in the Gemini API or AI Studio (Google) | |
| Anthropic | No Claude model on the Claude API | None offered | ”The Claude API does not currently offer fine-tuning” (Anthropic) |
| Amazon Bedrock | Amazon Nova models, Meta Llama 3.1 to 3.3 models and Claude 3 Haiku | Fine-tuning | Available (AWS) |
| Together AI | Open-weight models including Qwen, Llama, Gemma 4, gpt-oss, DeepSeek and Kimi | LoRA on all of them, full fine-tuning on some; supervised or preference (DPO) | Available (Together AI) |
| Thinking Machines Tinker | Open-weight models including Inkling, Qwen, gpt-oss, Kimi, GLM and DeepSeek | LoRA, with your own training code; saved weights can be downloaded | Available (Thinking Machines) |
| Your own hardware | Any open-weight model | Any, using libraries such as Hugging Face PEFT | Depends on your hardware |
OpenAI began closing its fine-tuning platform in May 2026. Organisations that had never run fine-tuning lost access on 7 May 2026, and organisations that had not used a fine-tuned model in the previous 60 days lost it on 2 July 2026. Active customers can create fine-tuning jobs until 6 January 2027. OpenAI says “inference on fine-tuned models will be disabled only when the underlying base model is deprecated” (OpenAI). Google says it has no “immediate plans” to bring fine-tuning back to the Gemini API (Google).
On Amazon Bedrock, models move to a Legacy status before they are retired, and “after the model is in Legacy state, you cannot create new fine-tuning jobs on that model” (AWS).
For why open-weight models can be fine-tuned freely, see open-source AI. For the open models themselves, see best open-source LLMs and, for models that run on a single machine, best local LLMs.
How much does fine-tuning cost?
Fine-tuning is priced per million training tokens. Together AI, for example, counts the tokens in the training set multiplied by the number of passes the model makes over it, called epochs, plus the tokens in any test set it is checked against (Together AI). The tokens guide explains how text is counted. Hosted services charge for the training run, then for running the fine-tuned model.
| Provider | Model | Training per 1M tokens | Running the fine-tuned model, per 1M input / output tokens |
|---|---|---|---|
| OpenAI | GPT-4.1 | $25.00 | $3.00 / $12.00 |
| OpenAI | GPT-4.1 mini | $5.00 | $0.80 / $3.20 |
| OpenAI | GPT-4o mini | $3.00 | $0.30 / $1.20 |
| Together AI | Llama 3.1 8B, LoRA, supervised | $0.34, minimum $4 per job | Hosting priced separately |
| Together AI | Llama 3.3 70B, LoRA, supervised | $2.03, minimum $4 per job | Hosting priced separately |
| Thinking Machines | Qwen3-8B | $0.44 | Sampling on Tinker: $0.60 |
| Thinking Machines | Inkling 2 Mini, 64K context | $0.75 | Sampling on Tinker: $0.50 |
A worked example, using those prices: a training set of 2,000 examples of 500 tokens each is 1 million tokens. Trained for three epochs with LoRA on Together AI, that is 3 million training tokens: $6.09 on Llama 3.3 70B. On Llama 3.1 8B the same run comes to $1.02, below the $4 minimum, so the job costs $4. On OpenAI, each million training tokens costs $5 on GPT-4.1 mini and $25 on GPT-4.1. Preference (DPO) training costs more than supervised training on Together AI: $0.84 against $0.34 per million tokens for Llama 3.1 8B (Together AI).
Running a model on your own hardware has no per-token bill, but you pay for the chips and the electricity. QLoRA brought fine-tuning a 65-billion-parameter model within reach of one 48GB graphics card (Dettmers et al.).
The risks of fine-tuning
Fine-tuning changes the whole model, and some of the changes are not the ones intended.
- Forgetting. A fine-tuned model can lose some of what it could do before. Biderman and colleagues found full fine-tuning causes more of this forgetting than LoRA (Biderman et al.).
- More hallucination. Training a model on facts it did not already know can make it more likely to make things up (Gekhman et al.).
- Weaker safety training. Xiangyu Qi and colleagues found in October 2023 that fine-tuning on ordinary, harmless datasets can “inadvertently degrade the safety alignment of LLMs”, so a model’s original safety behaviour cannot be assumed to survive fine-tuning.
- Unexpected side effects. A 2025 study by Betley and colleagues fine-tuned a model to write insecure code without saying so, and found it then behaved badly on prompts that had nothing to do with code. The authors write that “training on the narrow task of writing insecure code induces broad misalignment”, an effect they call emergent misalignment.
- Overfitting. A model trained too long on too few examples can memorise them and do worse on anything new, which is why fine-tuned models are tested on examples held back from training. The machine learning guide explains overfitting.
- Tied to one model. A fine-tuned model is a modified copy of one base model. When that base model is retired, the fine-tuned version goes with it, as both OpenAI’s and Amazon’s policies state.
The AI safety guide covers the wider research into how models are trained to behave safely.
A short history of fine-tuning
| Date | Event |
|---|---|
| 18 January 2018 | Jeremy Howard and Sebastian Ruder publish ULMFiT, showing a pre-trained language model can be fine-tuned for a task with very little labelled data |
| 17 June 2021 | Edward Hu and colleagues publish LoRA, cutting the number of trained parameters by up to 10,000 times |
| 4 March 2022 | OpenAI’s InstructGPT paper shows instruction tuning and human feedback make a small model preferable to one more than 100 times larger |
| 23 May 2023 | The QLoRA paper shows a 65-billion-parameter model can be fine-tuned on a single 48GB GPU |
| 20 August 2024 | OpenAI opens fine-tuning for GPT-4o at $25 per million training tokens |
| May 2025 | Google retires Gemini 1.5 Flash-001, after which no model in the Gemini API can be fine-tuned (Google) |
| 7 May 2026 | OpenAI closes its fine-tuning platform to new organisations (OpenAI) |
For what has launched since, see the AI changelog.
Frequently asked questions
What is fine-tuning in simple terms?
Fine-tuning is giving an already-trained AI model a short extra round of training on examples of one particular job, so it gets better at that job. It changes the model’s weights, the numbers that hold what it has learned. A company might fine-tune a model on its best support replies so the model answers in the same format and tone.
What is the difference between RAG and fine-tuning?
RAG changes what a model is shown when it answers, by searching your documents and passing the relevant passages to it. Fine-tuning changes the model itself by training it further. RAG is better for facts that change or must be cited. Fine-tuning is better for changing a model’s format, tone or behaviour, and studies have found it is a poor way to teach a model new facts.
Is fine-tuning better than RAG?
Not for adding knowledge. A 2023 study by Ovadia and colleagues found RAG “consistently outperforms” unsupervised fine-tuning for adding facts to a model, both for facts the model had seen before and entirely new ones. Fine-tuning is the better choice when the problem is how a model behaves rather than what it knows, and the two can be used together.
Can you fine-tune ChatGPT?
You cannot fine-tune the ChatGPT app. OpenAI let developers fine-tune some of its models through its API, including GPT-4.1 and GPT-4o, but it closed the service to new organisations on 7 May 2026. Active existing customers can create fine-tuning jobs until 6 January 2027, and models already fine-tuned keep working until their base model is retired.
Can you fine-tune Claude?
Not through Anthropic’s own API. Anthropic’s documentation says “the Claude API does not currently offer fine-tuning” and tells interested customers to ask their Anthropic contact. Amazon Bedrock lists one Claude model for fine-tuning, the older Claude 3 Haiku.
What is LoRA fine-tuning?
LoRA, or low-rank adaptation, is a cheaper way to fine-tune a model. It freezes the original weights and trains a small set of extra ones alongside them. Its creators reported that, against full fine-tuning of GPT-3 175B, LoRA cut the number of trained parameters by 10,000 times and the GPU memory needed by three times.
How much data do you need to fine-tune an LLM?
It depends on the task, and there is no fixed minimum. Fine-tuning needs far less data than pre-training, which uses trillions of tokens. In the 2018 ULMFiT study, 100 labelled examples matched the results of training from scratch on 100 times more data. The 2024 study by Biderman and colleagues used about 100,000 prompt-and-response pairs for instruction fine-tuning.
How much does it cost to fine-tune a model?
Hosted fine-tuning is charged per million training tokens. OpenAI lists $5 per million for GPT-4.1 mini and $25 for GPT-4.1. Together AI lists $2.03 per million for supervised LoRA fine-tuning of Llama 3.3 70B and $0.34 for Llama 3.1 8B, with a $4 minimum per job, and counts the training set once for each pass the model makes over it. Running the fine-tuned model is charged on top.
Can I fine-tune a model on my own computer?
Yes, with an open-weight model and enough graphics memory. Parameter-efficient methods make it practical: QLoRA’s authors fine-tuned a 65-billion-parameter model on a single 48GB GPU, and smaller models need much less. Hugging Face’s PEFT library is a common tool for this.
Does fine-tuning make a model less safe?
It can. Researchers found in 2023 that fine-tuning on ordinary, harmless data can weaken a model’s safety training without anyone intending it, and a 2025 study found that fine-tuning a model on one narrow bad behaviour made it behave badly on unrelated tasks. The 2023 authors concluded that a model’s original safety training is not necessarily kept after fine-tuning.