Skip to main content
Supervised fine-tuning (method="sft_text") trains a model to imitate your labeled examples. It is the simplest way to adapt a base model to a task or style, and a common first pass before GRPO: teach the format with SFT, then reinforce correctness with RL. Veri runs SFT on TRL’s SFTTrainer. You provide a dataset of text or chat examples; Veri provisions the GPU, runs the loop, streams metrics, and uploads the checkpoint.

Dataset format

SFT accepts either plain text or conversational rows. For chat data, the trainer applies the model’s chat template automatically.

Submitting a job

This mirrors TRL’s SFT quickstart (a small Qwen model on the Capybara chat dataset), run on Veri:
SFT takes no reward function — the labeled completions are the training signal.

Hyperparameters

LoRA and QLoRA

SFT uses the same adapter path as GRPO. Set lora_rank to train low-rank adapters instead of the full model, and add load_in_4bit for QLoRA (a 4-bit NF4 base with adapters on top), which fits larger models on a single GPU.
See LoRA and QLoRA for the full rules (4-bit requires lora_rank; QLoRA is single-GPU; 16-bit LoRA is multi-GPU capable).

Where to go next

GRPO

Reinforce correctness with RL after an SFT pass.

Datasets

Connect a text or chat dataset.

Submit a job

The full training_jobs.create schema.

Deploy your checkpoint

Serve the trained model with an OpenAI-compatible API.