Implementing a weighted loss function in SFTTrainer
Currently you can let SFTTrainer teach your models to learn to predict every token in your dataset, or you can let it train on “completions only”, using the DataCollatorForCompletionOnlyLM
class.