Add new SentenceTransformer model.
Browse files- 1_Pooling/config.json +10 -0
- README.md +811 -0
- config.json +30 -0
- config_sentence_transformers.json +10 -0
- model.safetensors +3 -0
- modules.json +14 -0
- sentence_bert_config.json +4 -0
- special_tokens_map.json +37 -0
- tokenizer.json +0 -0
- tokenizer_config.json +58 -0
- vocab.txt +0 -0
1_Pooling/config.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"word_embedding_dimension": 768,
|
3 |
+
"pooling_mode_cls_token": false,
|
4 |
+
"pooling_mode_mean_tokens": true,
|
5 |
+
"pooling_mode_max_tokens": false,
|
6 |
+
"pooling_mode_mean_sqrt_len_tokens": false,
|
7 |
+
"pooling_mode_weightedmean_tokens": false,
|
8 |
+
"pooling_mode_lasttoken": false,
|
9 |
+
"include_prompt": true
|
10 |
+
}
|
README.md
ADDED
@@ -0,0 +1,811 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language: []
|
3 |
+
library_name: sentence-transformers
|
4 |
+
tags:
|
5 |
+
- sentence-transformers
|
6 |
+
- sentence-similarity
|
7 |
+
- feature-extraction
|
8 |
+
- generated_from_trainer
|
9 |
+
- dataset_size:557850
|
10 |
+
- loss:MatryoshkaLoss
|
11 |
+
- loss:MultipleNegativesRankingLoss
|
12 |
+
base_model: UBC-NLP/serengeti-E250
|
13 |
+
datasets: []
|
14 |
+
metrics:
|
15 |
+
- pearson_cosine
|
16 |
+
- spearman_cosine
|
17 |
+
- pearson_manhattan
|
18 |
+
- spearman_manhattan
|
19 |
+
- pearson_euclidean
|
20 |
+
- spearman_euclidean
|
21 |
+
- pearson_dot
|
22 |
+
- spearman_dot
|
23 |
+
- pearson_max
|
24 |
+
- spearman_max
|
25 |
+
widget:
|
26 |
+
- source_sentence: Mwanamume aliyepangwa vizuri anasimama kwa mguu mmoja karibu na
|
27 |
+
pwani safi ya bahari.
|
28 |
+
sentences:
|
29 |
+
- mtu anacheka wakati wa kufua nguo
|
30 |
+
- Mwanamume fulani yuko nje karibu na ufuo wa bahari.
|
31 |
+
- Mwanamume fulani ameketi kwenye sofa yake.
|
32 |
+
- source_sentence: Mwanamume mwenye ngozi nyeusi akivuta sigareti karibu na chombo
|
33 |
+
cha taka cha kijani.
|
34 |
+
sentences:
|
35 |
+
- Karibu na chombo cha taka mwanamume huyo alisimama na kuvuta sigareti
|
36 |
+
- Kitanda ni chafu.
|
37 |
+
- Alipokuwa kwenye dimbwi la kuogelea mvulana huyo mwenye ugonjwa wa albino alijihadhari
|
38 |
+
na jua kupita kiasi
|
39 |
+
- source_sentence: Mwanamume kijana mwenye nywele nyekundu anaketi ukutani akisoma
|
40 |
+
gazeti huku mwanamke na msichana mchanga wakipita.
|
41 |
+
sentences:
|
42 |
+
- Mwanamume aliyevalia shati la bluu amegonga ukuta kando ya barabara na gari la
|
43 |
+
bluu na gari nyekundu lenye maji nyuma.
|
44 |
+
- Mwanamume mchanga anatazama gazeti huku wanawake wawili wakipita karibu naye.
|
45 |
+
- Mwanamume huyo mchanga analala huku Mama akimwongoza binti yake kwenye bustani.
|
46 |
+
- source_sentence: Wasichana wako nje.
|
47 |
+
sentences:
|
48 |
+
- Wasichana wawili wakisafiri kwenye sehemu ya kusisimua.
|
49 |
+
- Kuna watu watatu wakiongoza gari linaloweza kugeuzwa-geuzwa wakipita watu wengine.
|
50 |
+
- Wasichana watatu wamesimama pamoja katika chumba, mmoja anasikiliza, mwingine
|
51 |
+
anaandika ukutani na wa tatu anaongea nao.
|
52 |
+
- source_sentence: Mwanamume aliyevalia koti la bluu la kuzuia upepo, amelala uso
|
53 |
+
chini kwenye benchi ya bustani, akiwa na chupa ya pombe iliyofungwa kwenye mojawapo
|
54 |
+
ya miguu ya benchi.
|
55 |
+
sentences:
|
56 |
+
- Mwanamume amelala uso chini kwenye benchi ya bustani.
|
57 |
+
- Mwanamke anaunganisha uzi katika mipira kando ya rundo la mipira
|
58 |
+
- Mwanamume fulani anacheza dansi kwenye klabu hiyo akifungua chupa.
|
59 |
+
pipeline_tag: sentence-similarity
|
60 |
+
model-index:
|
61 |
+
- name: SentenceTransformer based on UBC-NLP/serengeti-E250
|
62 |
+
results:
|
63 |
+
- task:
|
64 |
+
type: semantic-similarity
|
65 |
+
name: Semantic Similarity
|
66 |
+
dataset:
|
67 |
+
name: sts test 768
|
68 |
+
type: sts-test-768
|
69 |
+
metrics:
|
70 |
+
- type: pearson_cosine
|
71 |
+
value: 0.7113368462970326
|
72 |
+
name: Pearson Cosine
|
73 |
+
- type: spearman_cosine
|
74 |
+
value: 0.706531149090894
|
75 |
+
name: Spearman Cosine
|
76 |
+
- type: pearson_manhattan
|
77 |
+
value: 0.7134349154531519
|
78 |
+
name: Pearson Manhattan
|
79 |
+
- type: spearman_manhattan
|
80 |
+
value: 0.7023005843725415
|
81 |
+
name: Spearman Manhattan
|
82 |
+
- type: pearson_euclidean
|
83 |
+
value: 0.7137962920501839
|
84 |
+
name: Pearson Euclidean
|
85 |
+
- type: spearman_euclidean
|
86 |
+
value: 0.7020941994285994
|
87 |
+
name: Spearman Euclidean
|
88 |
+
- type: pearson_dot
|
89 |
+
value: 0.3920803758314358
|
90 |
+
name: Pearson Dot
|
91 |
+
- type: spearman_dot
|
92 |
+
value: 0.3601086266312748
|
93 |
+
name: Spearman Dot
|
94 |
+
- type: pearson_max
|
95 |
+
value: 0.7137962920501839
|
96 |
+
name: Pearson Max
|
97 |
+
- type: spearman_max
|
98 |
+
value: 0.706531149090894
|
99 |
+
name: Spearman Max
|
100 |
+
- task:
|
101 |
+
type: semantic-similarity
|
102 |
+
name: Semantic Similarity
|
103 |
+
dataset:
|
104 |
+
name: sts test 512
|
105 |
+
type: sts-test-512
|
106 |
+
metrics:
|
107 |
+
- type: pearson_cosine
|
108 |
+
value: 0.7090618585285485
|
109 |
+
name: Pearson Cosine
|
110 |
+
- type: spearman_cosine
|
111 |
+
value: 0.7045766195278508
|
112 |
+
name: Spearman Cosine
|
113 |
+
- type: pearson_manhattan
|
114 |
+
value: 0.7129955390384859
|
115 |
+
name: Pearson Manhattan
|
116 |
+
- type: spearman_manhattan
|
117 |
+
value: 0.7021695501159393
|
118 |
+
name: Spearman Manhattan
|
119 |
+
- type: pearson_euclidean
|
120 |
+
value: 0.7138697740168334
|
121 |
+
name: Pearson Euclidean
|
122 |
+
- type: spearman_euclidean
|
123 |
+
value: 0.7032055408694606
|
124 |
+
name: Spearman Euclidean
|
125 |
+
- type: pearson_dot
|
126 |
+
value: 0.39352767760073326
|
127 |
+
name: Pearson Dot
|
128 |
+
- type: spearman_dot
|
129 |
+
value: 0.3628376619678567
|
130 |
+
name: Spearman Dot
|
131 |
+
- type: pearson_max
|
132 |
+
value: 0.7138697740168334
|
133 |
+
name: Pearson Max
|
134 |
+
- type: spearman_max
|
135 |
+
value: 0.7045766195278508
|
136 |
+
name: Spearman Max
|
137 |
+
- task:
|
138 |
+
type: semantic-similarity
|
139 |
+
name: Semantic Similarity
|
140 |
+
dataset:
|
141 |
+
name: sts test 256
|
142 |
+
type: sts-test-256
|
143 |
+
metrics:
|
144 |
+
- type: pearson_cosine
|
145 |
+
value: 0.7067837420770313
|
146 |
+
name: Pearson Cosine
|
147 |
+
- type: spearman_cosine
|
148 |
+
value: 0.7044452613349608
|
149 |
+
name: Spearman Cosine
|
150 |
+
- type: pearson_manhattan
|
151 |
+
value: 0.7137425083925593
|
152 |
+
name: Pearson Manhattan
|
153 |
+
- type: spearman_manhattan
|
154 |
+
value: 0.7032345257234871
|
155 |
+
name: Spearman Manhattan
|
156 |
+
- type: pearson_euclidean
|
157 |
+
value: 0.7146861583047366
|
158 |
+
name: Pearson Euclidean
|
159 |
+
- type: spearman_euclidean
|
160 |
+
value: 0.7039212190752775
|
161 |
+
name: Spearman Euclidean
|
162 |
+
- type: pearson_dot
|
163 |
+
value: 0.37462153895392747
|
164 |
+
name: Pearson Dot
|
165 |
+
- type: spearman_dot
|
166 |
+
value: 0.34441190254194326
|
167 |
+
name: Spearman Dot
|
168 |
+
- type: pearson_max
|
169 |
+
value: 0.7146861583047366
|
170 |
+
name: Pearson Max
|
171 |
+
- type: spearman_max
|
172 |
+
value: 0.7044452613349608
|
173 |
+
name: Spearman Max
|
174 |
+
- task:
|
175 |
+
type: semantic-similarity
|
176 |
+
name: Semantic Similarity
|
177 |
+
dataset:
|
178 |
+
name: sts test 128
|
179 |
+
type: sts-test-128
|
180 |
+
metrics:
|
181 |
+
- type: pearson_cosine
|
182 |
+
value: 0.7046839100746249
|
183 |
+
name: Pearson Cosine
|
184 |
+
- type: spearman_cosine
|
185 |
+
value: 0.7050559450173808
|
186 |
+
name: Spearman Cosine
|
187 |
+
- type: pearson_manhattan
|
188 |
+
value: 0.7120431790616113
|
189 |
+
name: Pearson Manhattan
|
190 |
+
- type: spearman_manhattan
|
191 |
+
value: 0.7010054121016321
|
192 |
+
name: Spearman Manhattan
|
193 |
+
- type: pearson_euclidean
|
194 |
+
value: 0.7132280398983044
|
195 |
+
name: Pearson Euclidean
|
196 |
+
- type: spearman_euclidean
|
197 |
+
value: 0.701626975970973
|
198 |
+
name: Spearman Euclidean
|
199 |
+
- type: pearson_dot
|
200 |
+
value: 0.35455409787695585
|
201 |
+
name: Pearson Dot
|
202 |
+
- type: spearman_dot
|
203 |
+
value: 0.32292034736383524
|
204 |
+
name: Spearman Dot
|
205 |
+
- type: pearson_max
|
206 |
+
value: 0.7132280398983044
|
207 |
+
name: Pearson Max
|
208 |
+
- type: spearman_max
|
209 |
+
value: 0.7050559450173808
|
210 |
+
name: Spearman Max
|
211 |
+
- task:
|
212 |
+
type: semantic-similarity
|
213 |
+
name: Semantic Similarity
|
214 |
+
dataset:
|
215 |
+
name: sts test 64
|
216 |
+
type: sts-test-64
|
217 |
+
metrics:
|
218 |
+
- type: pearson_cosine
|
219 |
+
value: 0.7012310578605567
|
220 |
+
name: Pearson Cosine
|
221 |
+
- type: spearman_cosine
|
222 |
+
value: 0.7044132231714119
|
223 |
+
name: Spearman Cosine
|
224 |
+
- type: pearson_manhattan
|
225 |
+
value: 0.7091211798265005
|
226 |
+
name: Pearson Manhattan
|
227 |
+
- type: spearman_manhattan
|
228 |
+
value: 0.6972792688781575
|
229 |
+
name: Spearman Manhattan
|
230 |
+
- type: pearson_euclidean
|
231 |
+
value: 0.7103033981031003
|
232 |
+
name: Pearson Euclidean
|
233 |
+
- type: spearman_euclidean
|
234 |
+
value: 0.6985716335223231
|
235 |
+
name: Spearman Euclidean
|
236 |
+
- type: pearson_dot
|
237 |
+
value: 0.3379821887901175
|
238 |
+
name: Pearson Dot
|
239 |
+
- type: spearman_dot
|
240 |
+
value: 0.30513652558145304
|
241 |
+
name: Spearman Dot
|
242 |
+
- type: pearson_max
|
243 |
+
value: 0.7103033981031003
|
244 |
+
name: Pearson Max
|
245 |
+
- type: spearman_max
|
246 |
+
value: 0.7044132231714119
|
247 |
+
name: Spearman Max
|
248 |
+
---
|
249 |
+
|
250 |
+
# SentenceTransformer based on UBC-NLP/serengeti-E250
|
251 |
+
|
252 |
+
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [UBC-NLP/serengeti-E250](https://huggingface.co/UBC-NLP/serengeti-E250). It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
|
253 |
+
|
254 |
+
## Model Details
|
255 |
+
|
256 |
+
### Model Description
|
257 |
+
- **Model Type:** Sentence Transformer
|
258 |
+
- **Base model:** [UBC-NLP/serengeti-E250](https://huggingface.co/UBC-NLP/serengeti-E250) <!-- at revision 41b5b8b6179c4af2859768cbf4f0f03e928d651d -->
|
259 |
+
- **Maximum Sequence Length:** 512 tokens
|
260 |
+
- **Output Dimensionality:** 768 tokens
|
261 |
+
- **Similarity Function:** Cosine Similarity
|
262 |
+
<!-- - **Training Dataset:** Unknown -->
|
263 |
+
<!-- - **Language:** Unknown -->
|
264 |
+
<!-- - **License:** Unknown -->
|
265 |
+
|
266 |
+
### Model Sources
|
267 |
+
|
268 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
269 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
|
270 |
+
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
|
271 |
+
|
272 |
+
### Full Model Architecture
|
273 |
+
|
274 |
+
```
|
275 |
+
SentenceTransformer(
|
276 |
+
(0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: ElectraModel
|
277 |
+
(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})
|
278 |
+
)
|
279 |
+
```
|
280 |
+
|
281 |
+
## Usage
|
282 |
+
|
283 |
+
### Direct Usage (Sentence Transformers)
|
284 |
+
|
285 |
+
First install the Sentence Transformers library:
|
286 |
+
|
287 |
+
```bash
|
288 |
+
pip install -U sentence-transformers
|
289 |
+
```
|
290 |
+
|
291 |
+
Then you can load this model and run inference.
|
292 |
+
```python
|
293 |
+
from sentence_transformers import SentenceTransformer
|
294 |
+
|
295 |
+
# Download from the 🤗 Hub
|
296 |
+
model = SentenceTransformer("sartifyllc/swahili-serengeti-E250-nli-matryoshka")
|
297 |
+
# Run inference
|
298 |
+
sentences = [
|
299 |
+
'Mwanamume aliyevalia koti la bluu la kuzuia upepo, amelala uso chini kwenye benchi ya bustani, akiwa na chupa ya pombe iliyofungwa kwenye mojawapo ya miguu ya benchi.',
|
300 |
+
'Mwanamume amelala uso chini kwenye benchi ya bustani.',
|
301 |
+
'Mwanamume fulani anacheza dansi kwenye klabu hiyo akifungua chupa.',
|
302 |
+
]
|
303 |
+
embeddings = model.encode(sentences)
|
304 |
+
print(embeddings.shape)
|
305 |
+
# [3, 768]
|
306 |
+
|
307 |
+
# Get the similarity scores for the embeddings
|
308 |
+
similarities = model.similarity(embeddings, embeddings)
|
309 |
+
print(similarities.shape)
|
310 |
+
# [3, 3]
|
311 |
+
```
|
312 |
+
|
313 |
+
<!--
|
314 |
+
### Direct Usage (Transformers)
|
315 |
+
|
316 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
317 |
+
|
318 |
+
</details>
|
319 |
+
-->
|
320 |
+
|
321 |
+
<!--
|
322 |
+
### Downstream Usage (Sentence Transformers)
|
323 |
+
|
324 |
+
You can finetune this model on your own dataset.
|
325 |
+
|
326 |
+
<details><summary>Click to expand</summary>
|
327 |
+
|
328 |
+
</details>
|
329 |
+
-->
|
330 |
+
|
331 |
+
<!--
|
332 |
+
### Out-of-Scope Use
|
333 |
+
|
334 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
335 |
+
-->
|
336 |
+
|
337 |
+
## Evaluation
|
338 |
+
|
339 |
+
### Metrics
|
340 |
+
|
341 |
+
#### Semantic Similarity
|
342 |
+
* Dataset: `sts-test-768`
|
343 |
+
* Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
|
344 |
+
|
345 |
+
| Metric | Value |
|
346 |
+
|:--------------------|:-----------|
|
347 |
+
| pearson_cosine | 0.7113 |
|
348 |
+
| **spearman_cosine** | **0.7065** |
|
349 |
+
| pearson_manhattan | 0.7134 |
|
350 |
+
| spearman_manhattan | 0.7023 |
|
351 |
+
| pearson_euclidean | 0.7138 |
|
352 |
+
| spearman_euclidean | 0.7021 |
|
353 |
+
| pearson_dot | 0.3921 |
|
354 |
+
| spearman_dot | 0.3601 |
|
355 |
+
| pearson_max | 0.7138 |
|
356 |
+
| spearman_max | 0.7065 |
|
357 |
+
|
358 |
+
#### Semantic Similarity
|
359 |
+
* Dataset: `sts-test-512`
|
360 |
+
* Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
|
361 |
+
|
362 |
+
| Metric | Value |
|
363 |
+
|:--------------------|:-----------|
|
364 |
+
| pearson_cosine | 0.7091 |
|
365 |
+
| **spearman_cosine** | **0.7046** |
|
366 |
+
| pearson_manhattan | 0.713 |
|
367 |
+
| spearman_manhattan | 0.7022 |
|
368 |
+
| pearson_euclidean | 0.7139 |
|
369 |
+
| spearman_euclidean | 0.7032 |
|
370 |
+
| pearson_dot | 0.3935 |
|
371 |
+
| spearman_dot | 0.3628 |
|
372 |
+
| pearson_max | 0.7139 |
|
373 |
+
| spearman_max | 0.7046 |
|
374 |
+
|
375 |
+
#### Semantic Similarity
|
376 |
+
* Dataset: `sts-test-256`
|
377 |
+
* Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
|
378 |
+
|
379 |
+
| Metric | Value |
|
380 |
+
|:--------------------|:-----------|
|
381 |
+
| pearson_cosine | 0.7068 |
|
382 |
+
| **spearman_cosine** | **0.7044** |
|
383 |
+
| pearson_manhattan | 0.7137 |
|
384 |
+
| spearman_manhattan | 0.7032 |
|
385 |
+
| pearson_euclidean | 0.7147 |
|
386 |
+
| spearman_euclidean | 0.7039 |
|
387 |
+
| pearson_dot | 0.3746 |
|
388 |
+
| spearman_dot | 0.3444 |
|
389 |
+
| pearson_max | 0.7147 |
|
390 |
+
| spearman_max | 0.7044 |
|
391 |
+
|
392 |
+
#### Semantic Similarity
|
393 |
+
* Dataset: `sts-test-128`
|
394 |
+
* Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
|
395 |
+
|
396 |
+
| Metric | Value |
|
397 |
+
|:--------------------|:-----------|
|
398 |
+
| pearson_cosine | 0.7047 |
|
399 |
+
| **spearman_cosine** | **0.7051** |
|
400 |
+
| pearson_manhattan | 0.712 |
|
401 |
+
| spearman_manhattan | 0.701 |
|
402 |
+
| pearson_euclidean | 0.7132 |
|
403 |
+
| spearman_euclidean | 0.7016 |
|
404 |
+
| pearson_dot | 0.3546 |
|
405 |
+
| spearman_dot | 0.3229 |
|
406 |
+
| pearson_max | 0.7132 |
|
407 |
+
| spearman_max | 0.7051 |
|
408 |
+
|
409 |
+
#### Semantic Similarity
|
410 |
+
* Dataset: `sts-test-64`
|
411 |
+
* Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
|
412 |
+
|
413 |
+
| Metric | Value |
|
414 |
+
|:--------------------|:-----------|
|
415 |
+
| pearson_cosine | 0.7012 |
|
416 |
+
| **spearman_cosine** | **0.7044** |
|
417 |
+
| pearson_manhattan | 0.7091 |
|
418 |
+
| spearman_manhattan | 0.6973 |
|
419 |
+
| pearson_euclidean | 0.7103 |
|
420 |
+
| spearman_euclidean | 0.6986 |
|
421 |
+
| pearson_dot | 0.338 |
|
422 |
+
| spearman_dot | 0.3051 |
|
423 |
+
| pearson_max | 0.7103 |
|
424 |
+
| spearman_max | 0.7044 |
|
425 |
+
|
426 |
+
<!--
|
427 |
+
## Bias, Risks and Limitations
|
428 |
+
|
429 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
430 |
+
-->
|
431 |
+
|
432 |
+
<!--
|
433 |
+
### Recommendations
|
434 |
+
|
435 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
436 |
+
-->
|
437 |
+
|
438 |
+
## Training Details
|
439 |
+
|
440 |
+
### Training Hyperparameters
|
441 |
+
#### Non-Default Hyperparameters
|
442 |
+
|
443 |
+
- `per_device_train_batch_size`: 16
|
444 |
+
- `per_device_eval_batch_size`: 16
|
445 |
+
- `learning_rate`: 2e-05
|
446 |
+
- `num_train_epochs`: 1
|
447 |
+
- `warmup_ratio`: 0.1
|
448 |
+
- `bf16`: True
|
449 |
+
- `batch_sampler`: no_duplicates
|
450 |
+
|
451 |
+
#### All Hyperparameters
|
452 |
+
<details><summary>Click to expand</summary>
|
453 |
+
|
454 |
+
- `overwrite_output_dir`: False
|
455 |
+
- `do_predict`: False
|
456 |
+
- `prediction_loss_only`: True
|
457 |
+
- `per_device_train_batch_size`: 16
|
458 |
+
- `per_device_eval_batch_size`: 16
|
459 |
+
- `per_gpu_train_batch_size`: None
|
460 |
+
- `per_gpu_eval_batch_size`: None
|
461 |
+
- `gradient_accumulation_steps`: 1
|
462 |
+
- `eval_accumulation_steps`: None
|
463 |
+
- `learning_rate`: 2e-05
|
464 |
+
- `weight_decay`: 0.0
|
465 |
+
- `adam_beta1`: 0.9
|
466 |
+
- `adam_beta2`: 0.999
|
467 |
+
- `adam_epsilon`: 1e-08
|
468 |
+
- `max_grad_norm`: 1.0
|
469 |
+
- `num_train_epochs`: 1
|
470 |
+
- `max_steps`: -1
|
471 |
+
- `lr_scheduler_type`: linear
|
472 |
+
- `lr_scheduler_kwargs`: {}
|
473 |
+
- `warmup_ratio`: 0.1
|
474 |
+
- `warmup_steps`: 0
|
475 |
+
- `log_level`: passive
|
476 |
+
- `log_level_replica`: warning
|
477 |
+
- `log_on_each_node`: True
|
478 |
+
- `logging_nan_inf_filter`: True
|
479 |
+
- `save_safetensors`: True
|
480 |
+
- `save_on_each_node`: False
|
481 |
+
- `save_only_model`: False
|
482 |
+
- `no_cuda`: False
|
483 |
+
- `use_cpu`: False
|
484 |
+
- `use_mps_device`: False
|
485 |
+
- `seed`: 42
|
486 |
+
- `data_seed`: None
|
487 |
+
- `jit_mode_eval`: False
|
488 |
+
- `use_ipex`: False
|
489 |
+
- `bf16`: True
|
490 |
+
- `fp16`: False
|
491 |
+
- `fp16_opt_level`: O1
|
492 |
+
- `half_precision_backend`: auto
|
493 |
+
- `bf16_full_eval`: False
|
494 |
+
- `fp16_full_eval`: False
|
495 |
+
- `tf32`: None
|
496 |
+
- `local_rank`: 0
|
497 |
+
- `ddp_backend`: None
|
498 |
+
- `tpu_num_cores`: None
|
499 |
+
- `tpu_metrics_debug`: False
|
500 |
+
- `debug`: []
|
501 |
+
- `dataloader_drop_last`: False
|
502 |
+
- `dataloader_num_workers`: 0
|
503 |
+
- `dataloader_prefetch_factor`: None
|
504 |
+
- `past_index`: -1
|
505 |
+
- `disable_tqdm`: False
|
506 |
+
- `remove_unused_columns`: True
|
507 |
+
- `label_names`: None
|
508 |
+
- `load_best_model_at_end`: False
|
509 |
+
- `ignore_data_skip`: False
|
510 |
+
- `fsdp`: []
|
511 |
+
- `fsdp_min_num_params`: 0
|
512 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
513 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
514 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'gradient_accumulation_kwargs': None}
|
515 |
+
- `deepspeed`: None
|
516 |
+
- `label_smoothing_factor`: 0.0
|
517 |
+
- `optim`: adamw_torch
|
518 |
+
- `optim_args`: None
|
519 |
+
- `adafactor`: False
|
520 |
+
- `group_by_length`: False
|
521 |
+
- `length_column_name`: length
|
522 |
+
- `ddp_find_unused_parameters`: None
|
523 |
+
- `ddp_bucket_cap_mb`: None
|
524 |
+
- `ddp_broadcast_buffers`: False
|
525 |
+
- `dataloader_pin_memory`: True
|
526 |
+
- `dataloader_persistent_workers`: False
|
527 |
+
- `skip_memory_metrics`: True
|
528 |
+
- `use_legacy_prediction_loop`: False
|
529 |
+
- `push_to_hub`: False
|
530 |
+
- `resume_from_checkpoint`: None
|
531 |
+
- `hub_model_id`: None
|
532 |
+
- `hub_strategy`: every_save
|
533 |
+
- `hub_private_repo`: False
|
534 |
+
- `hub_always_push`: False
|
535 |
+
- `gradient_checkpointing`: False
|
536 |
+
- `gradient_checkpointing_kwargs`: None
|
537 |
+
- `include_inputs_for_metrics`: False
|
538 |
+
- `eval_do_concat_batches`: True
|
539 |
+
- `fp16_backend`: auto
|
540 |
+
- `push_to_hub_model_id`: None
|
541 |
+
- `push_to_hub_organization`: None
|
542 |
+
- `mp_parameters`:
|
543 |
+
- `auto_find_batch_size`: False
|
544 |
+
- `full_determinism`: False
|
545 |
+
- `torchdynamo`: None
|
546 |
+
- `ray_scope`: last
|
547 |
+
- `ddp_timeout`: 1800
|
548 |
+
- `torch_compile`: False
|
549 |
+
- `torch_compile_backend`: None
|
550 |
+
- `torch_compile_mode`: None
|
551 |
+
- `dispatch_batches`: None
|
552 |
+
- `split_batches`: None
|
553 |
+
- `include_tokens_per_second`: False
|
554 |
+
- `include_num_input_tokens_seen`: False
|
555 |
+
- `neftune_noise_alpha`: None
|
556 |
+
- `optim_target_modules`: None
|
557 |
+
- `batch_sampler`: no_duplicates
|
558 |
+
- `multi_dataset_batch_sampler`: proportional
|
559 |
+
|
560 |
+
</details>
|
561 |
+
|
562 |
+
### Training Logs
|
563 |
+
<details><summary>Click to expand</summary>
|
564 |
+
|
565 |
+
| Epoch | Step | Training Loss | sts-test-128_spearman_cosine | sts-test-256_spearman_cosine | sts-test-512_spearman_cosine | sts-test-64_spearman_cosine | sts-test-768_spearman_cosine |
|
566 |
+
|:------:|:-----:|:-------------:|:----------------------------:|:----------------------------:|:----------------------------:|:---------------------------:|:----------------------------:|
|
567 |
+
| 0.0057 | 100 | 25.7713 | - | - | - | - | - |
|
568 |
+
| 0.0115 | 200 | 20.7886 | - | - | - | - | - |
|
569 |
+
| 0.0172 | 300 | 17.0398 | - | - | - | - | - |
|
570 |
+
| 0.0229 | 400 | 15.3913 | - | - | - | - | - |
|
571 |
+
| 0.0287 | 500 | 14.0214 | - | - | - | - | - |
|
572 |
+
| 0.0344 | 600 | 12.2125 | - | - | - | - | - |
|
573 |
+
| 0.0402 | 700 | 10.3033 | - | - | - | - | - |
|
574 |
+
| 0.0459 | 800 | 9.3822 | - | - | - | - | - |
|
575 |
+
| 0.0516 | 900 | 8.9276 | - | - | - | - | - |
|
576 |
+
| 0.0574 | 1000 | 8.552 | - | - | - | - | - |
|
577 |
+
| 0.0631 | 1100 | 8.6293 | - | - | - | - | - |
|
578 |
+
| 0.0688 | 1200 | 8.5353 | - | - | - | - | - |
|
579 |
+
| 0.0746 | 1300 | 8.6431 | - | - | - | - | - |
|
580 |
+
| 0.0803 | 1400 | 8.3192 | - | - | - | - | - |
|
581 |
+
| 0.0860 | 1500 | 7.1834 | - | - | - | - | - |
|
582 |
+
| 0.0918 | 1600 | 6.7834 | - | - | - | - | - |
|
583 |
+
| 0.0975 | 1700 | 6.4758 | - | - | - | - | - |
|
584 |
+
| 0.1033 | 1800 | 6.756 | - | - | - | - | - |
|
585 |
+
| 0.1090 | 1900 | 7.807 | - | - | - | - | - |
|
586 |
+
| 0.1147 | 2000 | 6.8836 | - | - | - | - | - |
|
587 |
+
| 0.1205 | 2100 | 6.9948 | - | - | - | - | - |
|
588 |
+
| 0.1262 | 2200 | 6.5031 | - | - | - | - | - |
|
589 |
+
| 0.1319 | 2300 | 6.3596 | - | - | - | - | - |
|
590 |
+
| 0.1377 | 2400 | 6.0257 | - | - | - | - | - |
|
591 |
+
| 0.1434 | 2500 | 5.9757 | - | - | - | - | - |
|
592 |
+
| 0.1491 | 2600 | 5.464 | - | - | - | - | - |
|
593 |
+
| 0.1549 | 2700 | 5.6518 | - | - | - | - | - |
|
594 |
+
| 0.1606 | 2800 | 6.2899 | - | - | - | - | - |
|
595 |
+
| 0.1664 | 2900 | 6.4876 | - | - | - | - | - |
|
596 |
+
| 0.1721 | 3000 | 6.9466 | - | - | - | - | - |
|
597 |
+
| 0.1778 | 3100 | 6.8439 | - | - | - | - | - |
|
598 |
+
| 0.1836 | 3200 | 6.2545 | - | - | - | - | - |
|
599 |
+
| 0.1893 | 3300 | 5.9795 | - | - | - | - | - |
|
600 |
+
| 0.1950 | 3400 | 5.3904 | - | - | - | - | - |
|
601 |
+
| 0.2008 | 3500 | 6.2798 | - | - | - | - | - |
|
602 |
+
| 0.2065 | 3600 | 5.6882 | - | - | - | - | - |
|
603 |
+
| 0.2122 | 3700 | 6.195 | - | - | - | - | - |
|
604 |
+
| 0.2180 | 3800 | 5.8728 | - | - | - | - | - |
|
605 |
+
| 0.2237 | 3900 | 6.2428 | - | - | - | - | - |
|
606 |
+
| 0.2294 | 4000 | 5.801 | - | - | - | - | - |
|
607 |
+
| 0.2352 | 4100 | 5.6918 | - | - | - | - | - |
|
608 |
+
| 0.2409 | 4200 | 5.3977 | - | - | - | - | - |
|
609 |
+
| 0.2467 | 4300 | 5.8792 | - | - | - | - | - |
|
610 |
+
| 0.2524 | 4400 | 5.9297 | - | - | - | - | - |
|
611 |
+
| 0.2581 | 4500 | 6.161 | - | - | - | - | - |
|
612 |
+
| 0.2639 | 4600 | 5.6571 | - | - | - | - | - |
|
613 |
+
| 0.2696 | 4700 | 5.5849 | - | - | - | - | - |
|
614 |
+
| 0.2753 | 4800 | 5.6382 | - | - | - | - | - |
|
615 |
+
| 0.2811 | 4900 | 5.2978 | - | - | - | - | - |
|
616 |
+
| 0.2868 | 5000 | 5.108 | - | - | - | - | - |
|
617 |
+
| 0.2925 | 5100 | 5.1158 | - | - | - | - | - |
|
618 |
+
| 0.2983 | 5200 | 5.6218 | - | - | - | - | - |
|
619 |
+
| 0.3040 | 5300 | 5.643 | - | - | - | - | - |
|
620 |
+
| 0.3098 | 5400 | 5.6894 | - | - | - | - | - |
|
621 |
+
| 0.3155 | 5500 | 5.373 | - | - | - | - | - |
|
622 |
+
| 0.3212 | 5600 | 5.0673 | - | - | - | - | - |
|
623 |
+
| 0.3270 | 5700 | 5.1915 | - | - | - | - | - |
|
624 |
+
| 0.3327 | 5800 | 5.3705 | - | - | - | - | - |
|
625 |
+
| 0.3384 | 5900 | 5.6432 | - | - | - | - | - |
|
626 |
+
| 0.3442 | 6000 | 5.2567 | - | - | - | - | - |
|
627 |
+
| 0.3499 | 6100 | 5.4516 | - | - | - | - | - |
|
628 |
+
| 0.3556 | 6200 | 5.4844 | - | - | - | - | - |
|
629 |
+
| 0.3614 | 6300 | 4.8238 | - | - | - | - | - |
|
630 |
+
| 0.3671 | 6400 | 4.8271 | - | - | - | - | - |
|
631 |
+
| 0.3729 | 6500 | 4.9863 | - | - | - | - | - |
|
632 |
+
| 0.3786 | 6600 | 5.4894 | - | - | - | - | - |
|
633 |
+
| 0.3843 | 6700 | 4.95 | - | - | - | - | - |
|
634 |
+
| 0.3901 | 6800 | 5.0881 | - | - | - | - | - |
|
635 |
+
| 0.3958 | 6900 | 5.249 | - | - | - | - | - |
|
636 |
+
| 0.4015 | 7000 | 5.0082 | - | - | - | - | - |
|
637 |
+
| 0.4073 | 7100 | 5.5064 | - | - | - | - | - |
|
638 |
+
| 0.4130 | 7200 | 5.0885 | - | - | - | - | - |
|
639 |
+
| 0.4187 | 7300 | 5.0321 | - | - | - | - | - |
|
640 |
+
| 0.4245 | 7400 | 4.8212 | - | - | - | - | - |
|
641 |
+
| 0.4302 | 7500 | 5.4231 | - | - | - | - | - |
|
642 |
+
| 0.4360 | 7600 | 4.7687 | - | - | - | - | - |
|
643 |
+
| 0.4417 | 7700 | 4.5707 | - | - | - | - | - |
|
644 |
+
| 0.4474 | 7800 | 5.2229 | - | - | - | - | - |
|
645 |
+
| 0.4532 | 7900 | 5.2446 | - | - | - | - | - |
|
646 |
+
| 0.4589 | 8000 | 4.682 | - | - | - | - | - |
|
647 |
+
| 0.4646 | 8100 | 4.888 | - | - | - | - | - |
|
648 |
+
| 0.4704 | 8200 | 5.0496 | - | - | - | - | - |
|
649 |
+
| 0.4761 | 8300 | 4.7089 | - | - | - | - | - |
|
650 |
+
| 0.4818 | 8400 | 4.9567 | - | - | - | - | - |
|
651 |
+
| 0.4876 | 8500 | 4.7913 | - | - | - | - | - |
|
652 |
+
| 0.4933 | 8600 | 4.8904 | - | - | - | - | - |
|
653 |
+
| 0.4991 | 8700 | 5.247 | - | - | - | - | - |
|
654 |
+
| 0.5048 | 8800 | 4.8254 | - | - | - | - | - |
|
655 |
+
| 0.5105 | 8900 | 4.973 | - | - | - | - | - |
|
656 |
+
| 0.5163 | 9000 | 4.6657 | - | - | - | - | - |
|
657 |
+
| 0.5220 | 9100 | 4.9224 | - | - | - | - | - |
|
658 |
+
| 0.5277 | 9200 | 4.8163 | - | - | - | - | - |
|
659 |
+
| 0.5335 | 9300 | 4.3673 | - | - | - | - | - |
|
660 |
+
| 0.5392 | 9400 | 4.6509 | - | - | - | - | - |
|
661 |
+
| 0.5449 | 9500 | 5.0667 | - | - | - | - | - |
|
662 |
+
| 0.5507 | 9600 | 4.8771 | - | - | - | - | - |
|
663 |
+
| 0.5564 | 9700 | 5.1056 | - | - | - | - | - |
|
664 |
+
| 0.5622 | 9800 | 4.8297 | - | - | - | - | - |
|
665 |
+
| 0.5679 | 9900 | 5.0156 | - | - | - | - | - |
|
666 |
+
| 0.5736 | 10000 | 5.0758 | - | - | - | - | - |
|
667 |
+
| 0.5794 | 10100 | 4.9551 | - | - | - | - | - |
|
668 |
+
| 0.5851 | 10200 | 4.9594 | - | - | - | - | - |
|
669 |
+
| 0.5908 | 10300 | 5.136 | - | - | - | - | - |
|
670 |
+
| 0.5966 | 10400 | 4.7873 | - | - | - | - | - |
|
671 |
+
| 0.6023 | 10500 | 4.5154 | - | - | - | - | - |
|
672 |
+
| 0.6080 | 10600 | 4.928 | - | - | - | - | - |
|
673 |
+
| 0.6138 | 10700 | 5.1825 | - | - | - | - | - |
|
674 |
+
| 0.6195 | 10800 | 5.046 | - | - | - | - | - |
|
675 |
+
| 0.6253 | 10900 | 5.0111 | - | - | - | - | - |
|
676 |
+
| 0.6310 | 11000 | 4.9458 | - | - | - | - | - |
|
677 |
+
| 0.6367 | 11100 | 5.188 | - | - | - | - | - |
|
678 |
+
| 0.6425 | 11200 | 4.6219 | - | - | - | - | - |
|
679 |
+
| 0.6482 | 11300 | 5.3367 | - | - | - | - | - |
|
680 |
+
| 0.6539 | 11400 | 4.9851 | - | - | - | - | - |
|
681 |
+
| 0.6597 | 11500 | 5.2068 | - | - | - | - | - |
|
682 |
+
| 0.6654 | 11600 | 4.3789 | - | - | - | - | - |
|
683 |
+
| 0.6711 | 11700 | 5.3533 | - | - | - | - | - |
|
684 |
+
| 0.6769 | 11800 | 5.3983 | - | - | - | - | - |
|
685 |
+
| 0.6826 | 11900 | 4.6 | - | - | - | - | - |
|
686 |
+
| 0.6883 | 12000 | 4.6668 | - | - | - | - | - |
|
687 |
+
| 0.6941 | 12100 | 5.0814 | - | - | - | - | - |
|
688 |
+
| 0.6998 | 12200 | 5.0787 | - | - | - | - | - |
|
689 |
+
| 0.7056 | 12300 | 4.6325 | - | - | - | - | - |
|
690 |
+
| 0.7113 | 12400 | 4.9415 | - | - | - | - | - |
|
691 |
+
| 0.7170 | 12500 | 4.7053 | - | - | - | - | - |
|
692 |
+
| 0.7228 | 12600 | 4.3212 | - | - | - | - | - |
|
693 |
+
| 0.7285 | 12700 | 4.8205 | - | - | - | - | - |
|
694 |
+
| 0.7342 | 12800 | 4.8602 | - | - | - | - | - |
|
695 |
+
| 0.7400 | 12900 | 4.6944 | - | - | - | - | - |
|
696 |
+
| 0.7457 | 13000 | 4.7785 | - | - | - | - | - |
|
697 |
+
| 0.7514 | 13100 | 4.3515 | - | - | - | - | - |
|
698 |
+
| 0.7572 | 13200 | 5.7561 | - | - | - | - | - |
|
699 |
+
| 0.7629 | 13300 | 5.3526 | - | - | - | - | - |
|
700 |
+
| 0.7687 | 13400 | 5.187 | - | - | - | - | - |
|
701 |
+
| 0.7744 | 13500 | 5.0143 | - | - | - | - | - |
|
702 |
+
| 0.7801 | 13600 | 4.515 | - | - | - | - | - |
|
703 |
+
| 0.7859 | 13700 | 4.639 | - | - | - | - | - |
|
704 |
+
| 0.7916 | 13800 | 4.5556 | - | - | - | - | - |
|
705 |
+
| 0.7973 | 13900 | 4.3526 | - | - | - | - | - |
|
706 |
+
| 0.8031 | 14000 | 4.3091 | - | - | - | - | - |
|
707 |
+
| 0.8088 | 14100 | 4.1761 | - | - | - | - | - |
|
708 |
+
| 0.8145 | 14200 | 4.0484 | - | - | - | - | - |
|
709 |
+
| 0.8203 | 14300 | 4.1886 | - | - | - | - | - |
|
710 |
+
| 0.8260 | 14400 | 4.237 | - | - | - | - | - |
|
711 |
+
| 0.8318 | 14500 | 4.2167 | - | - | - | - | - |
|
712 |
+
| 0.8375 | 14600 | 4.0329 | - | - | - | - | - |
|
713 |
+
| 0.8432 | 14700 | 3.9902 | - | - | - | - | - |
|
714 |
+
| 0.8490 | 14800 | 3.8211 | - | - | - | - | - |
|
715 |
+
| 0.8547 | 14900 | 4.0048 | - | - | - | - | - |
|
716 |
+
| 0.8604 | 15000 | 3.7979 | - | - | - | - | - |
|
717 |
+
| 0.8662 | 15100 | 3.8117 | - | - | - | - | - |
|
718 |
+
| 0.8719 | 15200 | 3.909 | - | - | - | - | - |
|
719 |
+
| 0.8776 | 15300 | 3.8526 | - | - | - | - | - |
|
720 |
+
| 0.8834 | 15400 | 3.79 | - | - | - | - | - |
|
721 |
+
| 0.8891 | 15500 | 3.7792 | - | - | - | - | - |
|
722 |
+
| 0.8949 | 15600 | 3.7469 | - | - | - | - | - |
|
723 |
+
| 0.9006 | 15700 | 3.8387 | - | - | - | - | - |
|
724 |
+
| 0.9063 | 15800 | 3.6418 | - | - | - | - | - |
|
725 |
+
| 0.9121 | 15900 | 3.645 | - | - | - | - | - |
|
726 |
+
| 0.9178 | 16000 | 3.4861 | - | - | - | - | - |
|
727 |
+
| 0.9235 | 16100 | 3.6416 | - | - | - | - | - |
|
728 |
+
| 0.9293 | 16200 | 3.6665 | - | - | - | - | - |
|
729 |
+
| 0.9350 | 16300 | 3.6809 | - | - | - | - | - |
|
730 |
+
| 0.9407 | 16400 | 3.7944 | - | - | - | - | - |
|
731 |
+
| 0.9465 | 16500 | 3.6585 | - | - | - | - | - |
|
732 |
+
| 0.9522 | 16600 | 3.5398 | - | - | - | - | - |
|
733 |
+
| 0.9580 | 16700 | 3.7036 | - | - | - | - | - |
|
734 |
+
| 0.9637 | 16800 | 3.6386 | - | - | - | - | - |
|
735 |
+
| 0.9694 | 16900 | 3.5501 | - | - | - | - | - |
|
736 |
+
| 0.9752 | 17000 | 3.7957 | - | - | - | - | - |
|
737 |
+
| 0.9809 | 17100 | 3.6076 | - | - | - | - | - |
|
738 |
+
| 0.9866 | 17200 | 3.4653 | - | - | - | - | - |
|
739 |
+
| 0.9924 | 17300 | 3.6768 | - | - | - | - | - |
|
740 |
+
| 0.9981 | 17400 | 3.49 | - | - | - | - | - |
|
741 |
+
| 1.0 | 17433 | - | 0.7051 | 0.7044 | 0.7046 | 0.7044 | 0.7065 |
|
742 |
+
|
743 |
+
</details>
|
744 |
+
|
745 |
+
### Framework Versions
|
746 |
+
- Python: 3.11.9
|
747 |
+
- Sentence Transformers: 3.0.1
|
748 |
+
- Transformers: 4.40.1
|
749 |
+
- PyTorch: 2.3.0+cu121
|
750 |
+
- Accelerate: 0.29.3
|
751 |
+
- Datasets: 2.19.0
|
752 |
+
- Tokenizers: 0.19.1
|
753 |
+
|
754 |
+
## Citation
|
755 |
+
|
756 |
+
### BibTeX
|
757 |
+
|
758 |
+
#### Sentence Transformers
|
759 |
+
```bibtex
|
760 |
+
@inproceedings{reimers-2019-sentence-bert,
|
761 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
762 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
763 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
764 |
+
month = "11",
|
765 |
+
year = "2019",
|
766 |
+
publisher = "Association for Computational Linguistics",
|
767 |
+
url = "https://arxiv.org/abs/1908.10084",
|
768 |
+
}
|
769 |
+
```
|
770 |
+
|
771 |
+
#### MatryoshkaLoss
|
772 |
+
```bibtex
|
773 |
+
@misc{kusupati2024matryoshka,
|
774 |
+
title={Matryoshka Representation Learning},
|
775 |
+
author={Aditya Kusupati and Gantavya Bhatt and Aniket Rege and Matthew Wallingford and Aditya Sinha and Vivek Ramanujan and William Howard-Snyder and Kaifeng Chen and Sham Kakade and Prateek Jain and Ali Farhadi},
|
776 |
+
year={2024},
|
777 |
+
eprint={2205.13147},
|
778 |
+
archivePrefix={arXiv},
|
779 |
+
primaryClass={cs.LG}
|
780 |
+
}
|
781 |
+
```
|
782 |
+
|
783 |
+
#### MultipleNegativesRankingLoss
|
784 |
+
```bibtex
|
785 |
+
@misc{henderson2017efficient,
|
786 |
+
title={Efficient Natural Language Response Suggestion for Smart Reply},
|
787 |
+
author={Matthew Henderson and Rami Al-Rfou and Brian Strope and Yun-hsuan Sung and Laszlo Lukacs and Ruiqi Guo and Sanjiv Kumar and Balint Miklos and Ray Kurzweil},
|
788 |
+
year={2017},
|
789 |
+
eprint={1705.00652},
|
790 |
+
archivePrefix={arXiv},
|
791 |
+
primaryClass={cs.CL}
|
792 |
+
}
|
793 |
+
```
|
794 |
+
|
795 |
+
<!--
|
796 |
+
## Glossary
|
797 |
+
|
798 |
+
*Clearly define terms in order to be accessible across audiences.*
|
799 |
+
-->
|
800 |
+
|
801 |
+
<!--
|
802 |
+
## Model Card Authors
|
803 |
+
|
804 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
805 |
+
-->
|
806 |
+
|
807 |
+
<!--
|
808 |
+
## Model Card Contact
|
809 |
+
|
810 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
811 |
+
-->
|
config.json
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "UBC-NLP/serengeti-E250",
|
3 |
+
"architectures": [
|
4 |
+
"ElectraModel"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"classifier_dropout": null,
|
8 |
+
"embedding_size": 768,
|
9 |
+
"hidden_act": "gelu",
|
10 |
+
"hidden_dropout_prob": 0.1,
|
11 |
+
"hidden_size": 768,
|
12 |
+
"initializer_range": 0.02,
|
13 |
+
"intermediate_size": 3072,
|
14 |
+
"layer_norm_eps": 1e-12,
|
15 |
+
"max_position_embeddings": 512,
|
16 |
+
"model_type": "electra",
|
17 |
+
"num_attention_heads": 12,
|
18 |
+
"num_hidden_layers": 12,
|
19 |
+
"pad_token_id": 0,
|
20 |
+
"position_embedding_type": "absolute",
|
21 |
+
"summary_activation": "gelu",
|
22 |
+
"summary_last_dropout": 0.1,
|
23 |
+
"summary_type": "first",
|
24 |
+
"summary_use_proj": true,
|
25 |
+
"torch_dtype": "float32",
|
26 |
+
"transformers_version": "4.40.1",
|
27 |
+
"type_vocab_size": 2,
|
28 |
+
"use_cache": true,
|
29 |
+
"vocab_size": 250000
|
30 |
+
}
|
config_sentence_transformers.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"__version__": {
|
3 |
+
"sentence_transformers": "3.0.1",
|
4 |
+
"transformers": "4.40.1",
|
5 |
+
"pytorch": "2.3.0+cu121"
|
6 |
+
},
|
7 |
+
"prompts": {},
|
8 |
+
"default_prompt_name": null,
|
9 |
+
"similarity_fn_name": null
|
10 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:672730788a7bf59e91c2b6c69f6e53277912fb3625069536fe4c308f96103f59
|
3 |
+
size 1109825328
|
modules.json
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
[
|
2 |
+
{
|
3 |
+
"idx": 0,
|
4 |
+
"name": "0",
|
5 |
+
"path": "",
|
6 |
+
"type": "sentence_transformers.models.Transformer"
|
7 |
+
},
|
8 |
+
{
|
9 |
+
"idx": 1,
|
10 |
+
"name": "1",
|
11 |
+
"path": "1_Pooling",
|
12 |
+
"type": "sentence_transformers.models.Pooling"
|
13 |
+
}
|
14 |
+
]
|
sentence_bert_config.json
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"max_seq_length": 512,
|
3 |
+
"do_lower_case": false
|
4 |
+
}
|
special_tokens_map.json
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"cls_token": {
|
3 |
+
"content": "[CLS]",
|
4 |
+
"lstrip": false,
|
5 |
+
"normalized": false,
|
6 |
+
"rstrip": false,
|
7 |
+
"single_word": false
|
8 |
+
},
|
9 |
+
"mask_token": {
|
10 |
+
"content": "[MASK]",
|
11 |
+
"lstrip": false,
|
12 |
+
"normalized": false,
|
13 |
+
"rstrip": false,
|
14 |
+
"single_word": false
|
15 |
+
},
|
16 |
+
"pad_token": {
|
17 |
+
"content": "[PAD]",
|
18 |
+
"lstrip": false,
|
19 |
+
"normalized": false,
|
20 |
+
"rstrip": false,
|
21 |
+
"single_word": false
|
22 |
+
},
|
23 |
+
"sep_token": {
|
24 |
+
"content": "[SEP]",
|
25 |
+
"lstrip": false,
|
26 |
+
"normalized": false,
|
27 |
+
"rstrip": false,
|
28 |
+
"single_word": false
|
29 |
+
},
|
30 |
+
"unk_token": {
|
31 |
+
"content": "[UNK]",
|
32 |
+
"lstrip": false,
|
33 |
+
"normalized": false,
|
34 |
+
"rstrip": false,
|
35 |
+
"single_word": false
|
36 |
+
}
|
37 |
+
}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"added_tokens_decoder": {
|
3 |
+
"0": {
|
4 |
+
"content": "[PAD]",
|
5 |
+
"lstrip": false,
|
6 |
+
"normalized": false,
|
7 |
+
"rstrip": false,
|
8 |
+
"single_word": false,
|
9 |
+
"special": true
|
10 |
+
},
|
11 |
+
"1": {
|
12 |
+
"content": "[UNK]",
|
13 |
+
"lstrip": false,
|
14 |
+
"normalized": false,
|
15 |
+
"rstrip": false,
|
16 |
+
"single_word": false,
|
17 |
+
"special": true
|
18 |
+
},
|
19 |
+
"2": {
|
20 |
+
"content": "[CLS]",
|
21 |
+
"lstrip": false,
|
22 |
+
"normalized": false,
|
23 |
+
"rstrip": false,
|
24 |
+
"single_word": false,
|
25 |
+
"special": true
|
26 |
+
},
|
27 |
+
"3": {
|
28 |
+
"content": "[SEP]",
|
29 |
+
"lstrip": false,
|
30 |
+
"normalized": false,
|
31 |
+
"rstrip": false,
|
32 |
+
"single_word": false,
|
33 |
+
"special": true
|
34 |
+
},
|
35 |
+
"4": {
|
36 |
+
"content": "[MASK]",
|
37 |
+
"lstrip": false,
|
38 |
+
"normalized": false,
|
39 |
+
"rstrip": false,
|
40 |
+
"single_word": false,
|
41 |
+
"special": true
|
42 |
+
}
|
43 |
+
},
|
44 |
+
"additional_special_tokens": [],
|
45 |
+
"clean_up_tokenization_spaces": true,
|
46 |
+
"cls_token": "[CLS]",
|
47 |
+
"do_basic_tokenize": true,
|
48 |
+
"do_lower_case": true,
|
49 |
+
"mask_token": "[MASK]",
|
50 |
+
"model_max_length": 1000000000000000019884624838656,
|
51 |
+
"never_split": null,
|
52 |
+
"pad_token": "[PAD]",
|
53 |
+
"sep_token": "[SEP]",
|
54 |
+
"strip_accents": null,
|
55 |
+
"tokenize_chinese_chars": true,
|
56 |
+
"tokenizer_class": "ElectraTokenizer",
|
57 |
+
"unk_token": "[UNK]"
|
58 |
+
}
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|