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 (huggingface#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 <[email protected]>
  • Loading branch information
Rishav-hub and kashif committed Jul 28, 2024
1 parent a4272ce commit 4f043bc
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 4f043bc

Please sign in to comment.