Level 1 · Apprentice0 XP
Chat templates, special tokens and training only on the assistant's words.
Step 1 / 6
ProblemAsk your pretrained model "What is the capital of France?" and it may answer with another question, because on the web, questions are often followed by more questions. A base model completes documents; it is not an assistant.
← → step
Before this: Scale to GPT-2 size on a GPU
🛠️ Your turn
Reading is not the skill, doing is. Try for ten minutes before you open the hint. Getting stuck first is what makes the solution stick.
1.Core (30 min): run encode_chat on three conversations, print ids and labels side by side, and check that only assistant tokens (and their END) have labels other than -100. Stretch: fine-tune your 124M base model on 10,000 conversations from a public chat dataset, compare base and SFT answers on 10 prompts, and check that the SFT model stops at END.