We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6feb7d3 commit da230f2Copy full SHA for da230f2
megatron/checkpointing.py
@@ -402,6 +402,11 @@ def load_checkpoint(
402
load_module_strict=neox_args.train_impl != "rm",
403
)
404
405
+ # respect values passed in the config ....
406
+ print_rank_0(f"Overwriting ckpt grad clip of {model.optimizer.clip_grad} to config value of {neox_args.gradient_clipping}")
407
+ model.optimizer.clip_grad = neox_args.gradient_clipping
408
+ print_rank_0(f"Value successfully set to {model.optimizer.clip_grad}")
409
+
410
if checkpoint_name is None:
411
# if an iteration is specified, we want to raise an error here rather than
412
# continuing silently, since we are trying to load a specific checkpoint
0 commit comments