mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-31 02:02:21 +06:00
Clip device map (#19409)
* add first generation tutorial * uP * [Clip] Add text model to device map
This commit is contained in:
parent
c2b83d540e
commit
06514b3e1a
@ -688,6 +688,8 @@ class CLIPTextTransformer(nn.Module):
|
||||
class CLIPTextModel(CLIPPreTrainedModel):
|
||||
config_class = CLIPTextConfig
|
||||
|
||||
_no_split_modules = ["CLIPEncoderLayer"]
|
||||
|
||||
def __init__(self, config: CLIPTextConfig):
|
||||
super().__init__(config)
|
||||
self.text_model = CLIPTextTransformer(config)
|
||||
|
Loading…
Reference in New Issue
Block a user