Skip to main content

What Is Fine-Tuning in AI? Providers, Costs, VRAM 2026

Fine-tuning in 2026: OpenAI only for existing customers until Jan 6, 2027, Gemini only in Google Cloud. Plus costs, VRAM for LoRA and QLoRA, and methods.

FHFinn Hillebrandt
Last updated:
Technology
What Is Fine-Tuning in AI? Providers, Costs, VRAM 2026

Fine-tuning means continuing the training of a pre-trained LLM on your own examples, so that its weights change permanently. It changes behavior, style, and format, but it does not add reliable facts. Fine-tuning builds on the idea of transfer learning. The model does not start from random weights as in pretraining, but keeps everything it has already learned and is only adjusted.

Think of an employee who already knows a lot. Fine-tuning is the onboarding that teaches the house style, until they write replies the way your team does without being told. It does not put the current price list into their head. You hand that over with every request.

A classic case is a support assistant that always answers in the same tone and wraps its reply in a fixed JSON format. The current price of your product does not belong in the weights. It reaches the model through a lookup, in the context. Many teams start fine-tuning because they want to "feed the model our knowledge" and end up with a model that confidently produces wrong details. If you settle first what you actually want to change, you save weeks and pick the right method.

First, the 2026 picture, because it decides whether you can start at all before any question of method:

  • OpenAI: The fine-tuning platform is closed to new users. Existing customers can create training jobs only until January 6, 2027.
  • Google: Gemini can no longer be fine-tuned in the Gemini API or AI Studio, only in Google Cloud through the Gemini Enterprise Agent Platform.
  • Amazon Bedrock: Fine-tuning for Nova and Llama models.
  • Mistral: The fine-tuning page is marked as deprecated.
  • Open models such as Llama, Gemma, or Qwen you train yourself, usually with LoRA or QLoRA.

The table in section 7 lists 18 models and model families, 8 of which have a documented shutdown date. Section 8 works out how much GPU memory training open models needs.

1. Fine-tuning, RAG, or prompting? The decision

There are three levers for getting an LLM onto your task. Prompting steers the model with instructions and examples in the context. RAG (retrieval-augmented generation) finds matching passages in your sources and puts them in front of the model. Fine-tuning changes the model itself.

My rule of thumb is to start with prompting, use RAG for knowledge questions, and save fine-tuning for style, format, and behavior. OpenAI's own documentation also treats fine-tuning as a complement to prompt engineering and advises refining evaluations and prompts first.

Answers should always appear in the brand tone and a fixed format
Best choice
Prompting with examples first, then fine-tuning
Why
Tone and format are behavior, which a model learns well from examples.
Answering questions about manuals, price lists, or policies
Best choice
RAG
Why
The facts change, and you want to show the source of every answer.
Answers that use stock levels, weather, or account balances
Best choice
Function calling or tools
Why
Live numbers come from an interface when needed. They do not belong in weights.
A first version of a writing assistant with five examples
Best choice
Prompting (few-shot)
Why
You get feedback in minutes and can compare every change directly.
Sorting tickets into 12 categories, with thousands of verified examples
Best choice
Fine-tuning a small model
Why
Many examples do not fit in a prompt, and a small model is faster and cheaper.
Answers that are only correct after checking a database
Best choice
RAG or function calling, optionally fine-tuning for the answer format
Why
Facts come from the source, format comes from training.

Research backs this split. Ovadia et al. compared fine-tuning and retrieval for injecting knowledge in 2023, and retrieval won consistently. Gekhman et al. found in 2024 that models learn new facts more slowly than known ones during fine-tuning, and that this raises the tendency to hallucinate.

2. What happens inside the model

A pre-trained model consists of billions of numbers, the weights. In fine-tuning you show it pairs of input and desired answer. The model computes its answer, compares it with yours, and nudges the weights a small step toward your version. This repeats over your whole dataset, usually for several passes (epochs).

Adapting every weight of a large model (full fine-tuning) takes a lot of memory and compute. That is why most projects use parameter-efficient methods such as LoRA. The base model stays frozen, and you train only a small adapter that is added when the model answers. In the LoRA paper, the number of trainable parameters fell by a factor of 10,000 compared with full fine-tuning of GPT-3 175B.

