Update README.md
Browse files
README.md
CHANGED
@@ -19,7 +19,7 @@ pipeline_tag: sentence-similarity
|
|
19 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
20 |
should probably proofread and complete it, then remove this comment. -->
|
21 |
|
22 |
-
#
|
23 |
|
24 |
This model is a fine-tuned version of [intfloat/e5-base](https://huggingface.co/intfloat/e5-base) on german subset of the stsb_multi_mt dataset.
|
25 |
It achieves the following results on the evaluation set:
|
@@ -31,6 +31,35 @@ Test:
|
|
31 |
- Loss: 1.2162
|
32 |
- Pearson: 0.7252
|
33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
## Model description
|
35 |
|
36 |
More information needed
|
|
|
19 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
20 |
should probably proofread and complete it, then remove this comment. -->
|
21 |
|
22 |
+
# e5-base-german-sentence-embeddings
|
23 |
|
24 |
This model is a fine-tuned version of [intfloat/e5-base](https://huggingface.co/intfloat/e5-base) on german subset of the stsb_multi_mt dataset.
|
25 |
It achieves the following results on the evaluation set:
|
|
|
31 |
- Loss: 1.2162
|
32 |
- Pearson: 0.7252
|
33 |
|
34 |
+
## Usage
|
35 |
+
|
36 |
+
```python
|
37 |
+
#install sentence-transformers
|
38 |
+
!pip install -U sentence-transformers
|
39 |
+
|
40 |
+
from sentence_transformers import SentenceTransformer
|
41 |
+
|
42 |
+
# Download from the 🤗 Hub
|
43 |
+
model = SentenceTransformer("kaixkhazaki/e5-base-german-sentence-similarity")
|
44 |
+
|
45 |
+
sentences = [
|
46 |
+
'Ein älterer Herr genießt die Natur auf einer Parkbank.',
|
47 |
+
'Ein alter Mann vertieft sich in eine Zeitung im Stadtpark.',
|
48 |
+
'Ein Teenager hört Musik auf einer Bank.'
|
49 |
+
]
|
50 |
+
embeddings = model.encode(sentences)
|
51 |
+
|
52 |
+
# Get the similarity scores for the embeddings
|
53 |
+
similarities = model.similarity(embeddings, embeddings)
|
54 |
+
|
55 |
+
>>
|
56 |
+
tensor([[1.0000, 0.9044, 0.7919],
|
57 |
+
[0.9044, 1.0000, 0.7757],
|
58 |
+
[0.7919, 0.7757, 1.0000]])
|
59 |
+
|
60 |
+
|
61 |
+
```
|
62 |
+
|
63 |
## Model description
|
64 |
|
65 |
More information needed
|