What Is Fine-Tuning? When to Fine-Tune an LLM (2026 Guide)

Fine-tuning explained: a glowing neural network being trained on custom data to adapt an LLM

For years, fine-tuning was the default answer to a simple question: how do I make an AI model work the way I need it to? In 2026 that answer got more complicated. OpenAI has closed its fine-tuning platform to new users, and research suggests fine-tuning is the wrong tool for some of the jobs people use it for.

This guide explains what fine-tuning really is, when it is worth doing, how LoRA and QLoRA make it affordable, and what the OpenAI wind-down means for you. The numbers come from official documentation and the original research papers, not from marketing pages.

Quick answer: Fine-tuning means training an existing LLM a little more on your own examples so it behaves a specific way, such as following a fixed format or tone. It works best for shaping behavior, not for teaching new facts, which models tend to learn poorly this way. Start with evals and good prompts, add RAG for knowledge, and fine-tune only if a gap remains. In 2026, OpenAI has closed its self-serve fine-tuning platform to new users, so anyone starting now has to look at open-weight models with LoRA or at other providers.

What Is Fine-Tuning?

Fine-tuning means taking a model that has already been trained and training it a bit more on your own examples. A pre-trained model has learned language and general knowledge from huge amounts of text. Fine-tuning adjusts its weights so it handles one specific job better, such as answering in a fixed format or sorting support tickets into categories.

OpenAI's documentation describes it as giving the model the kinds of inputs and outputs you expect in your application, so you get a model that excels at those tasks. The key word is examples. You are showing the model what good looks like, not handing it a manual.

A simple way to picture it: prompting is handing a smart new hire a sticky note of instructions. RAG is giving them a reference binder to look things up in. Fine-tuning is sending them on a training course so the habits stick.

Fine-Tuning vs Prompting vs RAG

These three tools solve different problems, and mixing them up is the most common mistake.

Approach What it does Best for Main weakness
Prompt engineering Clearer instructions and examples inside the prompt. The model itself does not change. Your first attempt and quick experiments Long prompts cost tokens on every call
RAG Relevant documents are retrieved and added to the prompt at request time. Facts that are private, large or change often Needs good retrieval; does not change how the model writes
Fine-tuning The model's weights (or a small adapter) are updated using your training examples. Consistent format, tone or behavior, and narrow repeatable tasks Hard to update; weak for new facts

If RAG is new to you, start with our guide to what RAG is and how it works.

Why Fine-Tuning Is a Weak Way to Teach Facts

This is a common mistake, so it is worth a closer look. Two research papers explain why.

Microsoft researchers compared unsupervised fine-tuning with RAG for injecting knowledge into a model (Ovadia et al.). RAG consistently came out ahead, both for topics the model had seen before and for completely new ones. They also found that models struggle to learn new facts through fine-tuning, although showing many variations of the same fact helped.

A Google Research and Technion study (Gekhman et al., EMNLP 2024) found something more worrying. Training examples that contained new facts were learned much more slowly than examples matching what the model already knew. Worse, as those new-fact examples were eventually learned, they steadily increased the model's tendency to hallucinate. The authors conclude that models mostly gain their knowledge during pre-training, and that fine-tuning mainly teaches them to use it more efficiently.

In plain terms: use fine-tuning to shape behavior, and use RAG to supply facts.

When Should You Fine-Tune an LLM?

Based on OpenAI's own guidance, fine-tuning makes sense in these cases:

  • You need a consistent format or style. Generating content in a specific format is a core use case.
  • You have a narrow task like classification. Classification and nuanced translation are both on OpenAI's list.
  • The model keeps failing to follow your instructions. Correcting instruction-following failures is a use case for supervised fine-tuning.
  • You want shorter prompts or a smaller model. Fine-tuning can reach the same results with a shorter prompt, and maybe a smaller model. One method is distillation: collect good outputs from a large model and use them to train a smaller one.

It is usually the wrong choice in these cases:

  • You want the model to know new or changing facts. Use RAG instead.
  • You cannot measure quality. Invest in fine-tuning only after setting up evals. Our guide to AI evaluation shows how to build them.
  • You have not tried better prompts yet. They are the cheapest fix and often enough.
  • You cannot maintain the dataset. You will need to retrain when the base model is replaced.

One more caution: fine-tuning can change safety behavior. Do not assume the tuned model inherited the base model's safeguards. Test it yourself.

Types of Fine-Tuning: SFT, DPO and RFT

Method How it works Best for
SFT (supervised fine-tuning) You provide prompts paired with the correct responses. Classification, fixed output formats, fixing instruction-following failures
DPO (direct preference optimization) You provide pairs of responses, one preferred and one not. Subjective tasks, such as writing summaries, where there is no single right answer
RFT (reinforcement fine-tuning) A grader scores the model's attempts, and training reinforces higher-scoring ones. Tasks with a checkable result, such as code or math

SFT is the default starting point. OpenAI's cookbook recommends doing SFT first and then applying DPO on top, because that order converges faster and gives higher-quality results.

Full Fine-Tuning vs LoRA vs QLoRA

Full fine-tuning updates every weight in the model, which is slow and needs a lot of GPU memory. Two techniques changed that.

LoRA freezes the original weights and trains small add-on matrices instead. In the original paper, applied to GPT-3 175B, LoRA cut trainable parameters by about 10,000 times and GPU memory needs by about 3 times compared with full fine-tuning. The small matrices can also be merged back into the base weights, so there is no added delay at inference time.

QLoRA goes further by combining LoRA with a 4-bit quantized base model. Its authors report that it cut the memory needed to fine-tune a 65B model from more than 780 GB to about 48 GB, which fits on a single GPU. Their Guanaco model reached 99.3 percent of ChatGPT's score on the Vicuna benchmark after 24 hours of fine-tuning on one GPU. The same paper also warns that chatbot benchmarks like this are not fully trustworthy, so treat that figure as a sign of what is possible, not a guarantee.

