pattonma commited on
Commit
e73c6aa
1 Parent(s): 7ebe2ed

Pushing fine-tuned SentenceTransformer model

Browse files
1_Pooling/config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "word_embedding_dimension": 384,
3
+ "pooling_mode_cls_token": false,
4
+ "pooling_mode_mean_tokens": true,
5
+ "pooling_mode_max_tokens": false,
6
+ "pooling_mode_mean_sqrt_len_tokens": false,
7
+ "pooling_mode_weightedmean_tokens": false,
8
+ "pooling_mode_lasttoken": false,
9
+ "include_prompt": true
10
+ }
README.md CHANGED
@@ -1,3 +1,689 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: sentence-transformers/all-MiniLM-L6-v2
3
+ library_name: sentence-transformers
4
+ metrics:
5
+ - cosine_accuracy@1
6
+ - cosine_accuracy@3
7
+ - cosine_accuracy@5
8
+ - cosine_accuracy@10
9
+ - cosine_precision@1
10
+ - cosine_precision@3
11
+ - cosine_precision@5
12
+ - cosine_precision@10
13
+ - cosine_recall@1
14
+ - cosine_recall@3
15
+ - cosine_recall@5
16
+ - cosine_recall@10
17
+ - cosine_ndcg@10
18
+ - cosine_mrr@10
19
+ - cosine_map@100
20
+ - dot_accuracy@1
21
+ - dot_accuracy@3
22
+ - dot_accuracy@5
23
+ - dot_accuracy@10
24
+ - dot_precision@1
25
+ - dot_precision@3
26
+ - dot_precision@5
27
+ - dot_precision@10
28
+ - dot_recall@1
29
+ - dot_recall@3
30
+ - dot_recall@5
31
+ - dot_recall@10
32
+ - dot_ndcg@10
33
+ - dot_mrr@10
34
+ - dot_map@100
35
+ pipeline_tag: sentence-similarity
36
+ tags:
37
+ - sentence-transformers
38
+ - sentence-similarity
39
+ - feature-extraction
40
+ - generated_from_trainer
41
+ - dataset_size:600
42
+ - loss:MatryoshkaLoss
43
+ - loss:MultipleNegativesRankingLoss
44
+ widget:
45
+ - source_sentence: What is the purpose of the Blueprint for an AI Bill of Rights in
46
+ relation to government and private sector practices?
47
+ sentences:
48
+ - "Proportionate. The availability of human consideration and fallback, along with\
49
+ \ associated training and \nsafeguards against human bias, should be proportionate\
50
+ \ to the potential of the automated system to meaning­\nfully impact rights, opportunities,\
51
+ \ or access. Automated systems that have greater control over outcomes, \nprovide\
52
+ \ input to high-stakes decisions, relate to sensitive domains, or otherwise have\
53
+ \ a greater potential to \nmeaningfully impact rights, opportunities, or access\
54
+ \ should have greater availability (e.g., staffing) and over­\nsight of human\
55
+ \ consideration and fallback mechanisms. \nAccessible. Mechanisms for human consideration\
56
+ \ and fallback, whether in-person, on paper, by phone, or"
57
+ - "Moderator: Kathy Pham Evans, Deputy Chief Technology Officer for Product and\
58
+ \ Engineering, U.S \nFederal Trade Commission. \nPanelists: \n•\nLiz O’Sullivan,\
59
+ \ CEO, Parity AI\n•\nTimnit Gebru, Independent Scholar\n•\nJennifer Wortman Vaughan,\
60
+ \ Senior Principal Researcher, Microsoft Research, New York City\n•\nPamela Wisniewski,\
61
+ \ Associate Professor of Computer Science, University of Central Florida; Director,\n\
62
+ Socio-technical Interaction Research (STIR) Lab\n•\nSeny Kamara, Associate Professor\
63
+ \ of Computer Science, Brown University\nEach panelist individually emphasized\
64
+ \ the risks of using AI in high-stakes settings, including the potential for \n\
65
+ biased data and discriminatory outcomes, opaque decision-making processes, and\
66
+ \ lack of public trust and"
67
+ - "enforcement, and other regulatory contexts may require government actors to protect\
68
+ \ civil rights, civil liberties, \nand privacy in a manner consistent with, but\
69
+ \ using alternate mechanisms to, the specific principles discussed in \nthis framework.\
70
+ \ The Blueprint for an AI Bill of Rights is meant to assist governments and the\
71
+ \ private sector in \nmoving principles into practice. \nThe expectations given\
72
+ \ in the Technical Companion are meant to serve as a blueprint for the development\
73
+ \ of \nadditional technical standards and practices that should be tailored for\
74
+ \ particular sectors and contexts. While \nexisting laws informed the development\
75
+ \ of the Blueprint for an AI Bill of Rights, this framework does not detail"
76
+ - source_sentence: What steps should be taken to ensure that data collection aligns
77
+ with the expectations of the people involved?
78
+ sentences:
79
+ - "help to mitigate biases and potential harms. \nGuarding against proxies. Directly\
80
+ \ using demographic information in the design, development, or \ndeployment of\
81
+ \ an automated system (for purposes other than evaluating a system for discrimination\
82
+ \ or using \na system to counter discrimination) runs a high risk of leading to\
83
+ \ algorithmic discrimination and should be \navoided. In many cases, attributes\
84
+ \ that are highly correlated with demographic features, known as proxies, can\
85
+ \ \ncontribute to algorithmic discrimination. In cases where use of the demographic\
86
+ \ features themselves would \nlead to illegal algorithmic discrimination, reliance\
87
+ \ on such proxies in decision-making (such as that facilitated"
88
+ - "collection should be minimized and clearly communicated to the people whose data\
89
+ \ is collected. Data should \nonly be collected or used for the purposes of training\
90
+ \ or testing machine learning models if such collection and \nuse is legal and\
91
+ \ consistent with the expectations of the people whose data is collected. User\
92
+ \ experience \nresearch should be conducted to confirm that people understand\
93
+ \ what data is being collected about them and \nhow it will be used, and that\
94
+ \ this collection matches their expectations and desires. \nData collection and\
95
+ \ use-case scope limits. Data collection should be limited in scope, with specific,\
96
+ \ \nnarrow identified goals, to avoid \"mission creep.\" Anticipated data collection\
97
+ \ should be determined to be"
98
+ - "HUMAN ALTERNATIVES, \nCONSIDERATION, AND \nFALLBACK \nWHY THIS PRINCIPLE IS IMPORTANT\n\
99
+ This section provides a brief summary of the problems which the principle seeks\
100
+ \ to address and protect \nagainst, including illustrative examples. \n•\nAn unemployment\
101
+ \ benefits system in Colorado required, as a condition of accessing benefits,\
102
+ \ that applicants\nhave a smartphone in order to verify their identity. No alternative\
103
+ \ human option was readily available,\nwhich denied many people access to benefits.101\n\
104
+ •\nA fraud detection system for unemployment insurance distribution incorrectly\
105
+ \ flagged entries as fraudulent,\nleading to people with slight discrepancies\
106
+ \ or complexities in their files having their wages withheld and tax"
107
+ - source_sentence: Why is it important to assess the potential impact of surveillance
108
+ technologies on your rights and opportunities?
109
+ sentences:
110
+ - "SAFE AND EFFECTIVE \nSYSTEMS \nWHY THIS PRINCIPLE IS IMPORTANT\nThis section\
111
+ \ provides a brief summary of the problems which the principle seeks to address\
112
+ \ and protect \nagainst, including illustrative examples. \nWhile technologies\
113
+ \ are being deployed to solve problems across a wide array of issues, our reliance\
114
+ \ on technology can \nalso lead to its use in situations where it has not yet\
115
+ \ been proven to work—either at all or within an acceptable range \nof error.\
116
+ \ In other cases, technologies do not work as intended or as promised, causing\
117
+ \ substantial and unjustified harm. \nAutomated systems sometimes rely on data\
118
+ \ from other systems, including historical data, allowing irrelevant informa­"
119
+ - "enforcement or national security restrictions prevent doing so. Care should be\
120
+ \ taken to balance individual \nprivacy with evaluation data access needs; in\
121
+ \ many cases, policy-based and/or technological innovations and \ncontrols allow\
122
+ \ access to such data without compromising privacy. \nReporting. Entities responsible\
123
+ \ for the development or use of automated systems should provide \nreporting of\
124
+ \ an appropriately designed algorithmic impact assessment,50 with clear specification\
125
+ \ of who \nperforms the assessment, who evaluates the system, and how corrective\
126
+ \ actions are taken (if necessary) in \nresponse to the assessment. This algorithmic\
127
+ \ impact assessment should include at least: the results of any"
128
+ - "access. Whenever possible, you should have access to reporting that confirms\
129
+ \ \nyour data decisions have been respected and provides an assessment of the\
130
+ \ \npotential impact of surveillance technologies on your rights, opportunities,\
131
+ \ or \naccess. \nDATA PRIVACY\n30"
132
+ - source_sentence: How have technological developments influenced public perceptions
133
+ of sensitive domains over time?
134
+ sentences:
135
+ - "opportunities, undermine their privacy, or pervasively track their activity—often\
136
+ \ without their knowledge or \nconsent. \nThese outcomes are deeply harmful—but\
137
+ \ they are not inevitable. Automated systems have brought about extraor-\ndinary\
138
+ \ benefits, from technology that helps farmers grow food more efficiently and\
139
+ \ computers that predict storm \npaths, to algorithms that can identify diseases\
140
+ \ in patients. These tools now drive important decisions across \nsectors, while\
141
+ \ data is helping to revolutionize global industries. Fueled by the power of American\
142
+ \ innovation, \nthese tools hold the potential to redefine every part of our society\
143
+ \ and make life better for everyone."
144
+ - "in some cases. Many states have also enacted consumer data privacy protection\
145
+ \ regimes to address some of these \nharms. \nHowever, these are not yet standard\
146
+ \ practices, and the United States lacks a comprehensive statutory or regulatory\
147
+ \ \nframework governing the rights of the public when it comes to personal data.\
148
+ \ While a patchwork of laws exists to \nguide the collection and use of personal\
149
+ \ data in specific contexts, including health, employment, education, and credit,\
150
+ \ \nit can be unclear how these laws apply in other contexts and in an increasingly\
151
+ \ automated society. Additional protec­\ntions would assure the American public\
152
+ \ that the automated systems they use are not monitoring their activities,"
153
+ - "DATA PRIVACY \nEXTRA PROTECTIONS FOR DATA RELATED TO SENSITIVE\nDOMAINS\nSome\
154
+ \ domains, including health, employment, education, criminal justice, and personal\
155
+ \ finance, have long been \nsingled out as sensitive domains deserving of enhanced\
156
+ \ data protections. This is due to the intimate nature of these \ndomains as well\
157
+ \ as the inability of individuals to opt out of these domains in any meaningful\
158
+ \ way, and the \nhistorical discrimination that has often accompanied data knowledge.69\
159
+ \ Domains understood by the public to be \nsensitive also change over time, including\
160
+ \ because of technological developments. Tracking and monitoring \ntechnologies,\
161
+ \ personal tracking devices, and our extensive data footprints are used and misused\
162
+ \ more than ever"
163
+ - source_sentence: What are the privacy and civil liberties implications of using
164
+ biometric identification technologies in New York schools?
165
+ sentences:
166
+ - "existing human performance considered as a performance baseline for the algorithm\
167
+ \ to meet pre-deployment, \nand as a lifecycle minimum performance standard. Decision\
168
+ \ possibilities resulting from performance testing \nshould include the possibility\
169
+ \ of not deploying the system. \nRisk identification and mitigation. Before deployment,\
170
+ \ and in a proactive and ongoing manner, poten­\ntial risks of the automated system\
171
+ \ should be identified and mitigated. Identified risks should focus on the \n\
172
+ potential for meaningful impact on people’s rights, opportunities, or access and\
173
+ \ include those to impacted \ncommunities that may not be direct users of the\
174
+ \ automated system, risks resulting from purposeful misuse of"
175
+ - "and other data-driven automated systems most directly collect data on, make inferences\
176
+ \ about, and may cause \nharm to individuals. But the overall magnitude of their\
177
+ \ impacts may be most readily visible at the level of com-\nmunities. Accordingly,\
178
+ \ the concept of community is integral to the scope of the Blueprint for an AI\
179
+ \ Bill of Rights. \nUnited States law and policy have long employed approaches\
180
+ \ for protecting the rights of individuals, but exist-\ning frameworks have sometimes\
181
+ \ struggled to provide protections when effects manifest most clearly at a com-\n\
182
+ munity level. For these reasons, the Blueprint for an AI Bill of Rights asserts\
183
+ \ that the harms of automated"
184
+ - "the privacy, civil rights, and civil liberties implications of the use of such\
185
+ \ technologies be issued before \nbiometric identification technologies can be\
186
+ \ used in New York schools. \nFederal law requires employers, and any consultants\
187
+ \ they may retain, to report the costs \nof surveilling employees in the context\
188
+ \ of a labor dispute, providing a transparency \nmechanism to help protect worker\
189
+ \ organizing. Employers engaging in workplace surveillance \"where \nan object\
190
+ \ there-of, directly or indirectly, is […] to obtain information concerning the\
191
+ \ activities of employees or a \nlabor organization in connection with a labor\
192
+ \ dispute\" must report expenditures relating to this surveillance to"
193
+ model-index:
194
+ - name: SentenceTransformer based on sentence-transformers/all-MiniLM-L6-v2
195
+ results:
196
+ - task:
197
+ type: information-retrieval
198
+ name: Information Retrieval
199
+ dataset:
200
+ name: Unknown
201
+ type: unknown
202
+ metrics:
203
+ - type: cosine_accuracy@1
204
+ value: 0.79
205
+ name: Cosine Accuracy@1
206
+ - type: cosine_accuracy@3
207
+ value: 0.91
208
+ name: Cosine Accuracy@3
209
+ - type: cosine_accuracy@5
210
+ value: 0.93
211
+ name: Cosine Accuracy@5
212
+ - type: cosine_accuracy@10
213
+ value: 0.97
214
+ name: Cosine Accuracy@10
215
+ - type: cosine_precision@1
216
+ value: 0.79
217
+ name: Cosine Precision@1
218
+ - type: cosine_precision@3
219
+ value: 0.3033333333333333
220
+ name: Cosine Precision@3
221
+ - type: cosine_precision@5
222
+ value: 0.18599999999999994
223
+ name: Cosine Precision@5
224
+ - type: cosine_precision@10
225
+ value: 0.09699999999999998
226
+ name: Cosine Precision@10
227
+ - type: cosine_recall@1
228
+ value: 0.79
229
+ name: Cosine Recall@1
230
+ - type: cosine_recall@3
231
+ value: 0.91
232
+ name: Cosine Recall@3
233
+ - type: cosine_recall@5
234
+ value: 0.93
235
+ name: Cosine Recall@5
236
+ - type: cosine_recall@10
237
+ value: 0.97
238
+ name: Cosine Recall@10
239
+ - type: cosine_ndcg@10
240
+ value: 0.8829840634364896
241
+ name: Cosine Ndcg@10
242
+ - type: cosine_mrr@10
243
+ value: 0.8549444444444444
244
+ name: Cosine Mrr@10
245
+ - type: cosine_map@100
246
+ value: 0.8561676587301588
247
+ name: Cosine Map@100
248
+ - type: dot_accuracy@1
249
+ value: 0.79
250
+ name: Dot Accuracy@1
251
+ - type: dot_accuracy@3
252
+ value: 0.91
253
+ name: Dot Accuracy@3
254
+ - type: dot_accuracy@5
255
+ value: 0.93
256
+ name: Dot Accuracy@5
257
+ - type: dot_accuracy@10
258
+ value: 0.97
259
+ name: Dot Accuracy@10
260
+ - type: dot_precision@1
261
+ value: 0.79
262
+ name: Dot Precision@1
263
+ - type: dot_precision@3
264
+ value: 0.3033333333333333
265
+ name: Dot Precision@3
266
+ - type: dot_precision@5
267
+ value: 0.18599999999999994
268
+ name: Dot Precision@5
269
+ - type: dot_precision@10
270
+ value: 0.09699999999999998
271
+ name: Dot Precision@10
272
+ - type: dot_recall@1
273
+ value: 0.79
274
+ name: Dot Recall@1
275
+ - type: dot_recall@3
276
+ value: 0.91
277
+ name: Dot Recall@3
278
+ - type: dot_recall@5
279
+ value: 0.93
280
+ name: Dot Recall@5
281
+ - type: dot_recall@10
282
+ value: 0.97
283
+ name: Dot Recall@10
284
+ - type: dot_ndcg@10
285
+ value: 0.8829840634364896
286
+ name: Dot Ndcg@10
287
+ - type: dot_mrr@10
288
+ value: 0.8549444444444444
289
+ name: Dot Mrr@10
290
+ - type: dot_map@100
291
+ value: 0.8561676587301588
292
+ name: Dot Map@100
293
+ ---
294
+
295
+ # SentenceTransformer based on sentence-transformers/all-MiniLM-L6-v2
296
+
297
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [sentence-transformers/all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2). 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.
298
+
299
+ ## Model Details
300
+
301
+ ### Model Description
302
+ - **Model Type:** Sentence Transformer
303
+ - **Base model:** [sentence-transformers/all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2) <!-- at revision 8b3219a92973c328a8e22fadcfa821b5dc75636a -->
304
+ - **Maximum Sequence Length:** 256 tokens
305
+ - **Output Dimensionality:** 384 tokens
306
+ - **Similarity Function:** Cosine Similarity
307
+ <!-- - **Training Dataset:** Unknown -->
308
+ <!-- - **Language:** Unknown -->
309
+ <!-- - **License:** Unknown -->
310
+
311
+ ### Model Sources
312
+
313
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
314
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
315
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
316
+
317
+ ### Full Model Architecture
318
+
319
+ ```
320
+ SentenceTransformer(
321
+ (0): Transformer({'max_seq_length': 256, 'do_lower_case': False}) with Transformer model: BertModel
322
+ (1): Pooling({'word_embedding_dimension': 384, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
323
+ (2): Normalize()
324
+ )
325
+ ```
326
+
327
+ ## Usage
328
+
329
+ ### Direct Usage (Sentence Transformers)
330
+
331
+ First install the Sentence Transformers library:
332
+
333
+ ```bash
334
+ pip install -U sentence-transformers
335
+ ```
336
+
337
+ Then you can load this model and run inference.
338
+ ```python
339
+ from sentence_transformers import SentenceTransformer
340
+
341
+ # Download from the 🤗 Hub
342
+ model = SentenceTransformer("sentence_transformers_model_id")
343
+ # Run inference
344
+ sentences = [
345
+ 'What are the privacy and civil liberties implications of using biometric identification technologies in New York schools?',
346
+ 'the privacy, civil rights, and civil liberties implications of the use of such technologies be issued before \nbiometric identification technologies can be used in New York schools. \nFederal law requires employers, and any consultants they may retain, to report the costs \nof surveilling employees in the context of a labor dispute, providing a transparency \nmechanism to help protect worker organizing. Employers engaging in workplace surveillance "where \nan object there-of, directly or indirectly, is […] to obtain information concerning the activities of employees or a \nlabor organization in connection with a labor dispute" must report expenditures relating to this surveillance to',
347
+ 'and other data-driven automated systems most directly collect data on, make inferences about, and may cause \nharm to individuals. But the overall magnitude of their impacts may be most readily visible at the level of com-\nmunities. Accordingly, the concept of community is integral to the scope of the Blueprint for an AI Bill of Rights. \nUnited States law and policy have long employed approaches for protecting the rights of individuals, but exist-\ning frameworks have sometimes struggled to provide protections when effects manifest most clearly at a com-\nmunity level. For these reasons, the Blueprint for an AI Bill of Rights asserts that the harms of automated',
348
+ ]
349
+ embeddings = model.encode(sentences)
350
+ print(embeddings.shape)
351
+ # [3, 384]
352
+
353
+ # Get the similarity scores for the embeddings
354
+ similarities = model.similarity(embeddings, embeddings)
355
+ print(similarities.shape)
356
+ # [3, 3]
357
+ ```
358
+
359
+ <!--
360
+ ### Direct Usage (Transformers)
361
+
362
+ <details><summary>Click to see the direct usage in Transformers</summary>
363
+
364
+ </details>
365
+ -->
366
+
367
+ <!--
368
+ ### Downstream Usage (Sentence Transformers)
369
+
370
+ You can finetune this model on your own dataset.
371
+
372
+ <details><summary>Click to expand</summary>
373
+
374
+ </details>
375
+ -->
376
+
377
+ <!--
378
+ ### Out-of-Scope Use
379
+
380
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
381
+ -->
382
+
383
+ ## Evaluation
384
+
385
+ ### Metrics
386
+
387
+ #### Information Retrieval
388
+
389
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
390
+
391
+ | Metric | Value |
392
+ |:--------------------|:-----------|
393
+ | cosine_accuracy@1 | 0.79 |
394
+ | cosine_accuracy@3 | 0.91 |
395
+ | cosine_accuracy@5 | 0.93 |
396
+ | cosine_accuracy@10 | 0.97 |
397
+ | cosine_precision@1 | 0.79 |
398
+ | cosine_precision@3 | 0.3033 |
399
+ | cosine_precision@5 | 0.186 |
400
+ | cosine_precision@10 | 0.097 |
401
+ | cosine_recall@1 | 0.79 |
402
+ | cosine_recall@3 | 0.91 |
403
+ | cosine_recall@5 | 0.93 |
404
+ | cosine_recall@10 | 0.97 |
405
+ | cosine_ndcg@10 | 0.883 |
406
+ | cosine_mrr@10 | 0.8549 |
407
+ | **cosine_map@100** | **0.8562** |
408
+ | dot_accuracy@1 | 0.79 |
409
+ | dot_accuracy@3 | 0.91 |
410
+ | dot_accuracy@5 | 0.93 |
411
+ | dot_accuracy@10 | 0.97 |
412
+ | dot_precision@1 | 0.79 |
413
+ | dot_precision@3 | 0.3033 |
414
+ | dot_precision@5 | 0.186 |
415
+ | dot_precision@10 | 0.097 |
416
+ | dot_recall@1 | 0.79 |
417
+ | dot_recall@3 | 0.91 |
418
+ | dot_recall@5 | 0.93 |
419
+ | dot_recall@10 | 0.97 |
420
+ | dot_ndcg@10 | 0.883 |
421
+ | dot_mrr@10 | 0.8549 |
422
+ | dot_map@100 | 0.8562 |
423
+
424
+ <!--
425
+ ## Bias, Risks and Limitations
426
+
427
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
428
+ -->
429
+
430
+ <!--
431
+ ### Recommendations
432
+
433
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
434
+ -->
435
+
436
+ ## Training Details
437
+
438
+ ### Training Dataset
439
+
440
+ #### Unnamed Dataset
441
+
442
+
443
+ * Size: 600 training samples
444
+ * Columns: <code>sentence_0</code> and <code>sentence_1</code>
445
+ * Approximate statistics based on the first 600 samples:
446
+ | | sentence_0 | sentence_1 |
447
+ |:--------|:-----------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|
448
+ | type | string | string |
449
+ | details | <ul><li>min: 10 tokens</li><li>mean: 19.96 tokens</li><li>max: 39 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 115.57 tokens</li><li>max: 223 tokens</li></ul> |
450
+ * Samples:
451
+ | sentence_0 | sentence_1 |
452
+ |:-----------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
453
+ | <code>What is the primary purpose of the AI Bill of Rights as outlined in the blueprint?</code> | <code>BLUEPRINT FOR AN <br>AI BILL OF <br>RIGHTS <br>MAKING AUTOMATED <br>SYSTEMS WORK FOR <br>THE AMERICAN PEOPLE <br>OCTOBER 2022</code> |
454
+ | <code>In what month and year was the AI Bill of Rights blueprint published?</code> | <code>BLUEPRINT FOR AN <br>AI BILL OF <br>RIGHTS <br>MAKING AUTOMATED <br>SYSTEMS WORK FOR <br>THE AMERICAN PEOPLE <br>OCTOBER 2022</code> |
455
+ | <code>When was the Blueprint for an AI Bill of Rights published by the White House Office of Science and Technology Policy?</code> | <code>About this Document <br>The Blueprint for an AI Bill of Rights: Making Automated Systems Work for the American People was <br>published by the White House Office of Science and Technology Policy in October 2022. This framework was <br>released one year after OSTP announced the launch of a process to develop “a bill of rights for an AI-powered <br>world.” Its release follows a year of public engagement to inform this initiative. The framework is available <br>online at: https://www.whitehouse.gov/ostp/ai-bill-of-rights <br>About the Office of Science and Technology Policy <br>The Office of Science and Technology Policy (OSTP) was established by the National Science and Technology</code> |
456
+ * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
457
+ ```json
458
+ {
459
+ "loss": "MultipleNegativesRankingLoss",
460
+ "matryoshka_dims": [
461
+ 384,
462
+ 192,
463
+ 96,
464
+ 48,
465
+ 24
466
+ ],
467
+ "matryoshka_weights": [
468
+ 1,
469
+ 1,
470
+ 1,
471
+ 1,
472
+ 1
473
+ ],
474
+ "n_dims_per_step": -1
475
+ }
476
+ ```
477
+
478
+ ### Training Hyperparameters
479
+ #### Non-Default Hyperparameters
480
+
481
+ - `eval_strategy`: steps
482
+ - `per_device_train_batch_size`: 20
483
+ - `per_device_eval_batch_size`: 20
484
+ - `num_train_epochs`: 5
485
+ - `multi_dataset_batch_sampler`: round_robin
486
+
487
+ #### All Hyperparameters
488
+ <details><summary>Click to expand</summary>
489
+
490
+ - `overwrite_output_dir`: False
491
+ - `do_predict`: False
492
+ - `eval_strategy`: steps
493
+ - `prediction_loss_only`: True
494
+ - `per_device_train_batch_size`: 20
495
+ - `per_device_eval_batch_size`: 20
496
+ - `per_gpu_train_batch_size`: None
497
+ - `per_gpu_eval_batch_size`: None
498
+ - `gradient_accumulation_steps`: 1
499
+ - `eval_accumulation_steps`: None
500
+ - `torch_empty_cache_steps`: None
501
+ - `learning_rate`: 5e-05
502
+ - `weight_decay`: 0.0
503
+ - `adam_beta1`: 0.9
504
+ - `adam_beta2`: 0.999
505
+ - `adam_epsilon`: 1e-08
506
+ - `max_grad_norm`: 1
507
+ - `num_train_epochs`: 5
508
+ - `max_steps`: -1
509
+ - `lr_scheduler_type`: linear
510
+ - `lr_scheduler_kwargs`: {}
511
+ - `warmup_ratio`: 0.0
512
+ - `warmup_steps`: 0
513
+ - `log_level`: passive
514
+ - `log_level_replica`: warning
515
+ - `log_on_each_node`: True
516
+ - `logging_nan_inf_filter`: True
517
+ - `save_safetensors`: True
518
+ - `save_on_each_node`: False
519
+ - `save_only_model`: False
520
+ - `restore_callback_states_from_checkpoint`: False
521
+ - `no_cuda`: False
522
+ - `use_cpu`: False
523
+ - `use_mps_device`: False
524
+ - `seed`: 42
525
+ - `data_seed`: None
526
+ - `jit_mode_eval`: False
527
+ - `use_ipex`: False
528
+ - `bf16`: False
529
+ - `fp16`: False
530
+ - `fp16_opt_level`: O1
531
+ - `half_precision_backend`: auto
532
+ - `bf16_full_eval`: False
533
+ - `fp16_full_eval`: False
534
+ - `tf32`: None
535
+ - `local_rank`: 0
536
+ - `ddp_backend`: None
537
+ - `tpu_num_cores`: None
538
+ - `tpu_metrics_debug`: False
539
+ - `debug`: []
540
+ - `dataloader_drop_last`: False
541
+ - `dataloader_num_workers`: 0
542
+ - `dataloader_prefetch_factor`: None
543
+ - `past_index`: -1
544
+ - `disable_tqdm`: False
545
+ - `remove_unused_columns`: True
546
+ - `label_names`: None
547
+ - `load_best_model_at_end`: False
548
+ - `ignore_data_skip`: False
549
+ - `fsdp`: []
550
+ - `fsdp_min_num_params`: 0
551
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
552
+ - `fsdp_transformer_layer_cls_to_wrap`: None
553
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
554
+ - `deepspeed`: None
555
+ - `label_smoothing_factor`: 0.0
556
+ - `optim`: adamw_torch
557
+ - `optim_args`: None
558
+ - `adafactor`: False
559
+ - `group_by_length`: False
560
+ - `length_column_name`: length
561
+ - `ddp_find_unused_parameters`: None
562
+ - `ddp_bucket_cap_mb`: None
563
+ - `ddp_broadcast_buffers`: False
564
+ - `dataloader_pin_memory`: True
565
+ - `dataloader_persistent_workers`: False
566
+ - `skip_memory_metrics`: True
567
+ - `use_legacy_prediction_loop`: False
568
+ - `push_to_hub`: False
569
+ - `resume_from_checkpoint`: None
570
+ - `hub_model_id`: None
571
+ - `hub_strategy`: every_save
572
+ - `hub_private_repo`: False
573
+ - `hub_always_push`: False
574
+ - `gradient_checkpointing`: False
575
+ - `gradient_checkpointing_kwargs`: None
576
+ - `include_inputs_for_metrics`: False
577
+ - `eval_do_concat_batches`: True
578
+ - `fp16_backend`: auto
579
+ - `push_to_hub_model_id`: None
580
+ - `push_to_hub_organization`: None
581
+ - `mp_parameters`:
582
+ - `auto_find_batch_size`: False
583
+ - `full_determinism`: False
584
+ - `torchdynamo`: None
585
+ - `ray_scope`: last
586
+ - `ddp_timeout`: 1800
587
+ - `torch_compile`: False
588
+ - `torch_compile_backend`: None
589
+ - `torch_compile_mode`: None
590
+ - `dispatch_batches`: None
591
+ - `split_batches`: None
592
+ - `include_tokens_per_second`: False
593
+ - `include_num_input_tokens_seen`: False
594
+ - `neftune_noise_alpha`: None
595
+ - `optim_target_modules`: None
596
+ - `batch_eval_metrics`: False
597
+ - `eval_on_start`: False
598
+ - `eval_use_gather_object`: False
599
+ - `batch_sampler`: batch_sampler
600
+ - `multi_dataset_batch_sampler`: round_robin
601
+
602
+ </details>
603
+
604
+ ### Training Logs
605
+ | Epoch | Step | cosine_map@100 |
606
+ |:------:|:----:|:--------------:|
607
+ | 1.0 | 30 | 0.8353 |
608
+ | 1.6667 | 50 | 0.8590 |
609
+ | 2.0 | 60 | 0.8517 |
610
+ | 3.0 | 90 | 0.8592 |
611
+ | 3.3333 | 100 | 0.8567 |
612
+ | 4.0 | 120 | 0.8570 |
613
+ | 5.0 | 150 | 0.8565 |
614
+ | 1.0 | 30 | 0.8598 |
615
+ | 1.6667 | 50 | 0.8519 |
616
+ | 2.0 | 60 | 0.8560 |
617
+ | 3.0 | 90 | 0.8556 |
618
+ | 3.3333 | 100 | 0.8564 |
619
+ | 4.0 | 120 | 0.8566 |
620
+ | 5.0 | 150 | 0.8562 |
621
+
622
+
623
+ ### Framework Versions
624
+ - Python: 3.10.12
625
+ - Sentence Transformers: 3.1.1
626
+ - Transformers: 4.44.2
627
+ - PyTorch: 2.4.1+cu121
628
+ - Accelerate: 0.34.2
629
+ - Datasets: 3.0.0
630
+ - Tokenizers: 0.19.1
631
+
632
+ ## Citation
633
+
634
+ ### BibTeX
635
+
636
+ #### Sentence Transformers
637
+ ```bibtex
638
+ @inproceedings{reimers-2019-sentence-bert,
639
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
640
+ author = "Reimers, Nils and Gurevych, Iryna",
641
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
642
+ month = "11",
643
+ year = "2019",
644
+ publisher = "Association for Computational Linguistics",
645
+ url = "https://arxiv.org/abs/1908.10084",
646
+ }
647
+ ```
648
+
649
+ #### MatryoshkaLoss
650
+ ```bibtex
651
+ @misc{kusupati2024matryoshka,
652
+ title={Matryoshka Representation Learning},
653
+ 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},
654
+ year={2024},
655
+ eprint={2205.13147},
656
+ archivePrefix={arXiv},
657
+ primaryClass={cs.LG}
658
+ }
659
+ ```
660
+
661
+ #### MultipleNegativesRankingLoss
662
+ ```bibtex
663
+ @misc{henderson2017efficient,
664
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
665
+ 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},
666
+ year={2017},
667
+ eprint={1705.00652},
668
+ archivePrefix={arXiv},
669
+ primaryClass={cs.CL}
670
+ }
671
+ ```
672
+
673
+ <!--
674
+ ## Glossary
675
+
676
+ *Clearly define terms in order to be accessible across audiences.*
677
+ -->
678
+
679
+ <!--
680
+ ## Model Card Authors
681
+
682
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
683
+ -->
684
+
685
+ <!--
686
+ ## Model Card Contact
687
+
688
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
689
+ -->
config.json ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "sentence-transformers/all-MiniLM-L6-v2",
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": 384,
12
+ "initializer_range": 0.02,
13
+ "intermediate_size": 1536,
14
+ "layer_norm_eps": 1e-12,
15
+ "max_position_embeddings": 512,
16
+ "model_type": "bert",
17
+ "num_attention_heads": 12,
18
+ "num_hidden_layers": 6,
19
+ "pad_token_id": 0,
20
+ "position_embedding_type": "absolute",
21
+ "torch_dtype": "float32",
22
+ "transformers_version": "4.44.2",
23
+ "type_vocab_size": 2,
24
+ "use_cache": true,
25
+ "vocab_size": 30522
26
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "3.1.1",
4
+ "transformers": "4.44.2",
5
+ "pytorch": "2.4.1+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:111fdbda0dc0eb6ce6949b4467437b74b38895fcdc716080d15718c3336adf35
3
+ size 90864192
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": 256,
3
+ "do_lower_case": false
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,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "max_length": 128,
50
+ "model_max_length": 256,
51
+ "never_split": null,
52
+ "pad_to_multiple_of": null,
53
+ "pad_token": "[PAD]",
54
+ "pad_token_type_id": 0,
55
+ "padding_side": "right",
56
+ "sep_token": "[SEP]",
57
+ "stride": 0,
58
+ "strip_accents": null,
59
+ "tokenize_chinese_chars": true,
60
+ "tokenizer_class": "BertTokenizer",
61
+ "truncation_side": "right",
62
+ "truncation_strategy": "longest_first",
63
+ "unk_token": "[UNK]"
64
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff