src/transformers/models/xglm/modeling_xglm.py/XGLMPreTrainedModel/_set_gradient_checkpointing
class XGLMPreTrainedModel:    def _set_gradient_checkpointing(self, module, value=False):
        if isinstance(module, XGLMModel):
            module.gradient_checkpointing = value