OpenAI fine-tuning migration
Migrate fine-tuned GPT-4o and GPT-4.1 models to open models
OpenAI stops new fine-tuning jobs on January 6, 2027 and stops serving fine-tuned GPT-4o, GPT-4o mini, GPT-4.1 and GPT-4.1 mini models on January 14, 2027. In Tensorant you train an open model on the same data, compare it with your current fine-tune on the same test set, and call it through an OpenAI-compatible API.
Timeline
OpenAI's fine-tuning timeline
Dates as OpenAI's deprecations page gave them on . OpenAI's page lists gpt-6-luna as the replacement for the GPT-4o, GPT-4o mini, GPT-4.1 and GPT-4.1 mini models.
Before you move
What to save before January 14, 2027
Your fine-tuned GPT-4o and GPT-4.1 models stop answering on January 14, 2027. Save these while your fine-tunes still answer.
- Download your training and validation files through OpenAI's Files API, or keep the copy you uploaded from. How to download them.
- Save the ID of each fine-tuned model and its base model, from OpenAI's list of fine-tuning jobs. How to list them.
- Keep a held-out test set, such as your validation file or real requests with answers you know are good.
- Score your fine-tune on that test set in Tensorant while it still answers. The evaluation keeps each of its answers. See your own endpoints.
Import your OpenAI JSONL
Upload the training file as it is, and the validation file as your test set. Each row's
messagesbecomes a conversation. A row is skipped, and listed in the import report, when a message carries another field, such asweight,nameor tool calls. See how rows are recognized.Score your current fine-tune through a model endpoint
Add your fine-tune as a model endpoint, with OpenAI's address, its
ft:model ID and your OpenAI key. Then evaluate it on your test set. OpenAI bills you for those requests.Train an open model, trial first
Choose an open model and run a trial on a small sample. It checks formatting, memory and speed, and estimates the full run's time and GPU cost. An experiment then scores the base model, trains an adapter and scores the adapter on the same test examples.
Compare both on the same test set
Compare the open model's evaluation with your OpenAI fine-tune's evaluation. You see the change in score, and which answers improved and which got worse. See compare any two evaluations.
Publish it
Give the trained adapter a name, such as
support, that your applications call through the API. It wakes on request or stays always on. See API models.Change
base_urlPoint the OpenAI SDK at Tensorant's API, with a Tensorant API key and your model's name. See the API quickstart.
Your code
What changes in your application
- Set
base_urltohttps://api.tensorant.io/v1, use a Tensorant API key, and send your published model's name asmodel. See the API quickstart. - The API serves chat completions. Code on OpenAI's Responses API moves to
client.chat.completions.create, because other routes answer404 not_found. See chat completions. - The API takes the fields its chat completions reference lists. Any other field, such as OpenAI's
tools,storeormetadata, is refused with400 unsupported_parameter, even when it isnull. - Each message carries only
roleandcontent. Anamefield, or thedeveloperortoolrole, is refused with400 invalid_request. - When a request leaves them out,
max_tokensis 512 andtemperatureis 0. OpenAI's default temperature is 1, so sendtemperatureif your application relied on it, and a largermax_tokensfor answers longer than 512 tokens. response_formatwith a JSON schema works, and so does streaming withstream: true.
import os
from openai import OpenAI
client = OpenAI(api_key=os.environ["OPENAI_API_KEY"])
answer = client.chat.completions.create(
model="ft:gpt-4o-mini-2024-07-18:acme::A1b2C3d4",
messages=[{"role": "user", "content": "Where is my order?"}],
)
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.tensorant.io/v1",
api_key=os.environ["TENSORANT_API_KEY"],
)
answer = client.chat.completions.create(
model="support",
messages=[{"role": "user", "content": "Where is my order?"}],
)
After the move
What you keep
- You keep the adapter you train. Download it as standard LoRA files that load with PEFT on the same base model, or publish it to your own Hugging Face account.
- The base model is an open model whose weights are on Hugging Face. Any tool that loads PEFT LoRA adapters can run your adapter on it.
- With the Own compute subscription, you can train on GPUs in your own RunPod, Verda, Lambda, AWS, Azure or Google Cloud account. Every organization can keep the data in its own S3 bucket, free. Test sessions, experiments and published models in your own account run only on RunPod, with your RunPod volume as storage. See connections.
FAQ
Questions about moving off OpenAI fine-tuning
When does OpenAI fine-tuning shut down?
Existing customers can't create new fine-tuning jobs from January 6, 2027. Fine-tuned GPT-4o, GPT-4o mini, GPT-4.1 and GPT-4.1 mini models stop answering on January 14, 2027, when their base models shut down. Since May 7, 2026, organizations that had never run fine-tuning can't create fine-tuning jobs.
What is an alternative to OpenAI fine-tuning?
You can fine-tune an open model, such as Qwen3, Llama or Mistral, on the same data. In Tensorant you import your OpenAI training file, train a LoRA adapter, score it against your OpenAI fine-tune on the same test set and call it through an OpenAI-compatible API. You can also download the adapter and run it with its base model on your own hardware. See the step-by-step guide.
Can I import my OpenAI fine-tuning files as they are?
Chat rows import as they are, except rows whose messages carry weight, name or tool calls, which are skipped and listed in the import report (how rows are recognized). The guide's cleaning command cuts each message to its role and content, so the weight and name rows import too. DPO files import with a column mapping, and image URLs in rows are not accepted.
Which open model should I start with?
Use the smallest model that your test set says is good enough. Train a small instruct model such as Qwen/Qwen3-4B-Instruct-2507 first, compare it with your fine-tune, and try a larger one if it falls short. See supported models.
Will an open model match my fine-tuned GPT-4o?
Only a test on your own data can say. Tensorant scores both models on the same test set and shows which answers improved and which got worse. For published results on narrow tasks, see fine-tuned 7B models compared with GPT-4 and a fine-tuned 7B model compared with GPT-4o at text-to-SQL.
What do I change in my code?
You change the base URL, the API key and the model name. The API takes the fields its chat completions reference lists, and refuses any other field, such as OpenAI's tools, store or metadata, with 400 unsupported_parameter. It also refuses messages with a name field or a developer or tool role, so remove those first. A request without temperature or max_tokens gets a temperature of 0 and at most 512 tokens. See fields that are refused and messages.
Where is my data kept?
Tensorant keeps it in Tensorant storage, separately for each organization, unless you connect your own S3 bucket or a network volume in your own RunPod account. Connect your own storage before your first project, because it can be chosen only while the organization has no projects. See where your data lives, data storage and Fine-tune LLMs on private and sensitive data.
Start with your OpenAI training file.
Import it, score your current fine-tune while it still answers, and train an open model on the same data.