Sentence Similarity
sentence-transformers
English
bert
ctranslate2
int8
float16
mteb
Sentence Transformers
Eval Results (legacy)
text-embeddings-inference
Instructions to use michaelfeil/ct2fast-e5-large-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use michaelfeil/ct2fast-e5-large-v2 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("michaelfeil/ct2fast-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] - Notebooks
- Google Colab
- Kaggle
Commit ·
9e910dc
1
Parent(s): d1c73ed
Upload intfloat/e5-large-v2 ctranslate fp16 weights
Browse files
README.md
CHANGED
|
@@ -2630,12 +2630,11 @@ model = EncoderCT2fromHfHub(
|
|
| 2630 |
# load in int8 on CUDA
|
| 2631 |
model_name_or_path=model_name,
|
| 2632 |
device="cuda",
|
| 2633 |
-
compute_type="
|
| 2634 |
# tokenizer=AutoTokenizer.from_pretrained("{ORG}/{NAME}")
|
| 2635 |
)
|
| 2636 |
outputs = model.generate(
|
| 2637 |
-
text=["
|
| 2638 |
-
max_length=64,
|
| 2639 |
)
|
| 2640 |
print(outputs.shape, outputs)
|
| 2641 |
```
|
|
|
|
| 2630 |
# load in int8 on CUDA
|
| 2631 |
model_name_or_path=model_name,
|
| 2632 |
device="cuda",
|
| 2633 |
+
compute_type="float16",
|
| 2634 |
# tokenizer=AutoTokenizer.from_pretrained("{ORG}/{NAME}")
|
| 2635 |
)
|
| 2636 |
outputs = model.generate(
|
| 2637 |
+
text=["I like soccer", "I like tennis", "The eiffel tower is in Paris"],
|
|
|
|
| 2638 |
)
|
| 2639 |
print(outputs.shape, outputs)
|
| 2640 |
```
|