That brings a second benefit. If you train every weight on narrow data, the model risks losing general abilities. Researchers call this catastrophic forgetting. Biderman et al. compared LoRA with full fine-tuning in 2024 and found that LoRA learns less of the new task but better keeps the base model's performance outside the target domain. The study's title sums it up, "LoRA Learns Less and Forgets Less".

Base model
weights W, frozen
LoRA adapter
two small matrices B and A, trained
Adapted model
W + B·A
Training examples (input and desired answer)
With LoRA fine-tuning the base model’s weights stay frozen, and only a small adapter is trained and added when the model answers.

3. The methods at a glance

Several techniques run under the name "fine-tuning". They differ in learning signal and effort, and the table separates them because they are often mixed up.

SFT (supervised fine-tuning)
Learning signal
Target answer per input
What you need
Pairs of input and desired answer
Used for
Style, format, task behavior
LoRA and QLoRA
Learning signal
Target answer per input, like SFT
What you need
Like SFT. Only a small adapter is trained. QLoRA also loads the base model quantized and needs less GPU memory
Used for
SFT on your own hardware, open models
DPO (direct preference optimization)
Learning signal
Comparison of two answers
What you need
Pairs of preferred and rejected answer
Used for
Refining preferences such as tone or caution
RFT (reinforcement fine-tuning)
Learning signal
Score from a grader, a checking function or a scoring model
What you need
Tasks with an automatically checkable solution
Used for
Improving answers on checkable tasks
Distillation
Learning signal
Outputs of a larger model
What you need
Outputs of a strong teacher model
Used for
A small, fast model for one task
Full fine-tuning
Learning signal
Target answer per input, like SFT
What you need
Many examples and a lot of compute, because all weights are adjusted
Used for
Large adaptations, own infrastructure

Two distinctions matter to me. Reinforcement fine-tuning is not the same as RLHF. RLHF learns from human preference judgments, which is how InstructGPT was built. RFT scores answers with a grader, a checking function or a scoring model. And distillation is not another name for fine-tuning but a source of data. You train a small model on the outputs of a large one so that it imitates its behavior.

4. Worked example: support replies in a house style

Say you run an online shop and want a model to answer customer requests in three parts every time. First a short greeting with the name, then the solution in at most three sentences, then a fixed sign-off. A prompt gets this right most of the time, but not always. With 500 reviewed examples from your support team you can lock the behavior in.

The training format at most providers is a JSONL file with one example per line. The pattern below follows the chat format from the OpenAI documentation, and the content is an invented example.

json
{"messages": [{"role": "system", "content": "You are the support team of Exampleshop. Reply in three parts: greeting, solution in at most three sentences, sign-off."}, {"role": "user", "content": "This is Anna Becker. My order 4711 has not arrived yet."}, {"role": "assistant", "content": "Hello Ms Becker,\nI checked your shipment. It is with the carrier and should arrive tomorrow. You can find the tracking number in your shipping email.\nBest regards from the Exampleshop team"}]}
{"messages": [{"role": "system", "content": "You are the support team of Exampleshop. Reply in three parts: greeting, solution in at most three sentences, sign-off."}, {"role": "user", "content": "Can I return the shoes?"}, {"role": "assistant", "content": "Hello,\nyes, you can send the shoes back within 14 days. Enclose the return slip that you will find in your customer account.\nBest regards from the Exampleshop team"}]}

Notice what is in these examples and what is not. Structure, tone, and length are behavior you can train. The return window is a fact that can change. As soon as your rule moves from 14 to 30 days, the fine-tuned model keeps quoting the old number. Deadlines and prices are better fetched from the current policy via RAG, and the model supplies only the tone.

To judge the result, run the same 50 test requests that were not in the training once through the base model with your best prompt and once through the fine-tuned model. If the fine-tuned model keeps the format in 49 of 50 cases and the base model in only 41, fine-tuning paid off. Both numbers are only an illustration. You have to measure on your own data.

5. How much data you need and how to measure success

