From 8cbc978be35bc9c4e1ae3f6dd82c7e6d405f44fe Mon Sep 17 00:00:00 2001 From: Zhan Ling Date: Mon, 13 Nov 2023 14:20:28 -0800 Subject: [PATCH] Add _no_split_modules to CLIPModel --- src/transformers/models/clip/modeling_clip.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/transformers/models/clip/modeling_clip.py b/src/transformers/models/clip/modeling_clip.py index 77d24a5da32518..eae23607964265 100644 --- a/src/transformers/models/clip/modeling_clip.py +++ b/src/transformers/models/clip/modeling_clip.py @@ -925,6 +925,7 @@ def forward( @add_start_docstrings(CLIP_START_DOCSTRING) class CLIPModel(CLIPPreTrainedModel): config_class = CLIPConfig + _no_split_modules = ["CLIPTextEmbeddings", "CLIPEncoderLayer"] def __init__(self, config: CLIPConfig): super().__init__(config)