Sentence Similarity
sentence-transformers
PyTorch
TensorFlow
ONNX
Safetensors
OpenVINO
English
bert
mteb
Sentence Transformers
Eval Results (legacy)
text-embeddings-inference
Instructions to use intfloat/e5-small-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use intfloat/e5-small-v2 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("intfloat/e5-small-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
Michael Feil commited on
Commit ·
0f45e29
1
Parent(s): 67a456d
update readme
Browse files
README.md
CHANGED
|
@@ -2671,4 +2671,14 @@ If you find our paper or models helpful, please consider cite as follows:
|
|
| 2671 |
|
| 2672 |
## Limitations
|
| 2673 |
|
| 2674 |
-
This model only works for English texts. Long texts will be truncated to at most 512 tokens.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2671 |
|
| 2672 |
## Limitations
|
| 2673 |
|
| 2674 |
+
This model only works for English texts. Long texts will be truncated to at most 512 tokens.
|
| 2675 |
+
|
| 2676 |
+
## Sentence Transformers
|
| 2677 |
+
|
| 2678 |
+
Below is an example for usage with sentence_transformers. `pip install sentence_transformers~=2.2.2`
|
| 2679 |
+
This is community contributed, and results may vary up to numerical precision.
|
| 2680 |
+
```
|
| 2681 |
+
from sentence_transformers import SentenceTransformer
|
| 2682 |
+
model = SentenceTransformer('intfloat/e5-small-v2')
|
| 2683 |
+
embeddings = model.encode(input_texts, normalize_embeddings=True)
|
| 2684 |
+
```
|