MugheesAwan11 commited on
Commit
b6b47ba
1 Parent(s): 5dc1969

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,849 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.5
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.9444444444444444
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.5
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.1888888888888889
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.5
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.9444444444444444
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.736082728585743
171
+ name: Cosine Ndcg@10
172
+ - type: cosine_mrr@10
173
+ value: 0.6515432098765431
174
+ name: Cosine Mrr@10
175
+ - type: cosine_map@100
176
+ value: 0.6515432098765432
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.5
187
+ name: Cosine Accuracy@1
188
+ - type: cosine_accuracy@3
189
+ value: 0.7777777777777778
190
+ name: Cosine Accuracy@3
191
+ - type: cosine_accuracy@5
192
+ value: 0.9444444444444444
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.5
199
+ name: Cosine Precision@1
200
+ - type: cosine_precision@3
201
+ value: 0.25925925925925924
202
+ name: Cosine Precision@3
203
+ - type: cosine_precision@5
204
+ value: 0.1888888888888889
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.5
211
+ name: Cosine Recall@1
212
+ - type: cosine_recall@3
213
+ value: 0.7777777777777778
214
+ name: Cosine Recall@3
215
+ - type: cosine_recall@5
216
+ value: 0.9444444444444444
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.744344523828935
223
+ name: Cosine Ndcg@10
224
+ - type: cosine_mrr@10
225
+ value: 0.6626543209876543
226
+ name: Cosine Mrr@10
227
+ - type: cosine_map@100
228
+ value: 0.6626543209876543
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.5
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.8888888888888888
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.5
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.1777777777777778
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.5
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.8888888888888888
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.7569877225340996
275
+ name: Cosine Ndcg@10
276
+ - type: cosine_mrr@10
277
+ value: 0.6790123456790123
278
+ name: Cosine Mrr@10
279
+ - type: cosine_map@100
280
+ value: 0.6790123456790124
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.5
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.5
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.5
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.7291386563584304
327
+ name: Cosine Ndcg@10
328
+ - type: cosine_mrr@10
329
+ value: 0.6589506172839507
330
+ name: Cosine Mrr@10
331
+ - type: cosine_map@100
332
+ value: 0.6604938271604938
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.6111111111111112
346
+ name: Cosine Accuracy@3
347
+ - type: cosine_accuracy@5
348
+ value: 0.6666666666666666
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.2037037037037037
358
+ name: Cosine Precision@3
359
+ - type: cosine_precision@5
360
+ value: 0.13333333333333336
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.6111111111111112
370
+ name: Cosine Recall@3
371
+ - type: cosine_recall@5
372
+ value: 0.6666666666666666
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.6740519326169271
379
+ name: Cosine Ndcg@10
380
+ - type: cosine_mrr@10
381
+ value: 0.5768298059964727
382
+ name: Cosine Mrr@10
383
+ - type: cosine_map@100
384
+ value: 0.5768298059964727
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-v5")
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.5 |
487
+ | cosine_accuracy@3 | 0.8333 |
488
+ | cosine_accuracy@5 | 0.9444 |
489
+ | cosine_accuracy@10 | 1.0 |
490
+ | cosine_precision@1 | 0.5 |
491
+ | cosine_precision@3 | 0.2778 |
492
+ | cosine_precision@5 | 0.1889 |
493
+ | cosine_precision@10 | 0.1 |
494
+ | cosine_recall@1 | 0.5 |
495
+ | cosine_recall@3 | 0.8333 |
496
+ | cosine_recall@5 | 0.9444 |
497
+ | cosine_recall@10 | 1.0 |
498
+ | cosine_ndcg@10 | 0.7361 |
499
+ | cosine_mrr@10 | 0.6515 |
500
+ | **cosine_map@100** | **0.6515** |
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.5 |
509
+ | cosine_accuracy@3 | 0.7778 |
510
+ | cosine_accuracy@5 | 0.9444 |
511
+ | cosine_accuracy@10 | 1.0 |
512
+ | cosine_precision@1 | 0.5 |
513
+ | cosine_precision@3 | 0.2593 |
514
+ | cosine_precision@5 | 0.1889 |
515
+ | cosine_precision@10 | 0.1 |
516
+ | cosine_recall@1 | 0.5 |
517
+ | cosine_recall@3 | 0.7778 |
518
+ | cosine_recall@5 | 0.9444 |
519
+ | cosine_recall@10 | 1.0 |
520
+ | cosine_ndcg@10 | 0.7443 |
521
+ | cosine_mrr@10 | 0.6627 |
522
+ | **cosine_map@100** | **0.6627** |
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.5 |
531
+ | cosine_accuracy@3 | 0.8889 |
532
+ | cosine_accuracy@5 | 0.8889 |
533
+ | cosine_accuracy@10 | 1.0 |
534
+ | cosine_precision@1 | 0.5 |
535
+ | cosine_precision@3 | 0.2963 |
536
+ | cosine_precision@5 | 0.1778 |
537
+ | cosine_precision@10 | 0.1 |
538
+ | cosine_recall@1 | 0.5 |
539
+ | cosine_recall@3 | 0.8889 |
540
+ | cosine_recall@5 | 0.8889 |
541
+ | cosine_recall@10 | 1.0 |
542
+ | cosine_ndcg@10 | 0.757 |
543
+ | cosine_mrr@10 | 0.679 |
544
+ | **cosine_map@100** | **0.679** |
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.5 |
553
+ | cosine_accuracy@3 | 0.8333 |
554
+ | cosine_accuracy@5 | 0.8889 |
555
+ | cosine_accuracy@10 | 0.9444 |
556
+ | cosine_precision@1 | 0.5 |
557
+ | cosine_precision@3 | 0.2778 |
558
+ | cosine_precision@5 | 0.1778 |
559
+ | cosine_precision@10 | 0.0944 |
560
+ | cosine_recall@1 | 0.5 |
561
+ | cosine_recall@3 | 0.8333 |
562
+ | cosine_recall@5 | 0.8889 |
563
+ | cosine_recall@10 | 0.9444 |
564
+ | cosine_ndcg@10 | 0.7291 |
565
+ | cosine_mrr@10 | 0.659 |
566
+ | **cosine_map@100** | **0.6605** |
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.6111 |
576
+ | cosine_accuracy@5 | 0.6667 |
577
+ | cosine_accuracy@10 | 1.0 |
578
+ | cosine_precision@1 | 0.4444 |
579
+ | cosine_precision@3 | 0.2037 |
580
+ | cosine_precision@5 | 0.1333 |
581
+ | cosine_precision@10 | 0.1 |
582
+ | cosine_recall@1 | 0.4444 |
583
+ | cosine_recall@3 | 0.6111 |
584
+ | cosine_recall@5 | 0.6667 |
585
+ | cosine_recall@10 | 1.0 |
586
+ | cosine_ndcg@10 | 0.6741 |
587
+ | cosine_mrr@10 | 0.5768 |
588
+ | **cosine_map@100** | **0.5768** |
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
+ - `num_train_epochs`: 2
653
+ - `lr_scheduler_type`: cosine
654
+ - `warmup_ratio`: 0.1
655
+ - `bf16`: True
656
+ - `tf32`: True
657
+ - `load_best_model_at_end`: True
658
+ - `optim`: adamw_torch_fused
659
+ - `batch_sampler`: no_duplicates
660
+
661
+ #### All Hyperparameters
662
+ <details><summary>Click to expand</summary>
663
+
664
+ - `overwrite_output_dir`: False
665
+ - `do_predict`: False
666
+ - `eval_strategy`: epoch
667
+ - `prediction_loss_only`: True
668
+ - `per_device_train_batch_size`: 32
669
+ - `per_device_eval_batch_size`: 16
670
+ - `per_gpu_train_batch_size`: None
671
+ - `per_gpu_eval_batch_size`: None
672
+ - `gradient_accumulation_steps`: 2
673
+ - `eval_accumulation_steps`: None
674
+ - `learning_rate`: 2e-05
675
+ - `weight_decay`: 0.0
676
+ - `adam_beta1`: 0.9
677
+ - `adam_beta2`: 0.999
678
+ - `adam_epsilon`: 1e-08
679
+ - `max_grad_norm`: 1.0
680
+ - `num_train_epochs`: 2
681
+ - `max_steps`: -1
682
+ - `lr_scheduler_type`: cosine
683
+ - `lr_scheduler_kwargs`: {}
684
+ - `warmup_ratio`: 0.1
685
+ - `warmup_steps`: 0
686
+ - `log_level`: passive
687
+ - `log_level_replica`: warning
688
+ - `log_on_each_node`: True
689
+ - `logging_nan_inf_filter`: True
690
+ - `save_safetensors`: True
691
+ - `save_on_each_node`: False
692
+ - `save_only_model`: False
693
+ - `restore_callback_states_from_checkpoint`: False
694
+ - `no_cuda`: False
695
+ - `use_cpu`: False
696
+ - `use_mps_device`: False
697
+ - `seed`: 42
698
+ - `data_seed`: None
699
+ - `jit_mode_eval`: False
700
+ - `use_ipex`: False
701
+ - `bf16`: True
702
+ - `fp16`: False
703
+ - `fp16_opt_level`: O1
704
+ - `half_precision_backend`: auto
705
+ - `bf16_full_eval`: False
706
+ - `fp16_full_eval`: False
707
+ - `tf32`: True
708
+ - `local_rank`: 0
709
+ - `ddp_backend`: None
710
+ - `tpu_num_cores`: None
711
+ - `tpu_metrics_debug`: False
712
+ - `debug`: []
713
+ - `dataloader_drop_last`: False
714
+ - `dataloader_num_workers`: 0
715
+ - `dataloader_prefetch_factor`: None
716
+ - `past_index`: -1
717
+ - `disable_tqdm`: False
718
+ - `remove_unused_columns`: True
719
+ - `label_names`: None
720
+ - `load_best_model_at_end`: True
721
+ - `ignore_data_skip`: False
722
+ - `fsdp`: []
723
+ - `fsdp_min_num_params`: 0
724
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
725
+ - `fsdp_transformer_layer_cls_to_wrap`: None
726
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
727
+ - `deepspeed`: None
728
+ - `label_smoothing_factor`: 0.0
729
+ - `optim`: adamw_torch_fused
730
+ - `optim_args`: None
731
+ - `adafactor`: False
732
+ - `group_by_length`: False
733
+ - `length_column_name`: length
734
+ - `ddp_find_unused_parameters`: None
735
+ - `ddp_bucket_cap_mb`: None
736
+ - `ddp_broadcast_buffers`: False
737
+ - `dataloader_pin_memory`: True
738
+ - `dataloader_persistent_workers`: False
739
+ - `skip_memory_metrics`: True
740
+ - `use_legacy_prediction_loop`: False
741
+ - `push_to_hub`: False
742
+ - `resume_from_checkpoint`: None
743
+ - `hub_model_id`: None
744
+ - `hub_strategy`: every_save
745
+ - `hub_private_repo`: False
746
+ - `hub_always_push`: False
747
+ - `gradient_checkpointing`: False
748
+ - `gradient_checkpointing_kwargs`: None
749
+ - `include_inputs_for_metrics`: False
750
+ - `eval_do_concat_batches`: True
751
+ - `fp16_backend`: auto
752
+ - `push_to_hub_model_id`: None
753
+ - `push_to_hub_organization`: None
754
+ - `mp_parameters`:
755
+ - `auto_find_batch_size`: False
756
+ - `full_determinism`: False
757
+ - `torchdynamo`: None
758
+ - `ray_scope`: last
759
+ - `ddp_timeout`: 1800
760
+ - `torch_compile`: False
761
+ - `torch_compile_backend`: None
762
+ - `torch_compile_mode`: None
763
+ - `dispatch_batches`: None
764
+ - `split_batches`: None
765
+ - `include_tokens_per_second`: False
766
+ - `include_num_input_tokens_seen`: False
767
+ - `neftune_noise_alpha`: None
768
+ - `optim_target_modules`: None
769
+ - `batch_eval_metrics`: False
770
+ - `batch_sampler`: no_duplicates
771
+ - `multi_dataset_batch_sampler`: proportional
772
+
773
+ </details>
774
+
775
+ ### Training Logs
776
+ | 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 |
777
+ |:-------:|:-----:|:----------------------:|:----------------------:|:----------------------:|:---------------------:|:----------------------:|
778
+ | 1.0 | 3 | 0.6510 | 0.6691 | 0.6534 | 0.5641 | 0.6515 |
779
+ | **2.0** | **6** | **0.6605** | **0.679** | **0.6627** | **0.5768** | **0.6515** |
780
+
781
+ * The bold row denotes the saved checkpoint.
782
+
783
+ ### Framework Versions
784
+ - Python: 3.10.14
785
+ - Sentence Transformers: 3.0.1
786
+ - Transformers: 4.41.2
787
+ - PyTorch: 2.1.2+cu121
788
+ - Accelerate: 0.31.0
789
+ - Datasets: 2.19.1
790
+ - Tokenizers: 0.19.1
791
+
792
+ ## Citation
793
+
794
+ ### BibTeX
795
+
796
+ #### Sentence Transformers
797
+ ```bibtex
798
+ @inproceedings{reimers-2019-sentence-bert,
799
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
800
+ author = "Reimers, Nils and Gurevych, Iryna",
801
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
802
+ month = "11",
803
+ year = "2019",
804
+ publisher = "Association for Computational Linguistics",
805
+ url = "https://arxiv.org/abs/1908.10084",
806
+ }
807
+ ```
808
+
809
+ #### MatryoshkaLoss
810
+ ```bibtex
811
+ @misc{kusupati2024matryoshka,
812
+ title={Matryoshka Representation Learning},
813
+ 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},
814
+ year={2024},
815
+ eprint={2205.13147},
816
+ archivePrefix={arXiv},
817
+ primaryClass={cs.LG}
818
+ }
819
+ ```
820
+
821
+ #### MultipleNegativesRankingLoss
822
+ ```bibtex
823
+ @misc{henderson2017efficient,
824
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
825
+ 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},
826
+ year={2017},
827
+ eprint={1705.00652},
828
+ archivePrefix={arXiv},
829
+ primaryClass={cs.CL}
830
+ }
831
+ ```
832
+
833
+ <!--
834
+ ## Glossary
835
+
836
+ *Clearly define terms in order to be accessible across audiences.*
837
+ -->
838
+
839
+ <!--
840
+ ## Model Card Authors
841
+
842
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
843
+ -->
844
+
845
+ <!--
846
+ ## Model Card Contact
847
+
848
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
849
+ -->
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:cd14f5b69b24c8ae1a9b2ed740e6fef32e5800b6f38783c0e657a82b43bf077a
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