Skip to content

Commit

Permalink
FIx SFTTrainer bugs on TRL main (#1276)
Browse files Browse the repository at this point in the history
* Update sft_trainer.py

* Update trl/trainer/sft_trainer.py
  • Loading branch information
younesbelkada authored Jan 26, 2024
1 parent 4edc688 commit 09ca565
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion trl/trainer/sft_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ def make_inputs_require_grad(module, input, output):
data_collator = DataCollatorForLanguageModeling(tokenizer=tokenizer, mlm=False)

# Pre-process the datasets only once per node. The remaining processes will use the cache.
if PartialState().is_local_main_process:
with PartialState().local_main_process_first():
if dataset_kwargs is None:
dataset_kwargs = {}
if train_dataset is not None:
Expand Down

0 comments on commit 09ca565

Please sign in to comment.