ernestobs7 commited on
Commit
af0231a
·
verified ·
1 Parent(s): defa832

Add new SentenceTransformer model

Browse files
1_Pooling/config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "word_embedding_dimension": 1024,
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,752 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - sentence-transformers
4
+ - sentence-similarity
5
+ - feature-extraction
6
+ - generated_from_trainer
7
+ - dataset_size:98
8
+ - loss:MatryoshkaLoss
9
+ - loss:MultipleNegativesRankingLoss
10
+ base_model: Snowflake/snowflake-arctic-embed-l
11
+ widget:
12
+ - source_sentence: What are some common attitudes and beliefs that can create personal
13
+ barriers to self-care for family caregivers?
14
+ sentences:
15
+ - 'Support for nutrition, breathing, and feeding
16
+
17
+ People with ALS may have trouble chewing and swallowing their food, and getting
18
+ the nutrients they need. Nutritionists and registered dieticians can help plan
19
+ small, nutritious meals throughout the day and identify foods to avoid. When the
20
+ person can no longer eat with help, a feeding tube can reduce the person’s risk
21
+ of choking and pneumonia.'
22
+ - "Amyotrophic Lateral Sclerosis (ALS) | National Institute of Neurological Disorders\
23
+ \ and Stroke\n\n\n\n\n\n\n\n\n Skip to main content\n \n\n\n\n\n\n\n\n\
24
+ \n\n\n\n\n\n\nAn official website of the United States government\n\n \
25
+ \ Here’s how you know\n\n\n\n\n\n\n\n\n\n\n\nOfficial websites use .gov \n\
26
+ \ A\n .gov\n website belongs to an\
27
+ \ official government organization in the United States.\n \n\n\n\
28
+ \n\n\n\n\n\nSecure .gov websites use HTTPS\n\n A lock\n \
29
+ \ (\n\n)\n or\n https://\n \
30
+ \ means you’ve safely connected to the .gov website. Share sensitive\
31
+ \ information only on official, secure websites.\n \n\n\n\n\n\n\
32
+ \n\n\n\n\n\n\n\n\n\n\n\n\n\n\nSearch\n\n\nMenu\n\n\n\n\n\n\n\n\n\nSearch NINDS\n\
33
+ \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nSearch NINDS\n\n\n\n\n\n\n\n\n\n\n\
34
+ \n\n\n\nMain navigation"
35
+ - "Identifying Personal Barriers \nMany times, attitudes and beliefs form personal\
36
+ \ barriers that stand in the \nway of caring for yourself. Not taking care of\
37
+ \ yourself may be a lifelong \npattern, with taking care of others an easier option.\
38
+ \ However, as a family \ncaregiver you must ask yourself, \"What good will I\
39
+ \ be to the person I care \nfor if I become ill? If I die?\" Breaking old patterns\
40
+ \ and overcoming \nobstacles is not an easy proposition, but it can be done –\
41
+ \ regardless of \nyour age or situation. The first task in removing personal\
42
+ \ barriers to self-\ncare is to identify what is in your way. For example, \n\
43
+ • Do you feel you have to prove that you are worthy of the care recipient's \n\
44
+ affection? \n• Do you think you are being selfish if you put your needs first?\
45
+ \ \n• Is it frightening to think of your own needs? What is the fear about?"
46
+ - source_sentence: What role does the SOD1 gene play in the body?
47
+ sentences:
48
+ - "Migraine Trainer® Shareable Resources\n\n\n\nMind Your Risks®\n\n\nNINDS Brain\
49
+ \ Educational Resources\n\n\nStroke\n\n\n\n\n\n\nStroke Overview\n\n\nPrevention\n\
50
+ \n\nSigns and Symptoms\n\n\nAssess and Treat\n\n\n\n\n\n\nNIH Stroke Scale\n\n\
51
+ \n\nRecovery\n\n\nResearch\n\n\nOutreach\n\n\n\n\n\n\n\n\nDid you find the content\
52
+ \ you were looking for?\n\n\n\n\n\nYes, I did find the content I was looking for\n\
53
+ \n\n\n\nNo, I did not find the content I was looking for\n\n\n\n\n\n\n\nPlease\
54
+ \ rate how easy it was to navigate the NINDS website\n\n\n\n\n\nVery easy to navigate\n\
55
+ \n\n\n\nEasy to navigate\n\n\n\n\nNeutral\n\n\n\n\nDifficult to navigate\n\n\n\
56
+ \n\nVery difficult to navigate\n\n\n\n\n\n\nThank you for letting us know! Any\
57
+ \ other feedback?\n\n\n\n\nSubmit\n\n\n\n\n\nThis site is protected by reCAPTCHA\
58
+ \ and the Google Privacy Policyand Terms of Serviceapply.\n\n\n\n\n\n\n\n\n\n\n\
59
+ \n Last reviewed on July 19, 2024\n \n\n\n\n\n\n\n\
60
+ \n\n\n\n\nContact Us"
61
+ - 'Muscle twitches in the arm, leg, shoulder, or tongue
62
+
63
+ Muscle cramps
64
+
65
+ Tight and stiff muscles (spasticity)
66
+
67
+ Muscle weakness affecting an arm, a leg, or the neck
68
+
69
+ Slurred and nasal speech
70
+
71
+ Difficulty chewing or swallowing
72
+
73
+
74
+ As the disease progresses, muscle weakness and atrophy spread to other parts of
75
+ your body. People with ALS may develop problems with:
76
+
77
+
78
+ Chewing food and swallowing (dysphagia)
79
+
80
+ Drooling (sialorrhea)
81
+
82
+ Speaking or forming words (dysarthria)
83
+
84
+ Breathing (dyspnea)
85
+
86
+ Unintended crying, laughing, or other emotional displays (pseudobulbar symptoms)
87
+
88
+ Constipation
89
+
90
+ Maintaining weight and getting enough nutrients'
91
+ - "About 25-40% of all familial cases (and a small percentage of sporadic cases)\
92
+ \ are caused by a defect in the C9orf72 gene. C9orf72 makes a protein found in\
93
+ \ motor neurons and nerve cells in the brain. \nAnother 12-20% of familial cases\
94
+ \ result from mutations in the SOD1 gene. SOD1 is involved in production of the\
95
+ \ enzyme copper-zinc superoxide dismutase 1."
96
+ - source_sentence: What types of resources are available for caregivers of individuals
97
+ with ALS?
98
+ sentences:
99
+ - 'Eventually, people with ALS will not be able to stand or walk, get in or out
100
+ of bed on their own, use their hands and arms, or breathe on their own. Because
101
+ they usually remain able to reason, remember, and understand, they are aware of
102
+ their progressive loss of function. This can cause anxiety and depression in the
103
+ person with ALS and their loved ones. Although not as common, people with ALS
104
+ also may experience problems with language or decision-making. Some also develop
105
+ a form of dementia known as FTD-ALS.
106
+
107
+ Most people with ALS die from being unable to breathe on their own (known as respiratory
108
+ failure,) usually within three to five years from when the symptoms first appear.
109
+ However, about 10% survive for a decade or more.
110
+
111
+ Who is more likely to get amyotrophic lateral sclerosis (ALS)?'
112
+ - 'Motor Neuron Diseases 
113
+
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+
126
+ Order publications from the NINDS Catalog
127
+
128
+ The NINDS Publication Catalog offers printed materials on neurological disorders
129
+ for patients, health professionals, and the general public. All materials are
130
+ free of charge, and a downloadable PDF version is also available for most publications.
131
+
132
+ Order NINDS Publications
133
+
134
+
135
+
136
+  
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+ Health Information
146
+
147
+
148
+
149
+
150
+
151
+
152
+
153
+ Disorders
154
+
155
+
156
+
157
+
158
+
159
+
160
+
161
+ Glossary of Neurological Terms
162
+
163
+
164
+
165
+ Order Publications
166
+
167
+
168
+
169
+
170
+ Clinical Trials
171
+
172
+
173
+
174
+
175
+
176
+
177
+
178
+ Clinical Trials in the Spotlight
179
+
180
+
181
+
182
+ Find NINDS Clinical Trials
183
+
184
+
185
+
186
+
187
+ Patient & Caregiver Education
188
+
189
+
190
+
191
+
192
+
193
+
194
+
195
+ Brain Attack Coalition
196
+
197
+
198
+
199
+ Brain Donation
200
+
201
+
202
+
203
+
204
+ Public Education
205
+
206
+
207
+
208
+
209
+
210
+
211
+
212
+ Brain Basics
213
+
214
+
215
+
216
+
217
+
218
+
219
+
220
+ Know Your Brain
221
+
222
+
223
+
224
+ Understanding Sleep
225
+
226
+
227
+
228
+ Preventing Stroke
229
+
230
+
231
+
232
+ The Life and Death of a Neuron
233
+
234
+
235
+
236
+ Genes and the Brain
237
+
238
+
239
+
240
+
241
+ Migraine Trainer®
242
+
243
+
244
+
245
+
246
+
247
+
248
+
249
+ Migraine Trainer® Shareable Resources'
250
+ - "Caring for a person living with ALS\nAs the person with ALS progresses in their\
251
+ \ disease, they will need more and more help with daily activities. Being a caregiver\
252
+ \ for a person with ALS, while rewarding, can be challenging for the person’s\
253
+ \ loved ones and caregivers. It is important for caregivers take care of themselves\
254
+ \ and to seek support when needed. Free and paid resources are available to provide\
255
+ \ home health care services and support. Visit the organizations listed at the\
256
+ \ end of this article to find support in your area. \nWhat are the latest updates\
257
+ \ on amyotrophic lateral sclerosis (ALS)?"
258
+ - source_sentence: How can prospective donors participate in ALS research through
259
+ brain donation?
260
+ sentences:
261
+ - 'Doctors may use the following medications approved by the U.S. Food and Drug
262
+ Administration (FDA) to support a treatment plan for ALS:'
263
+ - NINDS also supports the NIH NeuroBioBank, a collaborative effort involving several
264
+ brain banks across the U.S. that supply investigators with tissue from people
265
+ with neurological and other disorders. Tissue from individuals with ALS is needed
266
+ to help advance critical research on the disease. A single donated brain can make
267
+ a huge impact on ALS research, potentially providing information for hundreds
268
+ of studies. The goal is to increase the availability of, and access to, high quality
269
+ specimens for research to understand the neurological basis of the disease. Prospective
270
+ donors can begin the enrollment process by visiting Learn How to Become a Brain
271
+ Donor.
272
+ - The National ALS Registry collects, manages, and analyzes de-identified data about
273
+ people with ALS in the United States. Developed by the Center for Disease Control
274
+ and Prevention's Agency for Toxic Substances and Disease Registry (ATSDR), this
275
+ registry establishes information about the number of ALS cases, collects demographic,
276
+ occupational, and environmental exposure data from people with ALS to learn about
277
+ potential risk factors for the disease, and notifies participants about research
278
+ opportunities. The Registry includes data from national databases as well as de-identified
279
+ information provided by individuals with ALS. All information is kept confidential.
280
+ People with ALS can add their information to the registry and sign up to receive
281
+ for more information.
282
+ - source_sentence: Does having a risk factor guarantee that a person will develop
283
+ a disorder?
284
+ sentences:
285
+ - 'Doctors may use the following medications approved by the U.S. Food and Drug
286
+ Administration (FDA) to support a treatment plan for ALS:'
287
+ - "possible decline in quality of life. \n \nBut despite these risks, family caregivers\
288
+ \ of any age are less likely than \nnon-caregivers to practice preventive healthcare\
289
+ \ and self-care behavior. \nRegardless of age, sex, and race and ethnicity, caregivers\
290
+ \ report problems \nattending to their own health and well-being while managing\
291
+ \ caregiving \nresponsibilities. They report: \n• sleep deprivation \n• poor\
292
+ \ eating habits \n• failure to exercise \n• failure to stay in bed when ill\
293
+ \ \n• postponement of or failure to make medical appointments ."
294
+ - 'A risk factor is a condition or behavior that occurs more frequently in those
295
+ who have a disease, or who are at greater risk of getting a disease, than in those
296
+ who don''t have the risk factor. Having a risk factor doesn''t mean a person will
297
+ develop a disorder, and not having a risk factor doesn''t mean you won’t. Risk
298
+ factors for ALS include:'
299
+ pipeline_tag: sentence-similarity
300
+ library_name: sentence-transformers
301
+ metrics:
302
+ - cosine_accuracy@1
303
+ - cosine_accuracy@3
304
+ - cosine_accuracy@5
305
+ - cosine_accuracy@10
306
+ - cosine_precision@1
307
+ - cosine_precision@3
308
+ - cosine_precision@5
309
+ - cosine_precision@10
310
+ - cosine_recall@1
311
+ - cosine_recall@3
312
+ - cosine_recall@5
313
+ - cosine_recall@10
314
+ - cosine_ndcg@10
315
+ - cosine_mrr@10
316
+ - cosine_map@100
317
+ model-index:
318
+ - name: SentenceTransformer based on Snowflake/snowflake-arctic-embed-l
319
+ results:
320
+ - task:
321
+ type: information-retrieval
322
+ name: Information Retrieval
323
+ dataset:
324
+ name: Unknown
325
+ type: unknown
326
+ metrics:
327
+ - type: cosine_accuracy@1
328
+ value: 0.9166666666666666
329
+ name: Cosine Accuracy@1
330
+ - type: cosine_accuracy@3
331
+ value: 1.0
332
+ name: Cosine Accuracy@3
333
+ - type: cosine_accuracy@5
334
+ value: 1.0
335
+ name: Cosine Accuracy@5
336
+ - type: cosine_accuracy@10
337
+ value: 1.0
338
+ name: Cosine Accuracy@10
339
+ - type: cosine_precision@1
340
+ value: 0.9166666666666666
341
+ name: Cosine Precision@1
342
+ - type: cosine_precision@3
343
+ value: 0.3333333333333333
344
+ name: Cosine Precision@3
345
+ - type: cosine_precision@5
346
+ value: 0.20000000000000004
347
+ name: Cosine Precision@5
348
+ - type: cosine_precision@10
349
+ value: 0.10000000000000002
350
+ name: Cosine Precision@10
351
+ - type: cosine_recall@1
352
+ value: 0.9166666666666666
353
+ name: Cosine Recall@1
354
+ - type: cosine_recall@3
355
+ value: 1.0
356
+ name: Cosine Recall@3
357
+ - type: cosine_recall@5
358
+ value: 1.0
359
+ name: Cosine Recall@5
360
+ - type: cosine_recall@10
361
+ value: 1.0
362
+ name: Cosine Recall@10
363
+ - type: cosine_ndcg@10
364
+ value: 0.9637887397321441
365
+ name: Cosine Ndcg@10
366
+ - type: cosine_mrr@10
367
+ value: 0.951388888888889
368
+ name: Cosine Mrr@10
369
+ - type: cosine_map@100
370
+ value: 0.9513888888888888
371
+ name: Cosine Map@100
372
+ ---
373
+
374
+ # SentenceTransformer based on Snowflake/snowflake-arctic-embed-l
375
+
376
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [Snowflake/snowflake-arctic-embed-l](https://huggingface.co/Snowflake/snowflake-arctic-embed-l). It maps sentences & paragraphs to a 1024-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
377
+
378
+ ## Model Details
379
+
380
+ ### Model Description
381
+ - **Model Type:** Sentence Transformer
382
+ - **Base model:** [Snowflake/snowflake-arctic-embed-l](https://huggingface.co/Snowflake/snowflake-arctic-embed-l) <!-- at revision d8fb21ca8d905d2832ee8b96c894d3298964346b -->
383
+ - **Maximum Sequence Length:** 512 tokens
384
+ - **Output Dimensionality:** 1024 dimensions
385
+ - **Similarity Function:** Cosine Similarity
386
+ <!-- - **Training Dataset:** Unknown -->
387
+ <!-- - **Language:** Unknown -->
388
+ <!-- - **License:** Unknown -->
389
+
390
+ ### Model Sources
391
+
392
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
393
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
394
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
395
+
396
+ ### Full Model Architecture
397
+
398
+ ```
399
+ SentenceTransformer(
400
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: BertModel
401
+ (1): Pooling({'word_embedding_dimension': 1024, '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})
402
+ (2): Normalize()
403
+ )
404
+ ```
405
+
406
+ ## Usage
407
+
408
+ ### Direct Usage (Sentence Transformers)
409
+
410
+ First install the Sentence Transformers library:
411
+
412
+ ```bash
413
+ pip install -U sentence-transformers
414
+ ```
415
+
416
+ Then you can load this model and run inference.
417
+ ```python
418
+ from sentence_transformers import SentenceTransformer
419
+
420
+ # Download from the 🤗 Hub
421
+ model = SentenceTransformer("ernestobs7/caregiver-ft-v1")
422
+ # Run inference
423
+ sentences = [
424
+ 'Does having a risk factor guarantee that a person will develop a disorder?',
425
+ "A risk factor is a condition or behavior that occurs more frequently in those who have a disease, or who are at greater risk of getting a disease, than in those who don't have the risk factor. Having a risk factor doesn't mean a person will develop a disorder, and not having a risk factor doesn't mean you won’t. Risk factors for ALS include:",
426
+ 'possible decline in quality of life. \n \nBut despite these risks, family caregivers of any age are less likely than \nnon-caregivers to practice preventive healthcare and self-care behavior. \nRegardless of age, sex, and race and ethnicity, caregivers report problems \nattending to their own health and well-being while managing caregiving \nresponsibilities. They report: \n• sleep deprivation \n• poor eating habits \n• failure to exercise \n• failure to stay in bed when ill \n• postponement of or failure to make medical appointments .',
427
+ ]
428
+ embeddings = model.encode(sentences)
429
+ print(embeddings.shape)
430
+ # [3, 1024]
431
+
432
+ # Get the similarity scores for the embeddings
433
+ similarities = model.similarity(embeddings, embeddings)
434
+ print(similarities.shape)
435
+ # [3, 3]
436
+ ```
437
+
438
+ <!--
439
+ ### Direct Usage (Transformers)
440
+
441
+ <details><summary>Click to see the direct usage in Transformers</summary>
442
+
443
+ </details>
444
+ -->
445
+
446
+ <!--
447
+ ### Downstream Usage (Sentence Transformers)
448
+
449
+ You can finetune this model on your own dataset.
450
+
451
+ <details><summary>Click to expand</summary>
452
+
453
+ </details>
454
+ -->
455
+
456
+ <!--
457
+ ### Out-of-Scope Use
458
+
459
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
460
+ -->
461
+
462
+ ## Evaluation
463
+
464
+ ### Metrics
465
+
466
+ #### Information Retrieval
467
+
468
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
469
+
470
+ | Metric | Value |
471
+ |:--------------------|:-----------|
472
+ | cosine_accuracy@1 | 0.9167 |
473
+ | cosine_accuracy@3 | 1.0 |
474
+ | cosine_accuracy@5 | 1.0 |
475
+ | cosine_accuracy@10 | 1.0 |
476
+ | cosine_precision@1 | 0.9167 |
477
+ | cosine_precision@3 | 0.3333 |
478
+ | cosine_precision@5 | 0.2 |
479
+ | cosine_precision@10 | 0.1 |
480
+ | cosine_recall@1 | 0.9167 |
481
+ | cosine_recall@3 | 1.0 |
482
+ | cosine_recall@5 | 1.0 |
483
+ | cosine_recall@10 | 1.0 |
484
+ | **cosine_ndcg@10** | **0.9638** |
485
+ | cosine_mrr@10 | 0.9514 |
486
+ | cosine_map@100 | 0.9514 |
487
+
488
+ <!--
489
+ ## Bias, Risks and Limitations
490
+
491
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
492
+ -->
493
+
494
+ <!--
495
+ ### Recommendations
496
+
497
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
498
+ -->
499
+
500
+ ## Training Details
501
+
502
+ ### Training Dataset
503
+
504
+ #### Unnamed Dataset
505
+
506
+ * Size: 98 training samples
507
+ * Columns: <code>sentence_0</code> and <code>sentence_1</code>
508
+ * Approximate statistics based on the first 98 samples:
509
+ | | sentence_0 | sentence_1 |
510
+ |:--------|:-----------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------|
511
+ | type | string | string |
512
+ | details | <ul><li>min: 12 tokens</li><li>mean: 19.21 tokens</li><li>max: 34 tokens</li></ul> | <ul><li>min: 30 tokens</li><li>mean: 120.29 tokens</li><li>max: 181 tokens</li></ul> |
513
+ * Samples:
514
+ | sentence_0 | sentence_1 |
515
+ |:-----------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
516
+ | <code>What are some common symptoms experienced by individuals with ALS related to muscle function?</code> | <code>Muscle twitches in the arm, leg, shoulder, or tongue<br>Muscle cramps<br>Tight and stiff muscles (spasticity)<br>Muscle weakness affecting an arm, a leg, or the neck<br>Slurred and nasal speech<br>Difficulty chewing or swallowing<br><br>As the disease progresses, muscle weakness and atrophy spread to other parts of your body. People with ALS may develop problems with:<br><br>Chewing food and swallowing (dysphagia)<br>Drooling (sialorrhea)<br>Speaking or forming words (dysarthria)<br>Breathing (dyspnea)<br>Unintended crying, laughing, or other emotional displays (pseudobulbar symptoms)<br>Constipation<br>Maintaining weight and getting enough nutrients</code> |
517
+ | <code>How does ALS affect a person's ability to chew and swallow food?</code> | <code>Muscle twitches in the arm, leg, shoulder, or tongue<br>Muscle cramps<br>Tight and stiff muscles (spasticity)<br>Muscle weakness affecting an arm, a leg, or the neck<br>Slurred and nasal speech<br>Difficulty chewing or swallowing<br><br>As the disease progresses, muscle weakness and atrophy spread to other parts of your body. People with ALS may develop problems with:<br><br>Chewing food and swallowing (dysphagia)<br>Drooling (sialorrhea)<br>Speaking or forming words (dysarthria)<br>Breathing (dyspnea)<br>Unintended crying, laughing, or other emotional displays (pseudobulbar symptoms)<br>Constipation<br>Maintaining weight and getting enough nutrients</code> |
518
+ | <code>What percentage of ALS cases are classified as familial?</code> | <code>About 10% of all ALS cases are familial (also called inherited or genetic). Changes in more than a dozen genes have been found to cause familial ALS.</code> |
519
+ * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
520
+ ```json
521
+ {
522
+ "loss": "MultipleNegativesRankingLoss",
523
+ "matryoshka_dims": [
524
+ 768,
525
+ 512,
526
+ 256,
527
+ 128,
528
+ 64
529
+ ],
530
+ "matryoshka_weights": [
531
+ 1,
532
+ 1,
533
+ 1,
534
+ 1,
535
+ 1
536
+ ],
537
+ "n_dims_per_step": -1
538
+ }
539
+ ```
540
+
541
+ ### Training Hyperparameters
542
+ #### Non-Default Hyperparameters
543
+
544
+ - `eval_strategy`: steps
545
+ - `per_device_train_batch_size`: 10
546
+ - `per_device_eval_batch_size`: 10
547
+ - `num_train_epochs`: 10
548
+ - `multi_dataset_batch_sampler`: round_robin
549
+
550
+ #### All Hyperparameters
551
+ <details><summary>Click to expand</summary>
552
+
553
+ - `overwrite_output_dir`: False
554
+ - `do_predict`: False
555
+ - `eval_strategy`: steps
556
+ - `prediction_loss_only`: True
557
+ - `per_device_train_batch_size`: 10
558
+ - `per_device_eval_batch_size`: 10
559
+ - `per_gpu_train_batch_size`: None
560
+ - `per_gpu_eval_batch_size`: None
561
+ - `gradient_accumulation_steps`: 1
562
+ - `eval_accumulation_steps`: None
563
+ - `torch_empty_cache_steps`: None
564
+ - `learning_rate`: 5e-05
565
+ - `weight_decay`: 0.0
566
+ - `adam_beta1`: 0.9
567
+ - `adam_beta2`: 0.999
568
+ - `adam_epsilon`: 1e-08
569
+ - `max_grad_norm`: 1
570
+ - `num_train_epochs`: 10
571
+ - `max_steps`: -1
572
+ - `lr_scheduler_type`: linear
573
+ - `lr_scheduler_kwargs`: {}
574
+ - `warmup_ratio`: 0.0
575
+ - `warmup_steps`: 0
576
+ - `log_level`: passive
577
+ - `log_level_replica`: warning
578
+ - `log_on_each_node`: True
579
+ - `logging_nan_inf_filter`: True
580
+ - `save_safetensors`: True
581
+ - `save_on_each_node`: False
582
+ - `save_only_model`: False
583
+ - `restore_callback_states_from_checkpoint`: False
584
+ - `no_cuda`: False
585
+ - `use_cpu`: False
586
+ - `use_mps_device`: False
587
+ - `seed`: 42
588
+ - `data_seed`: None
589
+ - `jit_mode_eval`: False
590
+ - `use_ipex`: False
591
+ - `bf16`: False
592
+ - `fp16`: False
593
+ - `fp16_opt_level`: O1
594
+ - `half_precision_backend`: auto
595
+ - `bf16_full_eval`: False
596
+ - `fp16_full_eval`: False
597
+ - `tf32`: None
598
+ - `local_rank`: 0
599
+ - `ddp_backend`: None
600
+ - `tpu_num_cores`: None
601
+ - `tpu_metrics_debug`: False
602
+ - `debug`: []
603
+ - `dataloader_drop_last`: False
604
+ - `dataloader_num_workers`: 0
605
+ - `dataloader_prefetch_factor`: None
606
+ - `past_index`: -1
607
+ - `disable_tqdm`: False
608
+ - `remove_unused_columns`: True
609
+ - `label_names`: None
610
+ - `load_best_model_at_end`: False
611
+ - `ignore_data_skip`: False
612
+ - `fsdp`: []
613
+ - `fsdp_min_num_params`: 0
614
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
615
+ - `fsdp_transformer_layer_cls_to_wrap`: None
616
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
617
+ - `deepspeed`: None
618
+ - `label_smoothing_factor`: 0.0
619
+ - `optim`: adamw_torch
620
+ - `optim_args`: None
621
+ - `adafactor`: False
622
+ - `group_by_length`: False
623
+ - `length_column_name`: length
624
+ - `ddp_find_unused_parameters`: None
625
+ - `ddp_bucket_cap_mb`: None
626
+ - `ddp_broadcast_buffers`: False
627
+ - `dataloader_pin_memory`: True
628
+ - `dataloader_persistent_workers`: False
629
+ - `skip_memory_metrics`: True
630
+ - `use_legacy_prediction_loop`: False
631
+ - `push_to_hub`: False
632
+ - `resume_from_checkpoint`: None
633
+ - `hub_model_id`: None
634
+ - `hub_strategy`: every_save
635
+ - `hub_private_repo`: None
636
+ - `hub_always_push`: False
637
+ - `gradient_checkpointing`: False
638
+ - `gradient_checkpointing_kwargs`: None
639
+ - `include_inputs_for_metrics`: False
640
+ - `include_for_metrics`: []
641
+ - `eval_do_concat_batches`: True
642
+ - `fp16_backend`: auto
643
+ - `push_to_hub_model_id`: None
644
+ - `push_to_hub_organization`: None
645
+ - `mp_parameters`:
646
+ - `auto_find_batch_size`: False
647
+ - `full_determinism`: False
648
+ - `torchdynamo`: None
649
+ - `ray_scope`: last
650
+ - `ddp_timeout`: 1800
651
+ - `torch_compile`: False
652
+ - `torch_compile_backend`: None
653
+ - `torch_compile_mode`: None
654
+ - `dispatch_batches`: None
655
+ - `split_batches`: None
656
+ - `include_tokens_per_second`: False
657
+ - `include_num_input_tokens_seen`: False
658
+ - `neftune_noise_alpha`: None
659
+ - `optim_target_modules`: None
660
+ - `batch_eval_metrics`: False
661
+ - `eval_on_start`: False
662
+ - `use_liger_kernel`: False
663
+ - `eval_use_gather_object`: False
664
+ - `average_tokens_across_devices`: False
665
+ - `prompts`: None
666
+ - `batch_sampler`: batch_sampler
667
+ - `multi_dataset_batch_sampler`: round_robin
668
+
669
+ </details>
670
+
671
+ ### Training Logs
672
+ | Epoch | Step | cosine_ndcg@10 |
673
+ |:-----:|:----:|:--------------:|
674
+ | 1.0 | 10 | 0.9382 |
675
+ | 2.0 | 20 | 0.9539 |
676
+ | 3.0 | 30 | 0.9484 |
677
+ | 4.0 | 40 | 0.9484 |
678
+ | 5.0 | 50 | 0.9638 |
679
+ | 6.0 | 60 | 0.9638 |
680
+ | 7.0 | 70 | 0.9638 |
681
+ | 8.0 | 80 | 0.9638 |
682
+ | 9.0 | 90 | 0.9638 |
683
+ | 10.0 | 100 | 0.9638 |
684
+
685
+
686
+ ### Framework Versions
687
+ - Python: 3.11.4
688
+ - Sentence Transformers: 3.4.1
689
+ - Transformers: 4.49.0
690
+ - PyTorch: 2.6.0+cu124
691
+ - Accelerate: 1.4.0
692
+ - Datasets: 3.3.2
693
+ - Tokenizers: 0.21.0
694
+
695
+ ## Citation
696
+
697
+ ### BibTeX
698
+
699
+ #### Sentence Transformers
700
+ ```bibtex
701
+ @inproceedings{reimers-2019-sentence-bert,
702
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
703
+ author = "Reimers, Nils and Gurevych, Iryna",
704
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
705
+ month = "11",
706
+ year = "2019",
707
+ publisher = "Association for Computational Linguistics",
708
+ url = "https://arxiv.org/abs/1908.10084",
709
+ }
710
+ ```
711
+
712
+ #### MatryoshkaLoss
713
+ ```bibtex
714
+ @misc{kusupati2024matryoshka,
715
+ title={Matryoshka Representation Learning},
716
+ 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},
717
+ year={2024},
718
+ eprint={2205.13147},
719
+ archivePrefix={arXiv},
720
+ primaryClass={cs.LG}
721
+ }
722
+ ```
723
+
724
+ #### MultipleNegativesRankingLoss
725
+ ```bibtex
726
+ @misc{henderson2017efficient,
727
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
728
+ 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},
729
+ year={2017},
730
+ eprint={1705.00652},
731
+ archivePrefix={arXiv},
732
+ primaryClass={cs.CL}
733
+ }
734
+ ```
735
+
736
+ <!--
737
+ ## Glossary
738
+
739
+ *Clearly define terms in order to be accessible across audiences.*
740
+ -->
741
+
742
+ <!--
743
+ ## Model Card Authors
744
+
745
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
746
+ -->
747
+
748
+ <!--
749
+ ## Model Card Contact
750
+
751
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
752
+ -->
config.json ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "Snowflake/snowflake-arctic-embed-l",
3
+ "architectures": [
4
+ "BertModel"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "classifier_dropout": null,
8
+ "hidden_act": "gelu",
9
+ "hidden_dropout_prob": 0.1,
10
+ "hidden_size": 1024,
11
+ "initializer_range": 0.02,
12
+ "intermediate_size": 4096,
13
+ "layer_norm_eps": 1e-12,
14
+ "max_position_embeddings": 512,
15
+ "model_type": "bert",
16
+ "num_attention_heads": 16,
17
+ "num_hidden_layers": 24,
18
+ "pad_token_id": 0,
19
+ "position_embedding_type": "absolute",
20
+ "torch_dtype": "float32",
21
+ "transformers_version": "4.49.0",
22
+ "type_vocab_size": 2,
23
+ "use_cache": true,
24
+ "vocab_size": 30522
25
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "3.4.1",
4
+ "transformers": "4.49.0",
5
+ "pytorch": "2.6.0+cu124"
6
+ },
7
+ "prompts": {
8
+ "query": "Represent this sentence for searching relevant passages: "
9
+ },
10
+ "default_prompt_name": null,
11
+ "similarity_fn_name": "cosine"
12
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9a67fd83e5631a454c6ef787244826ea321100a1188830bec09778b70b117f43
3
+ size 1336413848
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": 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,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_lower_case": true,
47
+ "extra_special_tokens": {},
48
+ "mask_token": "[MASK]",
49
+ "max_length": 512,
50
+ "model_max_length": 512,
51
+ "pad_to_multiple_of": null,
52
+ "pad_token": "[PAD]",
53
+ "pad_token_type_id": 0,
54
+ "padding_side": "right",
55
+ "sep_token": "[SEP]",
56
+ "stride": 0,
57
+ "strip_accents": null,
58
+ "tokenize_chinese_chars": true,
59
+ "tokenizer_class": "BertTokenizer",
60
+ "truncation_side": "right",
61
+ "truncation_strategy": "longest_first",
62
+ "unk_token": "[UNK]"
63
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff