Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion megatron/core/optimizer/distrib_optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2528,7 +2528,7 @@ def _build_model_param_to_state_dict_param_map(self, state_dict):
for name, model_param in model_chunk.named_parameters():
while name.startswith("module."):
name = name[len("module.") :]
matched_keys = [k for k in names_in_state_dict if name in k]
matched_keys = [k for k in names_in_state_dict if k.endswith(name)]
assert (
len(matched_keys) == 1
), f"Parameter {name} has {len(matched_keys)} matches in state dict"
Expand Down
Loading