Quality matters more than quantity. OpenAI names 10 examples as the technical minimum and recommends starting with 50 well-crafted examples. Google recommends at least 100 to 500 for Gemini. The LIMA study shows that about 1,000 carefully curated examples can already shape a model's style and format strongly.

  • Real cases, not fiction: Use requests that resemble the later use, especially those where the base model has been off so far.
  • Consistent answers: The model learns contradictory examples as uncertainty. One person should give the style of the target answers a final review.
  • Split three datasets: Training data, validation data to monitor training, and a test set the model never sees.
  • Measure against the baseline: Compare the fine-tuned model with the best prompt on the base model, not with a weak prompt.
  • Watch for overfitting: If the error on the training data keeps falling while it rises on the validation data, the model is memorizing examples. Less training or more variety in the data helps.
  • Test for regressions: Check whether the model lost abilities that worked before.

6. What fine-tuning costs

The bill has three items. Training is charged by processed tokens. With several epochs, the training file is processed several times, so the bill grows accordingly. Using the fine-tuned model usually costs more per token than the base model. Then comes the largest item, the work on the data.

OpenAI's price list gives $25 per 1M training tokens for gpt-4.1 and $5 for gpt-4.1 mini. A calculation with 500 examples of 600 tokens each and 3 epochs gives 900,000 training tokens. That is $22.50 for gpt-4.1 and $4.50 for gpt-4.1 mini. Using a fine-tuned gpt-4.1 costs $3 per 1M input tokens and $12 per 1M output tokens.

5×more expensive to train with gpt-4.1 than with gpt-4.1 mini
gpt-4.1$22.50
gpt-4.1 mini$4.50
500 examples × 600 tokens × 3 epochs900,000 training tokens
0.9 M tokens × $25.00 (gpt-4.1)$22.50
0.9 M tokens × $5.00 (gpt-4.1 mini)$4.50
OpenAI price list, own calculation
gradually.ai
OpenAI (gpt-4.1)
$25 per 1M training tokens, usage $3 input and $12 output per 1M tokens
OpenAI (gpt-4.1 mini)
$5 per 1M training tokens, usage $0.80 input and $3.20 output per 1M tokens
Mistral (legacy API)
$4 minimum fee per job and $2 storage fee per model per month
Google Cloud (Gemini Enterprise Agent Platform), Amazon Bedrock
Not quantified in the linked documentation. Prices are on each provider's pricing page.

Pure training is often the smallest bill. What gets expensive is the time for collecting and checking data, repeated runs with better data, and retraining whenever the base model changes. Weigh that effort against what you gain from shorter prompts or a cheaper model per request.

The OpenAI prices show the order of magnitude, but only existing customers can still book them. With an open model and LoRA or QLoRA you pay for compute time on a rented or own GPU, not for tokens. Ask your provider for the hourly price and multiply it by the runtime of a small test run. That gives you a reliable number for your data.

7. Which models you can still fine-tune

The offering changes fast, so check the provider's documentation before you start.

OpenAI is winding down its fine-tuning platform. It is closed to new users, and existing customers can create training jobs only until January 6, 2027, unless the base model shuts down earlier. Google no longer offers fine-tuning for Gemini in the Gemini API or AI Studio. It now runs only in Google Cloud through the Gemini Enterprise Agent Platform, for example for Gemini 3.5 Flash. Its documentation still lives at the Vertex AI addresses, which is why the table below uses that name. Amazon Bedrock offers it for Nova and Llama models. Mistral marks its fine-tuning page as deprecated. Open models such as Llama, Gemma, or Qwen you train yourself, for example with LoRA through Hugging Face's PEFT library.

With an open model, the process takes five steps. You prepare the examples as a JSONL file and pick a base model. Then you train a LoRA adapter with a library such as PEFT or a tool such as LLaMA-Factory. Finally, you check it against your test set and run it together with the base model.

This is the core with PEFT, based on Hugging Face's quicktour. The rank r sets how large the adapter's extra matrices are, and target_modules sets which layers it adapts.

python
from peft import LoraConfig, TaskType, get_peft_model
from transformers import AutoModelForCausalLM

model = AutoModelForCausalLM.from_pretrained("meta-llama/Llama-3.2-1B")
peft_config = LoraConfig(
    target_modules=["q_proj"],
    task_type=TaskType.CAUSAL_LM,
    r=8,
    lora_alpha=32,
    lora_dropout=0.1,
)
peft_model = get_peft_model(model, peft_config)
peft_model.print_trainable_parameters()
# trainable params: 524,288 || all params: 1,236,338,688 || trainable%: 0.0424

Out of a little over 1.2 billion parameters, this example trains only about 0.04%. At the end, only the adapter is saved, not a copy of the whole model.

