Book a demo →

Fine-Tuning

Definition

Fine-tuning is extra training of a pretrained model on examples to change its behavior: supervised, instruction, preference or parameter-efficient tuning.

In short

Fine-tuning trains a pretrained model further on examples for a task, a style or a format. The main methods are supervised fine-tuning, instruction tuning, preference tuning (RLHF, DPO) and parameter-efficient methods such as LoRA. As of 4 December 2026, OpenAI is winding down its fine-tuning platform, and the Gemini API has no model that supports it. Not to be confused with the “fine-tuning argument” in physics and philosophy, a different concept.

What fine-tuning is

Fine-tuning continues the training of a model that has already been trained. Google's documentation for its cloud platform describes it as “retraining the base model on your own labeled dataset, adapting its weights to your task and data.” OpenAI puts it from the developer's side: “OpenAI models are already pre-trained to perform across a broad range of subjects and tasks. Fine-tuning lets you take an OpenAI base model, provide the kinds of inputs and outputs you expect in your application, and get a model that excels in the tasks you’ll use it for.”

Google and OpenAI describe the result in terms of skills, style and format. Google: “Supervised fine-tuning improves the performance of the model by teaching it a new skill.” OpenAI writes that a model trained on your examples “more reliably produces your desired style and content.” According to the same documentation, fine-tuning can also “enable a model to consistently format responses in a certain way or handle novel inputs.”

Two papers from 2018 described this sequence for language models. In January Jeremy Howard and Sebastian Ruder proposed ULMFiT, “an effective transfer learning method that can be applied to any task in NLP”. Their starting point came from image recognition: “Inductive transfer learning has greatly impacted computer vision”. In June 2018 OpenAI's first GPT paper described “generative pre-training of a language model on a diverse corpus of unlabeled text, followed by discriminative fine-tuning on each specific task.”

Pretraining and fine-tuning

Hugging Face's LLM Course separates the two stages. “Pretraining is the act of training a model from scratch: the weights are randomly initialized, and the training starts without any prior knowledge.” Fine-tuning “is the training done after a model has been pretrained.” The course places both under transfer learning: what the pretrained model has learned is carried over to the new task, “hence the term transfer learning”.

The difference in effort follows from that. The course states: “Fine-tuning a model therefore has lower time, data, financial, and environmental costs.” How a large language model learns during pretraining, by predicting the next token, is explained in its own entry.

Pretraining builds the base model once; fine-tuning adapts it with your own examples, either by changing every weight or only a small added set.

Types of fine-tuning

Fine-tuning is an umbrella term. Google's platform “supports supervised fine-tuning, preference tuning, and reinforcement learning fine-tuning”, and OpenAI's documentation lists supervised fine-tuning, vision fine-tuning and direct preference optimization. Two questions separate the methods: what kind of examples the model learns from, and how many of its parameters change.

MethodLearns fromSource
Supervised fine-tuning (SFT)Example prompts with the desired answerOpenAI; Google
Instruction tuningMany tasks written as instructionsWei et al., 2021
Preference tuning (RLHF, DPO)Rankings or pairs of better and worse answersOuyang et al., 2022; OpenAI
Full fine-tuningExample data; all parameters changeGoogle
Parameter-efficient (LoRA)Example data; a small set of parameters changesHu et al., 2021; Hugging Face

Provider documentation and papers retrieved 4 December 2026.

Supervised fine-tuning. OpenAI: “Supervised fine-tuning (SFT) lets you train an OpenAI model with examples for your specific use case.” Google's comparison table gives the typical dataset size as “Hundreds to thousands of labeled examples”.

Instruction tuning. Jason Wei and eight co-authors defined it in 2021 as “finetuning language models on a collection of tasks described via instructions” and reported that it “substantially improves zero-shot performance on unseen tasks.”

Preference tuning and RLHF. Reinforcement learning from human feedback (RLHF) trains a model on people's judgements of its answers. Paul Christiano and co-authors used human comparisons in 2017 to train agents on Atari games and simulated robots, with “goals defined in terms of (non-expert) human preferences between pairs of trajectory segments”. The InstructGPT paper by Long Ouyang and co-authors (March 2022) applied the idea to a language model in two steps: “we collect a dataset of labeler demonstrations of the desired model behavior, which we use to fine-tune GPT-3 using supervised learning. We then collect a dataset of rankings of model outputs, which we use to further fine-tune this supervised model using reinforcement learning from human feedback.” Direct preference optimization (DPO) works with pairs. OpenAI's instruction for it: “Provide both a correct and incorrect example response for a prompt.”

