Skip to content

Commit

Permalink
Use empty dict instead of none to load only metadata from dist ckpt (#…
Browse files Browse the repository at this point in the history
…11782)

due to change in mcore commit NVIDIA/Megatron-LM@31e8bfa

Signed-off-by: Chen Cui <[email protected]>
Co-authored-by: Chen Cui <[email protected]>
  • Loading branch information
ko3n1g and cuichenx authored Jan 8, 2025
1 parent f75bd88 commit 40d617e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nemo/lightning/pytorch/callbacks/peft.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ def load_checkpoint(
if getattr(path, "base_model_path", None):
## PEFT Resume, FIRST TIME
self.adapter_ckpt_path = Path(str(path))
adapter_ckpt = self.checkpoint_io.load_checkpoint(path) # Loads only metadata
adapter_ckpt = self.checkpoint_io.load_checkpoint(path, sharded_state_dict={}) # Loads only metadata
# path is adapter path to restore the training metadata, but switch to loading base model here.
path = self.model_ckpt_path = path.base_model_path
elif adapter_meta_path.exists():
Expand Down

0 comments on commit 40d617e

Please sign in to comment.