src/transformers/models/x_clip/modeling_x_clip.py/XCLIPPreTrainedModel/_set_gradient_checkpointing
class XCLIPPreTrainedModel:    def _set_gradient_checkpointing(self, module, value=False):
        if isinstance(module, (XCLIPEncoder, XCLIPVisionEncoder)):
            module.gradient_checkpointing = value