mlsa-iai-msu-lab commited on
Commit
ac433d5
·
verified ·
1 Parent(s): e8eced9

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +130 -0
README.md ADDED
@@ -0,0 +1,130 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - ru
4
+ - en
5
+ - zh
6
+ library_name: sentence-transformers
7
+ pipeline_tag: sentence-similarity
8
+ tags:
9
+ - sentence-transformers
10
+ - sentence-similarity
11
+ - feature-extraction
12
+ widget: []
13
+ license: mit
14
+ ---
15
+
16
+ # SentenceTransformer
17
+
18
+ This is a [sentence-transformers](https://www.SBERT.net) model trained. It maps sentences & paragraphs to a 312-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
19
+
20
+ ## Model Details
21
+
22
+ ### Model Description
23
+ - **Model Type:** Sentence Transformer
24
+ <!-- - **Base model:** [Unknown](https://huggingface.co/unknown) -->
25
+ - **Maximum Sequence Length:** 1024 tokens
26
+ - **Output Dimensionality:** 312 tokens
27
+ - **Similarity Function:** Cosine Similarity
28
+ <!-- - **Training Dataset:** Unknown -->
29
+ <!-- - **Language:** Unknown -->
30
+ <!-- - **License:** Unknown -->
31
+
32
+ ### Full Model Architecture
33
+
34
+ ```
35
+ SentenceTransformer(
36
+ (0): Transformer({'max_seq_length': 1024, 'do_lower_case': False}) with Transformer model: RobertaModel
37
+ (1): Pooling({'word_embedding_dimension': 312, '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})
38
+ (2): Normalize()
39
+ )
40
+ ```
41
+
42
+ ## Usage
43
+
44
+ ### Direct Usage (Sentence Transformers)
45
+
46
+ First install the Sentence Transformers library:
47
+
48
+ ```bash
49
+ pip install -U sentence-transformers
50
+ ```
51
+
52
+ Then you can load this model and run inference.
53
+ ```python
54
+ from sentence_transformers import SentenceTransformer
55
+
56
+ # Download from the 🤗 Hub
57
+ model = SentenceTransformer("mlsa-iai-msu-lab/sci-rus-tiny3.1")
58
+ # Run inference
59
+ sentences = [
60
+ 'The weather is lovely today.',
61
+ "It's so sunny outside!",
62
+ 'He drove to the stadium.',
63
+ ]
64
+ embeddings = model.encode(sentences)
65
+ print(embeddings.shape)
66
+ # [3, 312]
67
+
68
+ # Get the similarity scores for the embeddings
69
+ similarities = model.similarity(embeddings, embeddings)
70
+ print(similarities.shape)
71
+ # [3, 3]
72
+ ```
73
+
74
+ <!--
75
+ ### Direct Usage (Transformers)
76
+
77
+ <details><summary>Click to see the direct usage in Transformers</summary>
78
+
79
+ </details>
80
+ -->
81
+
82
+ <!--
83
+ ### Downstream Usage (Sentence Transformers)
84
+
85
+ You can finetune this model on your own dataset.
86
+
87
+ <details><summary>Click to expand</summary>
88
+
89
+ </details>
90
+ -->
91
+
92
+ <!--
93
+ ### Out-of-Scope Use
94
+
95
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
96
+ -->
97
+
98
+ <!--
99
+ ## Bias, Risks and Limitations
100
+
101
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
102
+ -->
103
+
104
+ <!--
105
+ ### Recommendations
106
+
107
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
108
+ -->
109
+
110
+ ### Metrics
111
+
112
+ RuSciBench few shoot
113
+
114
+ | model name | ru | en | total avg |
115
+ |:------------------------------------|------:|------:|------------:|
116
+ | mlsa-iai-msu-lab/sci-rus-tiny | 28.37 | 27.87 | 60.79 |
117
+ | mlsa-iai-msu-lab/sci-rus-small-cite | 38.4 | 38.68 | 67.34 |
118
+ | mlsa-iai-msu-lab/sci-rus-tiny3-cite | 39.36 | 39.5 | 67.58 |
119
+ | mlsa-iai-msu-lab/sci-rus-tiny3.5 | 38.93 | 39.27 | 69.17 |
120
+ | mlsa-iai-msu-lab/sci-rus-tiny3.1 | 39 | 39.92 | 69.36 |
121
+
122
+ RuSciBench
123
+
124
+ | model_name | ru | en | total avg |
125
+ |:------------------------------------|------:|------:|------------:|
126
+ | mlsa-iai-msu-lab/sci-rus-tiny | 35.77 | 35.21 | 64.48 |
127
+ | mlsa-iai-msu-lab/sci-rus-tiny3-cite | 44.55 | 44.79 | 70.2 |
128
+ | mlsa-iai-msu-lab/sci-rus-small-cite | 44.53 | 44.81 | 70.4 |
129
+ | mlsa-iai-msu-lab/sci-rus-tiny3.1 | 44.52 | 45.15 | 72.05 |
130
+ | mlsa-iai-msu-lab/sci-rus-tiny3.5 | 44.48 | 45.4 | 72.09 |