These are research numbers for specific setups, but the direction held: tuning open models on one GPU is now realistic. Popular tools include Hugging Face PEFT and TRL, Unsloth and Axolotl. Once you have a tuned model, our guide to running LLMs on your own computer shows how to use it locally.

The Trade-Off: LoRA Learns Less and Forgets Less

A 2024 study titled "LoRA Learns Less and Forgets Less" compared LoRA with full fine-tuning on Llama-2-7B for code and math. With common low-rank settings, LoRA substantially underperformed full fine-tuning, although in instruction fine-tuning higher ranks could close most of the gap. In return, LoRA better preserved the base model's abilities outside the target domain.

So LoRA is a common practical choice, but it is not a free lunch for hard domains like code.

What Changed in 2026: OpenAI Is Winding Down Fine-Tuning

This is the part most older tutorials get wrong. According to OpenAI's deprecations page, its self-serve fine-tuning platform is closing in stages:

  • May 7, 2026: organizations that had never fine-tuned could no longer create jobs.
  • July 2, 2026: organizations with no fine-tuned inference in the previous 60 days lost access too.
  • January 6, 2027: even active existing customers can no longer create new fine-tuning jobs.

Existing fine-tuned models keep running only until their base model shuts down. For GPT-4.1 and GPT-4.1 mini, that date is January 14, 2027.

The lesson goes beyond one vendor. A hosted fine-tune lives only as long as its base model, and the provider decides when that is. Do not build a product on a customization you cannot take with you.

Fine-tuning itself has not disappeared. Other providers, including cloud platforms and specialist services, still offer some form of it. Supported-model lists change quickly, though, so check each provider's current docs before you plan around one. If the tuned model is central to your product, favor an open-weight base and a provider that lets you download the trained weights. Some do. Many do not say.

A Practical Fine-Tuning Workflow

  1. Write evals first. You need a way to tell whether the fine-tuned model beats the base model.
  2. Try prompting, then RAG. Fine-tune only if a clear gap remains.
  3. Collect about 50 high-quality examples. Keep a share of them aside as a holdout set for testing, as OpenAI recommends.
  4. Train. For most teams, that means LoRA on an open-weight model.
  5. Compare against the base model on your holdout set.
  6. Watch for overfitting. A model can start memorizing the dataset instead of learning from it, which is why OpenAI saves checkpoints from earlier training stages.
  7. Add data only if the first 50 examples helped.

Training data is usually stored as JSONL, one example per line. Here is a simple classification example in the common chat style:

{"messages":[{"role":"system","content":"Classify the support ticket as billing, bug, or feature_request."},{"role":"user","content":"I was charged twice this month."},{"role":"assistant","content":"billing"}]}

This layout follows OpenAI's chat format. Other tools use similar structures, so check the format your training tool expects.

Common Mistakes to Avoid

  • Fine-tuning to add knowledge. Research shows models struggle to absorb new facts this way and may hallucinate more.
  • Skipping evals. Without a baseline, you cannot tell whether the fine-tune helped.
  • Using messy data. Research such as LIMA suggests a small set of carefully curated examples can go a long way, so quality matters more than volume.
  • Assuming LoRA always matches full fine-tuning. It can fall short on hard domains such as code.
  • Ignoring base-model lifetime. A fine-tune depends on its base model staying available.

Frequently Asked Questions

What is fine-tuning in simple terms?

It is extra training on your own examples that teaches an existing AI model to behave a specific way, such as using a fixed format or a certain tone, without long instructions every time.

Is fine-tuning better than RAG?

Neither is better overall. Fine-tuning shapes behavior and format, while RAG supplies facts that are private or change often. Many systems use both.

Can fine-tuning teach a model new facts?

Not reliably. In the EMNLP 2024 study, new-fact examples were learned slowly and increased hallucinations once learned. RAG is usually the better tool for knowledge.

Can I still fine-tune OpenAI models?

Only if you are an eligible existing customer, and only until January 6, 2027, or earlier if the base model shuts down first. New organizations can no longer start fine-tuning jobs on the platform.

How many examples do I need to fine-tune?

OpenAI's minimum is 10, and it sees improvements from 50 to 100 examples. It suggests starting with about 50 good ones and evaluating the results.

What is the difference between LoRA and full fine-tuning?

Full fine-tuning updates every weight. LoRA trains only small add-on matrices, which needs far less memory. It can learn less than full fine-tuning in hard domains, but it forgets less of what the base model already knew.

What is the cheapest way to fine-tune today?

LoRA or QLoRA on an open-weight model is the usual low-cost route, since both train small adapters instead of the whole model. Actual costs depend on the model size, the data and where you run the training.

Final Verdict

Fine-tuning is a precision tool, not a general upgrade. It shines when you need a consistent format, a narrow task done reliably, or a smaller model doing the work of a bigger one. It is a poor way to teach facts, and the evidence says to reach for RAG there. With OpenAI's platform closed to new users, anyone starting now needs to look at open-weight models with LoRA or QLoRA, or at other providers whose terms they have checked. Whatever route you take, start with evals and good prompts, and keep your data portable.

Provider availability and dates in this article were last checked on November 23, 2026. Always confirm current details in each provider's documentation.

You Might Also Like

Comments

Popular posts from this blog

AI Evaluation Explained: How to Know If Your AI Agent Is Actually Working

What Is Open-Source AI? Why It's Reshaping the Industry in 2026

What Is Agentic Commerce? How AI Agents Are Starting to Shop in 2026