Sentence Similarity
sentence-transformers
PyTorch
ONNX
Safetensors
OpenVINO
English
bert
mteb
Sentence Transformers
Eval Results (legacy)
text-embeddings-inference
Instructions to use intfloat/e5-large-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use intfloat/e5-large-v2 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("intfloat/e5-large-v2") sentences = [ "That is a happy person", "That is a happy dog", "That is a very happy person", "Today is a sunny day" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Inference
- Notebooks
- Google Colab
- Kaggle
Possible Vector Collaps Issue
#10
by Banso - opened
Hey, amazing work!
In some of my experiments, the model seems to predict vectors in certain areas, which causes the relatively high (> 0.7) cosine similarity.
I think this might be due to vector collapse. Maybe it's worth investigating in this direction.
You are right, the produced embeddings concentrate in a certain area of the vector space.
I suspect this is a result of using contrastive loss with low temperature (0.01), but it is surely a good research question.