src/transformers/models/luke/modeling_luke.py/LukePreTrainedModel/_set_gradient_checkpointing
class LukePreTrainedModel:    def _set_gradient_checkpointing(self, module, value=False):
        if isinstance(module, LukeEncoder):
            module.gradient_checkpointing = value