Add new SentenceTransformer model.
Browse files- 1_Pooling/config.json +10 -0
- README.md +811 -0
- config.json +32 -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 +7 -0
- tokenizer.json +0 -0
- tokenizer_config.json +57 -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: Geotrend/bert-base-sw-cased
|
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 Geotrend/bert-base-sw-cased
|
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.6868804546581948
|
72 |
+
name: Pearson Cosine
|
73 |
+
- type: spearman_cosine
|
74 |
+
value: 0.6801625382694466
|
75 |
+
name: Spearman Cosine
|
76 |
+
- type: pearson_manhattan
|
77 |
+
value: 0.6719079171543956
|
78 |
+
name: Pearson Manhattan
|
79 |
+
- type: spearman_manhattan
|
80 |
+
value: 0.6653137984517007
|
81 |
+
name: Spearman Manhattan
|
82 |
+
- type: pearson_euclidean
|
83 |
+
value: 0.6734384393604611
|
84 |
+
name: Pearson Euclidean
|
85 |
+
- type: spearman_euclidean
|
86 |
+
value: 0.6665812962708187
|
87 |
+
name: Spearman Euclidean
|
88 |
+
- type: pearson_dot
|
89 |
+
value: 0.5540255947111082
|
90 |
+
name: Pearson Dot
|
91 |
+
- type: spearman_dot
|
92 |
+
value: 0.5399212934179993
|
93 |
+
name: Spearman Dot
|
94 |
+
- type: pearson_max
|
95 |
+
value: 0.6868804546581948
|
96 |
+
name: Pearson Max
|
97 |
+
- type: spearman_max
|
98 |
+
value: 0.6801625382694466
|
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.6827780698031986
|
109 |
+
name: Pearson Cosine
|
110 |
+
- type: spearman_cosine
|
111 |
+
value: 0.6770486364807735
|
112 |
+
name: Spearman Cosine
|
113 |
+
- type: pearson_manhattan
|
114 |
+
value: 0.6729437410000495
|
115 |
+
name: Pearson Manhattan
|
116 |
+
- type: spearman_manhattan
|
117 |
+
value: 0.6664360018282044
|
118 |
+
name: Spearman Manhattan
|
119 |
+
- type: pearson_euclidean
|
120 |
+
value: 0.6738342605019458
|
121 |
+
name: Pearson Euclidean
|
122 |
+
- type: spearman_euclidean
|
123 |
+
value: 0.6666791464094138
|
124 |
+
name: Spearman Euclidean
|
125 |
+
- type: pearson_dot
|
126 |
+
value: 0.5296210420398023
|
127 |
+
name: Pearson Dot
|
128 |
+
- type: spearman_dot
|
129 |
+
value: 0.5173769714392553
|
130 |
+
name: Spearman Dot
|
131 |
+
- type: pearson_max
|
132 |
+
value: 0.6827780698031986
|
133 |
+
name: Pearson Max
|
134 |
+
- type: spearman_max
|
135 |
+
value: 0.6770486364807735
|
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.6758051721795716
|
146 |
+
name: Pearson Cosine
|
147 |
+
- type: spearman_cosine
|
148 |
+
value: 0.6701833115162764
|
149 |
+
name: Spearman Cosine
|
150 |
+
- type: pearson_manhattan
|
151 |
+
value: 0.671762500960023
|
152 |
+
name: Pearson Manhattan
|
153 |
+
- type: spearman_manhattan
|
154 |
+
value: 0.6643430423969034
|
155 |
+
name: Spearman Manhattan
|
156 |
+
- type: pearson_euclidean
|
157 |
+
value: 0.6730238156482042
|
158 |
+
name: Pearson Euclidean
|
159 |
+
- type: spearman_euclidean
|
160 |
+
value: 0.6649839339725255
|
161 |
+
name: Spearman Euclidean
|
162 |
+
- type: pearson_dot
|
163 |
+
value: 0.48923961423508167
|
164 |
+
name: Pearson Dot
|
165 |
+
- type: spearman_dot
|
166 |
+
value: 0.4783312389130331
|
167 |
+
name: Spearman Dot
|
168 |
+
- type: pearson_max
|
169 |
+
value: 0.6758051721795716
|
170 |
+
name: Pearson Max
|
171 |
+
- type: spearman_max
|
172 |
+
value: 0.6701833115162764
|
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.6700363607439113
|
183 |
+
name: Pearson Cosine
|
184 |
+
- type: spearman_cosine
|
185 |
+
value: 0.6637709194412489
|
186 |
+
name: Spearman Cosine
|
187 |
+
- type: pearson_manhattan
|
188 |
+
value: 0.6692814840348797
|
189 |
+
name: Pearson Manhattan
|
190 |
+
- type: spearman_manhattan
|
191 |
+
value: 0.6594295578885248
|
192 |
+
name: Spearman Manhattan
|
193 |
+
- type: pearson_euclidean
|
194 |
+
value: 0.671006713633375
|
195 |
+
name: Pearson Euclidean
|
196 |
+
- type: spearman_euclidean
|
197 |
+
value: 0.6600674238087292
|
198 |
+
name: Spearman Euclidean
|
199 |
+
- type: pearson_dot
|
200 |
+
value: 0.45094972472157246
|
201 |
+
name: Pearson Dot
|
202 |
+
- type: spearman_dot
|
203 |
+
value: 0.44023350072779777
|
204 |
+
name: Spearman Dot
|
205 |
+
- type: pearson_max
|
206 |
+
value: 0.671006713633375
|
207 |
+
name: Pearson Max
|
208 |
+
- type: spearman_max
|
209 |
+
value: 0.6637709194412489
|
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.6614685875750459
|
220 |
+
name: Pearson Cosine
|
221 |
+
- type: spearman_cosine
|
222 |
+
value: 0.6556282400518681
|
223 |
+
name: Spearman Cosine
|
224 |
+
- type: pearson_manhattan
|
225 |
+
value: 0.665261323713716
|
226 |
+
name: Pearson Manhattan
|
227 |
+
- type: spearman_manhattan
|
228 |
+
value: 0.6533415018004937
|
229 |
+
name: Spearman Manhattan
|
230 |
+
- type: pearson_euclidean
|
231 |
+
value: 0.6671725346980402
|
232 |
+
name: Pearson Euclidean
|
233 |
+
- type: spearman_euclidean
|
234 |
+
value: 0.6540012112658994
|
235 |
+
name: Spearman Euclidean
|
236 |
+
- type: pearson_dot
|
237 |
+
value: 0.38682442010639634
|
238 |
+
name: Pearson Dot
|
239 |
+
- type: spearman_dot
|
240 |
+
value: 0.37712136401470375
|
241 |
+
name: Spearman Dot
|
242 |
+
- type: pearson_max
|
243 |
+
value: 0.6671725346980402
|
244 |
+
name: Pearson Max
|
245 |
+
- type: spearman_max
|
246 |
+
value: 0.6556282400518681
|
247 |
+
name: Spearman Max
|
248 |
+
---
|
249 |
+
|
250 |
+
# SentenceTransformer based on Geotrend/bert-base-sw-cased
|
251 |
+
|
252 |
+
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [Geotrend/bert-base-sw-cased](https://huggingface.co/Geotrend/bert-base-sw-cased). 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:** [Geotrend/bert-base-sw-cased](https://huggingface.co/Geotrend/bert-base-sw-cased) <!-- at revision 7d9ca957a81d2449cf1319af0b91f75f11642336 -->
|
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: BertModel
|
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-bert-base-sw-cased-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.6869 |
|
348 |
+
| **spearman_cosine** | **0.6802** |
|
349 |
+
| pearson_manhattan | 0.6719 |
|
350 |
+
| spearman_manhattan | 0.6653 |
|
351 |
+
| pearson_euclidean | 0.6734 |
|
352 |
+
| spearman_euclidean | 0.6666 |
|
353 |
+
| pearson_dot | 0.554 |
|
354 |
+
| spearman_dot | 0.5399 |
|
355 |
+
| pearson_max | 0.6869 |
|
356 |
+
| spearman_max | 0.6802 |
|
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.6828 |
|
365 |
+
| **spearman_cosine** | **0.677** |
|
366 |
+
| pearson_manhattan | 0.6729 |
|
367 |
+
| spearman_manhattan | 0.6664 |
|
368 |
+
| pearson_euclidean | 0.6738 |
|
369 |
+
| spearman_euclidean | 0.6667 |
|
370 |
+
| pearson_dot | 0.5296 |
|
371 |
+
| spearman_dot | 0.5174 |
|
372 |
+
| pearson_max | 0.6828 |
|
373 |
+
| spearman_max | 0.677 |
|
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.6758 |
|
382 |
+
| **spearman_cosine** | **0.6702** |
|
383 |
+
| pearson_manhattan | 0.6718 |
|
384 |
+
| spearman_manhattan | 0.6643 |
|
385 |
+
| pearson_euclidean | 0.673 |
|
386 |
+
| spearman_euclidean | 0.665 |
|
387 |
+
| pearson_dot | 0.4892 |
|
388 |
+
| spearman_dot | 0.4783 |
|
389 |
+
| pearson_max | 0.6758 |
|
390 |
+
| spearman_max | 0.6702 |
|
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.67 |
|
399 |
+
| **spearman_cosine** | **0.6638** |
|
400 |
+
| pearson_manhattan | 0.6693 |
|
401 |
+
| spearman_manhattan | 0.6594 |
|
402 |
+
| pearson_euclidean | 0.671 |
|
403 |
+
| spearman_euclidean | 0.6601 |
|
404 |
+
| pearson_dot | 0.4509 |
|
405 |
+
| spearman_dot | 0.4402 |
|
406 |
+
| pearson_max | 0.671 |
|
407 |
+
| spearman_max | 0.6638 |
|
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.6615 |
|
416 |
+
| **spearman_cosine** | **0.6556** |
|
417 |
+
| pearson_manhattan | 0.6653 |
|
418 |
+
| spearman_manhattan | 0.6533 |
|
419 |
+
| pearson_euclidean | 0.6672 |
|
420 |
+
| spearman_euclidean | 0.654 |
|
421 |
+
| pearson_dot | 0.3868 |
|
422 |
+
| spearman_dot | 0.3771 |
|
423 |
+
| pearson_max | 0.6672 |
|
424 |
+
| spearman_max | 0.6556 |
|
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 | 20.0932 | - | - | - | - | - |
|
568 |
+
| 0.0115 | 200 | 16.2641 | - | - | - | - | - |
|
569 |
+
| 0.0172 | 300 | 12.797 | - | - | - | - | - |
|
570 |
+
| 0.0229 | 400 | 12.1927 | - | - | - | - | - |
|
571 |
+
| 0.0287 | 500 | 11.0423 | - | - | - | - | - |
|
572 |
+
| 0.0344 | 600 | 9.676 | - | - | - | - | - |
|
573 |
+
| 0.0402 | 700 | 8.1545 | - | - | - | - | - |
|
574 |
+
| 0.0459 | 800 | 7.7822 | - | - | - | - | - |
|
575 |
+
| 0.0516 | 900 | 7.9352 | - | - | - | - | - |
|
576 |
+
| 0.0574 | 1000 | 7.9534 | - | - | - | - | - |
|
577 |
+
| 0.0631 | 1100 | 8.1006 | - | - | - | - | - |
|
578 |
+
| 0.0688 | 1200 | 7.4767 | - | - | - | - | - |
|
579 |
+
| 0.0746 | 1300 | 8.3747 | - | - | - | - | - |
|
580 |
+
| 0.0803 | 1400 | 7.7686 | - | - | - | - | - |
|
581 |
+
| 0.0860 | 1500 | 6.8076 | - | - | - | - | - |
|
582 |
+
| 0.0918 | 1600 | 6.9238 | - | - | - | - | - |
|
583 |
+
| 0.0975 | 1700 | 6.5503 | - | - | - | - | - |
|
584 |
+
| 0.1033 | 1800 | 6.74 | - | - | - | - | - |
|
585 |
+
| 0.1090 | 1900 | 7.7802 | - | - | - | - | - |
|
586 |
+
| 0.1147 | 2000 | 7.2594 | - | - | - | - | - |
|
587 |
+
| 0.1205 | 2100 | 7.091 | - | - | - | - | - |
|
588 |
+
| 0.1262 | 2200 | 6.8677 | - | - | - | - | - |
|
589 |
+
| 0.1319 | 2300 | 6.4249 | - | - | - | - | - |
|
590 |
+
| 0.1377 | 2400 | 6.1512 | - | - | - | - | - |
|
591 |
+
| 0.1434 | 2500 | 5.9714 | - | - | - | - | - |
|
592 |
+
| 0.1491 | 2600 | 5.4914 | - | - | - | - | - |
|
593 |
+
| 0.1549 | 2700 | 5.5825 | - | - | - | - | - |
|
594 |
+
| 0.1606 | 2800 | 5.9456 | - | - | - | - | - |
|
595 |
+
| 0.1664 | 2900 | 6.4012 | - | - | - | - | - |
|
596 |
+
| 0.1721 | 3000 | 7.1999 | - | - | - | - | - |
|
597 |
+
| 0.1778 | 3100 | 6.8254 | - | - | - | - | - |
|
598 |
+
| 0.1836 | 3200 | 6.541 | - | - | - | - | - |
|
599 |
+
| 0.1893 | 3300 | 6.5411 | - | - | - | - | - |
|
600 |
+
| 0.1950 | 3400 | 5.56 | - | - | - | - | - |
|
601 |
+
| 0.2008 | 3500 | 6.4692 | - | - | - | - | - |
|
602 |
+
| 0.2065 | 3600 | 5.9266 | - | - | - | - | - |
|
603 |
+
| 0.2122 | 3700 | 6.2055 | - | - | - | - | - |
|
604 |
+
| 0.2180 | 3800 | 6.0835 | - | - | - | - | - |
|
605 |
+
| 0.2237 | 3900 | 6.6112 | - | - | - | - | - |
|
606 |
+
| 0.2294 | 4000 | 6.3391 | - | - | - | - | - |
|
607 |
+
| 0.2352 | 4100 | 5.8379 | - | - | - | - | - |
|
608 |
+
| 0.2409 | 4200 | 5.8107 | - | - | - | - | - |
|
609 |
+
| 0.2467 | 4300 | 6.1473 | - | - | - | - | - |
|
610 |
+
| 0.2524 | 4400 | 6.2827 | - | - | - | - | - |
|
611 |
+
| 0.2581 | 4500 | 6.2299 | - | - | - | - | - |
|
612 |
+
| 0.2639 | 4600 | 6.1013 | - | - | - | - | - |
|
613 |
+
| 0.2696 | 4700 | 5.6491 | - | - | - | - | - |
|
614 |
+
| 0.2753 | 4800 | 5.8641 | - | - | - | - | - |
|
615 |
+
| 0.2811 | 4900 | 5.4278 | - | - | - | - | - |
|
616 |
+
| 0.2868 | 5000 | 5.7304 | - | - | - | - | - |
|
617 |
+
| 0.2925 | 5100 | 5.4652 | - | - | - | - | - |
|
618 |
+
| 0.2983 | 5200 | 5.9031 | - | - | - | - | - |
|
619 |
+
| 0.3040 | 5300 | 6.1014 | - | - | - | - | - |
|
620 |
+
| 0.3098 | 5400 | 5.9282 | - | - | - | - | - |
|
621 |
+
| 0.3155 | 5500 | 5.6618 | - | - | - | - | - |
|
622 |
+
| 0.3212 | 5600 | 5.3803 | - | - | - | - | - |
|
623 |
+
| 0.3270 | 5700 | 5.5759 | - | - | - | - | - |
|
624 |
+
| 0.3327 | 5800 | 5.6936 | - | - | - | - | - |
|
625 |
+
| 0.3384 | 5900 | 5.7249 | - | - | - | - | - |
|
626 |
+
| 0.3442 | 6000 | 5.5926 | - | - | - | - | - |
|
627 |
+
| 0.3499 | 6100 | 5.6329 | - | - | - | - | - |
|
628 |
+
| 0.3556 | 6200 | 5.7456 | - | - | - | - | - |
|
629 |
+
| 0.3614 | 6300 | 5.1638 | - | - | - | - | - |
|
630 |
+
| 0.3671 | 6400 | 5.3258 | - | - | - | - | - |
|
631 |
+
| 0.3729 | 6500 | 5.1216 | - | - | - | - | - |
|
632 |
+
| 0.3786 | 6600 | 5.7453 | - | - | - | - | - |
|
633 |
+
| 0.3843 | 6700 | 4.9906 | - | - | - | - | - |
|
634 |
+
| 0.3901 | 6800 | 5.1126 | - | - | - | - | - |
|
635 |
+
| 0.3958 | 6900 | 5.2389 | - | - | - | - | - |
|
636 |
+
| 0.4015 | 7000 | 5.1483 | - | - | - | - | - |
|
637 |
+
| 0.4073 | 7100 | 5.6072 | - | - | - | - | - |
|
638 |
+
| 0.4130 | 7200 | 5.2018 | - | - | - | - | - |
|
639 |
+
| 0.4187 | 7300 | 5.4083 | - | - | - | - | - |
|
640 |
+
| 0.4245 | 7400 | 5.1995 | - | - | - | - | - |
|
641 |
+
| 0.4302 | 7500 | 5.5787 | - | - | - | - | - |
|
642 |
+
| 0.4360 | 7600 | 4.9942 | - | - | - | - | - |
|
643 |
+
| 0.4417 | 7700 | 4.9196 | - | - | - | - | - |
|
644 |
+
| 0.4474 | 7800 | 5.3938 | - | - | - | - | - |
|
645 |
+
| 0.4532 | 7900 | 5.381 | - | - | - | - | - |
|
646 |
+
| 0.4589 | 8000 | 4.908 | - | - | - | - | - |
|
647 |
+
| 0.4646 | 8100 | 4.8871 | - | - | - | - | - |
|
648 |
+
| 0.4704 | 8200 | 5.2298 | - | - | - | - | - |
|
649 |
+
| 0.4761 | 8300 | 4.6157 | - | - | - | - | - |
|
650 |
+
| 0.4818 | 8400 | 5.0344 | - | - | - | - | - |
|
651 |
+
| 0.4876 | 8500 | 5.0713 | - | - | - | - | - |
|
652 |
+
| 0.4933 | 8600 | 5.1952 | - | - | - | - | - |
|
653 |
+
| 0.4991 | 8700 | 5.5352 | - | - | - | - | - |
|
654 |
+
| 0.5048 | 8800 | 5.1556 | - | - | - | - | - |
|
655 |
+
| 0.5105 | 8900 | 5.2318 | - | - | - | - | - |
|
656 |
+
| 0.5163 | 9000 | 4.7887 | - | - | - | - | - |
|
657 |
+
| 0.5220 | 9100 | 4.868 | - | - | - | - | - |
|
658 |
+
| 0.5277 | 9200 | 4.9544 | - | - | - | - | - |
|
659 |
+
| 0.5335 | 9300 | 4.816 | - | - | - | - | - |
|
660 |
+
| 0.5392 | 9400 | 4.8374 | - | - | - | - | - |
|
661 |
+
| 0.5449 | 9500 | 5.3242 | - | - | - | - | - |
|
662 |
+
| 0.5507 | 9600 | 4.9039 | - | - | - | - | - |
|
663 |
+
| 0.5564 | 9700 | 5.2907 | - | - | - | - | - |
|
664 |
+
| 0.5622 | 9800 | 5.4007 | - | - | - | - | - |
|
665 |
+
| 0.5679 | 9900 | 5.3016 | - | - | - | - | - |
|
666 |
+
| 0.5736 | 10000 | 5.3235 | - | - | - | - | - |
|
667 |
+
| 0.5794 | 10100 | 5.1566 | - | - | - | - | - |
|
668 |
+
| 0.5851 | 10200 | 5.1348 | - | - | - | - | - |
|
669 |
+
| 0.5908 | 10300 | 5.4583 | - | - | - | - | - |
|
670 |
+
| 0.5966 | 10400 | 4.9528 | - | - | - | - | - |
|
671 |
+
| 0.6023 | 10500 | 5.0073 | - | - | - | - | - |
|
672 |
+
| 0.6080 | 10600 | 5.0324 | - | - | - | - | - |
|
673 |
+
| 0.6138 | 10700 | 5.4107 | - | - | - | - | - |
|
674 |
+
| 0.6195 | 10800 | 5.3643 | - | - | - | - | - |
|
675 |
+
| 0.6253 | 10900 | 5.1267 | - | - | - | - | - |
|
676 |
+
| 0.6310 | 11000 | 5.0443 | - | - | - | - | - |
|
677 |
+
| 0.6367 | 11100 | 5.2001 | - | - | - | - | - |
|
678 |
+
| 0.6425 | 11200 | 4.8813 | - | - | - | - | - |
|
679 |
+
| 0.6482 | 11300 | 5.4734 | - | - | - | - | - |
|
680 |
+
| 0.6539 | 11400 | 5.0344 | - | - | - | - | - |
|
681 |
+
| 0.6597 | 11500 | 5.5043 | - | - | - | - | - |
|
682 |
+
| 0.6654 | 11600 | 4.6201 | - | - | - | - | - |
|
683 |
+
| 0.6711 | 11700 | 5.4626 | - | - | - | - | - |
|
684 |
+
| 0.6769 | 11800 | 5.3813 | - | - | - | - | - |
|
685 |
+
| 0.6826 | 11900 | 4.626 | - | - | - | - | - |
|
686 |
+
| 0.6883 | 12000 | 4.87 | - | - | - | - | - |
|
687 |
+
| 0.6941 | 12100 | 5.0015 | - | - | - | - | - |
|
688 |
+
| 0.6998 | 12200 | 4.962 | - | - | - | - | - |
|
689 |
+
| 0.7056 | 12300 | 5.1613 | - | - | - | - | - |
|
690 |
+
| 0.7113 | 12400 | 5.2074 | - | - | - | - | - |
|
691 |
+
| 0.7170 | 12500 | 4.958 | - | - | - | - | - |
|
692 |
+
| 0.7228 | 12600 | 4.4516 | - | - | - | - | - |
|
693 |
+
| 0.7285 | 12700 | 4.8421 | - | - | - | - | - |
|
694 |
+
| 0.7342 | 12800 | 4.9242 | - | - | - | - | - |
|
695 |
+
| 0.7400 | 12900 | 4.9256 | - | - | - | - | - |
|
696 |
+
| 0.7457 | 13000 | 4.8254 | - | - | - | - | - |
|
697 |
+
| 0.7514 | 13100 | 4.5114 | - | - | - | - | - |
|
698 |
+
| 0.7572 | 13200 | 7.7118 | - | - | - | - | - |
|
699 |
+
| 0.7629 | 13300 | 7.0822 | - | - | - | - | - |
|
700 |
+
| 0.7687 | 13400 | 6.8022 | - | - | - | - | - |
|
701 |
+
| 0.7744 | 13500 | 6.7295 | - | - | - | - | - |
|
702 |
+
| 0.7801 | 13600 | 6.0547 | - | - | - | - | - |
|
703 |
+
| 0.7859 | 13700 | 6.5285 | - | - | - | - | - |
|
704 |
+
| 0.7916 | 13800 | 6.2666 | - | - | - | - | - |
|
705 |
+
| 0.7973 | 13900 | 6.1031 | - | - | - | - | - |
|
706 |
+
| 0.8031 | 14000 | 5.9138 | - | - | - | - | - |
|
707 |
+
| 0.8088 | 14100 | 5.6636 | - | - | - | - | - |
|
708 |
+
| 0.8145 | 14200 | 5.7073 | - | - | - | - | - |
|
709 |
+
| 0.8203 | 14300 | 5.7963 | - | - | - | - | - |
|
710 |
+
| 0.8260 | 14400 | 5.7336 | - | - | - | - | - |
|
711 |
+
| 0.8318 | 14500 | 5.8113 | - | - | - | - | - |
|
712 |
+
| 0.8375 | 14600 | 5.6708 | - | - | - | - | - |
|
713 |
+
| 0.8432 | 14700 | 5.4565 | - | - | - | - | - |
|
714 |
+
| 0.8490 | 14800 | 5.4293 | - | - | - | - | - |
|
715 |
+
| 0.8547 | 14900 | 5.4166 | - | - | - | - | - |
|
716 |
+
| 0.8604 | 15000 | 5.3616 | - | - | - | - | - |
|
717 |
+
| 0.8662 | 15100 | 5.1579 | - | - | - | - | - |
|
718 |
+
| 0.8719 | 15200 | 5.3887 | - | - | - | - | - |
|
719 |
+
| 0.8776 | 15300 | 5.346 | - | - | - | - | - |
|
720 |
+
| 0.8834 | 15400 | 5.2762 | - | - | - | - | - |
|
721 |
+
| 0.8891 | 15500 | 5.3417 | - | - | - | - | - |
|
722 |
+
| 0.8949 | 15600 | 5.1607 | - | - | - | - | - |
|
723 |
+
| 0.9006 | 15700 | 5.4493 | - | - | - | - | - |
|
724 |
+
| 0.9063 | 15800 | 5.0268 | - | - | - | - | - |
|
725 |
+
| 0.9121 | 15900 | 5.0612 | - | - | - | - | - |
|
726 |
+
| 0.9178 | 16000 | 5.1471 | - | - | - | - | - |
|
727 |
+
| 0.9235 | 16100 | 4.8275 | - | - | - | - | - |
|
728 |
+
| 0.9293 | 16200 | 5.1464 | - | - | - | - | - |
|
729 |
+
| 0.9350 | 16300 | 4.958 | - | - | - | - | - |
|
730 |
+
| 0.9407 | 16400 | 5.1968 | - | - | - | - | - |
|
731 |
+
| 0.9465 | 16500 | 4.7783 | - | - | - | - | - |
|
732 |
+
| 0.9522 | 16600 | 5.0834 | - | - | - | - | - |
|
733 |
+
| 0.9580 | 16700 | 4.9839 | - | - | - | - | - |
|
734 |
+
| 0.9637 | 16800 | 5.0078 | - | - | - | - | - |
|
735 |
+
| 0.9694 | 16900 | 5.1624 | - | - | - | - | - |
|
736 |
+
| 0.9752 | 17000 | 5.2132 | - | - | - | - | - |
|
737 |
+
| 0.9809 | 17100 | 4.9741 | - | - | - | - | - |
|
738 |
+
| 0.9866 | 17200 | 4.96 | - | - | - | - | - |
|
739 |
+
| 0.9924 | 17300 | 5.1834 | - | - | - | - | - |
|
740 |
+
| 0.9981 | 17400 | 4.8955 | - | - | - | - | - |
|
741 |
+
| 1.0 | 17433 | - | 0.6638 | 0.6702 | 0.6770 | 0.6556 | 0.6802 |
|
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,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "Geotrend/bert-base-sw-cased",
|
3 |
+
"architectures": [
|
4 |
+
"BertModel"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"classifier_dropout": null,
|
8 |
+
"directionality": "bidi",
|
9 |
+
"gradient_checkpointing": false,
|
10 |
+
"hidden_act": "gelu",
|
11 |
+
"hidden_dropout_prob": 0.1,
|
12 |
+
"hidden_size": 768,
|
13 |
+
"initializer_range": 0.02,
|
14 |
+
"intermediate_size": 3072,
|
15 |
+
"layer_norm_eps": 1e-12,
|
16 |
+
"max_position_embeddings": 512,
|
17 |
+
"model_type": "bert",
|
18 |
+
"num_attention_heads": 12,
|
19 |
+
"num_hidden_layers": 12,
|
20 |
+
"pad_token_id": 0,
|
21 |
+
"pooler_fc_size": 768,
|
22 |
+
"pooler_num_attention_heads": 12,
|
23 |
+
"pooler_num_fc_layers": 3,
|
24 |
+
"pooler_size_per_head": 128,
|
25 |
+
"pooler_type": "first_token_transform",
|
26 |
+
"position_embedding_type": "absolute",
|
27 |
+
"torch_dtype": "float32",
|
28 |
+
"transformers_version": "4.40.1",
|
29 |
+
"type_vocab_size": 2,
|
30 |
+
"use_cache": true,
|
31 |
+
"vocab_size": 16632
|
32 |
+
}
|
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:3a7a64d909931e7e1b959149e6e900de8be2f87a66d5b7cbfd0e482a9e890509
|
3 |
+
size 395281192
|
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,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"cls_token": "[CLS]",
|
3 |
+
"mask_token": "[MASK]",
|
4 |
+
"pad_token": "[PAD]",
|
5 |
+
"sep_token": "[SEP]",
|
6 |
+
"unk_token": "[UNK]"
|
7 |
+
}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
"10": {
|
12 |
+
"content": "[UNK]",
|
13 |
+
"lstrip": false,
|
14 |
+
"normalized": false,
|
15 |
+
"rstrip": false,
|
16 |
+
"single_word": false,
|
17 |
+
"special": true
|
18 |
+
},
|
19 |
+
"11": {
|
20 |
+
"content": "[CLS]",
|
21 |
+
"lstrip": false,
|
22 |
+
"normalized": false,
|
23 |
+
"rstrip": false,
|
24 |
+
"single_word": false,
|
25 |
+
"special": true
|
26 |
+
},
|
27 |
+
"12": {
|
28 |
+
"content": "[SEP]",
|
29 |
+
"lstrip": false,
|
30 |
+
"normalized": false,
|
31 |
+
"rstrip": false,
|
32 |
+
"single_word": false,
|
33 |
+
"special": true
|
34 |
+
},
|
35 |
+
"13": {
|
36 |
+
"content": "[MASK]",
|
37 |
+
"lstrip": false,
|
38 |
+
"normalized": false,
|
39 |
+
"rstrip": false,
|
40 |
+
"single_word": false,
|
41 |
+
"special": true
|
42 |
+
}
|
43 |
+
},
|
44 |
+
"clean_up_tokenization_spaces": true,
|
45 |
+
"cls_token": "[CLS]",
|
46 |
+
"do_basic_tokenize": true,
|
47 |
+
"do_lower_case": false,
|
48 |
+
"mask_token": "[MASK]",
|
49 |
+
"model_max_length": 512,
|
50 |
+
"never_split": null,
|
51 |
+
"pad_token": "[PAD]",
|
52 |
+
"sep_token": "[SEP]",
|
53 |
+
"strip_accents": null,
|
54 |
+
"tokenize_chinese_chars": true,
|
55 |
+
"tokenizer_class": "BertTokenizer",
|
56 |
+
"unk_token": "[UNK]"
|
57 |
+
}
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|