Update README.md
Browse files
README.md
CHANGED
@@ -1,49 +1,27 @@
|
|
1 |
-
---
|
2 |
-
library_name: sentence-transformers
|
3 |
-
pipeline_tag: sentence-similarity
|
4 |
-
tags:
|
5 |
-
- sentence-transformers
|
6 |
-
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
## Usage (Sentence-Transformers)
|
18 |
-
|
19 |
-
Using this model becomes easy when you have [sentence-transformers](https://www.SBERT.net) installed:
|
20 |
-
|
21 |
-
```
|
22 |
-
pip install -U sentence-transformers
|
23 |
-
```
|
24 |
-
|
25 |
-
Then you can use the model like this:
|
26 |
-
|
27 |
-
```python
|
28 |
-
from sentence_transformers import SentenceTransformer
|
29 |
-
sentences = ["This is an example sentence", "Each sentence is converted"]
|
30 |
-
|
31 |
-
model = SentenceTransformer('{MODEL_NAME}')
|
32 |
-
embeddings = model.encode(sentences)
|
33 |
-
print(embeddings)
|
34 |
-
```
|
35 |
-
|
36 |
-
|
37 |
|
38 |
## Evaluation Results
|
39 |
|
40 |
<!--- Describe how your model was evaluated -->
|
|
|
|
|
41 |
|
42 |
-
For an automated evaluation of this model, see the *Sentence Embeddings Benchmark*: [https://seb.sbert.net](https://seb.sbert.net?model_name={MODEL_NAME})
|
43 |
|
44 |
-
|
45 |
-
## Training
|
46 |
-
The model was trained with the parameters:
|
47 |
|
48 |
**DataLoader**:
|
49 |
|
@@ -65,7 +43,6 @@ Parameters of the fit()-Method:
|
|
65 |
"epochs": 10,
|
66 |
"evaluation_steps": 100,
|
67 |
"evaluator": "sentence_transformers.evaluation.EmbeddingSimilarityEvaluator.EmbeddingSimilarityEvaluator",
|
68 |
-
"max_grad_norm": 1,
|
69 |
"optimizer_class": "<class 'torch.optim.adamw.AdamW'>",
|
70 |
"optimizer_params": {
|
71 |
"lr": 2e-05
|
@@ -75,18 +52,4 @@ Parameters of the fit()-Method:
|
|
75 |
"warmup_steps": 790,
|
76 |
"weight_decay": 0.01
|
77 |
}
|
78 |
-
```
|
79 |
-
|
80 |
-
|
81 |
-
## Full Model Architecture
|
82 |
-
```
|
83 |
-
SentenceTransformer(
|
84 |
-
(0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: XLMRobertaModel
|
85 |
-
(1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
|
86 |
-
(2): Normalize()
|
87 |
-
)
|
88 |
-
```
|
89 |
-
|
90 |
-
## Citing & Authors
|
91 |
-
|
92 |
-
<!--- Describe where people can find more information -->
|
|
|
1 |
+
---
|
2 |
+
library_name: sentence-transformers
|
3 |
+
pipeline_tag: sentence-similarity
|
4 |
+
tags:
|
5 |
+
- sentence-transformers
|
6 |
+
- sentence-similarity
|
7 |
+
license: mit
|
8 |
+
language:
|
9 |
+
- en
|
10 |
+
- ru
|
11 |
+
---
|
12 |
+
|
13 |
+
# Multilingual E5 WB
|
14 |
+
|
15 |
+
Fine-tuned version of default [multilingual-e5-base](https://huggingface.co/intfloat/multilingual-e5-base) for WB DS School and RAG project.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
|
17 |
## Evaluation Results
|
18 |
|
19 |
<!--- Describe how your model was evaluated -->
|
20 |
+
As model is used as retriever, goal was to boost its performance at cosine similarity between question and answer.
|
21 |
+
With given dataset of QA pairs model performance on EmbeddingSimilarityEvaluator improved from 0.62 to 0.78
|
22 |
|
|
|
23 |
|
24 |
+
## Fine Tuning
|
|
|
|
|
25 |
|
26 |
**DataLoader**:
|
27 |
|
|
|
43 |
"epochs": 10,
|
44 |
"evaluation_steps": 100,
|
45 |
"evaluator": "sentence_transformers.evaluation.EmbeddingSimilarityEvaluator.EmbeddingSimilarityEvaluator",
|
|
|
46 |
"optimizer_class": "<class 'torch.optim.adamw.AdamW'>",
|
47 |
"optimizer_params": {
|
48 |
"lr": 2e-05
|
|
|
52 |
"warmup_steps": 790,
|
53 |
"weight_decay": 0.01
|
54 |
}
|
55 |
+
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|