src/transformers/models/vilt/modeling_vilt.py/ViltPreTrainedModel/_set_gradient_checkpointing
class ViltPreTrainedModel:    def _set_gradient_checkpointing(self, module, value=False):
        if isinstance(module, ViltEncoder):
            module.gradient_checkpointing = value