Skip to content

Commit

Permalink
Merge pull request huggingface#6 from microsoft/raviskolli/ort
Browse files Browse the repository at this point in the history
Fix for ortmodule + ds config
  • Loading branch information
raviskolli authored Apr 21, 2021
2 parents 2322d22 + 5366e56 commit 0aaf93a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/transformers/integrations.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ def deepspeed_init(trainer, num_training_steps, resume_from_checkpoint=None):
deepspeed_zero3_enable(zero.get("stage") == 3)

# automatically assign the optimal config values based on model config
hidden_size = model.config.hidden_size
hidden_size = model._original_module.config.hidden_size if args.ort else model.config.hidden_size
if zero.get("reduce_bucket_size") == 0:
zero["reduce_bucket_size"] = hidden_size * hidden_size
if zero.get("stage3_prefetch_bucket_size") == 0:
Expand Down

0 comments on commit 0aaf93a

Please sign in to comment.