Skip to content

Commit

Permalink
fix load missing keys
Browse files Browse the repository at this point in the history
  • Loading branch information
DesmonDay committed Nov 29, 2024
1 parent 020a25f commit 514c006
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions paddlenlp/trainer/unified_checkpoint/check_completion.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@ def check_dynamic_load(args, weight_map, existed_files, is_master_weights=False,
state_dict = get_expected_state_dict(model)

for key in state_dict.keys():
if key in model._keys_to_ignore_on_load_missing:
continue
if sharding_group.nranks > 1:
static_name = struct2static_name_mappings.get(key, None)
param_rank = param2rank.get(static_name, None)
Expand Down

0 comments on commit 514c006

Please sign in to comment.