src/transformers/models/electra/modeling_electra.py/ElectraPreTrainedModel/_set_gradient_checkpointing
class ElectraPreTrainedModel:    def _set_gradient_checkpointing(self, module, value=False):
        if isinstance(module, ElectraEncoder):
            module.gradient_checkpointing = value