koukandre commited on
Commit
c87a5b2
·
1 Parent(s): 7dc253b

update modeling_clip.py

Browse files
Files changed (1) hide show
  1. 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 "jina-clip-v1" in self.config._name_or_path:
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
  )