Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,25 @@
|
|
1 |
-
---
|
2 |
-
license: apache-2.0
|
3 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
---
|
4 |
+
|
5 |
+
## Model
|
6 |
+
OpenVINO Version 8bit of bce-embedding-base_v1. Using: https://huggingface.co/spaces/sentence-transformers/backend-export.
|
7 |
+
Calibrated using params: nyu-mll/glue, sst2, train, sentence, 300
|
8 |
+
|
9 |
+
|
10 |
+
## Inference
|
11 |
+
|
12 |
+
```python
|
13 |
+
from sentence_transformers import SentenceTransformer
|
14 |
+
|
15 |
+
# 1. Load the model from the Hugging Face Hub
|
16 |
+
model = SentenceTransformer(
|
17 |
+
"guoch/bce-embedding-base_v1-openvino-qint8",
|
18 |
+
backend="openvino",
|
19 |
+
model_kwargs={"file_name": "openvino_model_qint8_quantized.xml"},
|
20 |
+
)
|
21 |
+
|
22 |
+
# 2. Inference works as normal
|
23 |
+
embeddings = model.encode(["The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium."])
|
24 |
+
similarities = model.similarity(embeddings, embeddings)
|
25 |
+
```
|