src/transformers/models/groupvit/modeling_groupvit.py/GroupViTPreTrainedModel/_set_gradient_checkpointing
class GroupViTPreTrainedModel:    def _set_gradient_checkpointing(self, module, value=False):
        if isinstance(module, (GroupViTTextEncoder, GroupViTVisionEncoder)):
            module.gradient_checkpointing = value