src/transformers/models/convnextv2/modeling_convnextv2.py/ConvNextV2PreTrainedModel/_set_gradient_checkpointing
class ConvNextV2PreTrainedModel:    def _set_gradient_checkpointing(self, module, value=False):
        if isinstance(module, ConvNextV2Encoder):
            module.gradient_checkpointing = value