You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In finetune.py, the Line 226 uses the tranformers.DataCollatorForLanguageModeling. This data collator actually ignores the "labels" field in line 185 and uses "input_ids" as the new labels in the trainer.train() function. You can see this behavior in the Line 745 of transformers.data_collator
Compared against the implementation of stanford_alpaca, its train.py uses the masked "labels" as the line 122~123 shows (This is the same purpose as your "labels" in line 185). But since the code write its own dataset and collator. The "labels" is not overwritten later in the training.
I wonder if the use of tranformers.DataCollatorForLanguageModeling in finetune.py is a bug. Does it serve the purpose here?
The text was updated successfully, but these errors were encountered:
In finetune.py, the Line 226 uses the tranformers.DataCollatorForLanguageModeling. This data collator actually ignores the "labels" field in line 185 and uses "input_ids" as the new labels in the trainer.train() function. You can see this behavior in the Line 745 of transformers.data_collator
Compared against the implementation of stanford_alpaca, its train.py uses the masked "labels" as the line 122~123 shows (This is the same purpose as your "labels" in line 185). But since the code write its own dataset and collator. The "labels" is not overwritten later in the training.
I wonder if the use of tranformers.DataCollatorForLanguageModeling in finetune.py is a bug. Does it serve the purpose here?
The text was updated successfully, but these errors were encountered: