src/transformers/models/megatron_bert/modeling_megatron_bert.py/MegatronBertPreTrainedModel/_set_gradient_checkpointing
class MegatronBertPreTrainedModel:    def _set_gradient_checkpointing(self, module, value=False):
        if isinstance(module, MegatronBertEncoder):
            module.gradient_checkpointing = value