MugheesAwan11 commited on
Commit
052477d
1 Parent(s): fbc0ad7

Add new SentenceTransformer model.

Browse files
1_Pooling/config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "word_embedding_dimension": 768,
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,851 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ license: apache-2.0
5
+ library_name: sentence-transformers
6
+ tags:
7
+ - sentence-transformers
8
+ - sentence-similarity
9
+ - feature-extraction
10
+ - generated_from_trainer
11
+ - dataset_size:161
12
+ - loss:MatryoshkaLoss
13
+ - loss:MultipleNegativesRankingLoss
14
+ base_model: BAAI/bge-base-en-v1.5
15
+ datasets: []
16
+ metrics:
17
+ - cosine_accuracy@1
18
+ - cosine_accuracy@3
19
+ - cosine_accuracy@5
20
+ - cosine_accuracy@10
21
+ - cosine_precision@1
22
+ - cosine_precision@3
23
+ - cosine_precision@5
24
+ - cosine_precision@10
25
+ - cosine_recall@1
26
+ - cosine_recall@3
27
+ - cosine_recall@5
28
+ - cosine_recall@10
29
+ - cosine_ndcg@10
30
+ - cosine_mrr@10
31
+ - cosine_map@100
32
+ widget:
33
+ - source_sentence: 'As per Part II of the PDPA, Personal Data Protection Commission
34
+ (PDPC) is the
35
+
36
+ regulatory body to enforce the provisions of PDPA. The PDPC is empowered with
37
+
38
+ broad discretion to issue remedial directions, initiate investigation
39
+
40
+ inquiries, and impose fines and penalties on the organisations in case of any
41
+
42
+ non-compliance of PDPA.
43
+
44
+
45
+ 1
46
+
47
+
48
+ If organisations misuse the personal data or hide information concerning its
49
+
50
+ collection, use, or disclosure, PDPA states penalties not exceeding **S$50,000
51
+
52
+ (approx. $36,000)**.
53
+
54
+
55
+ 2
56
+
57
+
58
+ Penalty for hindering a PDPC investigation can lead to a fine of not more than
59
+
60
+ **S$100,000 (approx. $72,000)**. The PDPA states that companies are also
61
+
62
+ liable for their employees’ actions, whether they are aware of them or not.
63
+
64
+
65
+ 3
66
+
67
+
68
+ New amendments to PDPA have enforced increased financial penalties for
69
+
70
+ breaches of the PDPA up to **10%** of annual gross turnover in Singapore, or
71
+
72
+ **S$ 1 million** , whichever is higher.
73
+
74
+
75
+ 4
76
+
77
+
78
+ Non-compliance with specific provisions under the PDPA may also constitute an
79
+
80
+ offense, for which a fine or a term of **imprisonment** may be imposed.
81
+
82
+
83
+ 5
84
+
85
+
86
+ An individual can bring a private civil action against an organisation for
87
+
88
+ having suffered **loss or damage** directly due to a contravention of the
89
+
90
+ provisions of the PDPA.'
91
+ sentences:
92
+ - What is the right to notice under the CCPA?
93
+ - What are the risks of non-compliance with the PDPA?
94
+ - What is the definition of personal data under the PDP Law?
95
+ - source_sentence: The DPA requires all data controllers to take appropriate technical
96
+ and organisational measures that are necessary to protect data from unauthorised
97
+ destruction, negligent loss, unauthorised alteration or access and any other unauthorised
98
+ processing of the data.
99
+ sentences:
100
+ - Which regulatory authority enforces GDPR in France?
101
+ - What are the security requirements under the DPA?
102
+ - How do PIPEDA and GDPR differ?
103
+ - source_sentence: if the data controller or the data processor holds a valid registration
104
+ certificate authorizing him or her to store personal data outside Rwanda
105
+ sentences:
106
+ - What is the difference between GDPR and a Data Protection Act?
107
+ - What is the voluntary certification by the CPPA?
108
+ - Where is personal data storage outside of Rwanda permitted?
109
+ - source_sentence: The PDP law will regulate sensitive personal data as well as other
110
+ personal data that may endanger or harm the privacy of the data subject.
111
+ sentences:
112
+ - What is the material scope of the PDP Law?
113
+ - What is the definition of personal information under the DPA in the Philippines?
114
+ - What does Securiti offer to help with data privacy compliance?
115
+ - source_sentence: Thailand's PDPA applies to any legal entity collecting, using,
116
+ or disclosing a natural (and alive) person's personal data.
117
+ sentences:
118
+ - Who does the Thailand's PDPA apply to?
119
+ - What penalties could an organization face for infringing Kenya's Data Protection
120
+ Act?
121
+ - What is the CPRA?
122
+ pipeline_tag: sentence-similarity
123
+ model-index:
124
+ - name: SentenceTransformer based on BAAI/bge-base-en-v1.5
125
+ results:
126
+ - task:
127
+ type: information-retrieval
128
+ name: Information Retrieval
129
+ dataset:
130
+ name: dim 768
131
+ type: dim_768
132
+ metrics:
133
+ - type: cosine_accuracy@1
134
+ value: 0.5555555555555556
135
+ name: Cosine Accuracy@1
136
+ - type: cosine_accuracy@3
137
+ value: 0.8333333333333334
138
+ name: Cosine Accuracy@3
139
+ - type: cosine_accuracy@5
140
+ value: 0.8888888888888888
141
+ name: Cosine Accuracy@5
142
+ - type: cosine_accuracy@10
143
+ value: 1.0
144
+ name: Cosine Accuracy@10
145
+ - type: cosine_precision@1
146
+ value: 0.5555555555555556
147
+ name: Cosine Precision@1
148
+ - type: cosine_precision@3
149
+ value: 0.27777777777777773
150
+ name: Cosine Precision@3
151
+ - type: cosine_precision@5
152
+ value: 0.17777777777777778
153
+ name: Cosine Precision@5
154
+ - type: cosine_precision@10
155
+ value: 0.10000000000000002
156
+ name: Cosine Precision@10
157
+ - type: cosine_recall@1
158
+ value: 0.5555555555555556
159
+ name: Cosine Recall@1
160
+ - type: cosine_recall@3
161
+ value: 0.8333333333333334
162
+ name: Cosine Recall@3
163
+ - type: cosine_recall@5
164
+ value: 0.8888888888888888
165
+ name: Cosine Recall@5
166
+ - type: cosine_recall@10
167
+ value: 1.0
168
+ name: Cosine Recall@10
169
+ - type: cosine_ndcg@10
170
+ value: 0.7730002998303461
171
+ name: Cosine Ndcg@10
172
+ - type: cosine_mrr@10
173
+ value: 0.7011463844797178
174
+ name: Cosine Mrr@10
175
+ - type: cosine_map@100
176
+ value: 0.7011463844797178
177
+ name: Cosine Map@100
178
+ - task:
179
+ type: information-retrieval
180
+ name: Information Retrieval
181
+ dataset:
182
+ name: dim 512
183
+ type: dim_512
184
+ metrics:
185
+ - type: cosine_accuracy@1
186
+ value: 0.5555555555555556
187
+ name: Cosine Accuracy@1
188
+ - type: cosine_accuracy@3
189
+ value: 0.8333333333333334
190
+ name: Cosine Accuracy@3
191
+ - type: cosine_accuracy@5
192
+ value: 0.8888888888888888
193
+ name: Cosine Accuracy@5
194
+ - type: cosine_accuracy@10
195
+ value: 1.0
196
+ name: Cosine Accuracy@10
197
+ - type: cosine_precision@1
198
+ value: 0.5555555555555556
199
+ name: Cosine Precision@1
200
+ - type: cosine_precision@3
201
+ value: 0.27777777777777773
202
+ name: Cosine Precision@3
203
+ - type: cosine_precision@5
204
+ value: 0.17777777777777778
205
+ name: Cosine Precision@5
206
+ - type: cosine_precision@10
207
+ value: 0.10000000000000002
208
+ name: Cosine Precision@10
209
+ - type: cosine_recall@1
210
+ value: 0.5555555555555556
211
+ name: Cosine Recall@1
212
+ - type: cosine_recall@3
213
+ value: 0.8333333333333334
214
+ name: Cosine Recall@3
215
+ - type: cosine_recall@5
216
+ value: 0.8888888888888888
217
+ name: Cosine Recall@5
218
+ - type: cosine_recall@10
219
+ value: 1.0
220
+ name: Cosine Recall@10
221
+ - type: cosine_ndcg@10
222
+ value: 0.7730002998303461
223
+ name: Cosine Ndcg@10
224
+ - type: cosine_mrr@10
225
+ value: 0.7011463844797178
226
+ name: Cosine Mrr@10
227
+ - type: cosine_map@100
228
+ value: 0.7011463844797178
229
+ name: Cosine Map@100
230
+ - task:
231
+ type: information-retrieval
232
+ name: Information Retrieval
233
+ dataset:
234
+ name: dim 256
235
+ type: dim_256
236
+ metrics:
237
+ - type: cosine_accuracy@1
238
+ value: 0.5555555555555556
239
+ name: Cosine Accuracy@1
240
+ - type: cosine_accuracy@3
241
+ value: 0.8888888888888888
242
+ name: Cosine Accuracy@3
243
+ - type: cosine_accuracy@5
244
+ value: 0.9444444444444444
245
+ name: Cosine Accuracy@5
246
+ - type: cosine_accuracy@10
247
+ value: 1.0
248
+ name: Cosine Accuracy@10
249
+ - type: cosine_precision@1
250
+ value: 0.5555555555555556
251
+ name: Cosine Precision@1
252
+ - type: cosine_precision@3
253
+ value: 0.2962962962962962
254
+ name: Cosine Precision@3
255
+ - type: cosine_precision@5
256
+ value: 0.1888888888888889
257
+ name: Cosine Precision@5
258
+ - type: cosine_precision@10
259
+ value: 0.10000000000000002
260
+ name: Cosine Precision@10
261
+ - type: cosine_recall@1
262
+ value: 0.5555555555555556
263
+ name: Cosine Recall@1
264
+ - type: cosine_recall@3
265
+ value: 0.8888888888888888
266
+ name: Cosine Recall@3
267
+ - type: cosine_recall@5
268
+ value: 0.9444444444444444
269
+ name: Cosine Recall@5
270
+ - type: cosine_recall@10
271
+ value: 1.0
272
+ name: Cosine Recall@10
273
+ - type: cosine_ndcg@10
274
+ value: 0.7903353721281168
275
+ name: Cosine Ndcg@10
276
+ - type: cosine_mrr@10
277
+ value: 0.7217592592592593
278
+ name: Cosine Mrr@10
279
+ - type: cosine_map@100
280
+ value: 0.7217592592592593
281
+ name: Cosine Map@100
282
+ - task:
283
+ type: information-retrieval
284
+ name: Information Retrieval
285
+ dataset:
286
+ name: dim 128
287
+ type: dim_128
288
+ metrics:
289
+ - type: cosine_accuracy@1
290
+ value: 0.5555555555555556
291
+ name: Cosine Accuracy@1
292
+ - type: cosine_accuracy@3
293
+ value: 0.8333333333333334
294
+ name: Cosine Accuracy@3
295
+ - type: cosine_accuracy@5
296
+ value: 0.8888888888888888
297
+ name: Cosine Accuracy@5
298
+ - type: cosine_accuracy@10
299
+ value: 0.9444444444444444
300
+ name: Cosine Accuracy@10
301
+ - type: cosine_precision@1
302
+ value: 0.5555555555555556
303
+ name: Cosine Precision@1
304
+ - type: cosine_precision@3
305
+ value: 0.27777777777777773
306
+ name: Cosine Precision@3
307
+ - type: cosine_precision@5
308
+ value: 0.1777777777777778
309
+ name: Cosine Precision@5
310
+ - type: cosine_precision@10
311
+ value: 0.09444444444444446
312
+ name: Cosine Precision@10
313
+ - type: cosine_recall@1
314
+ value: 0.5555555555555556
315
+ name: Cosine Recall@1
316
+ - type: cosine_recall@3
317
+ value: 0.8333333333333334
318
+ name: Cosine Recall@3
319
+ - type: cosine_recall@5
320
+ value: 0.8888888888888888
321
+ name: Cosine Recall@5
322
+ - type: cosine_recall@10
323
+ value: 0.9444444444444444
324
+ name: Cosine Recall@10
325
+ - type: cosine_ndcg@10
326
+ value: 0.7641903093346225
327
+ name: Cosine Ndcg@10
328
+ - type: cosine_mrr@10
329
+ value: 0.7052469135802469
330
+ name: Cosine Mrr@10
331
+ - type: cosine_map@100
332
+ value: 0.7080246913580247
333
+ name: Cosine Map@100
334
+ - task:
335
+ type: information-retrieval
336
+ name: Information Retrieval
337
+ dataset:
338
+ name: dim 64
339
+ type: dim_64
340
+ metrics:
341
+ - type: cosine_accuracy@1
342
+ value: 0.4444444444444444
343
+ name: Cosine Accuracy@1
344
+ - type: cosine_accuracy@3
345
+ value: 0.6666666666666666
346
+ name: Cosine Accuracy@3
347
+ - type: cosine_accuracy@5
348
+ value: 0.8333333333333334
349
+ name: Cosine Accuracy@5
350
+ - type: cosine_accuracy@10
351
+ value: 1.0
352
+ name: Cosine Accuracy@10
353
+ - type: cosine_precision@1
354
+ value: 0.4444444444444444
355
+ name: Cosine Precision@1
356
+ - type: cosine_precision@3
357
+ value: 0.2222222222222222
358
+ name: Cosine Precision@3
359
+ - type: cosine_precision@5
360
+ value: 0.16666666666666669
361
+ name: Cosine Precision@5
362
+ - type: cosine_precision@10
363
+ value: 0.10000000000000002
364
+ name: Cosine Precision@10
365
+ - type: cosine_recall@1
366
+ value: 0.4444444444444444
367
+ name: Cosine Recall@1
368
+ - type: cosine_recall@3
369
+ value: 0.6666666666666666
370
+ name: Cosine Recall@3
371
+ - type: cosine_recall@5
372
+ value: 0.8333333333333334
373
+ name: Cosine Recall@5
374
+ - type: cosine_recall@10
375
+ value: 1.0
376
+ name: Cosine Recall@10
377
+ - type: cosine_ndcg@10
378
+ value: 0.6976955584560773
379
+ name: Cosine Ndcg@10
380
+ - type: cosine_mrr@10
381
+ value: 0.6044753086419753
382
+ name: Cosine Mrr@10
383
+ - type: cosine_map@100
384
+ value: 0.6044753086419754
385
+ name: Cosine Map@100
386
+ ---
387
+
388
+ # SentenceTransformer based on BAAI/bge-base-en-v1.5
389
+
390
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [BAAI/bge-base-en-v1.5](https://huggingface.co/BAAI/bge-base-en-v1.5). 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.
391
+
392
+ ## Model Details
393
+
394
+ ### Model Description
395
+ - **Model Type:** Sentence Transformer
396
+ - **Base model:** [BAAI/bge-base-en-v1.5](https://huggingface.co/BAAI/bge-base-en-v1.5) <!-- at revision a5beb1e3e68b9ab74eb54cfd186867f64f240e1a -->
397
+ - **Maximum Sequence Length:** 512 tokens
398
+ - **Output Dimensionality:** 768 tokens
399
+ - **Similarity Function:** Cosine Similarity
400
+ <!-- - **Training Dataset:** Unknown -->
401
+ - **Language:** en
402
+ - **License:** apache-2.0
403
+
404
+ ### Model Sources
405
+
406
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
407
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
408
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
409
+
410
+ ### Full Model Architecture
411
+
412
+ ```
413
+ SentenceTransformer(
414
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': True}) with Transformer model: BertModel
415
+ (1): Pooling({'word_embedding_dimension': 768, '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})
416
+ (2): Normalize()
417
+ )
418
+ ```
419
+
420
+ ## Usage
421
+
422
+ ### Direct Usage (Sentence Transformers)
423
+
424
+ First install the Sentence Transformers library:
425
+
426
+ ```bash
427
+ pip install -U sentence-transformers
428
+ ```
429
+
430
+ Then you can load this model and run inference.
431
+ ```python
432
+ from sentence_transformers import SentenceTransformer
433
+
434
+ # Download from the 🤗 Hub
435
+ model = SentenceTransformer("MugheesAwan11/bge-base-securiti-dataset-1-v3")
436
+ # Run inference
437
+ sentences = [
438
+ "Thailand's PDPA applies to any legal entity collecting, using, or disclosing a natural (and alive) person's personal data.",
439
+ "Who does the Thailand's PDPA apply to?",
440
+ "What penalties could an organization face for infringing Kenya's Data Protection Act?",
441
+ ]
442
+ embeddings = model.encode(sentences)
443
+ print(embeddings.shape)
444
+ # [3, 768]
445
+
446
+ # Get the similarity scores for the embeddings
447
+ similarities = model.similarity(embeddings, embeddings)
448
+ print(similarities.shape)
449
+ # [3, 3]
450
+ ```
451
+
452
+ <!--
453
+ ### Direct Usage (Transformers)
454
+
455
+ <details><summary>Click to see the direct usage in Transformers</summary>
456
+
457
+ </details>
458
+ -->
459
+
460
+ <!--
461
+ ### Downstream Usage (Sentence Transformers)
462
+
463
+ You can finetune this model on your own dataset.
464
+
465
+ <details><summary>Click to expand</summary>
466
+
467
+ </details>
468
+ -->
469
+
470
+ <!--
471
+ ### Out-of-Scope Use
472
+
473
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
474
+ -->
475
+
476
+ ## Evaluation
477
+
478
+ ### Metrics
479
+
480
+ #### Information Retrieval
481
+ * Dataset: `dim_768`
482
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
483
+
484
+ | Metric | Value |
485
+ |:--------------------|:-----------|
486
+ | cosine_accuracy@1 | 0.5556 |
487
+ | cosine_accuracy@3 | 0.8333 |
488
+ | cosine_accuracy@5 | 0.8889 |
489
+ | cosine_accuracy@10 | 1.0 |
490
+ | cosine_precision@1 | 0.5556 |
491
+ | cosine_precision@3 | 0.2778 |
492
+ | cosine_precision@5 | 0.1778 |
493
+ | cosine_precision@10 | 0.1 |
494
+ | cosine_recall@1 | 0.5556 |
495
+ | cosine_recall@3 | 0.8333 |
496
+ | cosine_recall@5 | 0.8889 |
497
+ | cosine_recall@10 | 1.0 |
498
+ | cosine_ndcg@10 | 0.773 |
499
+ | cosine_mrr@10 | 0.7011 |
500
+ | **cosine_map@100** | **0.7011** |
501
+
502
+ #### Information Retrieval
503
+ * Dataset: `dim_512`
504
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
505
+
506
+ | Metric | Value |
507
+ |:--------------------|:-----------|
508
+ | cosine_accuracy@1 | 0.5556 |
509
+ | cosine_accuracy@3 | 0.8333 |
510
+ | cosine_accuracy@5 | 0.8889 |
511
+ | cosine_accuracy@10 | 1.0 |
512
+ | cosine_precision@1 | 0.5556 |
513
+ | cosine_precision@3 | 0.2778 |
514
+ | cosine_precision@5 | 0.1778 |
515
+ | cosine_precision@10 | 0.1 |
516
+ | cosine_recall@1 | 0.5556 |
517
+ | cosine_recall@3 | 0.8333 |
518
+ | cosine_recall@5 | 0.8889 |
519
+ | cosine_recall@10 | 1.0 |
520
+ | cosine_ndcg@10 | 0.773 |
521
+ | cosine_mrr@10 | 0.7011 |
522
+ | **cosine_map@100** | **0.7011** |
523
+
524
+ #### Information Retrieval
525
+ * Dataset: `dim_256`
526
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
527
+
528
+ | Metric | Value |
529
+ |:--------------------|:-----------|
530
+ | cosine_accuracy@1 | 0.5556 |
531
+ | cosine_accuracy@3 | 0.8889 |
532
+ | cosine_accuracy@5 | 0.9444 |
533
+ | cosine_accuracy@10 | 1.0 |
534
+ | cosine_precision@1 | 0.5556 |
535
+ | cosine_precision@3 | 0.2963 |
536
+ | cosine_precision@5 | 0.1889 |
537
+ | cosine_precision@10 | 0.1 |
538
+ | cosine_recall@1 | 0.5556 |
539
+ | cosine_recall@3 | 0.8889 |
540
+ | cosine_recall@5 | 0.9444 |
541
+ | cosine_recall@10 | 1.0 |
542
+ | cosine_ndcg@10 | 0.7903 |
543
+ | cosine_mrr@10 | 0.7218 |
544
+ | **cosine_map@100** | **0.7218** |
545
+
546
+ #### Information Retrieval
547
+ * Dataset: `dim_128`
548
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
549
+
550
+ | Metric | Value |
551
+ |:--------------------|:----------|
552
+ | cosine_accuracy@1 | 0.5556 |
553
+ | cosine_accuracy@3 | 0.8333 |
554
+ | cosine_accuracy@5 | 0.8889 |
555
+ | cosine_accuracy@10 | 0.9444 |
556
+ | cosine_precision@1 | 0.5556 |
557
+ | cosine_precision@3 | 0.2778 |
558
+ | cosine_precision@5 | 0.1778 |
559
+ | cosine_precision@10 | 0.0944 |
560
+ | cosine_recall@1 | 0.5556 |
561
+ | cosine_recall@3 | 0.8333 |
562
+ | cosine_recall@5 | 0.8889 |
563
+ | cosine_recall@10 | 0.9444 |
564
+ | cosine_ndcg@10 | 0.7642 |
565
+ | cosine_mrr@10 | 0.7052 |
566
+ | **cosine_map@100** | **0.708** |
567
+
568
+ #### Information Retrieval
569
+ * Dataset: `dim_64`
570
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
571
+
572
+ | Metric | Value |
573
+ |:--------------------|:-----------|
574
+ | cosine_accuracy@1 | 0.4444 |
575
+ | cosine_accuracy@3 | 0.6667 |
576
+ | cosine_accuracy@5 | 0.8333 |
577
+ | cosine_accuracy@10 | 1.0 |
578
+ | cosine_precision@1 | 0.4444 |
579
+ | cosine_precision@3 | 0.2222 |
580
+ | cosine_precision@5 | 0.1667 |
581
+ | cosine_precision@10 | 0.1 |
582
+ | cosine_recall@1 | 0.4444 |
583
+ | cosine_recall@3 | 0.6667 |
584
+ | cosine_recall@5 | 0.8333 |
585
+ | cosine_recall@10 | 1.0 |
586
+ | cosine_ndcg@10 | 0.6977 |
587
+ | cosine_mrr@10 | 0.6045 |
588
+ | **cosine_map@100** | **0.6045** |
589
+
590
+ <!--
591
+ ## Bias, Risks and Limitations
592
+
593
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
594
+ -->
595
+
596
+ <!--
597
+ ### Recommendations
598
+
599
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
600
+ -->
601
+
602
+ ## Training Details
603
+
604
+ ### Training Dataset
605
+
606
+ #### Unnamed Dataset
607
+
608
+
609
+ * Size: 161 training samples
610
+ * Columns: <code>positive</code> and <code>anchor</code>
611
+ * Approximate statistics based on the first 1000 samples:
612
+ | | positive | anchor |
613
+ |:--------|:-----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
614
+ | type | string | string |
615
+ | details | <ul><li>min: 5 tokens</li><li>mean: 40.09 tokens</li><li>max: 481 tokens</li></ul> | <ul><li>min: 7 tokens</li><li>mean: 13.01 tokens</li><li>max: 24 tokens</li></ul> |
616
+ * Samples:
617
+ | positive | anchor |
618
+ |:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------|
619
+ | <code>The DPA may impose administrative fines of up to €10 million, or up to 2%<br>of<br>worldwide turnover. The DPA may also impose heavier fines up to €20 million,<br>or up to 4% of worldwide turnover.</code> | <code>What is the penalty for non-compliance with the GDPR in Italy?</code> |
620
+ | <code>As per the DPA, the data handler must seek consent in writing from the data subject to collect any sensitive personal data.</code> | <code>What are the consent requirements under the DPA?</code> |
621
+ | <code>China's cybersecurity laws include the Cybersecurity Law, which governs<br>various aspects of cybersecurity, data protection, and the obligations of<br>organizations to ensure the security of networks and data within China's<br>territory.</code> | <code>What are the cybersecurity laws in China?</code> |
622
+ * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
623
+ ```json
624
+ {
625
+ "loss": "MultipleNegativesRankingLoss",
626
+ "matryoshka_dims": [
627
+ 768,
628
+ 512,
629
+ 256,
630
+ 128,
631
+ 64
632
+ ],
633
+ "matryoshka_weights": [
634
+ 1,
635
+ 1,
636
+ 1,
637
+ 1,
638
+ 1
639
+ ],
640
+ "n_dims_per_step": -1
641
+ }
642
+ ```
643
+
644
+ ### Training Hyperparameters
645
+ #### Non-Default Hyperparameters
646
+
647
+ - `eval_strategy`: epoch
648
+ - `per_device_train_batch_size`: 32
649
+ - `per_device_eval_batch_size`: 16
650
+ - `gradient_accumulation_steps`: 2
651
+ - `learning_rate`: 2e-05
652
+ - `lr_scheduler_type`: cosine
653
+ - `warmup_ratio`: 0.1
654
+ - `bf16`: True
655
+ - `tf32`: True
656
+ - `load_best_model_at_end`: True
657
+ - `optim`: adamw_torch_fused
658
+ - `batch_sampler`: no_duplicates
659
+
660
+ #### All Hyperparameters
661
+ <details><summary>Click to expand</summary>
662
+
663
+ - `overwrite_output_dir`: False
664
+ - `do_predict`: False
665
+ - `eval_strategy`: epoch
666
+ - `prediction_loss_only`: True
667
+ - `per_device_train_batch_size`: 32
668
+ - `per_device_eval_batch_size`: 16
669
+ - `per_gpu_train_batch_size`: None
670
+ - `per_gpu_eval_batch_size`: None
671
+ - `gradient_accumulation_steps`: 2
672
+ - `eval_accumulation_steps`: None
673
+ - `learning_rate`: 2e-05
674
+ - `weight_decay`: 0.0
675
+ - `adam_beta1`: 0.9
676
+ - `adam_beta2`: 0.999
677
+ - `adam_epsilon`: 1e-08
678
+ - `max_grad_norm`: 1.0
679
+ - `num_train_epochs`: 3
680
+ - `max_steps`: -1
681
+ - `lr_scheduler_type`: cosine
682
+ - `lr_scheduler_kwargs`: {}
683
+ - `warmup_ratio`: 0.1
684
+ - `warmup_steps`: 0
685
+ - `log_level`: passive
686
+ - `log_level_replica`: warning
687
+ - `log_on_each_node`: True
688
+ - `logging_nan_inf_filter`: True
689
+ - `save_safetensors`: True
690
+ - `save_on_each_node`: False
691
+ - `save_only_model`: False
692
+ - `restore_callback_states_from_checkpoint`: False
693
+ - `no_cuda`: False
694
+ - `use_cpu`: False
695
+ - `use_mps_device`: False
696
+ - `seed`: 42
697
+ - `data_seed`: None
698
+ - `jit_mode_eval`: False
699
+ - `use_ipex`: False
700
+ - `bf16`: True
701
+ - `fp16`: False
702
+ - `fp16_opt_level`: O1
703
+ - `half_precision_backend`: auto
704
+ - `bf16_full_eval`: False
705
+ - `fp16_full_eval`: False
706
+ - `tf32`: True
707
+ - `local_rank`: 0
708
+ - `ddp_backend`: None
709
+ - `tpu_num_cores`: None
710
+ - `tpu_metrics_debug`: False
711
+ - `debug`: []
712
+ - `dataloader_drop_last`: False
713
+ - `dataloader_num_workers`: 0
714
+ - `dataloader_prefetch_factor`: None
715
+ - `past_index`: -1
716
+ - `disable_tqdm`: False
717
+ - `remove_unused_columns`: True
718
+ - `label_names`: None
719
+ - `load_best_model_at_end`: True
720
+ - `ignore_data_skip`: False
721
+ - `fsdp`: []
722
+ - `fsdp_min_num_params`: 0
723
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
724
+ - `fsdp_transformer_layer_cls_to_wrap`: None
725
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
726
+ - `deepspeed`: None
727
+ - `label_smoothing_factor`: 0.0
728
+ - `optim`: adamw_torch_fused
729
+ - `optim_args`: None
730
+ - `adafactor`: False
731
+ - `group_by_length`: False
732
+ - `length_column_name`: length
733
+ - `ddp_find_unused_parameters`: None
734
+ - `ddp_bucket_cap_mb`: None
735
+ - `ddp_broadcast_buffers`: False
736
+ - `dataloader_pin_memory`: True
737
+ - `dataloader_persistent_workers`: False
738
+ - `skip_memory_metrics`: True
739
+ - `use_legacy_prediction_loop`: False
740
+ - `push_to_hub`: False
741
+ - `resume_from_checkpoint`: None
742
+ - `hub_model_id`: None
743
+ - `hub_strategy`: every_save
744
+ - `hub_private_repo`: False
745
+ - `hub_always_push`: False
746
+ - `gradient_checkpointing`: False
747
+ - `gradient_checkpointing_kwargs`: None
748
+ - `include_inputs_for_metrics`: False
749
+ - `eval_do_concat_batches`: True
750
+ - `fp16_backend`: auto
751
+ - `push_to_hub_model_id`: None
752
+ - `push_to_hub_organization`: None
753
+ - `mp_parameters`:
754
+ - `auto_find_batch_size`: False
755
+ - `full_determinism`: False
756
+ - `torchdynamo`: None
757
+ - `ray_scope`: last
758
+ - `ddp_timeout`: 1800
759
+ - `torch_compile`: False
760
+ - `torch_compile_backend`: None
761
+ - `torch_compile_mode`: None
762
+ - `dispatch_batches`: None
763
+ - `split_batches`: None
764
+ - `include_tokens_per_second`: False
765
+ - `include_num_input_tokens_seen`: False
766
+ - `neftune_noise_alpha`: None
767
+ - `optim_target_modules`: None
768
+ - `batch_eval_metrics`: False
769
+ - `batch_sampler`: no_duplicates
770
+ - `multi_dataset_batch_sampler`: proportional
771
+
772
+ </details>
773
+
774
+ ### Training Logs
775
+ | Epoch | Step | dim_128_cosine_map@100 | dim_256_cosine_map@100 | dim_512_cosine_map@100 | dim_64_cosine_map@100 | dim_768_cosine_map@100 |
776
+ |:-------:|:-----:|:----------------------:|:----------------------:|:----------------------:|:---------------------:|:----------------------:|
777
+ | 1.0 | 3 | 0.6510 | 0.6691 | 0.6534 | 0.5641 | 0.6515 |
778
+ | **2.0** | **6** | **0.6605** | **0.679** | **0.6627** | **0.5768** | **0.6515** |
779
+ | 1.0 | 3 | 0.6702 | 0.6914 | 0.6747 | 0.6014 | 0.7043 |
780
+ | **2.0** | **6** | **0.7078** | **0.694** | **0.7011** | **0.6052** | **0.7025** |
781
+ | 3.0 | 9 | 0.7080 | 0.7218 | 0.7011 | 0.6045 | 0.7011 |
782
+
783
+ * The bold row denotes the saved checkpoint.
784
+
785
+ ### Framework Versions
786
+ - Python: 3.10.14
787
+ - Sentence Transformers: 3.0.1
788
+ - Transformers: 4.41.2
789
+ - PyTorch: 2.1.2+cu121
790
+ - Accelerate: 0.31.0
791
+ - Datasets: 2.19.1
792
+ - Tokenizers: 0.19.1
793
+
794
+ ## Citation
795
+
796
+ ### BibTeX
797
+
798
+ #### Sentence Transformers
799
+ ```bibtex
800
+ @inproceedings{reimers-2019-sentence-bert,
801
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
802
+ author = "Reimers, Nils and Gurevych, Iryna",
803
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
804
+ month = "11",
805
+ year = "2019",
806
+ publisher = "Association for Computational Linguistics",
807
+ url = "https://arxiv.org/abs/1908.10084",
808
+ }
809
+ ```
810
+
811
+ #### MatryoshkaLoss
812
+ ```bibtex
813
+ @misc{kusupati2024matryoshka,
814
+ title={Matryoshka Representation Learning},
815
+ 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},
816
+ year={2024},
817
+ eprint={2205.13147},
818
+ archivePrefix={arXiv},
819
+ primaryClass={cs.LG}
820
+ }
821
+ ```
822
+
823
+ #### MultipleNegativesRankingLoss
824
+ ```bibtex
825
+ @misc{henderson2017efficient,
826
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
827
+ 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},
828
+ year={2017},
829
+ eprint={1705.00652},
830
+ archivePrefix={arXiv},
831
+ primaryClass={cs.CL}
832
+ }
833
+ ```
834
+
835
+ <!--
836
+ ## Glossary
837
+
838
+ *Clearly define terms in order to be accessible across audiences.*
839
+ -->
840
+
841
+ <!--
842
+ ## Model Card Authors
843
+
844
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
845
+ -->
846
+
847
+ <!--
848
+ ## Model Card Contact
849
+
850
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
851
+ -->
config.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "BAAI/bge-base-en-v1.5",
3
+ "architectures": [
4
+ "BertModel"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "classifier_dropout": null,
8
+ "gradient_checkpointing": false,
9
+ "hidden_act": "gelu",
10
+ "hidden_dropout_prob": 0.1,
11
+ "hidden_size": 768,
12
+ "id2label": {
13
+ "0": "LABEL_0"
14
+ },
15
+ "initializer_range": 0.02,
16
+ "intermediate_size": 3072,
17
+ "label2id": {
18
+ "LABEL_0": 0
19
+ },
20
+ "layer_norm_eps": 1e-12,
21
+ "max_position_embeddings": 512,
22
+ "model_type": "bert",
23
+ "num_attention_heads": 12,
24
+ "num_hidden_layers": 12,
25
+ "pad_token_id": 0,
26
+ "position_embedding_type": "absolute",
27
+ "torch_dtype": "float32",
28
+ "transformers_version": "4.41.2",
29
+ "type_vocab_size": 2,
30
+ "use_cache": true,
31
+ "vocab_size": 30522
32
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "3.0.1",
4
+ "transformers": "4.41.2",
5
+ "pytorch": "2.1.2+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:54511783eef21e30a9a31c2c49b002cafbafb4cacc9c07bd2eaca4444e2c8ee7
3
+ size 437951328
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