Skip to content

Commit

Permalink
BLIP: enable device map (#34850)
Browse files Browse the repository at this point in the history
fix device map
  • Loading branch information
zucchini-nlp authored Dec 11, 2024
1 parent 10feacd commit 9094b87
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/transformers/models/blip/modeling_blip.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,7 @@ class BlipPreTrainedModel(PreTrainedModel):
config_class = BlipConfig
base_model_prefix = "blip"
supports_gradient_checkpointing = True
_no_split_modules = ["BlipEncoderLayer"]

def _init_weights(self, module):
"""Initialize the weights"""
Expand Down

0 comments on commit 9094b87

Please sign in to comment.