src/transformers/models/gpt2/modeling_gpt2.py/GPT2PreTrainedModel/_set_gradient_checkpointing
class GPT2PreTrainedModel:    def _set_gradient_checkpointing(self, module, value=False):
        if isinstance(module, GPT2Model):
            module.gradient_checkpointing = value