Skip to content

OpenAI

Fine-tune gpt-oss on your data

OpenAI's open-weight mixture-of-experts text models, which answer in their own harmony chat format. Supported by the training and serving software Tensorant runs. It hasn't run on Tensorant yet, so start with a trial.

Status
Supported
Input
Text
Kind
Mixture of experts
Trains with
LoRA, QLoRA
Suggested sizes
LoRA from1 GPU, about 55 GB

Sizes

Sizes and GPUs

Each size with the GPUs one machine needs to train and to serve it. The figures are the estimates Tensorant checks a model against; a trial measures the real use. See GPU memory.

gpt-oss models and the GPUs each needs
ModelParametersTrain with LoRATrain with QLoRAServeStatus
unsloth/gpt-oss-20b-BF16Needs an 80 GB GPU to train20B1 GPUabout 55 GB1 GPUabout 52 GB1, 2, 4 or 8 GPUsabout 53 GB in allSupported
openai/gpt-oss-20b20B--1, 2, 4 or 8 GPUsabout 17 GB in allSupportedServing onlyStored in MXFP4, which the trainer can't train: train unsloth/gpt-oss-20b-BF16 instead.
unsloth/gpt-oss-120b-BF16120B--2, 4 or 8 GPUsabout 285 GB in allSupportedServing onlyNeeds its experts split across 8 GPUs, and the trainer has no tested LoRA setup for that on one machine yet.
  • Training needs the memory shown on each GPU: more GPUs on a machine train faster, but each holds the whole model.
  • Serve: the numbers of GPUs of one machine the base model can be split across, and the memory it needs in all.

Training

How it trains

Train gpt-oss with LoRA or QLoRA, by supervised fine-tuning (SFT), DPO on preference pairs or reinforcement learning (RL).

  • RL trains with LoRA, on one GPU. RL on mixture-of-experts models isn't proven yet, so run an RL trial first.
  • The official checkpoints store their expert weights in MXFP4, which the trainer can't train. Train a BF16 copy, such as unsloth/gpt-oss-20b-BF16.
  • gpt-oss answers in its own harmony chat format, which its chat template applies.

Every training run, trials included, pays a training-token fee for the tokens it trains on, by the model's size.

Serving

How it serves

Publish a trained model under a name and call it through the OpenAI-compatible API, with the OpenAI SDK or any HTTP client. The name is what your application sends as model.

  • A LoRA adapter you train serves on top of its base model, on the GPUs in the Serve column.
  • The base model serves on its own too, in a test session or for a baseline. A deployment splits it across the GPUs of one machine: the Serve column lists the numbers each size allows.
  • openai/gpt-oss-20b and unsloth/gpt-oss-120b-BF16 serve as base models but don't train: the table says why.
  • An adapter trained on a BF16 copy serves on the same copy. The official MXFP4 checkpoints serve as they are.

Steps

Fine-tune gpt-oss on Tensorant

  1. Create a project

    Create a project with unsloth/gpt-oss-20b-BF16 as its base model. The model check reads the model before anything starts.

  2. Import your data

    Upload files, paste text or import a Hugging Face dataset as sources.

  3. Review and freeze a version

    Review the examples and approve the ones to train on, then freeze them into a version with training, validation and test splits.

  4. Score the base model

    Evaluate the base model on the version's test split. This baseline is what a training run is compared with, and a full run needs one.

  5. Run a trial, then train

    A trial trains a small sample to check the settings, the GPU memory and the speed. Then start the full run. LoRA on unsloth/gpt-oss-20b-BF16 needs 1 GPU, about 55 GB.

  6. Compare and publish

    Evaluate the trained model on the same test split and compare it with the baseline. Then publish it and call it through the OpenAI-compatible API.

Related

See every model

Start with one dataset.

Create an account and import your data, or book a demo and we will show you the product.