Based on real interviews
Spot the bugs: SFT loss step
Review a supervised fine-tuning loss step and find the mistakes that change what the model learns.
Unlock with Full AccessThe challenge
The implementation trains a causal language model on prompt-and-response examples. Its loss should apply to the response, but bugs make the training calculation incorrect. Inspect the supplied code and explain each fault, its effect on training and the correction you would make.
What you'll practise
Training code review
Trace how the implementation calculates the model's loss.
Token-level reasoning
Check which parts of each example contribute to training.
Explaining corrections
Connect each code change to the behaviour it repairs.
SFT loss implementationCode included in the full challenge
Your diagnosis
Explain the training faults and the corrections you would make.
The code, instructions and feedback are included with Full Access.