Shape model behavior
Run supervised fine-tuning
Teach a pre-trained model a prompt-and-response pattern, then compare its behavior with the same baseline prompts used before SFT.
8 minute lesson
Pre-training learns to continue its corpus. Supervised fine-tuning, or SFT, trains on examples of the interaction pattern we want.
Open Fine-tuning data. Preview the examples before selecting a dataset. Check which fields represent the user and assistant turns.
The formatting is part of the data. A conversation might become one token sequence:
<user> Summarize the note.
<assistant> The release is ready.
Many SFT setups calculate loss mainly or only on the desired assistant response. Others train on more of the formatted sequence. Record what the app does because it changes the objective.
Choose a small dataset whose response style you can recognize. Record its source, license, size, and one example.
Reject examples with contradictory instructions, missing responses, hidden private data, or formatting that does not match the chat template used at evaluation time.
Run SFT from the checkpoint with the best validation result, unless your notebook records a different reason.
After it saves a checkpoint, repeat the baseline prompts with the same sampling settings. Record what changed and what did not.
Add three in-domain instruction prompts and three held-out variations. A model can imitate the exact training format without learning to generalize the behavior.
Compare pre-training capabilities too. SFT can improve instruction following while narrowing style, increasing refusals, or weakening ordinary continuation. Keep the base checkpoint available.

Lesson completed