Skip to content

Commit

Permalink
[Fix] freeze shard-reshard (#9067) (#9148)
Browse files Browse the repository at this point in the history
  • Loading branch information
bo-ke authored Sep 18, 2024
1 parent 4503dd3 commit 0540e97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion paddlenlp/trainer/utils/sharding_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def filter_sharded_params(state_dict, optimizer, sharding_group):
for (k, v) in state_dict.items():
if v.name in filtered_parameters:
filtered_state_dict[k] = v
else:
elif v.name not in [p.name for p in parameters]:
if sharding_rank == 0:
filtered_state_dict[k] = v
return filtered_state_dict
Expand Down

0 comments on commit 0540e97

Please sign in to comment.