You already know: next-token cross-entropy, ignore_index, and the training loop (Build an LLM from scratch); a base model continues text instead of answering (D5 → D6 bridge); data deduplication and decontamination (LLM pretraining §1).
Why this matters for Atlas. Supervised fine-tuning (SFT) is the step that turns a pretrained base model into something that answers questions. It is cheap compared with pretraining (thousands of times fewer tokens), and almost every model you will ever deploy has been through it — usually more than once, because domain fine-tuning (Atlas on course material) is SFT too. Getting it wrong is easy and quiet: the wrong template, the wrong loss mask or a poor dataset gives a model that looks fine on a demo and fails on real users.
1. What SFT is — and what it is not
The question. If the base model already has the knowledge, what does SFT actually teach?
Start from nothing. SFT is ordinary next-token training on a different kind of data: demonstrations of the behaviour you want. Each example is a conversation — usually a user request and an ideal assistant response — and the model is trained to produce the response.