Skip to content

Commit

Permalink
[Sharding] Fix gpt3 sharding hybrid parallel (PaddlePaddle#1648)
Browse files Browse the repository at this point in the history
  • Loading branch information
Baibaifan committed Jan 27, 2022
1 parent c720cf6 commit c728cab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/language_model/gpt-3/dygraph/run_pretrain.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def do_train(args):
if not any(nd in n for nd in ["bias", "norm"])
]

if args.sharding_stage == 1:
if args.sharding_stage == 1 and args.sharding_degree > 1:
optimizer = DygraphShardingOptimizer(
hcg=fleet.get_hybrid_communicate_group(),
user_defined_strategy=strategy,
Expand Down

0 comments on commit c728cab

Please sign in to comment.