Full and parameter-efficient fine-tuning. Google: “Full fine-tuning updates all parameters of the model, making it suitable for adapting the model to highly complex tasks, with the potential of achieving higher quality.” In contrast, “Parameter-efficient tuning updates a relatively small subset of the model's parameters during the tuning process.” One such method is LoRA, published by Edward Hu and co-authors in June 2021. Their reason: “full fine-tuning, which retrains all model parameters, becomes less feasible” as models grow. LoRA “freezes the pre-trained model weights and injects trainable rank decomposition matrices into each layer of the Transformer architecture”. Hugging Face's PEFT library collects such methods and states that they “only fine-tune a small number of (extra) model parameters”.

Fine-tuning, prompting and RAG

Google and OpenAI both put prompting first. Google: “Start with prompting to find the optimal prompt. Then, move on to fine-tuning (if required) to further boost performance or fix recurring errors.” OpenAI: “The prompt engineering process may be all you need in order to get great results for your use case.” Among the gains OpenAI lists for fine-tuning on top of prompting is room for more examples than could fit within the context window of a single request.

For information a model did not see in training, OpenAI's advice concerns the prompt, not the weights: “Include relevant context - in your instructions, include text or image content that the model will need to generate a response from outside its training data.” A retrieval-augmented generation (RAG) system does this with documents it retrieves for each request.

ApproachChangesUse when
PromptingThe instructions in each requestFirst step (Google, OpenAI)
RAGThe documents added to each requestThe answer needs information from outside the training data (OpenAI)
Fine-tuningThe model's weightsPrompting is not enough, or errors recur (Google)

Sources: Google Cloud, “Introduction to tuning”; OpenAI, “Model optimization”; both retrieved 4 December 2026.

What providers offer

The state of the large providers on 4 December 2026, according to their own pages:

  • OpenAI: “OpenAI is winding down the fine-tuning platform. The platform is no longer accessible to new users.” Eligible existing customers can create training jobs until 15 December 2026, unless the base model shuts down earlier, and fine-tuned models “remain available for inference until their base model shuts down.” The same page gives 23 October 2026 as the shutdown date for gpt-4.1-nano and its fine-tuned versions, and 14 January 2027 for gpt-4.1, gpt-4.1-mini and their fine-tuned versions.
  • Google: The Gemini API documentation says that “we no longer have a model available which supports fine-tuning in the Gemini API or AI Studio, but it is supported in Gemini Enterprise Agent Platform”. The methods on that platform are the ones listed above.
  • Anthropic: In July 2024 Anthropic announced that customers “can now fine-tune Claude 3 Haiku—our fastest and most cost-effective model—in Amazon Bedrock”. An update dated 1 November 2024 declared it generally available. Amazon's Bedrock documentation lists Claude 3 Haiku among the models that can be fine-tuned.

Provider offerings change. Each statement here carries the date on which the page was read.

What a project needs

OpenAI's guide to supervised fine-tuning names four parts: build a training dataset that shows what a good answer looks like, upload it, create a fine-tuning job for a base model, and evaluate the results. Before all of this it puts a test: “Only invest in fine-tuning after setting up evals.” The reason it gives: you need a reliable way to tell whether the fine-tuned model performs better than the base model.

Google's guidance concerns the data. “High-quality, well-labeled data is crucial for good performance and better than quantity.” The data should also “reflect the prompt distribution, format, and context that the model encounters in production.” Before adding more examples, Google advises checking where the model makes mistakes. For a sense of scale, its documentation says to “think 100 examples or more”.

Source

Frequently asked questions

What is fine-tuning?

Fine-tuning is further training of a model that has already been pretrained, using examples for a specific task. Hugging Face defines it as the training done after a model has been pretrained; Google describes it as retraining a base model on your own labeled data, which adapts its weights to your task.

How does fine-tuning work?

According to OpenAI's documentation, supervised fine-tuning has four parts: build a dataset of example prompts and desired outputs, upload it, create a fine-tuning job for a base model, and evaluate the results. OpenAI advises setting up evaluations before investing in fine-tuning. The variants differ in the kind of examples (answers, instructions, preferences) and in how many parameters change.

Can ChatGPT be fine-tuned?

OpenAI's fine-tuning documentation covers training its models through its developer platform. As of 4 December 2026, OpenAI is winding that platform down: it is no longer open to new users, and eligible existing customers can create training jobs until 15 December 2026, unless the base model shuts down earlier.

Is fine-tuning the same as RAG?

No. Fine-tuning changes the model's weights through further training. Retrieval-augmented generation (RAG) leaves the model as it is and adds retrieved documents to each request, which matches OpenAI's advice to include relevant context when an answer needs information from outside the training data.

Should I fine-tune or just write a better prompt?

Google and OpenAI both recommend starting with the prompt. Google advises moving to fine-tuning only if required, to boost performance further or fix recurring errors. OpenAI writes that prompt engineering may be all you need.

What is LoRA?

LoRA (Low-Rank Adaptation) is a parameter-efficient fine-tuning method published by Hu et al. in 2021. It freezes the pretrained weights and trains small additional matrices in each layer, so far fewer parameters change than in full fine-tuning.