Skip to content

Commit

Permalink
Fix accelerate kwargs for versions <0.28.0 (huggingface#30086)
Browse files Browse the repository at this point in the history
* fix learning rate display issue in galore optimizer

* fix kwarg in accelerate when using versions < 0.28.0

* this was supposed to be in the other PR whoops
  • Loading branch information
vasqu authored Apr 10, 2024
1 parent 505854f commit 0f94e3e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/transformers/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -4374,8 +4374,9 @@ def create_accelerator_and_postprocess(self):
even_batches=accelerator_config.pop("even_batches"),
use_seedable_sampler=accelerator_config.pop("use_seedable_sampler"),
)
# this would have been updated above, no need for it anymore
accelerator_config.pop("gradient_accumulation_kwargs")
# this would have been updated above, no need for it anymore
accelerator_config.pop("gradient_accumulation_kwargs")

args = {
"deepspeed_plugin": self.args.deepspeed_plugin,
"gradient_accumulation_plugin": gradient_accumulation_plugin,
Expand Down

0 comments on commit 0f94e3e

Please sign in to comment.