src/transformers/models/align/modeling_align.py/AlignPreTrainedModel/_set_gradient_checkpointing
class AlignPreTrainedModel:    def _set_gradient_checkpointing(self, module, value=False):
        if isinstance(module, (AlignTextModel, AlignVisionModel)):
            module.gradient_checkpointing = value