Skip to content

Commit

Permalink
conversion issue fix (#7648) (#7668)
Browse files Browse the repository at this point in the history
Signed-off-by: dimapihtar <[email protected]>
Co-authored-by: Dmytro Pykhtar <[email protected]>
  • Loading branch information
2 people authored and yaoyu-33 committed Oct 13, 2023
1 parent 2209a30 commit 70c0a37
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1332,7 +1332,7 @@ def on_load_checkpoint(self, checkpoint) -> None:

# mcore uses distributed checkpointing
if self.mcore_gpt:
if 'state_dict' in checkpoint:
if 'state_dict' in checkpoint and checkpoint['state_dict']:
for index, module in enumerate(self.get_gpt_module_list()):
if parallel_state.get_virtual_pipeline_model_parallel_world_size() is not None:
checkpoint_state_dict = checkpoint['state_dict'][f'model_{index}']
Expand Down

0 comments on commit 70c0a37

Please sign in to comment.