Skip to content

Commit b29c5fb

Browse files
Merge pull request #27 from rupaut98/fix-issue-24
Update Kaggle-Orpheus_(3B)-TTS.ipynb to fix issue #24
2 parents 6054093 + e62fdbe commit b29c5fb

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

nb/Kaggle-Orpheus_(3B)-TTS.ipynb

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,11 @@
527527
"from transformers import TrainingArguments,Trainer,DataCollatorForSeq2Seq\n",
528528
"from unsloth import is_bfloat16_supported\n",
529529
"\n",
530+
"data_collator = DataCollatorForSeq2Seq(\n",
531+
" tokenizer=tokenizer,\n",
532+
" padding=True,\n",
533+
")\n",
534+
"\n",
530535
"trainer = Trainer(\n",
531536
" model = model,\n",
532537
" train_dataset = dataset,\n",
@@ -547,8 +552,9 @@
547552
" output_dir = \"outputs\",\n",
548553
" report_to = \"none\", # Use this for WandB etc\n",
549554
" ),\n",
555+
" data_collator=data_collator,\n",
550556
")"
551-
]
557+
]
552558
},
553559
{
554560
"cell_type": "code",
@@ -4021,4 +4027,4 @@
40214027
},
40224028
"nbformat": 4,
40234029
"nbformat_minor": 0
4024-
}
4030+
}

0 commit comments

Comments
 (0)