src/transformers/models/ernie_m/modeling_ernie_m.py/ErnieMPreTrainedModel/_set_gradient_checkpointing
class ErnieMPreTrainedModel:    def _set_gradient_checkpointing(self, module, value=False):
        if isinstance(module, ErnieMEncoder):
            module.gradient_checkpointing = value