src/transformers/models/encoder_decoder/modeling_encoder_decoder.py/EncoderDecoderModel/_set_gradient_checkpointing
class EncoderDecoderModel:    def _set_gradient_checkpointing(self, module, value=False):
        # call both encoder and decoder function on gradient checkpointing
        self.encoder._set_gradient_checkpointing(module, value=value)
        self.decoder._set_gradient_checkpointing(module, value=value)