src/transformers/models/xmod/modeling_xmod.py/XmodPreTrainedModel/_set_gradient_checkpointing
class XmodPreTrainedModel:    def _set_gradient_checkpointing(self, module, value=False):
        if isinstance(module, XmodEncoder):
            module.gradient_checkpointing = value