Explainer
How fine-tuning works: adapting AI models with LoRA and more
Fine-tuning is extra training that adapts a pre-trained "foundation" model to a specific task, sometimes with just a few hundred or a few thousand examples.[1][2] Updating every parameter is expensive, so parameter-efficient methods such as LoRA freeze the original weights and train small add-on matrices instead; LoRA's authors cut trainable parameters by 10,000 times when adapting GPT-3.[3][4] Fine-tuning has side effects: models can forget earlier knowledge, and a 2023 study found it can weaken safety training, even with benign data.[5][6]
This page covers adapting an existing model. For how the underlying models are trained in the first place, see how large language models work.
From foundation model to specialist
A pre-trained language model knows a great deal about language but is not built for any one job.[1] Google’s machine learning course says such a foundation model serves as a platform rather than a solution, and that turning it into one that meets an application’s needs requires fine-tuning.[1] Fine-tuning trains on examples specific to the task, and Google says engineers can sometimes do it with just a few hundred or a few thousand examples.[2]
The same pattern applies beyond text. Google’s glossary gives the example of a large image model pre-trained on a vast general image dataset and then fine-tuned to do something specific, such as generate images of orcas.[7]
Full fine-tuning and its costs
Fine-tuning can change all of a model’s parameters, which is called full fine-tuning, change only some of them, or add new layers on top.[8] Google says standard fine-tuning is often computationally expensive because it updates every parameter on each round of training, and the result is just as large as the original model.[3]
Parameter-efficient methods: LoRA and QLoRA
Parameter-efficient tuning adjusts far fewer parameters than full fine-tuning yet generally produces a model that performs as well or almost as well, according to Google’s glossary.[9]
The best-known method is LoRA, short for Low-Rank Adaptation. The 2021 paper freezes the pre-trained weights and inserts small trainable matrices into each layer of the Transformer; compared with fully fine-tuning GPT-3 175B, this cut the number of trainable parameters by 10,000 times and GPU memory needs by 3 times.[4] Its authors reported quality on par with or better than full fine-tuning on several models, with no extra delay when the model runs.[10] Because the base model is unchanged, Google notes that many specialized LoRA versions can share one base model when served, reducing the cost of inference.[11]
QLoRA, published in 2023, goes further by training LoRA adapters on top of a frozen copy of the model compressed to 4-bit precision.[12] Its authors said this reduced memory enough to fine-tune a 65-billion-parameter model on a single 48GB GPU while preserving the task performance of full 16-bit fine-tuning.[12] For the difference between models whose weights are released and those that are not, see open-weight and closed models.
Instruction tuning and human feedback
Google’s glossary describes instruction tuning as fine-tuning a model on instruction prompts covering a wide variety of tasks, to improve how well it follows instructions.[13] OpenAI’s InstructGPT was trained in two stages: supervised fine-tuning on human-written demonstrations, then reinforcement learning from human feedback using human rankings of model outputs.[14] In human evaluations, the 1.3-billion-parameter InstructGPT’s outputs were preferred to those of the 175-billion-parameter GPT-3.[15] For how this connects to making AI behave as intended, see AI alignment.
Alternatives: prompting, retrieval and distillation
Fine-tuning is not the only way to customize a model. Prompt engineering, such as showing the model a few examples in the prompt, does not change its parameters at all.[16] Retrieval-augmented generation instead gives the model access to knowledge it was not trained on at the moment it answers.[17] Distillation goes the other way, making a smaller and faster model: usually a large teacher model labels data used to train a smaller student, whose predictions are generally not quite as good.[18]
Risks: forgetting and weakened safeguards
Training on new material can erode old abilities.[5] A 2023 study observed this catastrophic forgetting, where a model loses previously learned knowledge while learning new tasks, in language models of 1 billion to 7 billion parameters during continual instruction tuning.[5]
Fine-tuning can also undo safety training.[6] A 2023 study found that fine-tuning GPT-3.5 Turbo on only 10 adversarial examples, at a cost of under $0.20 through OpenAI’s API, removed its safety guardrails, and that fine-tuning on ordinary benign datasets could also degrade safety alignment, though to a lesser extent.[6] For the wider field, see AI safety.
Read next
Open-weight vs closed AI models, explained
What model weights are, how open-weight, open-source and closed AI models differ, the main licences, and the safety and competition debate.
Questions readers ask
What is fine-tuning in AI?
Additional training of a pre-trained model on examples specific to the task an application will perform. Google says it is what turns a general foundation model into a solution for a particular need.[1][2]
How much data does fine-tuning need?
Google says engineers can sometimes fine-tune a foundation language model on just a few hundred or a few thousand training examples.[2]
What is LoRA?
Low-Rank Adaptation, a 2021 method that freezes a model's pre-trained weights and adds small trainable matrices to each Transformer layer. Compared with fully fine-tuning GPT-3 175B, it cut trainable parameters by 10,000 times and GPU memory needs by 3 times.[4]
Is fine-tuning the same as prompting?
No. Prompt engineering, such as giving a model a few examples in the prompt, does not change the model's parameters. Fine-tuning does.[16][3]
Can fine-tuning make a model less safe?
Yes. A 2023 study found that fine-tuning GPT-3.5 Turbo on 10 adversarial examples, costing under $0.20, undid its safety guardrails, and that fine-tuning on ordinary benign data could also weaken safety alignment to a lesser extent.[6]
What is distillation?
A way to make a smaller, faster model. Usually a large teacher model labels data that is used to train a smaller student model, whose predictions are generally not quite as good.[18]
Sources
· 18 claims from 3 publishers
Each numbered claim is a statement we checked against the sources listed with it. Tap a number in the text to see its sources in place.
- [1]
Google's machine learning course says a foundation (pre-trained) language model is a platform rather than a solution, and turning it into one that meets an application's needs requires fine-tuning. confirmedas of 2026-11-14
- LLMs: Fine-tuning, distillation, and prompt engineering (Machine Learning Crash Course) · Google for Developers · Primary source · LLMs: Fine-tuning, distillation, and prompt engineering (retrieved 2026-11-14)
- LLMs: Fine-tuning, distillation, and prompt engineering (Machine Learning Crash Course) · Google for Developers · Primary source · LLMs: Fine-tuning, distillation, and prompt engineering (retrieved 2026-11-14)
- [2]
Google says fine-tuning trains on examples specific to the task and can sometimes use just a few hundred or a few thousand training examples. confirmedas of 2026-11-14
- LLMs: Fine-tuning, distillation, and prompt engineering (Machine Learning Crash Course) · Google for Developers · Primary source · Fine-tuning (retrieved 2026-11-14)
- [3]
Google says standard fine-tuning is often computationally expensive because it updates every parameter on each backpropagation iteration, and the fine-tuned model has the same number of parameters as the original. confirmedas of 2026-11-14
- LLMs: Fine-tuning, distillation, and prompt engineering (Machine Learning Crash Course) · Google for Developers · Primary source · Fine-tuning (retrieved 2026-11-14)
- LLMs: Fine-tuning, distillation, and prompt engineering (Machine Learning Crash Course) · Google for Developers · Primary source · Fine-tuning (retrieved 2026-11-14)
- [4]
The 2021 LoRA paper freezes a model's pre-trained weights and adds small trainable matrices to each Transformer layer; compared with fully fine-tuning GPT-3 175B, it cut trainable parameters by 10,000 times and GPU memory needs by 3 times. confirmedas of 2021-06-17
- LoRA: Low-Rank Adaptation of Large Language Models · arXiv · Primary source · 2021-06-17 · Abstract (retrieved 2026-11-14)
- LoRA: Low-Rank Adaptation of Large Language Models · arXiv · Primary source · 2021-06-17 · Abstract (retrieved 2026-11-14)
- [5]
A 2023 study observed catastrophic forgetting, where a model loses previously learned knowledge as it learns new tasks, in language models of 1 billion to 7 billion parameters during continual instruction tuning. confirmedas of 2023-08-17
- An Empirical Study of Catastrophic Forgetting in Large Language Models During Continual Fine-tuning · arXiv · Primary source · 2023-08-17 · Abstract (retrieved 2026-11-14)
- An Empirical Study of Catastrophic Forgetting in Large Language Models During Continual Fine-tuning · arXiv · Primary source · 2023-08-17 · Abstract (retrieved 2026-11-14)
- [6]
A 2023 study found that fine-tuning GPT-3.5 Turbo on only 10 adversarial examples, at a cost of under $0.20, undid its safety guardrails, and that fine-tuning on ordinary benign datasets could also degrade safety alignment to a lesser extent. confirmedas of 2023-10-05
- Fine-tuning Aligned Language Models Compromises Safety, Even When Users Do Not Intend To! · arXiv · Primary source · 2023-10-05 · Abstract (retrieved 2026-11-14)
- Fine-tuning Aligned Language Models Compromises Safety, Even When Users Do Not Intend To! · arXiv · Primary source · 2023-10-05 · Abstract (retrieved 2026-11-14)
- [7]
Google's glossary gives the example of a large image model pre-trained on a vast general image dataset and then fine-tuned for a specific task such as generating images of orcas. confirmedas of 2026-11-14
- Machine Learning Glossary · Google for Developers · Primary source · Glossary, fine-tuning (retrieved 2026-11-07)
- [8]
Google's glossary says fine-tuning can modify all of a pre-trained model's parameters (full fine-tuning), modify only some of them, or add new layers on top of the existing ones. confirmedas of 2026-11-14
- Machine Learning Glossary · Google for Developers · Primary source · Glossary, fine-tuning (retrieved 2026-11-07)
- Machine Learning Glossary · Google for Developers · Primary source · Glossary, fine-tuning (retrieved 2026-11-07)
- Machine Learning Glossary · Google for Developers · Primary source · Glossary, fine-tuning (retrieved 2026-11-07)
- [9]
Google's glossary says parameter-efficient tuning typically adjusts far fewer parameters than full fine-tuning yet generally produces a model that performs as well or almost as well. confirmedas of 2026-11-14
- Machine Learning Glossary · Google for Developers · Primary source · Glossary, parameter-efficient tuning (retrieved 2026-11-07)
- [10]
The LoRA authors reported quality on par with or better than full fine-tuning on RoBERTa, DeBERTa, GPT-2 and GPT-3, with no extra inference latency. confirmedas of 2021-06-17
- LoRA: Low-Rank Adaptation of Large Language Models · arXiv · Primary source · 2021-06-17 · Abstract (retrieved 2026-11-14)
- LoRA: Low-Rank Adaptation of Large Language Models · arXiv · Primary source · 2021-06-17 · Abstract (retrieved 2026-11-14)
- [11]
Google's glossary says LoRA can reduce the cost of inference by letting multiple specialized models share the same base model. confirmedas of 2026-11-14
- Machine Learning Glossary · Google for Developers · Primary source · Glossary, Low-Rank Adaptability (LoRA) (retrieved 2026-11-07)
- [12]
The 2023 QLoRA method fine-tunes LoRA adapters on top of a frozen model compressed to 4-bit precision, reducing memory enough to fine-tune a 65-billion-parameter model on a single 48GB GPU while preserving 16-bit task performance. confirmedas of 2023-05-23
- QLoRA: Efficient Finetuning of Quantized LLMs · arXiv · Primary source · 2023-05-23 · Abstract (retrieved 2026-11-14)
- QLoRA: Efficient Finetuning of Quantized LLMs · arXiv · Primary source · 2023-05-23 · Abstract (retrieved 2026-11-14)
- [13]
Google's glossary describes instruction tuning as a form of fine-tuning that trains a model on instruction prompts covering a wide variety of tasks, to improve its ability to follow instructions. confirmedas of 2026-11-14
- Machine Learning Glossary · Google for Developers · Primary source · Glossary, instruction tuning (retrieved 2026-11-07)
- [14]
InstructGPT was trained in two stages, supervised fine-tuning on human-written demonstrations and then reinforcement learning from human feedback (RLHF) using human rankings of model outputs. confirmedas of 2022-03-04
- Training language models to follow instructions with human feedback · arXiv (Ouyang et al.) · Primary source · 2022-03-04 · Abstract (retrieved 2026-10-10)
- [15]
In human evaluations, outputs of the 1.3-billion-parameter InstructGPT model were preferred to those of the 175-billion-parameter GPT-3, despite it having 100 times fewer parameters. confirmedas of 2022-03-04
- Training language models to follow instructions with human feedback · arXiv (Ouyang et al.) · Primary source · 2022-03-04 · Abstract (retrieved 2026-10-10)
- [16]
Google notes that prompt engineering, such as giving a model a few examples in the prompt, does not change the model's parameters. confirmedas of 2026-11-14
- LLMs: Fine-tuning, distillation, and prompt engineering (Machine Learning Crash Course) · Google for Developers · Primary source · Prompt engineering (retrieved 2026-11-14)
- LLMs: Fine-tuning, distillation, and prompt engineering (Machine Learning Crash Course) · Google for Developers · Primary source · Prompt engineering (retrieved 2026-11-14)
- [17]
Google lists common reasons to use RAG, including giving the model knowledge it was not trained on and letting it cite sources. confirmedas of 2026-11-14
- Machine Learning Glossary · Google for Developers · Primary source · Glossary, retrieval-augmented generation (retrieved 2026-11-07)
- Machine Learning Glossary · Google for Developers · Primary source · Glossary, retrieval-augmented generation (retrieved 2026-11-07)
- [18]
Google says distillation creates a smaller, faster version of a language model, usually by having a large teacher model label data used to train a smaller student, though the student's predictions are generally not quite as good. confirmedas of 2026-11-14
- LLMs: Fine-tuning, distillation, and prompt engineering (Machine Learning Crash Course) · Google for Developers · Primary source · Distillation (retrieved 2026-11-14)
- LLMs: Fine-tuning, distillation, and prompt engineering (Machine Learning Crash Course) · Google for Developers · Primary source · Distillation (retrieved 2026-11-14)
- LLMs: Fine-tuning, distillation, and prompt engineering (Machine Learning Crash Course) · Google for Developers · Primary source · Distillation (retrieved 2026-11-14)
Revision history (1)
- Page created.
Created Nov 14, 2026. Last reviewed by an editor on Nov 14, 2026. Next scheduled review: May 14, 2027.
Cite this page
"How fine-tuning works: adapting AI models with LoRA and more." ContentLora, updated Nov 14, 2026. https://contentlora.com/explain/how-fine-tuning-works
Spotted an error? Suggest a correction or emailcorrections@contentlora.com.