Add new SentenceTransformer model.
Browse files- 1_Pooling/config.json +10 -0
- README.md +890 -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,890 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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: sentence-transformers
|
4 |
+
tags:
|
5 |
+
- sentence-transformers
|
6 |
+
- sentence-similarity
|
7 |
+
- feature-extraction
|
8 |
+
- generated_from_trainer
|
9 |
+
- dataset_size:1115700
|
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: Ndege mwenye mdomo mrefu katikati ya ndege.
|
27 |
+
sentences:
|
28 |
+
- Panya anayekimbia juu ya gurudumu.
|
29 |
+
- Mtu anashindana katika mashindano ya mbio.
|
30 |
+
- Ndege anayeruka.
|
31 |
+
- source_sentence: Msichana mchanga mwenye nywele nyeusi anakabili kamera na kushikilia
|
32 |
+
mfuko wa karatasi wakati amevaa shati la machungwa na mabawa ya kipepeo yenye
|
33 |
+
rangi nyingi.
|
34 |
+
sentences:
|
35 |
+
- Mwanamke mzee anakataa kupigwa picha.
|
36 |
+
- mtu akila na mvulana mdogo kwenye kijia cha jiji
|
37 |
+
- Msichana mchanga anakabili kamera.
|
38 |
+
- source_sentence: Wanawake na watoto wameketi nje katika kivuli wakati kikundi cha
|
39 |
+
watoto wadogo wameketi ndani katika kivuli.
|
40 |
+
sentences:
|
41 |
+
- Mwanamke na watoto na kukaa chini.
|
42 |
+
- Mwanamke huyo anakimbia.
|
43 |
+
- Watu wanasafiri kwa baiskeli.
|
44 |
+
- source_sentence: Mtoto mdogo anaruka mikononi mwa mwanamke aliyevalia suti nyeusi
|
45 |
+
ya kuogelea akiwa kwenye dimbwi.
|
46 |
+
sentences:
|
47 |
+
- Mtoto akiruka mikononi mwa mwanamke aliyevalia suti ya kuogelea kwenye dimbwi.
|
48 |
+
- Someone is holding oranges and walking
|
49 |
+
- Mama na binti wakinunua viatu.
|
50 |
+
- source_sentence: Mwanamume na mwanamke wachanga waliovaa mikoba wanaweka au kuondoa
|
51 |
+
kitu kutoka kwenye mti mweupe wa zamani, huku watu wengine wamesimama au wameketi
|
52 |
+
nyuma.
|
53 |
+
sentences:
|
54 |
+
- tai huruka
|
55 |
+
- mwanamume na mwanamke wenye mikoba
|
56 |
+
- Wanaume wawili wameketi karibu na mwanamke.
|
57 |
+
pipeline_tag: sentence-similarity
|
58 |
+
model-index:
|
59 |
+
- name: SentenceTransformer based on Geotrend/bert-base-sw-cased
|
60 |
+
results:
|
61 |
+
- task:
|
62 |
+
type: semantic-similarity
|
63 |
+
name: Semantic Similarity
|
64 |
+
dataset:
|
65 |
+
name: sts test 768
|
66 |
+
type: sts-test-768
|
67 |
+
metrics:
|
68 |
+
- type: pearson_cosine
|
69 |
+
value: 0.6937245827269046
|
70 |
+
name: Pearson Cosine
|
71 |
+
- type: spearman_cosine
|
72 |
+
value: 0.6872564222432196
|
73 |
+
name: Spearman Cosine
|
74 |
+
- type: pearson_manhattan
|
75 |
+
value: 0.6671541268726737
|
76 |
+
name: Pearson Manhattan
|
77 |
+
- type: spearman_manhattan
|
78 |
+
value: 0.6578428252987948
|
79 |
+
name: Spearman Manhattan
|
80 |
+
- type: pearson_euclidean
|
81 |
+
value: 0.6672292642346008
|
82 |
+
name: Pearson Euclidean
|
83 |
+
- type: spearman_euclidean
|
84 |
+
value: 0.6577692881532263
|
85 |
+
name: Spearman Euclidean
|
86 |
+
- type: pearson_dot
|
87 |
+
value: 0.5234944445417878
|
88 |
+
name: Pearson Dot
|
89 |
+
- type: spearman_dot
|
90 |
+
value: 0.5126395384896926
|
91 |
+
name: Spearman Dot
|
92 |
+
- type: pearson_max
|
93 |
+
value: 0.6937245827269046
|
94 |
+
name: Pearson Max
|
95 |
+
- type: spearman_max
|
96 |
+
value: 0.6872564222432196
|
97 |
+
name: Spearman Max
|
98 |
+
- task:
|
99 |
+
type: semantic-similarity
|
100 |
+
name: Semantic Similarity
|
101 |
+
dataset:
|
102 |
+
name: sts test 512
|
103 |
+
type: sts-test-512
|
104 |
+
metrics:
|
105 |
+
- type: pearson_cosine
|
106 |
+
value: 0.689885399601221
|
107 |
+
name: Pearson Cosine
|
108 |
+
- type: spearman_cosine
|
109 |
+
value: 0.6847071916895495
|
110 |
+
name: Spearman Cosine
|
111 |
+
- type: pearson_manhattan
|
112 |
+
value: 0.6678379220949281
|
113 |
+
name: Pearson Manhattan
|
114 |
+
- type: spearman_manhattan
|
115 |
+
value: 0.6579957115799916
|
116 |
+
name: Spearman Manhattan
|
117 |
+
- type: pearson_euclidean
|
118 |
+
value: 0.6673062843667007
|
119 |
+
name: Pearson Euclidean
|
120 |
+
- type: spearman_euclidean
|
121 |
+
value: 0.6573006123381013
|
122 |
+
name: Spearman Euclidean
|
123 |
+
- type: pearson_dot
|
124 |
+
value: 0.49533316366864977
|
125 |
+
name: Pearson Dot
|
126 |
+
- type: spearman_dot
|
127 |
+
value: 0.48723679408818543
|
128 |
+
name: Spearman Dot
|
129 |
+
- type: pearson_max
|
130 |
+
value: 0.689885399601221
|
131 |
+
name: Pearson Max
|
132 |
+
- type: spearman_max
|
133 |
+
value: 0.6847071916895495
|
134 |
+
name: Spearman Max
|
135 |
+
- task:
|
136 |
+
type: semantic-similarity
|
137 |
+
name: Semantic Similarity
|
138 |
+
dataset:
|
139 |
+
name: sts test 256
|
140 |
+
type: sts-test-256
|
141 |
+
metrics:
|
142 |
+
- type: pearson_cosine
|
143 |
+
value: 0.6873377612773459
|
144 |
+
name: Pearson Cosine
|
145 |
+
- type: spearman_cosine
|
146 |
+
value: 0.6816874105466478
|
147 |
+
name: Spearman Cosine
|
148 |
+
- type: pearson_manhattan
|
149 |
+
value: 0.667357515297651
|
150 |
+
name: Pearson Manhattan
|
151 |
+
- type: spearman_manhattan
|
152 |
+
value: 0.6557727891191705
|
153 |
+
name: Spearman Manhattan
|
154 |
+
- type: pearson_euclidean
|
155 |
+
value: 0.6674937201647584
|
156 |
+
name: Pearson Euclidean
|
157 |
+
- type: spearman_euclidean
|
158 |
+
value: 0.6560441259953166
|
159 |
+
name: Spearman Euclidean
|
160 |
+
- type: pearson_dot
|
161 |
+
value: 0.45660372834373963
|
162 |
+
name: Pearson Dot
|
163 |
+
- type: spearman_dot
|
164 |
+
value: 0.4533070407260065
|
165 |
+
name: Spearman Dot
|
166 |
+
- type: pearson_max
|
167 |
+
value: 0.6873377612773459
|
168 |
+
name: Pearson Max
|
169 |
+
- type: spearman_max
|
170 |
+
value: 0.6816874105466478
|
171 |
+
name: Spearman Max
|
172 |
+
- task:
|
173 |
+
type: semantic-similarity
|
174 |
+
name: Semantic Similarity
|
175 |
+
dataset:
|
176 |
+
name: sts test 128
|
177 |
+
type: sts-test-128
|
178 |
+
metrics:
|
179 |
+
- type: pearson_cosine
|
180 |
+
value: 0.6836009506667413
|
181 |
+
name: Pearson Cosine
|
182 |
+
- type: spearman_cosine
|
183 |
+
value: 0.6795423695973911
|
184 |
+
name: Spearman Cosine
|
185 |
+
- type: pearson_manhattan
|
186 |
+
value: 0.6663652896396122
|
187 |
+
name: Pearson Manhattan
|
188 |
+
- type: spearman_manhattan
|
189 |
+
value: 0.6534731725514219
|
190 |
+
name: Spearman Manhattan
|
191 |
+
- type: pearson_euclidean
|
192 |
+
value: 0.6663726876345561
|
193 |
+
name: Pearson Euclidean
|
194 |
+
- type: spearman_euclidean
|
195 |
+
value: 0.6537216014002204
|
196 |
+
name: Spearman Euclidean
|
197 |
+
- type: pearson_dot
|
198 |
+
value: 0.43102957451470686
|
199 |
+
name: Pearson Dot
|
200 |
+
- type: spearman_dot
|
201 |
+
value: 0.431538008932168
|
202 |
+
name: Spearman Dot
|
203 |
+
- type: pearson_max
|
204 |
+
value: 0.6836009506667413
|
205 |
+
name: Pearson Max
|
206 |
+
- type: spearman_max
|
207 |
+
value: 0.6795423695973911
|
208 |
+
name: Spearman Max
|
209 |
+
- task:
|
210 |
+
type: semantic-similarity
|
211 |
+
name: Semantic Similarity
|
212 |
+
dataset:
|
213 |
+
name: sts test 64
|
214 |
+
type: sts-test-64
|
215 |
+
metrics:
|
216 |
+
- type: pearson_cosine
|
217 |
+
value: 0.6715253560367674
|
218 |
+
name: Pearson Cosine
|
219 |
+
- type: spearman_cosine
|
220 |
+
value: 0.669070001537953
|
221 |
+
name: Spearman Cosine
|
222 |
+
- type: pearson_manhattan
|
223 |
+
value: 0.6571390159051358
|
224 |
+
name: Pearson Manhattan
|
225 |
+
- type: spearman_manhattan
|
226 |
+
value: 0.6456119247619697
|
227 |
+
name: Spearman Manhattan
|
228 |
+
- type: pearson_euclidean
|
229 |
+
value: 0.6598587843081631
|
230 |
+
name: Pearson Euclidean
|
231 |
+
- type: spearman_euclidean
|
232 |
+
value: 0.6472279949159918
|
233 |
+
name: Spearman Euclidean
|
234 |
+
- type: pearson_dot
|
235 |
+
value: 0.36757468941627225
|
236 |
+
name: Pearson Dot
|
237 |
+
- type: spearman_dot
|
238 |
+
value: 0.3678274698380672
|
239 |
+
name: Spearman Dot
|
240 |
+
- type: pearson_max
|
241 |
+
value: 0.6715253560367674
|
242 |
+
name: Pearson Max
|
243 |
+
- type: spearman_max
|
244 |
+
value: 0.669070001537953
|
245 |
+
name: Spearman Max
|
246 |
+
---
|
247 |
+
|
248 |
+
# SentenceTransformer based on Geotrend/bert-base-sw-cased
|
249 |
+
|
250 |
+
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) on the Mollel/swahili-n_li-triplet-swh-eng dataset. 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.
|
251 |
+
|
252 |
+
## Model Details
|
253 |
+
|
254 |
+
### Model Description
|
255 |
+
- **Model Type:** Sentence Transformer
|
256 |
+
- **Base model:** [Geotrend/bert-base-sw-cased](https://huggingface.co/Geotrend/bert-base-sw-cased) <!-- at revision 7d9ca957a81d2449cf1319af0b91f75f11642336 -->
|
257 |
+
- **Maximum Sequence Length:** 512 tokens
|
258 |
+
- **Output Dimensionality:** 768 tokens
|
259 |
+
- **Similarity Function:** Cosine Similarity
|
260 |
+
- **Training Dataset:**
|
261 |
+
- Mollel/swahili-n_li-triplet-swh-eng
|
262 |
+
<!-- - **Language:** Unknown -->
|
263 |
+
<!-- - **License:** Unknown -->
|
264 |
+
|
265 |
+
### Model Sources
|
266 |
+
|
267 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
268 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
|
269 |
+
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
|
270 |
+
|
271 |
+
### Full Model Architecture
|
272 |
+
|
273 |
+
```
|
274 |
+
SentenceTransformer(
|
275 |
+
(0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: BertModel
|
276 |
+
(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})
|
277 |
+
)
|
278 |
+
```
|
279 |
+
|
280 |
+
## Usage
|
281 |
+
|
282 |
+
### Direct Usage (Sentence Transformers)
|
283 |
+
|
284 |
+
First install the Sentence Transformers library:
|
285 |
+
|
286 |
+
```bash
|
287 |
+
pip install -U sentence-transformers
|
288 |
+
```
|
289 |
+
|
290 |
+
Then you can load this model and run inference.
|
291 |
+
```python
|
292 |
+
from sentence_transformers import SentenceTransformer
|
293 |
+
|
294 |
+
# Download from the 🤗 Hub
|
295 |
+
model = SentenceTransformer("sartifyllc/MultiLinguSwahili-bert-base-sw-cased-nli-matryoshka")
|
296 |
+
# Run inference
|
297 |
+
sentences = [
|
298 |
+
'Mwanamume na mwanamke wachanga waliovaa mikoba wanaweka au kuondoa kitu kutoka kwenye mti mweupe wa zamani, huku watu wengine wamesimama au wameketi nyuma.',
|
299 |
+
'mwanamume na mwanamke wenye mikoba',
|
300 |
+
'tai huruka',
|
301 |
+
]
|
302 |
+
embeddings = model.encode(sentences)
|
303 |
+
print(embeddings.shape)
|
304 |
+
# [3, 768]
|
305 |
+
|
306 |
+
# Get the similarity scores for the embeddings
|
307 |
+
similarities = model.similarity(embeddings, embeddings)
|
308 |
+
print(similarities.shape)
|
309 |
+
# [3, 3]
|
310 |
+
```
|
311 |
+
|
312 |
+
<!--
|
313 |
+
### Direct Usage (Transformers)
|
314 |
+
|
315 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
316 |
+
|
317 |
+
</details>
|
318 |
+
-->
|
319 |
+
|
320 |
+
<!--
|
321 |
+
### Downstream Usage (Sentence Transformers)
|
322 |
+
|
323 |
+
You can finetune this model on your own dataset.
|
324 |
+
|
325 |
+
<details><summary>Click to expand</summary>
|
326 |
+
|
327 |
+
</details>
|
328 |
+
-->
|
329 |
+
|
330 |
+
<!--
|
331 |
+
### Out-of-Scope Use
|
332 |
+
|
333 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
334 |
+
-->
|
335 |
+
|
336 |
+
## Evaluation
|
337 |
+
|
338 |
+
### Metrics
|
339 |
+
|
340 |
+
#### Semantic Similarity
|
341 |
+
* Dataset: `sts-test-768`
|
342 |
+
* Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
|
343 |
+
|
344 |
+
| Metric | Value |
|
345 |
+
|:--------------------|:-----------|
|
346 |
+
| pearson_cosine | 0.6937 |
|
347 |
+
| **spearman_cosine** | **0.6873** |
|
348 |
+
| pearson_manhattan | 0.6672 |
|
349 |
+
| spearman_manhattan | 0.6578 |
|
350 |
+
| pearson_euclidean | 0.6672 |
|
351 |
+
| spearman_euclidean | 0.6578 |
|
352 |
+
| pearson_dot | 0.5235 |
|
353 |
+
| spearman_dot | 0.5126 |
|
354 |
+
| pearson_max | 0.6937 |
|
355 |
+
| spearman_max | 0.6873 |
|
356 |
+
|
357 |
+
#### Semantic Similarity
|
358 |
+
* Dataset: `sts-test-512`
|
359 |
+
* Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
|
360 |
+
|
361 |
+
| Metric | Value |
|
362 |
+
|:--------------------|:-----------|
|
363 |
+
| pearson_cosine | 0.6899 |
|
364 |
+
| **spearman_cosine** | **0.6847** |
|
365 |
+
| pearson_manhattan | 0.6678 |
|
366 |
+
| spearman_manhattan | 0.658 |
|
367 |
+
| pearson_euclidean | 0.6673 |
|
368 |
+
| spearman_euclidean | 0.6573 |
|
369 |
+
| pearson_dot | 0.4953 |
|
370 |
+
| spearman_dot | 0.4872 |
|
371 |
+
| pearson_max | 0.6899 |
|
372 |
+
| spearman_max | 0.6847 |
|
373 |
+
|
374 |
+
#### Semantic Similarity
|
375 |
+
* Dataset: `sts-test-256`
|
376 |
+
* Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
|
377 |
+
|
378 |
+
| Metric | Value |
|
379 |
+
|:--------------------|:-----------|
|
380 |
+
| pearson_cosine | 0.6873 |
|
381 |
+
| **spearman_cosine** | **0.6817** |
|
382 |
+
| pearson_manhattan | 0.6674 |
|
383 |
+
| spearman_manhattan | 0.6558 |
|
384 |
+
| pearson_euclidean | 0.6675 |
|
385 |
+
| spearman_euclidean | 0.656 |
|
386 |
+
| pearson_dot | 0.4566 |
|
387 |
+
| spearman_dot | 0.4533 |
|
388 |
+
| pearson_max | 0.6873 |
|
389 |
+
| spearman_max | 0.6817 |
|
390 |
+
|
391 |
+
#### Semantic Similarity
|
392 |
+
* Dataset: `sts-test-128`
|
393 |
+
* Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
|
394 |
+
|
395 |
+
| Metric | Value |
|
396 |
+
|:--------------------|:-----------|
|
397 |
+
| pearson_cosine | 0.6836 |
|
398 |
+
| **spearman_cosine** | **0.6795** |
|
399 |
+
| pearson_manhattan | 0.6664 |
|
400 |
+
| spearman_manhattan | 0.6535 |
|
401 |
+
| pearson_euclidean | 0.6664 |
|
402 |
+
| spearman_euclidean | 0.6537 |
|
403 |
+
| pearson_dot | 0.431 |
|
404 |
+
| spearman_dot | 0.4315 |
|
405 |
+
| pearson_max | 0.6836 |
|
406 |
+
| spearman_max | 0.6795 |
|
407 |
+
|
408 |
+
#### Semantic Similarity
|
409 |
+
* Dataset: `sts-test-64`
|
410 |
+
* Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
|
411 |
+
|
412 |
+
| Metric | Value |
|
413 |
+
|:--------------------|:-----------|
|
414 |
+
| pearson_cosine | 0.6715 |
|
415 |
+
| **spearman_cosine** | **0.6691** |
|
416 |
+
| pearson_manhattan | 0.6571 |
|
417 |
+
| spearman_manhattan | 0.6456 |
|
418 |
+
| pearson_euclidean | 0.6599 |
|
419 |
+
| spearman_euclidean | 0.6472 |
|
420 |
+
| pearson_dot | 0.3676 |
|
421 |
+
| spearman_dot | 0.3678 |
|
422 |
+
| pearson_max | 0.6715 |
|
423 |
+
| spearman_max | 0.6691 |
|
424 |
+
|
425 |
+
<!--
|
426 |
+
## Bias, Risks and Limitations
|
427 |
+
|
428 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
429 |
+
-->
|
430 |
+
|
431 |
+
<!--
|
432 |
+
### Recommendations
|
433 |
+
|
434 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
435 |
+
-->
|
436 |
+
|
437 |
+
## Training Details
|
438 |
+
|
439 |
+
### Training Dataset
|
440 |
+
|
441 |
+
#### Mollel/swahili-n_li-triplet-swh-eng
|
442 |
+
|
443 |
+
* Dataset: Mollel/swahili-n_li-triplet-swh-eng
|
444 |
+
* Size: 1,115,700 training samples
|
445 |
+
* Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
|
446 |
+
* Approximate statistics based on the first 1000 samples:
|
447 |
+
| | anchor | positive | negative |
|
448 |
+
|:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|
|
449 |
+
| type | string | string | string |
|
450 |
+
| details | <ul><li>min: 9 tokens</li><li>mean: 16.73 tokens</li><li>max: 71 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 19.74 tokens</li><li>max: 45 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 19.0 tokens</li><li>max: 49 tokens</li></ul> |
|
451 |
+
* Samples:
|
452 |
+
| anchor | positive | negative |
|
453 |
+
|:----------------------------------------------------------------------|:-----------------------------------------------|:-----------------------------------------------------------|
|
454 |
+
| <code>A person on a horse jumps over a broken down airplane.</code> | <code>A person is outdoors, on a horse.</code> | <code>A person is at a diner, ordering an omelette.</code> |
|
455 |
+
| <code>Mtu aliyepanda farasi anaruka juu ya ndege iliyovunjika.</code> | <code>Mtu yuko nje, juu ya farasi.</code> | <code>Mtu yuko kwenye mkahawa, akiagiza omelette.</code> |
|
456 |
+
| <code>Children smiling and waving at camera</code> | <code>There are children present</code> | <code>The kids are frowning</code> |
|
457 |
+
* Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
|
458 |
+
```json
|
459 |
+
{
|
460 |
+
"loss": "MultipleNegativesRankingLoss",
|
461 |
+
"matryoshka_dims": [
|
462 |
+
768,
|
463 |
+
512,
|
464 |
+
256,
|
465 |
+
128,
|
466 |
+
64
|
467 |
+
],
|
468 |
+
"matryoshka_weights": [
|
469 |
+
1,
|
470 |
+
1,
|
471 |
+
1,
|
472 |
+
1,
|
473 |
+
1
|
474 |
+
],
|
475 |
+
"n_dims_per_step": -1
|
476 |
+
}
|
477 |
+
```
|
478 |
+
|
479 |
+
### Evaluation Dataset
|
480 |
+
|
481 |
+
#### Mollel/swahili-n_li-triplet-swh-eng
|
482 |
+
|
483 |
+
* Dataset: Mollel/swahili-n_li-triplet-swh-eng
|
484 |
+
* Size: 13,168 evaluation samples
|
485 |
+
* Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
|
486 |
+
* Approximate statistics based on the first 1000 samples:
|
487 |
+
| | anchor | positive | negative |
|
488 |
+
|:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
|
489 |
+
| type | string | string | string |
|
490 |
+
| details | <ul><li>min: 7 tokens</li><li>mean: 28.25 tokens</li><li>max: 82 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 14.16 tokens</li><li>max: 55 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 15.55 tokens</li><li>max: 46 tokens</li></ul> |
|
491 |
+
* Samples:
|
492 |
+
| anchor | positive | negative |
|
493 |
+
|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------|:-------------------------------------------------------------------|
|
494 |
+
| <code>Two women are embracing while holding to go packages.</code> | <code>Two woman are holding packages.</code> | <code>The men are fighting outside a deli.</code> |
|
495 |
+
| <code>Wanawake wawili wanakumbatiana huku wakishikilia vifurushi vya kwenda.</code> | <code>Wanawake wawili wanashikilia vifurushi.</code> | <code>Wanaume hao wanapigana nje ya duka la vyakula vitamu.</code> |
|
496 |
+
| <code>Two young children in blue jerseys, one with the number 9 and one with the number 2 are standing on wooden steps in a bathroom and washing their hands in a sink.</code> | <code>Two kids in numbered jerseys wash their hands.</code> | <code>Two kids in jackets walk to school.</code> |
|
497 |
+
* Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
|
498 |
+
```json
|
499 |
+
{
|
500 |
+
"loss": "MultipleNegativesRankingLoss",
|
501 |
+
"matryoshka_dims": [
|
502 |
+
768,
|
503 |
+
512,
|
504 |
+
256,
|
505 |
+
128,
|
506 |
+
64
|
507 |
+
],
|
508 |
+
"matryoshka_weights": [
|
509 |
+
1,
|
510 |
+
1,
|
511 |
+
1,
|
512 |
+
1,
|
513 |
+
1
|
514 |
+
],
|
515 |
+
"n_dims_per_step": -1
|
516 |
+
}
|
517 |
+
```
|
518 |
+
|
519 |
+
### Training Hyperparameters
|
520 |
+
#### Non-Default Hyperparameters
|
521 |
+
|
522 |
+
- `per_device_train_batch_size`: 32
|
523 |
+
- `per_device_eval_batch_size`: 32
|
524 |
+
- `learning_rate`: 2e-05
|
525 |
+
- `num_train_epochs`: 1
|
526 |
+
- `warmup_ratio`: 0.1
|
527 |
+
- `bf16`: True
|
528 |
+
- `batch_sampler`: no_duplicates
|
529 |
+
|
530 |
+
#### All Hyperparameters
|
531 |
+
<details><summary>Click to expand</summary>
|
532 |
+
|
533 |
+
- `overwrite_output_dir`: False
|
534 |
+
- `do_predict`: False
|
535 |
+
- `prediction_loss_only`: True
|
536 |
+
- `per_device_train_batch_size`: 32
|
537 |
+
- `per_device_eval_batch_size`: 32
|
538 |
+
- `per_gpu_train_batch_size`: None
|
539 |
+
- `per_gpu_eval_batch_size`: None
|
540 |
+
- `gradient_accumulation_steps`: 1
|
541 |
+
- `eval_accumulation_steps`: None
|
542 |
+
- `learning_rate`: 2e-05
|
543 |
+
- `weight_decay`: 0.0
|
544 |
+
- `adam_beta1`: 0.9
|
545 |
+
- `adam_beta2`: 0.999
|
546 |
+
- `adam_epsilon`: 1e-08
|
547 |
+
- `max_grad_norm`: 1.0
|
548 |
+
- `num_train_epochs`: 1
|
549 |
+
- `max_steps`: -1
|
550 |
+
- `lr_scheduler_type`: linear
|
551 |
+
- `lr_scheduler_kwargs`: {}
|
552 |
+
- `warmup_ratio`: 0.1
|
553 |
+
- `warmup_steps`: 0
|
554 |
+
- `log_level`: passive
|
555 |
+
- `log_level_replica`: warning
|
556 |
+
- `log_on_each_node`: True
|
557 |
+
- `logging_nan_inf_filter`: True
|
558 |
+
- `save_safetensors`: True
|
559 |
+
- `save_on_each_node`: False
|
560 |
+
- `save_only_model`: False
|
561 |
+
- `no_cuda`: False
|
562 |
+
- `use_cpu`: False
|
563 |
+
- `use_mps_device`: False
|
564 |
+
- `seed`: 42
|
565 |
+
- `data_seed`: None
|
566 |
+
- `jit_mode_eval`: False
|
567 |
+
- `use_ipex`: False
|
568 |
+
- `bf16`: True
|
569 |
+
- `fp16`: False
|
570 |
+
- `fp16_opt_level`: O1
|
571 |
+
- `half_precision_backend`: auto
|
572 |
+
- `bf16_full_eval`: False
|
573 |
+
- `fp16_full_eval`: False
|
574 |
+
- `tf32`: None
|
575 |
+
- `local_rank`: 0
|
576 |
+
- `ddp_backend`: None
|
577 |
+
- `tpu_num_cores`: None
|
578 |
+
- `tpu_metrics_debug`: False
|
579 |
+
- `debug`: []
|
580 |
+
- `dataloader_drop_last`: False
|
581 |
+
- `dataloader_num_workers`: 0
|
582 |
+
- `dataloader_prefetch_factor`: None
|
583 |
+
- `past_index`: -1
|
584 |
+
- `disable_tqdm`: False
|
585 |
+
- `remove_unused_columns`: True
|
586 |
+
- `label_names`: None
|
587 |
+
- `load_best_model_at_end`: False
|
588 |
+
- `ignore_data_skip`: False
|
589 |
+
- `fsdp`: []
|
590 |
+
- `fsdp_min_num_params`: 0
|
591 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
592 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
593 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'gradient_accumulation_kwargs': None}
|
594 |
+
- `deepspeed`: None
|
595 |
+
- `label_smoothing_factor`: 0.0
|
596 |
+
- `optim`: adamw_torch
|
597 |
+
- `optim_args`: None
|
598 |
+
- `adafactor`: False
|
599 |
+
- `group_by_length`: False
|
600 |
+
- `length_column_name`: length
|
601 |
+
- `ddp_find_unused_parameters`: None
|
602 |
+
- `ddp_bucket_cap_mb`: None
|
603 |
+
- `ddp_broadcast_buffers`: False
|
604 |
+
- `dataloader_pin_memory`: True
|
605 |
+
- `dataloader_persistent_workers`: False
|
606 |
+
- `skip_memory_metrics`: True
|
607 |
+
- `use_legacy_prediction_loop`: False
|
608 |
+
- `push_to_hub`: False
|
609 |
+
- `resume_from_checkpoint`: None
|
610 |
+
- `hub_model_id`: None
|
611 |
+
- `hub_strategy`: every_save
|
612 |
+
- `hub_private_repo`: False
|
613 |
+
- `hub_always_push`: False
|
614 |
+
- `gradient_checkpointing`: False
|
615 |
+
- `gradient_checkpointing_kwargs`: None
|
616 |
+
- `include_inputs_for_metrics`: False
|
617 |
+
- `eval_do_concat_batches`: True
|
618 |
+
- `fp16_backend`: auto
|
619 |
+
- `push_to_hub_model_id`: None
|
620 |
+
- `push_to_hub_organization`: None
|
621 |
+
- `mp_parameters`:
|
622 |
+
- `auto_find_batch_size`: False
|
623 |
+
- `full_determinism`: False
|
624 |
+
- `torchdynamo`: None
|
625 |
+
- `ray_scope`: last
|
626 |
+
- `ddp_timeout`: 1800
|
627 |
+
- `torch_compile`: False
|
628 |
+
- `torch_compile_backend`: None
|
629 |
+
- `torch_compile_mode`: None
|
630 |
+
- `dispatch_batches`: None
|
631 |
+
- `split_batches`: None
|
632 |
+
- `include_tokens_per_second`: False
|
633 |
+
- `include_num_input_tokens_seen`: False
|
634 |
+
- `neftune_noise_alpha`: None
|
635 |
+
- `optim_target_modules`: None
|
636 |
+
- `batch_sampler`: no_duplicates
|
637 |
+
- `multi_dataset_batch_sampler`: proportional
|
638 |
+
|
639 |
+
</details>
|
640 |
+
|
641 |
+
### Training Logs
|
642 |
+
<details><summary>Click to expand</summary>
|
643 |
+
|
644 |
+
| 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 |
|
645 |
+
|:------:|:-----:|:-------------:|:----------------------------:|:----------------------------:|:----------------------------:|:---------------------------:|:----------------------------:|
|
646 |
+
| 0.0057 | 100 | 19.9104 | - | - | - | - | - |
|
647 |
+
| 0.0115 | 200 | 15.4038 | - | - | - | - | - |
|
648 |
+
| 0.0172 | 300 | 12.4565 | - | - | - | - | - |
|
649 |
+
| 0.0229 | 400 | 11.8633 | - | - | - | - | - |
|
650 |
+
| 0.0287 | 500 | 11.0601 | - | - | - | - | - |
|
651 |
+
| 0.0344 | 600 | 9.7725 | - | - | - | - | - |
|
652 |
+
| 0.0402 | 700 | 8.8549 | - | - | - | - | - |
|
653 |
+
| 0.0459 | 800 | 8.0831 | - | - | - | - | - |
|
654 |
+
| 0.0516 | 900 | 7.9941 | - | - | - | - | - |
|
655 |
+
| 0.0574 | 1000 | 7.6537 | - | - | - | - | - |
|
656 |
+
| 0.0631 | 1100 | 7.9303 | - | - | - | - | - |
|
657 |
+
| 0.0688 | 1200 | 7.5246 | - | - | - | - | - |
|
658 |
+
| 0.0746 | 1300 | 7.7754 | - | - | - | - | - |
|
659 |
+
| 0.0803 | 1400 | 7.668 | - | - | - | - | - |
|
660 |
+
| 0.0860 | 1500 | 6.7171 | - | - | - | - | - |
|
661 |
+
| 0.0918 | 1600 | 6.347 | - | - | - | - | - |
|
662 |
+
| 0.0975 | 1700 | 6.0 | - | - | - | - | - |
|
663 |
+
| 0.1033 | 1800 | 6.4314 | - | - | - | - | - |
|
664 |
+
| 0.1090 | 1900 | 6.7947 | - | - | - | - | - |
|
665 |
+
| 0.1147 | 2000 | 6.9316 | - | - | - | - | - |
|
666 |
+
| 0.1205 | 2100 | 6.6304 | - | - | - | - | - |
|
667 |
+
| 0.1262 | 2200 | 6.132 | - | - | - | - | - |
|
668 |
+
| 0.1319 | 2300 | 5.8953 | - | - | - | - | - |
|
669 |
+
| 0.1377 | 2400 | 5.6954 | - | - | - | - | - |
|
670 |
+
| 0.1434 | 2500 | 5.6832 | - | - | - | - | - |
|
671 |
+
| 0.1491 | 2600 | 5.2266 | - | - | - | - | - |
|
672 |
+
| 0.1549 | 2700 | 5.0678 | - | - | - | - | - |
|
673 |
+
| 0.1606 | 2800 | 5.4733 | - | - | - | - | - |
|
674 |
+
| 0.1664 | 2900 | 6.0899 | - | - | - | - | - |
|
675 |
+
| 0.1721 | 3000 | 6.332 | - | - | - | - | - |
|
676 |
+
| 0.1778 | 3100 | 6.4937 | - | - | - | - | - |
|
677 |
+
| 0.1836 | 3200 | 6.2242 | - | - | - | - | - |
|
678 |
+
| 0.1893 | 3300 | 5.8023 | - | - | - | - | - |
|
679 |
+
| 0.1950 | 3400 | 5.0745 | - | - | - | - | - |
|
680 |
+
| 0.2008 | 3500 | 5.5806 | - | - | - | - | - |
|
681 |
+
| 0.2065 | 3600 | 5.5191 | - | - | - | - | - |
|
682 |
+
| 0.2122 | 3700 | 5.3849 | - | - | - | - | - |
|
683 |
+
| 0.2180 | 3800 | 5.4828 | - | - | - | - | - |
|
684 |
+
| 0.2237 | 3900 | 5.9982 | - | - | - | - | - |
|
685 |
+
| 0.2294 | 4000 | 5.6842 | - | - | - | - | - |
|
686 |
+
| 0.2352 | 4100 | 5.1627 | - | - | - | - | - |
|
687 |
+
| 0.2409 | 4200 | 5.154 | - | - | - | - | - |
|
688 |
+
| 0.2467 | 4300 | 5.7932 | - | - | - | - | - |
|
689 |
+
| 0.2524 | 4400 | 5.5758 | - | - | - | - | - |
|
690 |
+
| 0.2581 | 4500 | 5.5212 | - | - | - | - | - |
|
691 |
+
| 0.2639 | 4600 | 5.5692 | - | - | - | - | - |
|
692 |
+
| 0.2696 | 4700 | 5.2699 | - | - | - | - | - |
|
693 |
+
| 0.2753 | 4800 | 5.4919 | - | - | - | - | - |
|
694 |
+
| 0.2811 | 4900 | 5.0754 | - | - | - | - | - |
|
695 |
+
| 0.2868 | 5000 | 5.1514 | - | - | - | - | - |
|
696 |
+
| 0.2925 | 5100 | 5.0241 | - | - | - | - | - |
|
697 |
+
| 0.2983 | 5200 | 5.2679 | - | - | - | - | - |
|
698 |
+
| 0.3040 | 5300 | 5.3576 | - | - | - | - | - |
|
699 |
+
| 0.3098 | 5400 | 5.3454 | - | - | - | - | - |
|
700 |
+
| 0.3155 | 5500 | 5.2142 | - | - | - | - | - |
|
701 |
+
| 0.3212 | 5600 | 4.8418 | - | - | - | - | - |
|
702 |
+
| 0.3270 | 5700 | 4.9597 | - | - | - | - | - |
|
703 |
+
| 0.3327 | 5800 | 5.1989 | - | - | - | - | - |
|
704 |
+
| 0.3384 | 5900 | 5.2624 | - | - | - | - | - |
|
705 |
+
| 0.3442 | 6000 | 5.0705 | - | - | - | - | - |
|
706 |
+
| 0.3499 | 6100 | 5.232 | - | - | - | - | - |
|
707 |
+
| 0.3556 | 6200 | 5.2428 | - | - | - | - | - |
|
708 |
+
| 0.3614 | 6300 | 4.755 | - | - | - | - | - |
|
709 |
+
| 0.3671 | 6400 | 4.7266 | - | - | - | - | - |
|
710 |
+
| 0.3729 | 6500 | 4.6452 | - | - | - | - | - |
|
711 |
+
| 0.3786 | 6600 | 5.1431 | - | - | - | - | - |
|
712 |
+
| 0.3843 | 6700 | 4.5343 | - | - | - | - | - |
|
713 |
+
| 0.3901 | 6800 | 4.698 | - | - | - | - | - |
|
714 |
+
| 0.3958 | 6900 | 4.6944 | - | - | - | - | - |
|
715 |
+
| 0.4015 | 7000 | 4.6255 | - | - | - | - | - |
|
716 |
+
| 0.4073 | 7100 | 5.0211 | - | - | - | - | - |
|
717 |
+
| 0.4130 | 7200 | 4.6974 | - | - | - | - | - |
|
718 |
+
| 0.4187 | 7300 | 4.9182 | - | - | - | - | - |
|
719 |
+
| 0.4245 | 7400 | 4.652 | - | - | - | - | - |
|
720 |
+
| 0.4302 | 7500 | 5.1015 | - | - | - | - | - |
|
721 |
+
| 0.4360 | 7600 | 4.5249 | - | - | - | - | - |
|
722 |
+
| 0.4417 | 7700 | 4.455 | - | - | - | - | - |
|
723 |
+
| 0.4474 | 7800 | 4.8153 | - | - | - | - | - |
|
724 |
+
| 0.4532 | 7900 | 4.7665 | - | - | - | - | - |
|
725 |
+
| 0.4589 | 8000 | 4.3413 | - | - | - | - | - |
|
726 |
+
| 0.4646 | 8100 | 4.4697 | - | - | - | - | - |
|
727 |
+
| 0.4704 | 8200 | 4.6776 | - | - | - | - | - |
|
728 |
+
| 0.4761 | 8300 | 4.2868 | - | - | - | - | - |
|
729 |
+
| 0.4818 | 8400 | 4.7052 | - | - | - | - | - |
|
730 |
+
| 0.4876 | 8500 | 4.4721 | - | - | - | - | - |
|
731 |
+
| 0.4933 | 8600 | 4.6926 | - | - | - | - | - |
|
732 |
+
| 0.4991 | 8700 | 4.9891 | - | - | - | - | - |
|
733 |
+
| 0.5048 | 8800 | 4.4837 | - | - | - | - | - |
|
734 |
+
| 0.5105 | 8900 | 4.8127 | - | - | - | - | - |
|
735 |
+
| 0.5163 | 9000 | 4.3438 | - | - | - | - | - |
|
736 |
+
| 0.5220 | 9100 | 4.4743 | - | - | - | - | - |
|
737 |
+
| 0.5277 | 9200 | 4.6879 | - | - | - | - | - |
|
738 |
+
| 0.5335 | 9300 | 4.3593 | - | - | - | - | - |
|
739 |
+
| 0.5392 | 9400 | 4.3023 | - | - | - | - | - |
|
740 |
+
| 0.5449 | 9500 | 4.8188 | - | - | - | - | - |
|
741 |
+
| 0.5507 | 9600 | 4.6142 | - | - | - | - | - |
|
742 |
+
| 0.5564 | 9700 | 4.7679 | - | - | - | - | - |
|
743 |
+
| 0.5622 | 9800 | 4.6224 | - | - | - | - | - |
|
744 |
+
| 0.5679 | 9900 | 4.9154 | - | - | - | - | - |
|
745 |
+
| 0.5736 | 10000 | 4.7557 | - | - | - | - | - |
|
746 |
+
| 0.5794 | 10100 | 4.6395 | - | - | - | - | - |
|
747 |
+
| 0.5851 | 10200 | 4.7977 | - | - | - | - | - |
|
748 |
+
| 0.5908 | 10300 | 4.915 | - | - | - | - | - |
|
749 |
+
| 0.5966 | 10400 | 4.4854 | - | - | - | - | - |
|
750 |
+
| 0.6023 | 10500 | 4.3973 | - | - | - | - | - |
|
751 |
+
| 0.6080 | 10600 | 4.6964 | - | - | - | - | - |
|
752 |
+
| 0.6138 | 10700 | 4.8853 | - | - | - | - | - |
|
753 |
+
| 0.6195 | 10800 | 4.786 | - | - | - | - | - |
|
754 |
+
| 0.6253 | 10900 | 4.5482 | - | - | - | - | - |
|
755 |
+
| 0.6310 | 11000 | 4.4857 | - | - | - | - | - |
|
756 |
+
| 0.6367 | 11100 | 4.7415 | - | - | - | - | - |
|
757 |
+
| 0.6425 | 11200 | 4.2596 | - | - | - | - | - |
|
758 |
+
| 0.6482 | 11300 | 4.8578 | - | - | - | - | - |
|
759 |
+
| 0.6539 | 11400 | 4.5471 | - | - | - | - | - |
|
760 |
+
| 0.6597 | 11500 | 4.8337 | - | - | - | - | - |
|
761 |
+
| 0.6654 | 11600 | 4.2244 | - | - | - | - | - |
|
762 |
+
| 0.6711 | 11700 | 4.9619 | - | - | - | - | - |
|
763 |
+
| 0.6769 | 11800 | 4.9369 | - | - | - | - | - |
|
764 |
+
| 0.6826 | 11900 | 4.2697 | - | - | - | - | - |
|
765 |
+
| 0.6883 | 12000 | 4.2711 | - | - | - | - | - |
|
766 |
+
| 0.6941 | 12100 | 4.6396 | - | - | - | - | - |
|
767 |
+
| 0.6998 | 12200 | 4.5626 | - | - | - | - | - |
|
768 |
+
| 0.7056 | 12300 | 4.5767 | - | - | - | - | - |
|
769 |
+
| 0.7113 | 12400 | 4.6449 | - | - | - | - | - |
|
770 |
+
| 0.7170 | 12500 | 4.4217 | - | - | - | - | - |
|
771 |
+
| 0.7228 | 12600 | 4.0203 | - | - | - | - | - |
|
772 |
+
| 0.7285 | 12700 | 4.5381 | - | - | - | - | - |
|
773 |
+
| 0.7342 | 12800 | 4.5865 | - | - | - | - | - |
|
774 |
+
| 0.7400 | 12900 | 4.4203 | - | - | - | - | - |
|
775 |
+
| 0.7457 | 13000 | 4.3761 | - | - | - | - | - |
|
776 |
+
| 0.7514 | 13100 | 4.093 | - | - | - | - | - |
|
777 |
+
| 0.7572 | 13200 | 5.9235 | - | - | - | - | - |
|
778 |
+
| 0.7629 | 13300 | 5.4098 | - | - | - | - | - |
|
779 |
+
| 0.7687 | 13400 | 5.3079 | - | - | - | - | - |
|
780 |
+
| 0.7744 | 13500 | 5.0946 | - | - | - | - | - |
|
781 |
+
| 0.7801 | 13600 | 4.7098 | - | - | - | - | - |
|
782 |
+
| 0.7859 | 13700 | 4.9471 | - | - | - | - | - |
|
783 |
+
| 0.7916 | 13800 | 4.5742 | - | - | - | - | - |
|
784 |
+
| 0.7973 | 13900 | 4.6178 | - | - | - | - | - |
|
785 |
+
| 0.8031 | 14000 | 4.4516 | - | - | - | - | - |
|
786 |
+
| 0.8088 | 14100 | 4.429 | - | - | - | - | - |
|
787 |
+
| 0.8145 | 14200 | 4.3812 | - | - | - | - | - |
|
788 |
+
| 0.8203 | 14300 | 4.3739 | - | - | - | - | - |
|
789 |
+
| 0.8260 | 14400 | 4.3821 | - | - | - | - | - |
|
790 |
+
| 0.8318 | 14500 | 4.4396 | - | - | - | - | - |
|
791 |
+
| 0.8375 | 14600 | 4.2667 | - | - | - | - | - |
|
792 |
+
| 0.8432 | 14700 | 4.1963 | - | - | - | - | - |
|
793 |
+
| 0.8490 | 14800 | 4.1298 | - | - | - | - | - |
|
794 |
+
| 0.8547 | 14900 | 4.1843 | - | - | - | - | - |
|
795 |
+
| 0.8604 | 15000 | 4.0735 | - | - | - | - | - |
|
796 |
+
| 0.8662 | 15100 | 3.9319 | - | - | - | - | - |
|
797 |
+
| 0.8719 | 15200 | 4.1544 | - | - | - | - | - |
|
798 |
+
| 0.8776 | 15300 | 4.105 | - | - | - | - | - |
|
799 |
+
| 0.8834 | 15400 | 4.014 | - | - | - | - | - |
|
800 |
+
| 0.8891 | 15500 | 4.0345 | - | - | - | - | - |
|
801 |
+
| 0.8949 | 15600 | 3.9127 | - | - | - | - | - |
|
802 |
+
| 0.9006 | 15700 | 4.1002 | - | - | - | - | - |
|
803 |
+
| 0.9063 | 15800 | 3.8564 | - | - | - | - | - |
|
804 |
+
| 0.9121 | 15900 | 3.9297 | - | - | - | - | - |
|
805 |
+
| 0.9178 | 16000 | 3.8487 | - | - | - | - | - |
|
806 |
+
| 0.9235 | 16100 | 3.7099 | - | - | - | - | - |
|
807 |
+
| 0.9293 | 16200 | 3.8545 | - | - | - | - | - |
|
808 |
+
| 0.9350 | 16300 | 3.8122 | - | - | - | - | - |
|
809 |
+
| 0.9407 | 16400 | 3.8951 | - | - | - | - | - |
|
810 |
+
| 0.9465 | 16500 | 3.6996 | - | - | - | - | - |
|
811 |
+
| 0.9522 | 16600 | 3.9081 | - | - | - | - | - |
|
812 |
+
| 0.9580 | 16700 | 3.8603 | - | - | - | - | - |
|
813 |
+
| 0.9637 | 16800 | 3.8534 | - | - | - | - | - |
|
814 |
+
| 0.9694 | 16900 | 3.8145 | - | - | - | - | - |
|
815 |
+
| 0.9752 | 17000 | 3.9858 | - | - | - | - | - |
|
816 |
+
| 0.9809 | 17100 | 3.8224 | - | - | - | - | - |
|
817 |
+
| 0.9866 | 17200 | 3.7469 | - | - | - | - | - |
|
818 |
+
| 0.9924 | 17300 | 3.9066 | - | - | - | - | - |
|
819 |
+
| 0.9981 | 17400 | 3.6754 | - | - | - | - | - |
|
820 |
+
| 1.0 | 17433 | - | 0.6795 | 0.6817 | 0.6847 | 0.6691 | 0.6873 |
|
821 |
+
|
822 |
+
</details>
|
823 |
+
|
824 |
+
### Framework Versions
|
825 |
+
- Python: 3.11.9
|
826 |
+
- Sentence Transformers: 3.0.1
|
827 |
+
- Transformers: 4.40.1
|
828 |
+
- PyTorch: 2.3.0+cu121
|
829 |
+
- Accelerate: 0.29.3
|
830 |
+
- Datasets: 2.19.0
|
831 |
+
- Tokenizers: 0.19.1
|
832 |
+
|
833 |
+
## Citation
|
834 |
+
|
835 |
+
### BibTeX
|
836 |
+
|
837 |
+
#### Sentence Transformers
|
838 |
+
```bibtex
|
839 |
+
@inproceedings{reimers-2019-sentence-bert,
|
840 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
841 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
842 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
843 |
+
month = "11",
|
844 |
+
year = "2019",
|
845 |
+
publisher = "Association for Computational Linguistics",
|
846 |
+
url = "https://arxiv.org/abs/1908.10084",
|
847 |
+
}
|
848 |
+
```
|
849 |
+
|
850 |
+
#### MatryoshkaLoss
|
851 |
+
```bibtex
|
852 |
+
@misc{kusupati2024matryoshka,
|
853 |
+
title={Matryoshka Representation Learning},
|
854 |
+
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},
|
855 |
+
year={2024},
|
856 |
+
eprint={2205.13147},
|
857 |
+
archivePrefix={arXiv},
|
858 |
+
primaryClass={cs.LG}
|
859 |
+
}
|
860 |
+
```
|
861 |
+
|
862 |
+
#### MultipleNegativesRankingLoss
|
863 |
+
```bibtex
|
864 |
+
@misc{henderson2017efficient,
|
865 |
+
title={Efficient Natural Language Response Suggestion for Smart Reply},
|
866 |
+
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},
|
867 |
+
year={2017},
|
868 |
+
eprint={1705.00652},
|
869 |
+
archivePrefix={arXiv},
|
870 |
+
primaryClass={cs.CL}
|
871 |
+
}
|
872 |
+
```
|
873 |
+
|
874 |
+
<!--
|
875 |
+
## Glossary
|
876 |
+
|
877 |
+
*Clearly define terms in order to be accessible across audiences.*
|
878 |
+
-->
|
879 |
+
|
880 |
+
<!--
|
881 |
+
## Model Card Authors
|
882 |
+
|
883 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
884 |
+
-->
|
885 |
+
|
886 |
+
<!--
|
887 |
+
## Model Card Contact
|
888 |
+
|
889 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
890 |
+
-->
|
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:662acea46800babde5dbde49f2a65172c936e7910cfec63aa39628b70e259b56
|
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
|
|