src/transformers/models/marian/modeling_marian.py/MarianPreTrainedModel/_set_gradient_checkpointing
class MarianPreTrainedModel:    def _set_gradient_checkpointing(self, module, value=False):
        if isinstance(module, (MarianDecoder, MarianEncoder)):
            module.gradient_checkpointing = value