What is fine-tuning in AI?
Also called: Fine tuning
In one minute
Fine-tuning means giving an AI that has already learned from lots of data (a pre-trained model) some extra training on a smaller set of data chosen for a goal, so that the numbers inside it (its parameters) shift a little.
An AI first learns broadly from huge amounts of text or images (pre-training). That takes many computers and a long time. Fine-tuning doesn’t rebuild this base from scratch; it adds training on examples for a goal, such as answering medical questions or replying in a set format. That is why it needs far less data and computing. It is also used to finish chat AIs.
But it can’t teach just anything. It is poor at adding new facts, and it can make an AI forget what it could do before or weaken its ability to refuse dangerous requests.
A common mix-up
“Fine-tuning lets you reliably teach an AI new knowledge.”
Partly right, but not “reliably.” Changing the numbers inside an AI by fine-tuning does change how it answers. But it has turned out to be poor at teaching new facts. A 2023 study (Ovadia et al.) gave an AI called Mistral 7B four-choice questions about events that happened after the AI finished training. Fine-tuning it on articles about those events only raised its score from 48.1% to 50.4%. Looking up and reading the same articles each time it answers (retrieval-augmented generation, or RAG) got 87.5%. The researchers concluded that RAG is the more reliable way to add knowledge. A 2024 study (Gekhman et al.) also reported that examples of facts the AI didn’t know were learned much more slowly than facts it already knew, and that as it learned them, it became more prone to convincing but wrong answers (hallucinations).
Explained in pictures
Think of it like this
A trained cook learning a new restaurant’s flavors
Pre-training is like spending years at cooking school, learning basics such as cutting, grilling and simmering, along with how to make many dishes. It takes a lot of time and ingredients.
Fine-tuning is like that cook starting work at a noodle shop and learning its broth and plating in a few weeks. The basics are already there, so there is no need to start over. Different shops can each add their own finish on top of the same basics.
But the comparison has limits. A person who gets used to a new shop’s ways doesn’t quickly forget the dishes they could make before. An AI, though, can suddenly lose what it could do before when it learns something new (catastrophic forgetting). And while a person picks up news heard at work right away, fine-tuning is poor at teaching an AI new facts.
Key points
Why does it take less than training from scratch?
Because pre-training has already soaked skills that help with almost any goal, such as how words are used and facts about the world, into the values of the numbers inside the AI (its parameters). For an AI, learning means adjusting a huge number of such values, little by little, so that its answers come out right. Fine-tuning starts from those numbers and only nudges them to fit the goal, so a small number of examples and a little computing are enough. Even large language models (LLMs) can sometimes be fine-tuned on just a few hundred or a few thousand examples.
In language AI, this approach spread around 2018. A paper that year (Howard and Ruder) reported that, on tasks of sorting texts into types, fine-tuning a pre-trained model with only 100 labeled examples did as well as a model trained from scratch on 100 times as many.
The same year, Google researchers (Devlin et al.) released BERT. Just by adding one answer-giving part (an output layer) to the pre-trained model and fine-tuning it, BERT set new records on 11 tasks. Pre-training its large version used about 3.3 billion words of text from books and Wikipedia and took 4 days on 16 Cloud TPUs (Google’s computers for AI). Fine-tuning, by contrast, could reproduce any result in the paper in at most an hour on a single Cloud TPU, the paper says. Each task gets its own model, but every one starts from the same pre-trained numbers.
How is it different from prompts and RAG?
All three are ways to fit an AI to a goal, but they change different things. Fine-tuning changes the numbers inside the AI itself. A prompt (the instructions given to an AI) leaves those numbers alone and shows what you want, with examples, in text. Retrieval-augmented generation (RAG) also leaves them alone and has the AI look up and read documents each time it answers.
The 2020 GPT-3 paper (Brown et al., OpenAI) named a weakness of fine-tuning: it needs thousands or tens of thousands of examples for each task. GPT-3, without changing its numbers even once, handled many tasks just by being shown what to do and about 10 to 100 examples in text (few-shot).
Because fine-tuning is poor at teaching new facts, research has found RAG the more reliable way to add knowledge (more on the “Retrieval-augmented generation (RAG)” page).
How is it used in chat AIs?
An AI that has only been pre-trained is good at continuing text, but it doesn’t necessarily answer the way it is asked. So fine-tuning is used to finish chat AIs.
InstructGPT (Ouyang et al., OpenAI, 2022) was made with two rounds of fine-tuning. First, GPT-3 was trained on model answers written by people (this is called supervised fine-tuning, because the AI is shown the right answers). Then it was fine-tuned further with reinforcement learning from human feedback (RLHF), which uses people’s rankings of the AI’s answers as a guide. When people compared them on the requests the paper collected, they preferred the answers of this 1.3-billion-parameter model to those of the 175-billion-parameter GPT-3 (more on the “Reinforcement learning” page).
The paper calls fine-tuning with human feedback a promising direction for aligning AI with human intent (AI alignment).
Do all the numbers have to be changed?
In the usual way, where every number is changed (full fine-tuning), the finished model has as many parameters as the original. Fine-tuning a big AI for each goal leaves you with many big models. Training also takes a lot of computer memory.
So there are ways to avoid changing every number (parameter-efficient fine-tuning). LoRA (Hu et al., Microsoft, 2021) freezes the original numbers, adds two small tables of numbers, and trains only those. When it is used, a table the same size as the original is calculated from the two long, thin tables and added on top of the original numbers. Because the two can be merged into one before use, answering needs no extra computing and is no slower.
Tested on GPT-3 (175 billion parameters), compared with changing every number, it cut the numbers to be trained to about 1/10,000 and the memory of the GPUs (the chips used for AI computing; memory is where the numbers being worked on are kept) needed for training to about a third, from 1.2 TB to 350 GB. What has to be saved for each goal shrank from 350 GB to about 35 MB. Even so, on the tasks in the paper, its results were as good as or better than changing every number.
Can it forget what it learned before?
Yes. When a neural network changes its numbers to fit a new task, it can also change numbers that were important for an earlier task, and suddenly lose the ability to do it. This problem, pointed out in a 1989 paper and others, is called “catastrophic forgetting.”
It happens in large language models too. A 2023 study (Luo et al.) found it widely: when language AIs with 1 to 7 billion parameters were fine-tuned on one task after another, they lost knowledge they had, along with reasoning and reading skills. Within that range of sizes, it says, the bigger the model, the worse the forgetting.
There are ways to forget less. A 2017 study (Kirkpatrick et al., DeepMind and others) showed that if the numbers most important for earlier tasks are made harder to move during learning, a network can learn a new task while keeping its skill at the old ones.
Can safety training wear off?
Yes. Chat AIs are trained to refuse dangerous requests, but fine-tuning them afterward can weaken that. A 2023 study (Qi et al., Princeton University and others) fine-tuned GPT-3.5 Turbo through OpenAI’s fine-tuning service (API) on just 10 deliberately made examples. For less than $0.20, it came to answer nearly any dangerous request.
It can happen without bad intent, too. In the same study, just fine-tuning GPT-3.5 Turbo on a commonly used dataset of instructions and answers (Alpaca) raised the share of answers judged harmful, on a test of dangerous requests, from 5.5% to 31.8%. The researchers write that current safety measures fall short of handling the risks that fine-tuning brings.
Unlike the more familiar “jailbreaking,” which slips past the safeguards through the wording of a request, here the training itself loosens them (more on the “Jailbreaking” page).
Check yourself
Q1What does “fine-tuning” an AI usually mean?
Answer and explanation
Answer: B Nudging the numbers of a trained AI a little
Fine-tuning starts from the numbers inside an AI that has already learned from lots of data (a pre-trained model) and nudges them a little with a smaller set of data chosen for a goal. Because it doesn’t train from scratch, it needs far less data and computing. Keeping the numbers and improving the wording of a request is prompting, which is a different approach.
Q2LoRA, announced in 2021, is one way to fine-tune a big AI. Which numbers (parameters) does LoRA change during training?
Answer and explanation
Answer: C Only added numbers; the originals stay fixed
LoRA freezes the original numbers set in pre-training, adds two small tables of numbers, and trains only those. In the paper’s tests on GPT-3 (175 billion parameters), the numbers to be trained fell to about 1/10,000 and the memory needed to about a third, with results as good as or better than changing every number.
More on this → Key points: Do all the numbers have to be changed?
Q3In a 2023 study, a chat AI trained to refuse dangerous requests (GPT-3.5 Turbo) was fine-tuned on deliberately harmful examples and on ordinary everyday data, and its answers to dangerous requests were tested. What did the study find?
Answer and explanation
Answer: A Even ordinary data weakened its refusals
Ten deliberately harmful examples made it answer almost any dangerous request, but that was not all. Even fine-tuning on harmless, ordinary data (Alpaca) raised the share of answers judged harmful, on a test of dangerous requests, from 5.5% to 31.8%. Changing the numbers inside an AI by fine-tuning can also weaken the ability to refuse dangerous requests that it learned before.
Related terms
- Large language model
- Parameter
- Retrieval-augmented generation (RAG)
- Prompt
- Reinforcement learning
- AI alignment
- Jailbreaking
- Hallucination
- Machine learning
- Deep learning
- Hyperparameter
- Pre-training
- Transfer learning
Sources and how we checked
- Google, "Machine Learning Glossary" (entries for fine-tuning, pre-training, parameter-efficient tuning and LoRA; read November 9, 2026)
- Google, "LLMs: Fine-tuning, distillation, and prompt engineering" (Machine Learning Crash Course; read November 9, 2026)
- Howard and Ruder, "Universal Language Model Fine-tuning for Text Classification" (ULMFiT; arXiv, January 2018; read November 9, 2026)
- Devlin et al., "BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding" (Google AI Language; arXiv, October 2018; abstract and the sections on pre-training and fine-tuning time; read November 9, 2026)
- Brown et al., "Language Models are Few-Shot Learners" (GPT-3; OpenAI; arXiv, May 2020; abstract and Section 2; read November 9, 2026)
- Ouyang et al., "Training language models to follow instructions with human feedback" (InstructGPT; OpenAI; arXiv, March 2022; read November 9, 2026)
- Hu et al., "LoRA: Low-Rank Adaptation of Large Language Models" (Microsoft; arXiv, June 2021; abstract and Section 4; read November 9, 2026)
- Kirkpatrick et al., "Overcoming catastrophic forgetting in neural networks" (DeepMind and Imperial College London; PNAS, March 2017; arXiv, December 2016; the introduction, citing McCloskey and Cohen 1989 and others; read November 9, 2026)
- Luo et al., "An Empirical Study of Catastrophic Forgetting in Large Language Models During Continual Fine-tuning" (arXiv, August 2023; read November 9, 2026)
- Ovadia et al., "Fine-Tuning or Retrieval? Comparing Knowledge Injection in LLMs" (Microsoft; arXiv, December 2023; Table 2, "Current Events"; read November 9, 2026)
- Gekhman et al., "Does Fine-Tuning LLMs on New Knowledge Encourage Hallucinations?" (Google Research and Technion; arXiv, May 2024; read November 9, 2026)
- Qi et al., "Fine-tuning Aligned Language Models Compromises Safety, Even When Users Do Not Intend To!" (Princeton University, Virginia Tech, IBM Research and Stanford University; arXiv, October 2023; abstract and Table 3; read November 9, 2026)
- Microsoft Learn, Japanese page on supervised fine-tuning in Microsoft Foundry (for the Japanese name “bichōsei,” fine adjustment; read November 9, 2026)
AI wrote this page from the sources above, and a different AI checked it against the text of those sources (November 9, 2026). A person with a master’s degree in science and a Japanese high-school science teaching license also read and checked it before publishing. Numbers are as of that date. If anything was hard to follow, you spot a mistake, or there’s a term you’d like explained, please write to [email protected].
AI terms
- AI agent
- Artificial general intelligence (AGI)
- Artificial intelligence (AI)
- Context window
- Deep learning
- You are hereFine-tuning
- Generative AI
- Hallucination
- Hyperparameter
- Intelligence explosion
- Large language model (LLM)
- Machine learning
- Mixture of experts (MoE)
- Neural network
- Parameter
- Prompt
- Prompt injection
- Reasoning model
- Recursive self-improvement (RSI)
- Reinforcement learning (RL)
- Retrieval-augmented generation (RAG)
- Superintelligence (ASI)
- Technological singularity
- Token
- Transformer