MCPcopy Create free account
hub / github.com/zai-org/CodeGeeX / get_loss_scale

Method get_loss_scale

codegeex/megatron/optimizer/optimizer.py:469–471  ·  view source on GitHub ↗

FP32 optimizer does not do any scaling.

(self)

Source from the content-addressed store, hash-verified

467 _zero_grad_group_helper(group["params"], set_to_none)
468
469 def get_loss_scale(self):
470 """FP32 optimizer does not do any scaling."""
471 return self._scale
472
473 @torch.no_grad()
474 def step(self):

Callers 3

trainFunction · 0.45
__init__Method · 0.45
__init__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected