src/transformers/models/blip_2/modeling_blip_2.py/Blip2PreTrainedModel/_set_gradient_checkpointing
class Blip2PreTrainedModel:    def _set_gradient_checkpointing(self, module, value=False):
        if isinstance(module, Blip2Encoder):
            module.gradient_checkpointing = value