Request and response fields use camelCase. The API rejects unknown fields.
REQUEST
RECIPE CONFIG
recipeConfig selects the recipe type and holds the training configuration.
TRAINING CONFIG
trainingConfig contains four sections. Only model is required. Oumi fills the omitted settings from the preset recipe for the selected model and training method.
MODEL
model defines the base model and the tokenizer.
INIT MODEL
model.initModel starts training from the weights of an existing model version in your project instead of the base model weights.
DATA
data lists the datasets for each split. Each split is an object with a datasets array. A split that you omit has no datasets.
Each split contains one field.
DATASET REFERENCE
DPO training requires preference datasets. The other training methods reject preference datasets.
TRAINING
training selects the training method and sets the hyperparameters. Omitted fields take the preset value for the model and method.
TRAINER TYPE
The API also accepts the legacy values
trl_sft, trl_gold, and verl_grpo, and stores them as sft, opd, and grpo.
When you omit trainerType, Oumi infers it from the method settings. onPolicyDistillation selects opd, grpo selects grpo, and preferenceOptimization selects dpo. Without any of these settings, the preset trainer for the model applies.
GRPO and DPO are behind feature flags. The API rejects grpo and dpo in environments where these flags are off.
ENUMERATED VALUES
ON-POLICY DISTILLATION
training.onPolicyDistillation configures on-policy distillation. Use it with trainerType opd.
GRPO
training.grpo configures GRPO training. Use it with trainerType grpo.
PREFERENCE OPTIMIZATION
training.preferenceOptimization configures DPO training. Use it with trainerType dpo. Omitted fields take the preset value.
PEFT
peft configures parameter-efficient fine-tuning. Omit peft, or omit peftMethod, for full fine-tuning.
VALIDATION RULES
trainingConfig.model.modelNameis the only required training field.- A request can set at most one of
onPolicyDistillation,grpo, andpreferenceOptimization. - When
trainerTypeis set, it must match the method settings. For example,grposettings requiretrainerTypegrpo. numTrainEpochsmust be from1to30.- A fractional
evalStepsmust be greater than0and less than1. GRPO training accepts only an integer. - GRPO training requires
training.grpo.evaluatorId. grpo.evaluatorVersionrequiresgrpo.evaluatorId.- DPO training requires preference datasets. Other trainer types reject preference datasets.
onPolicyDistillation.teacherModelNamemust be a teacher model listed for the student model.
EXAMPLES
SUPERVISED FINE-TUNING WITH LORA
LoRA uses less GPU memory and trains faster than full fine-tuning. Use it as the starting point for most fine-tuning tasks.FULL FINE-TUNING
Full fine-tuning updates all model parameters. Use it when LoRA quality is not sufficient for your task.ON-POLICY DISTILLATION INTO A SMALLER MODEL
On-policy distillation trains a smaller student model with guidance from a larger teacher model. See On-policy distillation.DIRECT PREFERENCE OPTIMIZATION
DPO trains a model to prefer the chosen response over the rejected response in each row of a preference dataset. This example uses full fine-tuning. See Direct preference optimization.GRPO WITH AN EVALUATOR REWARD
GRPO samples several completions for each prompt and scores them with an evaluator. SetevaluatorId to an evaluator in the same project.
seed in training for reproducible runs. Set enableGradientCheckpointing to true when GPU memory is limited.