Skip to content

Commit

Permalink
Bug Fix while training using SFTTrainer with DataCollatorForCompletio…
Browse files Browse the repository at this point in the history
…nOnlyLM (#1861)

* Bug Fix while training using SFTTrainer with DataCollatorForCompletionOnlyLM

Added ```dataset_text_field``` in the SFTConfig while training

* Update docs/source/sft_trainer.mdx

---------

Co-authored-by: Kashif Rasul <kashif.rasul@gmail.com>
  • Loading branch information
Rishav-hub and kashif authored Jul 25, 2024
1 parent db8e09e commit 3930973
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docs/source/sft_trainer.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,10 @@ collator = DataCollatorForCompletionOnlyLM(instruction_template=instruction_temp

trainer = SFTTrainer(
model,
args=SFTConfig(output_dir="/tmp"),
args=SFTConfig(
output_dir="/tmp",
dataset_text_field = "text",
),
train_dataset=dataset,
data_collator=collator,
)
Expand Down

0 comments on commit 3930973

Please sign in to comment.