Diff: origin/master...HEAD, staged and unstaged changes
Total: 56 lines
Missing: 3 lines
Coverage: 94%
Source File
Diff Coverage (%)
Missing Lines
hyper_parallel/components/functional/aux_loss.py
97.5%
73
hyper_parallel/core/utils/moe_utils.py
100%
hyper_parallel/trainer/base.py
81.8%
545-546
hyper_parallel/components/functional/aux_loss.py
6970717273747576
state=_AUX_LOSS_STATE.get()ifstateisNoneornotstate.activeornotloss.requires_grad:returnifloss.numel()!=1:raiseValueError("Auxiliary gradient scaling requires a scalar task loss")defsave_scale(gradient:torch.Tensor)->None:"""Capture the actual multiplier after token and parallel weighting.