src/transformers/models/m2m_100/modeling_m2m_100.py/M2M100PreTrainedModel/_set_gradient_checkpointing
class M2M100PreTrainedModel:    def _set_gradient_checkpointing(self, module, value=False):
        if isinstance(module, (M2M100Decoder, M2M100Encoder)):
            module.gradient_checkpointing = value