Skip to main content
Supervised fine-tuning (SFT) trains the model to produce a given response for each prompt. It fits when the right output can be written down, and it often comes before DPO or GRPO.

Training Data

SFT trains on a dataset added with --kind sft. Each row of support-replies is a ticket and what the support team did with it, as a chat messages list:
A row with tool calls also holds a tools list with the schemas from the environment’s tasks, so the chat template renders the tools as it does at serving time.
The loss applies to assistant turns only. A row longer than max_seq_length is dropped, and the run reports how many.

Example Run

Recipe Keys