src/transformers/models/canine/modeling_canine.py/CaninePreTrainedModel/_set_gradient_checkpointing
class CaninePreTrainedModel:    def _set_gradient_checkpointing(self, module, value=False):
        if isinstance(module, CanineEncoder):
            module.gradient_checkpointing = value