@@ -90,29 +90,24 @@ def __init__(
9090 super ().__init__ (model_name , cache_dir , threads , ** kwargs )
9191 if model_name == "nomic-ai/nomic-embed-text-v1.5-Q" :
9292 warnings .warn (
93- "The model 'nomic-ai/nomic-embed-text-v1.5-Q' has been updated on HuggingFace. "
94- "Please review the latest documentation and release notes to ensure compatibility with your workflow. " ,
95- UserWarning ,
96- stacklevel = 2 ,
97- )
98- if model_name == "sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2" :
99- warnings .warn (
100- "The model 'sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2' has been updated to "
101- "include a mean pooling layer. Please ensure your usage aligns with the new functionality. "
102- "Support for the previous version without mean pooling will be removed as of version 0.5.2." ,
93+ "The model 'nomic-ai/nomic-embed-text-v1.5-Q' has been updated on HuggingFace. Please review "
94+ "the latest documentation on HF and release notes to ensure compatibility with your workflow. " ,
10395 UserWarning ,
10496 stacklevel = 2 ,
10597 )
10698 if model_name in {
107- "sentence-transformers/paraphrase-multilingual-mpnet-base-v2" ,
99+ "sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2" ,
100+ "thenlper/gte-large" ,
108101 "intfloat/multilingual-e5-large" ,
102+ "sentence-transformers/paraphrase-multilingual-mpnet-base-v2" ,
109103 }:
110104 warnings .warn (
111- f"{ model_name } has been updated as of fastembed 0.5.2, outputs are now average pooled." ,
105+ f"The model { model_name } now uses mean pooling instead of CLS embedding. "
106+ f"In order to preserve the previous behaviour, consider either pinning fastembed version to 0.5.1 or "
107+ "using `add_custom_model` functionality." ,
112108 UserWarning ,
113109 stacklevel = 2 ,
114110 )
115-
116111 for EMBEDDING_MODEL_TYPE in self .EMBEDDINGS_REGISTRY :
117112 supported_models = EMBEDDING_MODEL_TYPE ._list_supported_models ()
118113 if any (model_name .lower () == model .model .lower () for model in supported_models ):
0 commit comments