Skip to content

Commit 2712cb0

Browse files
committed
update for llm_embedding_dim
1 parent 71b6b87 commit 2712cb0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llm2clip/eva_clip/model.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ class CLIPVisionCfg:
6565
@dataclass
6666
class CLIPTextCfg:
6767
use_embedding: bool = True
68+
llm_embedding_dim: int = 4096
6869
context_length: int = 77
6970
vocab_size: int = 49408
7071
width: int = 512
@@ -189,7 +190,7 @@ def _build_text_tower(
189190
masked_language_modeling=text_cfg.masked_language_modeling
190191
)
191192
elif text_cfg.use_embedding:
192-
text = TextProj(embedding_dim=4096, output_dim=embed_dim)
193+
text = TextProj(embedding_dim=text_cfg.llm_embedding_dim, output_dim=embed_dim)
193194
else:
194195
act_layer = QuickGELU if quick_gelu else nn.GELU
195196
norm_layer = LayerNorm

0 commit comments

Comments
 (0)