def _decrease_loss_scale(self):
        """
        Decrease the loss scale by self.scale_factor.
        NOTE: the loss_scale will not go below self.threshold.
        """
        self.loss_scale /= self.scale_factor
        if self.threshold is not None:
            self.loss_scale = max(self.loss_scale, self.threshold)

        Decrease the loss scale by self.scale_factor.
        NOTE: the loss_scale will not go below self.threshold.
        
EVA-CLIP-18B/shinji/training/fp16.py