update modeling_clip.py
Browse files- modeling_clip.py +1 -6
modeling_clip.py
CHANGED
@@ -287,12 +287,7 @@ class JinaCLIPModel(JinaCLIPPreTrainedModel):
|
|
287 |
return self.visual_projection(self.vision_model(x=x))
|
288 |
|
289 |
def truncate_embeddings(self, embeddings, truncate_dim):
|
290 |
-
if
|
291 |
-
logger.warning(
|
292 |
-
"Matryoshka embeddings are not supported for jina-clip-v1, so dimension truncation will not be performed."
|
293 |
-
)
|
294 |
-
return embeddings
|
295 |
-
elif not self.config.matryoshka_dimensions:
|
296 |
logger.warning(
|
297 |
"Matryoshka embeddings are not supported, so dimension truncation will not be performed."
|
298 |
)
|
|
|
287 |
return self.visual_projection(self.vision_model(x=x))
|
288 |
|
289 |
def truncate_embeddings(self, embeddings, truncate_dim):
|
290 |
+
if not self.config.matryoshka_dimensions:
|
|
|
|
|
|
|
|
|
|
|
291 |
logger.warning(
|
292 |
"Matryoshka embeddings are not supported, so dimension truncation will not be performed."
|
293 |
)
|