src/transformers/models/whisper/modeling_whisper.py/WhisperPreTrainedModel/_set_gradient_checkpointing
class WhisperPreTrainedModel:    def _set_gradient_checkpointing(self, module, value=False):
        if isinstance(module, (WhisperDecoder, WhisperEncoder)):
            module.gradient_checkpointing = value