Skip to content

Commit

Permalink
Merge branch 'jbarker/debug_pp_convert' into 'main'
Browse files Browse the repository at this point in the history
Fix bug when loading pp>1 model with frozen layers

See merge request ADLR/megatron-lm!2523
  • Loading branch information
jaredcasper committed Jan 9, 2025
2 parents 8fba594 + 458bfc9 commit 3046e33
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion megatron/core/optimizer/optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,8 @@ def get_loss_scale(self):
return self.grad_scaler.scale

def reload_model_params(self):
self._copy_model_params_to_main_params()
if self.param_groups:
self._copy_model_params_to_main_params()

def _unscale_main_grads_and_check_for_nan(self):

Expand Down

0 comments on commit 3046e33

Please sign in to comment.