Skip to content

Commit e8e87b9

Browse files
committed
Minor changes to data collator call to explicitly pass -100 for pad token.
Signed-off-by: meetkuma <[email protected]>
1 parent 5818728 commit e8e87b9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

QEfficient/finetune/utils/dataset_utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ def get_dataloader_kwargs(train_config, dataset, dataset_processer, split):
5858
else:
5959
kwargs["batch_size"] = batch_size
6060
kwargs["drop_last"] = True
61-
kwargs["collate_fn"] = DataCollatorForSeq2Seq(dataset_processer)
61+
# todo: -100 should be changed to a variable. or tokenizer.pad_token_id
62+
kwargs["collate_fn"] = DataCollatorForSeq2Seq(dataset_processer, label_pad_token_id=-100)
6263
return kwargs
6364

6465

0 commit comments

Comments
 (0)