src/transformers/models/mbart/modeling_mbart.py/MBartPreTrainedModel/_set_gradient_checkpointing
class MBartPreTrainedModel:    def _set_gradient_checkpointing(self, module, value=False):
        if isinstance(module, (MBartDecoder, MBartDecoder)):
            module.gradient_checkpointing = value