Skip to content

Commit

Permalink
fix map_location
Browse files Browse the repository at this point in the history
  • Loading branch information
NouamaneTazi committed Nov 22, 2024
1 parent 26ac3e0 commit 62fa626
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/nanotron/serialize/optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ def get_checkpoint_state_metadata(param_name: str, pp_rank: int, tp_rank: int) -
)
state_dict["state"][param_index][state_name] = sliced_tensor

optimizer.load_state_dict(state_dict, map_location="cpu")
optimizer.load_state_dict(state_dict, map_location=map_location)


def load_lr_scheduler(
Expand Down

0 comments on commit 62fa626

Please sign in to comment.