In SFT, labels for prompt tokens are set to an ignore value so the loss is computed only on the assistant's response (completion-only loss).
Otherwise the model also spends capacity learning to predict user prompts and system text, which wastes signal and can bias the model toward imitating the prompt style.
Packing multiple short examples into one sequence improves GPU efficiency, but needs correct attention masks so examples do not attend to each other.
Loading…