Skip to content

Commit

Permalink
query deepspeed global grad norm (bigscience-workshop#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaden Smith authored and stas00 committed Aug 10, 2021
1 parent 8947494 commit 4e27f6d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion megatron/training.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ def train_step(forward_step_func, data_iterator,
assert isinstance(model[0], deepspeed.PipelineEngine), model
loss = model[0].train_batch(data_iter=data_iterator)
skipped_iter = 0
grad_norm = 0.
grad_norm = model[0].get_global_grad_norm()
num_zeros_in_grad = 0
return {'lm loss' : loss}, skipped_iter, grad_norm, num_zeros_in_grad

Expand Down

0 comments on commit 4e27f6d

Please sign in to comment.