18 models
ProviderModelParametersPlatformMethod
Alibaba / QwenQwen2.5500M-72BOpen sourceFull, LoRA, QLoRA
AmazonNova 2 Liten/aAmazon BedrockSFT
AmazonNova Pron/aAmazon BedrockSFT
AmazonNova Lite and Nova Micron/aAmazon BedrockSFT
GoogleGemini 3.5 Flash-Liten/aGemini Enterprise Agent Platform (Vertex AI)SFT
GoogleGemini 3.5 Flashdeprecatedn/aGemini Enterprise Agent Platform (Vertex AI)SFT
GoogleGemini 3.1 Flash-Liteshutdown 2027-05-07n/aGemini Enterprise Agent Platform (Vertex AI)SFT
GoogleGemini 2.5 Proretired 2026-10-20n/aNo longer availableSFT
GoogleGemini 2.5 Flashretired 2026-10-20n/aNo longer availableSFT
GoogleGemini 2.5 Flash-Literetired 2026-10-20n/aNo longer availableSFT
GoogleGemma 31B-27BOpen sourceLoRA
MetaLlama 3.3 70B Instruct70BAmazon Bedrock, Open sourceSFT, Full, LoRA
MetaLlama 3.1 (8B, 70B) and Llama 3.2 (1B to 90B)1B-90BAmazon Bedrock, Open sourceSFT, Full, LoRA
MistralFine-tuning API (legacy)deprecatedn/aMistral APISFT
OpenAIGPT-4.1shutdown 2027-01-14n/aOpenAI API (existing customers only)SFT, DPO
OpenAIGPT-4.1 minishutdown 2027-01-14n/aOpenAI API (existing customers only)SFT, DPO
OpenAIGPT-4.1 nanoretired 2026-10-23n/aNo longer availableSFT, DPO
OpenAIo4-miniretired 2026-10-23n/aNo longer availableRFT
Source: provider documentation
gradually.ai

To choose a base model to start from, see the AI model directory with prices, status, and benchmarks.

8. How much GPU memory training needs

Training keeps much more in memory than answering does. According to the QLoRA paper, regular 16-bit fine-tuning of a model with 65 billion parameters requires more than 780 GB of GPU memory. That is 12 bytes per parameter. LoRA freezes the weights and keeps them in 16 bit (2 bytes per parameter), QLoRA in 4 bit (0.5 bytes). On top come the small adapter with its optimizer state and the activations, which depend on batch size and text length. The hardware check for local models only calculates inference. The table therefore shows a lower bound from the weights alone. The actual usage is higher.

3 B
Full fine-tuning, 16-bit
36 GB
LoRA, 16-bit
6 GB
QLoRA, 4-bit
1.5 GB
Lower bound fits in 24 GB (RTX 4090)
LoRA, QLoRA
8 B
Full fine-tuning, 16-bit
96 GB
LoRA, 16-bit
16 GB
QLoRA, 4-bit
4 GB
Lower bound fits in 24 GB (RTX 4090)
LoRA, QLoRA
32 B
Full fine-tuning, 16-bit
384 GB
LoRA, 16-bit
64 GB
QLoRA, 4-bit
16 GB
Lower bound fits in 24 GB (RTX 4090)
QLoRA
70 B
Full fine-tuning, 16-bit
840 GB
LoRA, 16-bit
140 GB
QLoRA, 4-bit
35 GB
Lower bound fits in 24 GB (RTX 4090)
none
Dettmers et al. (QLoRA), own calculation
gradually.ai

As a measured value, the paper gives for a 7B model at batch size 1: 5,048 MB for the 4-bit base model, 26 MB for the LoRA parameters and 567 MB for the input gradients, about 5.6 GB in total. With gradient checkpointing, the 567 MB drop to an average of 18 MB per sequence. QLoRA also makes a 65-billion-parameter model trainable on a single 48 GB card, more than 16 times less memory than full 16-bit training. On an RTX 4090 with 24 GB, the 4-bit weights fit, on paper, up to about 48 billion parameters. With activations and adapter, much less is left, and larger models need more cards or rented memory.

