Mollel commited on
Commit
b27f9ed
1 Parent(s): f57b909

Add new SentenceTransformer model.

Browse files
1_Pooling/config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "word_embedding_dimension": 384,
3
+ "pooling_mode_cls_token": true,
4
+ "pooling_mode_mean_tokens": false,
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,685 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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:1115700
10
+ - loss:MatryoshkaLoss
11
+ - loss:MultipleNegativesRankingLoss
12
+ base_model: BAAI/bge-small-en-v1.5
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 BAAI/bge-small-en-v1.5
60
+ results:
61
+ - task:
62
+ type: semantic-similarity
63
+ name: Semantic Similarity
64
+ dataset:
65
+ name: sts test 256
66
+ type: sts-test-256
67
+ metrics:
68
+ - type: pearson_cosine
69
+ value: 0.6831671531193453
70
+ name: Pearson Cosine
71
+ - type: spearman_cosine
72
+ value: 0.677143022633225
73
+ name: Spearman Cosine
74
+ - type: pearson_manhattan
75
+ value: 0.6891948944875336
76
+ name: Pearson Manhattan
77
+ - type: spearman_manhattan
78
+ value: 0.6892226446007472
79
+ name: Spearman Manhattan
80
+ - type: pearson_euclidean
81
+ value: 0.6916897298195501
82
+ name: Pearson Euclidean
83
+ - type: spearman_euclidean
84
+ value: 0.6916850273924392
85
+ name: Spearman Euclidean
86
+ - type: pearson_dot
87
+ value: 0.6418376172951465
88
+ name: Pearson Dot
89
+ - type: spearman_dot
90
+ value: 0.628581703082033
91
+ name: Spearman Dot
92
+ - type: pearson_max
93
+ value: 0.6916897298195501
94
+ name: Pearson Max
95
+ - type: spearman_max
96
+ value: 0.6916850273924392
97
+ name: Spearman Max
98
+ - task:
99
+ type: semantic-similarity
100
+ name: Semantic Similarity
101
+ dataset:
102
+ name: sts test 128
103
+ type: sts-test-128
104
+ metrics:
105
+ - type: pearson_cosine
106
+ value: 0.6753009254241098
107
+ name: Pearson Cosine
108
+ - type: spearman_cosine
109
+ value: 0.6731049071307844
110
+ name: Spearman Cosine
111
+ - type: pearson_manhattan
112
+ value: 0.6906782473185179
113
+ name: Pearson Manhattan
114
+ - type: spearman_manhattan
115
+ value: 0.6927883369656496
116
+ name: Spearman Manhattan
117
+ - type: pearson_euclidean
118
+ value: 0.6933649652149252
119
+ name: Pearson Euclidean
120
+ - type: spearman_euclidean
121
+ value: 0.694111832507592
122
+ name: Spearman Euclidean
123
+ - type: pearson_dot
124
+ value: 0.600449101550258
125
+ name: Pearson Dot
126
+ - type: spearman_dot
127
+ value: 0.5857671058687308
128
+ name: Spearman Dot
129
+ - type: pearson_max
130
+ value: 0.6933649652149252
131
+ name: Pearson Max
132
+ - type: spearman_max
133
+ value: 0.694111832507592
134
+ name: Spearman Max
135
+ - task:
136
+ type: semantic-similarity
137
+ name: Semantic Similarity
138
+ dataset:
139
+ name: sts test 64
140
+ type: sts-test-64
141
+ metrics:
142
+ - type: pearson_cosine
143
+ value: 0.6546200020168988
144
+ name: Pearson Cosine
145
+ - type: spearman_cosine
146
+ value: 0.6523958945855459
147
+ name: Spearman Cosine
148
+ - type: pearson_manhattan
149
+ value: 0.6837289470688535
150
+ name: Pearson Manhattan
151
+ - type: spearman_manhattan
152
+ value: 0.6796775815725002
153
+ name: Spearman Manhattan
154
+ - type: pearson_euclidean
155
+ value: 0.6861328219241016
156
+ name: Pearson Euclidean
157
+ - type: spearman_euclidean
158
+ value: 0.6815842202083926
159
+ name: Spearman Euclidean
160
+ - type: pearson_dot
161
+ value: 0.5120576666695955
162
+ name: Pearson Dot
163
+ - type: spearman_dot
164
+ value: 0.49141347385563683
165
+ name: Spearman Dot
166
+ - type: pearson_max
167
+ value: 0.6861328219241016
168
+ name: Pearson Max
169
+ - type: spearman_max
170
+ value: 0.6815842202083926
171
+ name: Spearman Max
172
+ ---
173
+
174
+ # SentenceTransformer based on BAAI/bge-small-en-v1.5
175
+
176
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [BAAI/bge-small-en-v1.5](https://huggingface.co/BAAI/bge-small-en-v1.5) on the Mollel/swahili-n_li-triplet-swh-eng dataset. It maps sentences & paragraphs to a 384-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
177
+
178
+ ## Model Details
179
+
180
+ ### Model Description
181
+ - **Model Type:** Sentence Transformer
182
+ - **Base model:** [BAAI/bge-small-en-v1.5](https://huggingface.co/BAAI/bge-small-en-v1.5) <!-- at revision 5c38ec7c405ec4b44b94cc5a9bb96e735b38267a -->
183
+ - **Maximum Sequence Length:** 512 tokens
184
+ - **Output Dimensionality:** 384 tokens
185
+ - **Similarity Function:** Cosine Similarity
186
+ - **Training Dataset:**
187
+ - Mollel/swahili-n_li-triplet-swh-eng
188
+ <!-- - **Language:** Unknown -->
189
+ <!-- - **License:** Unknown -->
190
+
191
+ ### Model Sources
192
+
193
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
194
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
195
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
196
+
197
+ ### Full Model Architecture
198
+
199
+ ```
200
+ SentenceTransformer(
201
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': True}) with Transformer model: BertModel
202
+ (1): Pooling({'word_embedding_dimension': 384, 'pooling_mode_cls_token': True, 'pooling_mode_mean_tokens': False, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
203
+ (2): Normalize()
204
+ )
205
+ ```
206
+
207
+ ## Usage
208
+
209
+ ### Direct Usage (Sentence Transformers)
210
+
211
+ First install the Sentence Transformers library:
212
+
213
+ ```bash
214
+ pip install -U sentence-transformers
215
+ ```
216
+
217
+ Then you can load this model and run inference.
218
+ ```python
219
+ from sentence_transformers import SentenceTransformer
220
+
221
+ # Download from the 🤗 Hub
222
+ model = SentenceTransformer("sartifyllc/MultiLinguSwahili-bge-small-en-v1.5-nli-matryoshka")
223
+ # Run inference
224
+ sentences = [
225
+ 'Mwanamume na mwanamke wachanga waliovaa mikoba wanaweka au kuondoa kitu kutoka kwenye mti mweupe wa zamani, huku watu wengine wamesimama au wameketi nyuma.',
226
+ 'mwanamume na mwanamke wenye mikoba',
227
+ 'tai huruka',
228
+ ]
229
+ embeddings = model.encode(sentences)
230
+ print(embeddings.shape)
231
+ # [3, 384]
232
+
233
+ # Get the similarity scores for the embeddings
234
+ similarities = model.similarity(embeddings, embeddings)
235
+ print(similarities.shape)
236
+ # [3, 3]
237
+ ```
238
+
239
+ <!--
240
+ ### Direct Usage (Transformers)
241
+
242
+ <details><summary>Click to see the direct usage in Transformers</summary>
243
+
244
+ </details>
245
+ -->
246
+
247
+ <!--
248
+ ### Downstream Usage (Sentence Transformers)
249
+
250
+ You can finetune this model on your own dataset.
251
+
252
+ <details><summary>Click to expand</summary>
253
+
254
+ </details>
255
+ -->
256
+
257
+ <!--
258
+ ### Out-of-Scope Use
259
+
260
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
261
+ -->
262
+
263
+ ## Evaluation
264
+
265
+ ### Metrics
266
+
267
+ #### Semantic Similarity
268
+ * Dataset: `sts-test-256`
269
+ * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
270
+
271
+ | Metric | Value |
272
+ |:--------------------|:-----------|
273
+ | pearson_cosine | 0.6832 |
274
+ | **spearman_cosine** | **0.6771** |
275
+ | pearson_manhattan | 0.6892 |
276
+ | spearman_manhattan | 0.6892 |
277
+ | pearson_euclidean | 0.6917 |
278
+ | spearman_euclidean | 0.6917 |
279
+ | pearson_dot | 0.6418 |
280
+ | spearman_dot | 0.6286 |
281
+ | pearson_max | 0.6917 |
282
+ | spearman_max | 0.6917 |
283
+
284
+ #### Semantic Similarity
285
+ * Dataset: `sts-test-128`
286
+ * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
287
+
288
+ | Metric | Value |
289
+ |:--------------------|:-----------|
290
+ | pearson_cosine | 0.6753 |
291
+ | **spearman_cosine** | **0.6731** |
292
+ | pearson_manhattan | 0.6907 |
293
+ | spearman_manhattan | 0.6928 |
294
+ | pearson_euclidean | 0.6934 |
295
+ | spearman_euclidean | 0.6941 |
296
+ | pearson_dot | 0.6004 |
297
+ | spearman_dot | 0.5858 |
298
+ | pearson_max | 0.6934 |
299
+ | spearman_max | 0.6941 |
300
+
301
+ #### Semantic Similarity
302
+ * Dataset: `sts-test-64`
303
+ * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
304
+
305
+ | Metric | Value |
306
+ |:--------------------|:-----------|
307
+ | pearson_cosine | 0.6546 |
308
+ | **spearman_cosine** | **0.6524** |
309
+ | pearson_manhattan | 0.6837 |
310
+ | spearman_manhattan | 0.6797 |
311
+ | pearson_euclidean | 0.6861 |
312
+ | spearman_euclidean | 0.6816 |
313
+ | pearson_dot | 0.5121 |
314
+ | spearman_dot | 0.4914 |
315
+ | pearson_max | 0.6861 |
316
+ | spearman_max | 0.6816 |
317
+
318
+ <!--
319
+ ## Bias, Risks and Limitations
320
+
321
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
322
+ -->
323
+
324
+ <!--
325
+ ### Recommendations
326
+
327
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
328
+ -->
329
+
330
+ ## Training Details
331
+
332
+ ### Training Dataset
333
+
334
+ #### Mollel/swahili-n_li-triplet-swh-eng
335
+
336
+ * Dataset: Mollel/swahili-n_li-triplet-swh-eng
337
+ * Size: 1,115,700 training samples
338
+ * Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
339
+ * Approximate statistics based on the first 1000 samples:
340
+ | | anchor | positive | negative |
341
+ |:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|
342
+ | type | string | string | string |
343
+ | details | <ul><li>min: 7 tokens</li><li>mean: 15.18 tokens</li><li>max: 80 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 18.53 tokens</li><li>max: 52 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 17.8 tokens</li><li>max: 53 tokens</li></ul> |
344
+ * Samples:
345
+ | anchor | positive | negative |
346
+ |:----------------------------------------------------------------------|:-----------------------------------------------|:-----------------------------------------------------------|
347
+ | <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> |
348
+ | <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> |
349
+ | <code>Children smiling and waving at camera</code> | <code>There are children present</code> | <code>The kids are frowning</code> |
350
+ * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
351
+ ```json
352
+ {
353
+ "loss": "MultipleNegativesRankingLoss",
354
+ "matryoshka_dims": [
355
+ 256,
356
+ 128,
357
+ 64
358
+ ],
359
+ "matryoshka_weights": [
360
+ 1,
361
+ 1,
362
+ 1
363
+ ],
364
+ "n_dims_per_step": -1
365
+ }
366
+ ```
367
+
368
+ ### Evaluation Dataset
369
+
370
+ #### Mollel/swahili-n_li-triplet-swh-eng
371
+
372
+ * Dataset: Mollel/swahili-n_li-triplet-swh-eng
373
+ * Size: 13,168 evaluation samples
374
+ * Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
375
+ * Approximate statistics based on the first 1000 samples:
376
+ | | anchor | positive | negative |
377
+ |:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|
378
+ | type | string | string | string |
379
+ | details | <ul><li>min: 6 tokens</li><li>mean: 26.43 tokens</li><li>max: 94 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 13.37 tokens</li><li>max: 65 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 14.7 tokens</li><li>max: 54 tokens</li></ul> |
380
+ * Samples:
381
+ | anchor | positive | negative |
382
+ |:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------|:-------------------------------------------------------------------|
383
+ | <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> |
384
+ | <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> |
385
+ | <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> |
386
+ * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
387
+ ```json
388
+ {
389
+ "loss": "MultipleNegativesRankingLoss",
390
+ "matryoshka_dims": [
391
+ 256,
392
+ 128,
393
+ 64
394
+ ],
395
+ "matryoshka_weights": [
396
+ 1,
397
+ 1,
398
+ 1
399
+ ],
400
+ "n_dims_per_step": -1
401
+ }
402
+ ```
403
+
404
+ ### Training Hyperparameters
405
+ #### Non-Default Hyperparameters
406
+
407
+ - `per_device_train_batch_size`: 64
408
+ - `per_device_eval_batch_size`: 64
409
+ - `learning_rate`: 2e-05
410
+ - `num_train_epochs`: 1
411
+ - `warmup_ratio`: 0.1
412
+ - `bf16`: True
413
+ - `batch_sampler`: no_duplicates
414
+
415
+ #### All Hyperparameters
416
+ <details><summary>Click to expand</summary>
417
+
418
+ - `overwrite_output_dir`: False
419
+ - `do_predict`: False
420
+ - `prediction_loss_only`: True
421
+ - `per_device_train_batch_size`: 64
422
+ - `per_device_eval_batch_size`: 64
423
+ - `per_gpu_train_batch_size`: None
424
+ - `per_gpu_eval_batch_size`: None
425
+ - `gradient_accumulation_steps`: 1
426
+ - `eval_accumulation_steps`: None
427
+ - `learning_rate`: 2e-05
428
+ - `weight_decay`: 0.0
429
+ - `adam_beta1`: 0.9
430
+ - `adam_beta2`: 0.999
431
+ - `adam_epsilon`: 1e-08
432
+ - `max_grad_norm`: 1.0
433
+ - `num_train_epochs`: 1
434
+ - `max_steps`: -1
435
+ - `lr_scheduler_type`: linear
436
+ - `lr_scheduler_kwargs`: {}
437
+ - `warmup_ratio`: 0.1
438
+ - `warmup_steps`: 0
439
+ - `log_level`: passive
440
+ - `log_level_replica`: warning
441
+ - `log_on_each_node`: True
442
+ - `logging_nan_inf_filter`: True
443
+ - `save_safetensors`: True
444
+ - `save_on_each_node`: False
445
+ - `save_only_model`: False
446
+ - `no_cuda`: False
447
+ - `use_cpu`: False
448
+ - `use_mps_device`: False
449
+ - `seed`: 42
450
+ - `data_seed`: None
451
+ - `jit_mode_eval`: False
452
+ - `use_ipex`: False
453
+ - `bf16`: True
454
+ - `fp16`: False
455
+ - `fp16_opt_level`: O1
456
+ - `half_precision_backend`: auto
457
+ - `bf16_full_eval`: False
458
+ - `fp16_full_eval`: False
459
+ - `tf32`: None
460
+ - `local_rank`: 0
461
+ - `ddp_backend`: None
462
+ - `tpu_num_cores`: None
463
+ - `tpu_metrics_debug`: False
464
+ - `debug`: []
465
+ - `dataloader_drop_last`: False
466
+ - `dataloader_num_workers`: 0
467
+ - `dataloader_prefetch_factor`: None
468
+ - `past_index`: -1
469
+ - `disable_tqdm`: False
470
+ - `remove_unused_columns`: True
471
+ - `label_names`: None
472
+ - `load_best_model_at_end`: False
473
+ - `ignore_data_skip`: False
474
+ - `fsdp`: []
475
+ - `fsdp_min_num_params`: 0
476
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
477
+ - `fsdp_transformer_layer_cls_to_wrap`: None
478
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'gradient_accumulation_kwargs': None}
479
+ - `deepspeed`: None
480
+ - `label_smoothing_factor`: 0.0
481
+ - `optim`: adamw_torch
482
+ - `optim_args`: None
483
+ - `adafactor`: False
484
+ - `group_by_length`: False
485
+ - `length_column_name`: length
486
+ - `ddp_find_unused_parameters`: None
487
+ - `ddp_bucket_cap_mb`: None
488
+ - `ddp_broadcast_buffers`: False
489
+ - `dataloader_pin_memory`: True
490
+ - `dataloader_persistent_workers`: False
491
+ - `skip_memory_metrics`: True
492
+ - `use_legacy_prediction_loop`: False
493
+ - `push_to_hub`: False
494
+ - `resume_from_checkpoint`: None
495
+ - `hub_model_id`: None
496
+ - `hub_strategy`: every_save
497
+ - `hub_private_repo`: False
498
+ - `hub_always_push`: False
499
+ - `gradient_checkpointing`: False
500
+ - `gradient_checkpointing_kwargs`: None
501
+ - `include_inputs_for_metrics`: False
502
+ - `eval_do_concat_batches`: True
503
+ - `fp16_backend`: auto
504
+ - `push_to_hub_model_id`: None
505
+ - `push_to_hub_organization`: None
506
+ - `mp_parameters`:
507
+ - `auto_find_batch_size`: False
508
+ - `full_determinism`: False
509
+ - `torchdynamo`: None
510
+ - `ray_scope`: last
511
+ - `ddp_timeout`: 1800
512
+ - `torch_compile`: False
513
+ - `torch_compile_backend`: None
514
+ - `torch_compile_mode`: None
515
+ - `dispatch_batches`: None
516
+ - `split_batches`: None
517
+ - `include_tokens_per_second`: False
518
+ - `include_num_input_tokens_seen`: False
519
+ - `neftune_noise_alpha`: None
520
+ - `optim_target_modules`: None
521
+ - `batch_sampler`: no_duplicates
522
+ - `multi_dataset_batch_sampler`: proportional
523
+
524
+ </details>
525
+
526
+ ### Training Logs
527
+ | Epoch | Step | Training Loss | sts-test-128_spearman_cosine | sts-test-256_spearman_cosine | sts-test-64_spearman_cosine |
528
+ |:------:|:----:|:-------------:|:----------------------------:|:----------------------------:|:---------------------------:|
529
+ | 0.0115 | 100 | 9.6847 | - | - | - |
530
+ | 0.0229 | 200 | 8.5336 | - | - | - |
531
+ | 0.0344 | 300 | 7.768 | - | - | - |
532
+ | 0.0459 | 400 | 7.2049 | - | - | - |
533
+ | 0.0574 | 500 | 6.9425 | - | - | - |
534
+ | 0.0688 | 600 | 7.029 | - | - | - |
535
+ | 0.0803 | 700 | 6.259 | - | - | - |
536
+ | 0.0918 | 800 | 6.0939 | - | - | - |
537
+ | 0.1032 | 900 | 5.991 | - | - | - |
538
+ | 0.1147 | 1000 | 5.39 | - | - | - |
539
+ | 0.1262 | 1100 | 5.3214 | - | - | - |
540
+ | 0.1377 | 1200 | 5.1469 | - | - | - |
541
+ | 0.1491 | 1300 | 4.901 | - | - | - |
542
+ | 0.1606 | 1400 | 5.2725 | - | - | - |
543
+ | 0.1721 | 1500 | 5.077 | - | - | - |
544
+ | 0.1835 | 1600 | 4.8006 | - | - | - |
545
+ | 0.1950 | 1700 | 4.5318 | - | - | - |
546
+ | 0.2065 | 1800 | 4.48 | - | - | - |
547
+ | 0.2180 | 1900 | 4.5752 | - | - | - |
548
+ | 0.2294 | 2000 | 4.427 | - | - | - |
549
+ | 0.2409 | 2100 | 4.4021 | - | - | - |
550
+ | 0.2524 | 2200 | 4.5903 | - | - | - |
551
+ | 0.2639 | 2300 | 4.4561 | - | - | - |
552
+ | 0.2753 | 2400 | 4.372 | - | - | - |
553
+ | 0.2868 | 2500 | 4.2698 | - | - | - |
554
+ | 0.2983 | 2600 | 4.3954 | - | - | - |
555
+ | 0.3097 | 2700 | 4.2697 | - | - | - |
556
+ | 0.3212 | 2800 | 4.125 | - | - | - |
557
+ | 0.3327 | 2900 | 4.3611 | - | - | - |
558
+ | 0.3442 | 3000 | 4.2527 | - | - | - |
559
+ | 0.3556 | 3100 | 4.1892 | - | - | - |
560
+ | 0.3671 | 3200 | 4.0417 | - | - | - |
561
+ | 0.3786 | 3300 | 3.9434 | - | - | - |
562
+ | 0.3900 | 3400 | 3.9797 | - | - | - |
563
+ | 0.4015 | 3500 | 3.9611 | - | - | - |
564
+ | 0.4130 | 3600 | 4.04 | - | - | - |
565
+ | 0.4245 | 3700 | 3.965 | - | - | - |
566
+ | 0.4359 | 3800 | 3.778 | - | - | - |
567
+ | 0.4474 | 3900 | 4.0624 | - | - | - |
568
+ | 0.4589 | 4000 | 3.8972 | - | - | - |
569
+ | 0.4703 | 4100 | 3.7882 | - | - | - |
570
+ | 0.4818 | 4200 | 3.8048 | - | - | - |
571
+ | 0.4933 | 4300 | 3.9253 | - | - | - |
572
+ | 0.5048 | 4400 | 3.9832 | - | - | - |
573
+ | 0.5162 | 4500 | 3.6644 | - | - | - |
574
+ | 0.5277 | 4600 | 3.7353 | - | - | - |
575
+ | 0.5392 | 4700 | 3.7768 | - | - | - |
576
+ | 0.5506 | 4800 | 3.796 | - | - | - |
577
+ | 0.5621 | 4900 | 3.875 | - | - | - |
578
+ | 0.5736 | 5000 | 3.7856 | - | - | - |
579
+ | 0.5851 | 5100 | 3.8898 | - | - | - |
580
+ | 0.5965 | 5200 | 3.6327 | - | - | - |
581
+ | 0.6080 | 5300 | 3.7727 | - | - | - |
582
+ | 0.6195 | 5400 | 3.8582 | - | - | - |
583
+ | 0.6310 | 5500 | 3.729 | - | - | - |
584
+ | 0.6424 | 5600 | 3.7088 | - | - | - |
585
+ | 0.6539 | 5700 | 3.8414 | - | - | - |
586
+ | 0.6654 | 5800 | 3.7624 | - | - | - |
587
+ | 0.6768 | 5900 | 3.8816 | - | - | - |
588
+ | 0.6883 | 6000 | 3.7483 | - | - | - |
589
+ | 0.6998 | 6100 | 3.7759 | - | - | - |
590
+ | 0.7113 | 6200 | 3.6674 | - | - | - |
591
+ | 0.7227 | 6300 | 3.6441 | - | - | - |
592
+ | 0.7342 | 6400 | 3.7779 | - | - | - |
593
+ | 0.7457 | 6500 | 3.6691 | - | - | - |
594
+ | 0.7571 | 6600 | 3.7636 | - | - | - |
595
+ | 0.7686 | 6700 | 3.7424 | - | - | - |
596
+ | 0.7801 | 6800 | 3.4943 | - | - | - |
597
+ | 0.7916 | 6900 | 3.5399 | - | - | - |
598
+ | 0.8030 | 7000 | 3.3658 | - | - | - |
599
+ | 0.8145 | 7100 | 3.2856 | - | - | - |
600
+ | 0.8260 | 7200 | 3.3702 | - | - | - |
601
+ | 0.8374 | 7300 | 3.3121 | - | - | - |
602
+ | 0.8489 | 7400 | 3.2322 | - | - | - |
603
+ | 0.8604 | 7500 | 3.1577 | - | - | - |
604
+ | 0.8719 | 7600 | 3.1873 | - | - | - |
605
+ | 0.8833 | 7700 | 3.1492 | - | - | - |
606
+ | 0.8948 | 7800 | 3.2035 | - | - | - |
607
+ | 0.9063 | 7900 | 3.1607 | - | - | - |
608
+ | 0.9177 | 8000 | 3.1557 | - | - | - |
609
+ | 0.9292 | 8100 | 3.0915 | - | - | - |
610
+ | 0.9407 | 8200 | 3.1335 | - | - | - |
611
+ | 0.9522 | 8300 | 3.14 | - | - | - |
612
+ | 0.9636 | 8400 | 3.1422 | - | - | - |
613
+ | 0.9751 | 8500 | 3.1923 | - | - | - |
614
+ | 0.9866 | 8600 | 3.1085 | - | - | - |
615
+ | 0.9980 | 8700 | 3.089 | - | - | - |
616
+ | 1.0 | 8717 | - | 0.6731 | 0.6771 | 0.6524 |
617
+
618
+
619
+ ### Framework Versions
620
+ - Python: 3.11.9
621
+ - Sentence Transformers: 3.0.1
622
+ - Transformers: 4.40.1
623
+ - PyTorch: 2.3.0+cu121
624
+ - Accelerate: 0.29.3
625
+ - Datasets: 2.19.0
626
+ - Tokenizers: 0.19.1
627
+
628
+ ## Citation
629
+
630
+ ### BibTeX
631
+
632
+ #### Sentence Transformers
633
+ ```bibtex
634
+ @inproceedings{reimers-2019-sentence-bert,
635
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
636
+ author = "Reimers, Nils and Gurevych, Iryna",
637
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
638
+ month = "11",
639
+ year = "2019",
640
+ publisher = "Association for Computational Linguistics",
641
+ url = "https://arxiv.org/abs/1908.10084",
642
+ }
643
+ ```
644
+
645
+ #### MatryoshkaLoss
646
+ ```bibtex
647
+ @misc{kusupati2024matryoshka,
648
+ title={Matryoshka Representation Learning},
649
+ 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},
650
+ year={2024},
651
+ eprint={2205.13147},
652
+ archivePrefix={arXiv},
653
+ primaryClass={cs.LG}
654
+ }
655
+ ```
656
+
657
+ #### MultipleNegativesRankingLoss
658
+ ```bibtex
659
+ @misc{henderson2017efficient,
660
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
661
+ 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},
662
+ year={2017},
663
+ eprint={1705.00652},
664
+ archivePrefix={arXiv},
665
+ primaryClass={cs.CL}
666
+ }
667
+ ```
668
+
669
+ <!--
670
+ ## Glossary
671
+
672
+ *Clearly define terms in order to be accessible across audiences.*
673
+ -->
674
+
675
+ <!--
676
+ ## Model Card Authors
677
+
678
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
679
+ -->
680
+
681
+ <!--
682
+ ## Model Card Contact
683
+
684
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
685
+ -->
config.json ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "BAAI/bge-small-en-v1.5",
3
+ "architectures": [
4
+ "BertModel"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "classifier_dropout": null,
8
+ "hidden_act": "gelu",
9
+ "hidden_dropout_prob": 0.1,
10
+ "hidden_size": 384,
11
+ "id2label": {
12
+ "0": "LABEL_0"
13
+ },
14
+ "initializer_range": 0.02,
15
+ "intermediate_size": 1536,
16
+ "label2id": {
17
+ "LABEL_0": 0
18
+ },
19
+ "layer_norm_eps": 1e-12,
20
+ "max_position_embeddings": 512,
21
+ "model_type": "bert",
22
+ "num_attention_heads": 12,
23
+ "num_hidden_layers": 12,
24
+ "pad_token_id": 0,
25
+ "position_embedding_type": "absolute",
26
+ "torch_dtype": "float32",
27
+ "transformers_version": "4.40.1",
28
+ "type_vocab_size": 2,
29
+ "use_cache": true,
30
+ "vocab_size": 30522
31
+ }
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:441f88cb9681ef618d77170e1e56b32a4ba852e80a7fd23ee39c78a257629c60
3
+ size 133462128
modules.json ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ {
15
+ "idx": 2,
16
+ "name": "2",
17
+ "path": "2_Normalize",
18
+ "type": "sentence_transformers.models.Normalize"
19
+ }
20
+ ]
sentence_bert_config.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "max_seq_length": 512,
3
+ "do_lower_case": true
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,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
+ "100": {
12
+ "content": "[UNK]",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "101": {
20
+ "content": "[CLS]",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "102": {
28
+ "content": "[SEP]",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "103": {
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": true,
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