Index Ai Academy
Phase 6 · Modern LLM engineering · Post-training

Supervised fine-tuning

Teach behavior from example conversations.

About 40 minutes · Free account required

Open this lesson Create a free account

Why it matters

Supervised fine-tuning is the first step of post-training and the most common way companies customize a model: show it examples of the conversations you want, and it learns to produce them. It's how a base model becomes an assistant, and how an assistant learns your output format, your brand voice or your support workflow. It's also the easiest stage to get subtly wrong.

What you'll be able to do

  • Build SFT training examples from chats, with the loss masked to the assistant's reply
  • Fine-tune a base model on demonstrations and measure the change on unseen prompts
  • Choose sensible data, learning rate and number of steps, and spot overfitting
  • Recognize what SFT looks like with real tools (Hugging Face TRL)

Before this lesson

Next in this phase: Instruction and preference data