src/transformers/debug_utils.py/DebugUnderflowOverflow/_register_forward_hook
class DebugUnderflowOverflow:    def _register_forward_hook(self, module):
        module.register_forward_hook(self.forward_hook)