The SFTTrainer documentation states:
SFTTrainer always pads by default the sequences to the max_seq_length argument of the SFTTrainer.
https://huggingface.co/docs/trl/main/en/sft_trainer#best-practices
However, when looking at the actual code, the Tokenizer appears to have padding=False, and it does not seem to pad sequences to the max_seq_length value.
https://github.com/huggingface/trl/blob/main/trl/trainer/sft_trainer.py#L420
How does SFTTrainer ensure that sequences are padded to the max_seq_length value?
The SFTTrainer documentation states:
However, when looking at the actual code, the Tokenizer appears to have padding=False, and it does not seem to pad sequences to the max_seq_length value.
https://github.com/huggingface/trl/blob/main/trl/trainer/sft_trainer.py#L420
How does SFTTrainer ensure that sequences are padded to the max_seq_length value?