src/transformers/models/altclip/modeling_altclip.py/AltCLIPPreTrainedModel/_set_gradient_checkpointing
class AltCLIPPreTrainedModel:    def _set_gradient_checkpointing(self, module, value=False):
        if isinstance(module, AltCLIPEncoder):
            module.gradient_checkpointing = value
        if isinstance(module, AltRobertaEncoder):
            module.gradient_checkpointing = value