9. Limits, risks, and misconceptions

  • The base model disappears: According to OpenAI, fine-tuned models stay usable only until their base model shuts down. Then you have to retrain.
  • New facts stay unreliable: Knowledge from fine-tuning is not retrievable like a database entry. The model can alter it and produce hallucinations delivered with false confidence. A test run by gradually.ai on November 7, 2026, shows how unreliable knowledge from the weights can be. Without web search, GPT-6.1 Terra named three caffeine studies, with one matching DOI out of three in English and none in German.
  • Forgetting and overfitting: Training too hard on narrow data can degrade general abilities, and the model then memorizes examples verbatim. An adapter instead of full fine-tuning helps, as the study by Biderman et al. shows, and so does a regression test on tasks outside your target data.
  • Data protection: If training data contains personal data, you need a legal basis. The European Data Protection Board states in Opinion 28/2024 that a model trained on personal data cannot automatically be considered anonymous. Pseudonymize or remove names, addresses, and identifiers before training. What a model has learned is hard to remove selectively.
  • Maintenance: Every new policy, every new tone, and every new base model requires new data and a new run.
Your documents
MythI feed the model my documents, then it knows my company.
FactDocuments belong in the context via RAG. Fine-tuning shapes style and format.
Number of examples
MythMore examples automatically make the model better.
FactA few clean, consistent examples beat many contradictory ones.
Prompts
MythFine-tuning replaces prompts.
FactA fine-tuned model still needs clear instructions, just shorter ones.
Shelf life
MythA fine-tuned model stays usable forever.
FactIt lives as long as its base model. Plan for the restart.

10. What this means for you

  1. Build a set of fixed test cases first and bring the best prompt with examples to the base model. Often that is enough.
  2. If you need knowledge from your own sources, use RAG, not fine-tuning. A long context helps here, see context window.
  3. Fine-tuning pays off when format, tone, or a cheap small model is the bottleneck and you have at least a few dozen, better a few hundred, reviewed examples.
  4. Start small with an adapter method such as LoRA, measure against the baseline, and keep training data and test cases under version control.
  5. Plan retraining on a new base model from the start.

Frequently Asked Questions

Fine-tuning means continuing the training of a pre-trained language model on your own examples, so its weights change. The model picks up style, format, and behavior patterns from your data. It does not reliably learn new facts this way.

The training run itself is the easy part. Providers and libraries reduce it to uploading a file and starting a job. The hard part is the data. You need consistent, reviewed examples, a test set the model never sees, and a baseline to compare against. Without those you cannot tell whether the tuned model is better.

Fine-tuning changes the model itself and shapes behavior, style, and format. RAG leaves the model unchanged and hands it matching passages from your documents with every request. For facts that change or must be cited, RAG is the better choice. The two can be combined.

Only when well-built prompts with examples hit a limit, for instance because you would need hundreds of examples, require a very strict format, or want a small, cheap model to do a task reliably. Build an evaluation with fixed test cases first, so you can measure the gain.

Technically a few examples are enough. OpenAI names 10 as the minimum and recommends starting with 50 well-crafted examples. Google recommends at least 100 to 500 for Gemini. Quality matters most, and the LIMA study got by with roughly 1,000 carefully curated examples.

OpenAI trained its InstructGPT model in stages. Supervised fine-tuning on human-written examples came first, followed by reinforcement learning from human feedback (RLHF), in which people rank answers. You cannot fine-tune the ChatGPT app itself. OpenAI's API models can only be tuned by customers who already use the platform, and only until January 6, 2027. Everyone else is left with open models, Gemini on Google's Gemini Enterprise Agent Platform, or Nova and Llama on Amazon Bedrock.

It disappears with it. OpenAI states that fine-tuned models stay available for inference only until their base model shuts down. You then have to retrain on a newer base model, so keep your training data and test cases under version control.

Sources and References
FH

Finn Hillebrandt

AI Expert & Blogger

Finn Hillebrandt is the founder of Gradually AI, an SEO and AI expert. He helps online entrepreneurs simplify and automate their processes and marketing with AI. Finn shares his knowledge here on the blog in 50+ articles as well as through the AI Business Club.

Learn more about Finn and the team, follow Finn on LinkedIn, join his Facebook group for ChatGPT, OpenAI & AI Tools or do like 17,500+ others and subscribe to his AI Newsletter with tips, news and offers about AI tools and online business. Also visit his other blog, Blogmojo, which is about WordPress, blogging and SEO.