Files changed (1) hide show
  1. build_mlp.py +1 -1
build_mlp.py CHANGED
@@ -59,7 +59,7 @@ class CLIPVisionTower(nn.Module):
59
  def load_model(self):
60
  self.vision_tower = CLIPVisionModel.from_pretrained(self.vision_tower_name)
61
  self.vision_tower.requires_grad_(False)
62
-
63
  self.is_loaded = True
64
 
65
  def resize_pos(self):
 
59
  def load_model(self):
60
  self.vision_tower = CLIPVisionModel.from_pretrained(self.vision_tower_name)
61
  self.vision_tower.requires_grad_(False)
62
+ self.vision_tower.gradient_checkpointing_enable({"use_reentrant": "True"})
63
  self.is_loaded = True
64
 
65
  def resize_pos(self):