Here is the PR for this fix: https://github.com/huggingface/course/pull/1170 The issue: - max_seq_length is no longer a valid param in SFTTrainer, instead we use max_length in SFTConfig - since this param is not important in this chapter, I delete the outdated line to avoid confusion - Link: https://huggingface.co/docs/trl/main/en/sft_trainer