Gonalb commited on
Commit
bfdcee3
·
verified ·
1 Parent(s): 0c61ad3

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,677 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - sentence-transformers
4
+ - sentence-similarity
5
+ - feature-extraction
6
+ - generated_from_trainer
7
+ - dataset_size:400
8
+ - loss:MatryoshkaLoss
9
+ - loss:MultipleNegativesRankingLoss
10
+ base_model: Snowflake/snowflake-arctic-embed-l
11
+ widget:
12
+ - source_sentence: 'QUESTION #2: What percentage of patients in the study reported
13
+ experiencing "chills" and "feverish discomfort"?'
14
+ sentences:
15
+ - "been proven superior. Annual influenza vaccination is recommended for all people\
16
+ \ six months and older who do not have \ncontraindications. ( Am Fam Physician.\
17
+ \ 2019; 100(12):751-758. Copyright © 2019 American Academy of Family Physicians.)\n\
18
+ BEST PRACTICES IN INFECTIOUS DISEASE \nRecommendations from the Choosing \nWisely\
19
+ \ Campaign\nRecommendation Sponsoring organization\nDo not routinely avoid \n\
20
+ influenza vaccination in \negg-allergic patients.\nAmerican Academy of Allergy,\
21
+ \ \nAsthma, and Immunology\nSource: For more information on the Choosing Wisely\
22
+ \ Campaign,"
23
+ - 'Review
24
+
25
+ 722 Vol 5 November 2005
26
+
27
+ accompanied by fever and some subjects have a transient
28
+
29
+ fall in body temperature during the early stages of
30
+
31
+ common cold. In a study of 272 patients with sore throat
32
+
33
+ associated with URTIs, the mean aural temperature was
34
+
35
+ 36·8ºC and around 35% of these patients said they were
36
+
37
+ suffering from “chills” and “feverish discomfort”.49 The
38
+
39
+ sensation of chilliness may be unrelated to any change in
40
+
41
+ skin or body temperature. In a study of human
42
+
43
+ volunteers, a sensation of chill still develops on
44
+
45
+ administration of exogenous pyrogen even though the'
46
+ - "ered when the results will modify management or when a \npatient with signs or\
47
+ \ symptoms of influenza is hospitalized.19 \nTABLE 2\nComplications of Influenza\n\
48
+ Cardiovascular 26\nCerebrovascular accidents\nIschemic heart disease\nMyocarditis\n\
49
+ Hematologic 26\nHemolytic uremic syndrome\nHemophagocytic syndrome\nThrombotic\
50
+ \ thrombocytope -\nnic purpura\nMusculoskeletal 19,26\nMyositis\nRhabdomyolysis\n\
51
+ Neurologic 26\nAcute disseminated \nencephalomyelitis\nEncephalitis\nGuillain-Barré\
52
+ \ syndrome\nPostinfluenza encephalopathy \n(neurologic symptoms occur -\nring\
53
+ \ after resolution but within"
54
+ - source_sentence: How do cytokines interact with the body's systems to influence
55
+ the hypothalamus and affect body temperature?
56
+ sentences:
57
+ - 'interleukin 1, interleukin 6, and tumour necrosis factor
58
+
59
+ alpha, as well as the anti-inflammatory cytokines
60
+
61
+ interleukin-1 receptor antagonist and interleukin 10
62
+
63
+ have been investigated for their pyrogenic or antipyretic
64
+
65
+ action.17 Interleukin 1 and interleukin 6 are believed to
66
+
67
+ be the most important cytokines that induce fever. 55
68
+
69
+ Cytokines are believed to cross the blood–brain barrier
70
+
71
+ or interact with the vagus nerve endings to signal the
72
+
73
+ temperature control centre of the hypothalamus to
74
+
75
+ increase the thermal set point.55,56 The hypothalamus
76
+
77
+ then initiates shivering, constriction of skin blood'
78
+ - "mended human dose; possible \nrisk of embryo-fetal toxicity with \ncontinuous\
79
+ \ intravenous infusion \nbased on limited animal data\nBaloxavir (Xofluza), \n\
80
+ available as oral \ntablets\nNA ($160) Adults and children 12 years \nand older:\
81
+ \ \n88 to 174 lb (40 to 79 kg): \nsingle dose of 40 mg \n≥ 175 lb (80 kg):\
82
+ \ single dose \nof 80 mg\nTreatment of uncom-\nplicated acute \ninfluenza in\
83
+ \ patients \n12 years and older who \nhave been symptom -\natic for no more than\
84
+ \ \n48 hours\nContraindicated in people with \na history of hypersensitivity to\
85
+ \ \nbaloxavir or any component of the \nproduct"
86
+ - "CME This clinical content conforms to AAFP criteria for con-\ntinuing medical\
87
+ \ education (CME). See CME Quiz on page 271.\nAuthor disclosure: No relevant\
88
+ \ financial affiliations.\nPatient information: Handouts on this topic, written\
89
+ \ by the \nauthors of this article, are available at https:// www.aafp.org/\n\
90
+ afp/2019/0901/p281-s1.html and https:// www.aafp.org/\nafp/2019/0901/p281-s2.html.\n\
91
+ Acute upper respiratory tract infections are extremely common in adults and children,\
92
+ \ but only a few safe and effective treat-"
93
+ - source_sentence: What are the limitations of using adamantanes (amantadine and rimantadine)
94
+ for influenza treatment according to the context?
95
+ sentences:
96
+ - "December 15, 2019 ◆ Volume 100, Number 12 www.aafp.org/afp American Family Physician\
97
+ \ 755\nINFLUENZA\nClinicians caring for high-risk patients can also be consid\
98
+ \ -\nered for treatment.28\nFour antiviral drugs have been approved for the treat\
99
+ \ -\nment of influenza (Table 4): the NA inhibitors oseltamivir \n(Tamiflu),\
100
+ \ zanamivir (Relenza), and peramivir (Rapivab), \nand the cap-dependent endonuclease\
101
+ \ inhibitor baloxa -\nvir (Xofluza). 18,37 Any of these agents can be used in\
102
+ \ age- \nappropriate, otherwise healthy outpatients with uncom -\nplicated influenza\
103
+ \ and no contraindications. 18 Baloxavir is"
104
+ - "756 American Family Physician www.aafp.org/afp Volume 100, Number 12 ◆ December\
105
+ \ 15, 2019\nINFLUENZA\nthe risk of bronchospasm. 18,28 Adamantanes (amantadine\
106
+ \ \nand rimantadine [Flumadine]) are approved for influenza \ntreatment but are\
107
+ \ not currently recommended. These med -\nications are not active against influenza\
108
+ \ B, and most influ -\nenza A strains have shown adamantane resistance for the\
109
+ \ \npast 10 years.18\nThere is no demonstrated benefit to treating patients \n\
110
+ with more than one antiviral agent or using higher than \nrecommended dosages.\
111
+ \ 28 However, extended treatment"
112
+ - "distress syndrome\nDiffuse alveolar \nhemorrhage\nHypoxic respiratory \nfailure\n\
113
+ Primary viral pneumonia\nSecondary bacterial \npneumonia\nRenal 26\nAcute kidney\
114
+ \ injury \n(e.g., acute tubulo- \ninterstitial nephritis, \nglomerulonephritis,\
115
+ \ \nminimal change disease)\nMultiorgan failure\nInformation from references 8,\
116
+ \ 19, and 25-27.\nSORT: KEY RECOMMENDATIONS FOR PRACTICE\nClinical recommendation\n\
117
+ Evidence \nrating Comments\nAnnual influenza vaccination is recommended for all\
118
+ \ people 6 months and older. 15,16 A Reports of expert committees"
119
+ - source_sentence: Which symptoms of colds and flu are now better understood due to
120
+ new knowledge in molecular biology?
121
+ sentences:
122
+ - 'mechanisms that generate the familiar symptoms is poor compared with the amount
123
+ of knowledge available on the
124
+
125
+ molecular biology of the viruses involved. New knowledge of the effects of cytokines
126
+ in human beings now helps to
127
+
128
+ explain some of the symptoms of colds and flu that were previously in the realm
129
+ of folklore rather than medicine—
130
+
131
+ eg, fever, anorexia, malaise, chilliness, headache, and muscle aches and pains.
132
+ The mechanisms of symptoms of
133
+
134
+ sore throat, rhinorrhoea, sneezing, nasal congestion, cough, watery eyes, and
135
+ sinus pain are discussed, since these'
136
+ - 'medicines such as ipratropium. These studies have
137
+
138
+ demonstrated that nasal secretions in the first 4 days of a
139
+
140
+ common cold are inhibited by intranasal administration
141
+
142
+ of ipratropium.25 The nasal discharge also consists of a
143
+
144
+ protein-rich plasma exudate derived from subepithelial
145
+
146
+ capillaries,28 which may explain why anticholinergics
147
+
148
+ only partly inhibit nasal discharge associated with
149
+
150
+ URTIs.27
151
+
152
+ The colour of nasal discharge and sputum is often
153
+
154
+ used as a clinical marker to determine whether or not to
155
+
156
+ prescribe antibiotics but there is no evidence from the'
157
+ - "ing diffuse alveolar hemorrhage in immunocompetent patients: a state-\nof-the-art\
158
+ \ review. Lung. 2013; 191(1): 9-18.\n 28. Uyeki TM, Bernstein HH, Bradley JS,\
159
+ \ et al. Clinical practice guidelines by \nthe Infectious Diseases Society of\
160
+ \ America: 2018 update on diagnosis, \ntreatment, chemoprophylaxis, and institutional\
161
+ \ outbreak management \nof seasonal influenza. Clin Infect Dis. 2019; 68(6): 895-902.\n\
162
+ \ 29. Ebell MH, Afonso AM, Gonzales R, et al. Development and validation of \n\
163
+ a clinical decision rule for the diagnosis of influenza. J Am Board Fam \nMed.\
164
+ \ 2012; 25(1): 55-62."
165
+ - source_sentence: 'QUESTION #2: How does the sneeze centre in the brainstem coordinate
166
+ the actions involved in sneezing?'
167
+ sentences:
168
+ - "stroke, seizure disorder, dementia)\nAsthma or other chronic pulmonary disease\n\
169
+ Chronic kidney disease\nChronic liver disease\nHeart disease (acquired or congenital)\n\
170
+ Immunosuppression (e.g., HIV infection, cancer, transplant \nrecipients, use of\
171
+ \ immunosuppressive medications)\nLong-term aspirin therapy in patients younger\
172
+ \ than 19 years\nMetabolic disorders (acquired [e.g., diabetes mellitus] or \n\
173
+ inherited [e.g., mitochondrial disorders])\nMorbid obesity\nSickle cell anemia\
174
+ \ and other hemoglobinopathies\nSpecial groups\nAdults 65 years and older\nAmerican\
175
+ \ Indians and Alaska Natives"
176
+ - 'causes sneezing.23 The trigeminal nerves relay
177
+
178
+ information to the sneeze centre in the brainstem and
179
+
180
+ cause reflex activation of motor and parasympathetic
181
+
182
+ branches of the facial nerve and activate respiratory
183
+
184
+ muscles. A model of the sneeze reflex is illustrated in
185
+
186
+ figure 1. The sneeze centre coordinates the inspiratory
187
+
188
+ and expiratory actions of sneezing via respiratory
189
+
190
+ muscles, and lacrimation and nasal congestion via
191
+
192
+ parasympathetic branches of the facial nerve. The eyes
193
+
194
+ are always closed during sneezing by activation of facial
195
+
196
+ muscles, indicating a close relation between the'
197
+ - 'during experimental rhinovirus infections have not
198
+
199
+ been able to find any morphological changes in the
200
+
201
+ nasal epithelium of infected volunteers, apart from a
202
+
203
+ substantial increase in polymorphonuclear leucocytes
204
+
205
+ early in the course of the infection.11 The major cell
206
+
207
+ monitoring the host for the invasion of pathogens is
208
+
209
+ the macrophage, which has the ability to trigger an
210
+
211
+ acute phase response when stimulated with
212
+
213
+ components of viruses or bacteria—eg, viral RNA and
214
+
215
+ bacterial cell wall components.12 The surface of the
216
+
217
+ macrophage exhibits toll-like receptors that combine'
218
+ pipeline_tag: sentence-similarity
219
+ library_name: sentence-transformers
220
+ metrics:
221
+ - cosine_accuracy@1
222
+ - cosine_accuracy@3
223
+ - cosine_accuracy@5
224
+ - cosine_accuracy@10
225
+ - cosine_precision@1
226
+ - cosine_precision@3
227
+ - cosine_precision@5
228
+ - cosine_precision@10
229
+ - cosine_recall@1
230
+ - cosine_recall@3
231
+ - cosine_recall@5
232
+ - cosine_recall@10
233
+ - cosine_ndcg@10
234
+ - cosine_mrr@10
235
+ - cosine_map@100
236
+ model-index:
237
+ - name: SentenceTransformer based on Snowflake/snowflake-arctic-embed-l
238
+ results:
239
+ - task:
240
+ type: information-retrieval
241
+ name: Information Retrieval
242
+ dataset:
243
+ name: Unknown
244
+ type: unknown
245
+ metrics:
246
+ - type: cosine_accuracy@1
247
+ value: 0.6122448979591837
248
+ name: Cosine Accuracy@1
249
+ - type: cosine_accuracy@3
250
+ value: 0.8877551020408163
251
+ name: Cosine Accuracy@3
252
+ - type: cosine_accuracy@5
253
+ value: 0.9387755102040817
254
+ name: Cosine Accuracy@5
255
+ - type: cosine_accuracy@10
256
+ value: 0.9897959183673469
257
+ name: Cosine Accuracy@10
258
+ - type: cosine_precision@1
259
+ value: 0.6122448979591837
260
+ name: Cosine Precision@1
261
+ - type: cosine_precision@3
262
+ value: 0.29591836734693877
263
+ name: Cosine Precision@3
264
+ - type: cosine_precision@5
265
+ value: 0.1877551020408163
266
+ name: Cosine Precision@5
267
+ - type: cosine_precision@10
268
+ value: 0.09897959183673469
269
+ name: Cosine Precision@10
270
+ - type: cosine_recall@1
271
+ value: 0.6122448979591837
272
+ name: Cosine Recall@1
273
+ - type: cosine_recall@3
274
+ value: 0.8877551020408163
275
+ name: Cosine Recall@3
276
+ - type: cosine_recall@5
277
+ value: 0.9387755102040817
278
+ name: Cosine Recall@5
279
+ - type: cosine_recall@10
280
+ value: 0.9897959183673469
281
+ name: Cosine Recall@10
282
+ - type: cosine_ndcg@10
283
+ value: 0.8165441473931409
284
+ name: Cosine Ndcg@10
285
+ - type: cosine_mrr@10
286
+ value: 0.7593091998704244
287
+ name: Cosine Mrr@10
288
+ - type: cosine_map@100
289
+ value: 0.7600380628441854
290
+ name: Cosine Map@100
291
+ ---
292
+
293
+ # SentenceTransformer based on Snowflake/snowflake-arctic-embed-l
294
+
295
+ 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.
296
+
297
+ ## Model Details
298
+
299
+ ### Model Description
300
+ - **Model Type:** Sentence Transformer
301
+ - **Base model:** [Snowflake/snowflake-arctic-embed-l](https://huggingface.co/Snowflake/snowflake-arctic-embed-l) <!-- at revision d8fb21ca8d905d2832ee8b96c894d3298964346b -->
302
+ - **Maximum Sequence Length:** 512 tokens
303
+ - **Output Dimensionality:** 1024 dimensions
304
+ - **Similarity Function:** Cosine Similarity
305
+ <!-- - **Training Dataset:** Unknown -->
306
+ <!-- - **Language:** Unknown -->
307
+ <!-- - **License:** Unknown -->
308
+
309
+ ### Model Sources
310
+
311
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
312
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
313
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
314
+
315
+ ### Full Model Architecture
316
+
317
+ ```
318
+ SentenceTransformer(
319
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: BertModel
320
+ (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})
321
+ (2): Normalize()
322
+ )
323
+ ```
324
+
325
+ ## Usage
326
+
327
+ ### Direct Usage (Sentence Transformers)
328
+
329
+ First install the Sentence Transformers library:
330
+
331
+ ```bash
332
+ pip install -U sentence-transformers
333
+ ```
334
+
335
+ Then you can load this model and run inference.
336
+ ```python
337
+ from sentence_transformers import SentenceTransformer
338
+
339
+ # Download from the 🤗 Hub
340
+ model = SentenceTransformer("Gonalb/flucold-ft-v1")
341
+ # Run inference
342
+ sentences = [
343
+ 'QUESTION #2: How does the sneeze centre in the brainstem coordinate the actions involved in sneezing?',
344
+ 'causes sneezing.23 The trigeminal nerves relay\ninformation to the sneeze centre in the brainstem and\ncause reflex activation of motor and parasympathetic\nbranches of the facial nerve and activate respiratory\nmuscles. A model of the sneeze reflex is illustrated in\nfigure 1. The sneeze centre coordinates the inspiratory\nand expiratory actions of sneezing via respiratory\nmuscles, and lacrimation and nasal congestion via\nparasympathetic branches of the facial nerve. The eyes\nare always closed during sneezing by activation of facial\nmuscles, indicating a close relation between the',
345
+ 'stroke, seizure disorder, dementia)\nAsthma or other chronic pulmonary disease\nChronic kidney disease\nChronic liver disease\nHeart disease (acquired or congenital)\nImmunosuppression (e.g., HIV infection, cancer, transplant \nrecipients, use of immunosuppressive medications)\nLong-term aspirin therapy in patients younger than 19 years\nMetabolic disorders (acquired [e.g., diabetes mellitus] or \ninherited [e.g., mitochondrial disorders])\nMorbid obesity\nSickle cell anemia and other hemoglobinopathies\nSpecial groups\nAdults 65 years and older\nAmerican Indians and Alaska Natives',
346
+ ]
347
+ embeddings = model.encode(sentences)
348
+ print(embeddings.shape)
349
+ # [3, 1024]
350
+
351
+ # Get the similarity scores for the embeddings
352
+ similarities = model.similarity(embeddings, embeddings)
353
+ print(similarities.shape)
354
+ # [3, 3]
355
+ ```
356
+
357
+ <!--
358
+ ### Direct Usage (Transformers)
359
+
360
+ <details><summary>Click to see the direct usage in Transformers</summary>
361
+
362
+ </details>
363
+ -->
364
+
365
+ <!--
366
+ ### Downstream Usage (Sentence Transformers)
367
+
368
+ You can finetune this model on your own dataset.
369
+
370
+ <details><summary>Click to expand</summary>
371
+
372
+ </details>
373
+ -->
374
+
375
+ <!--
376
+ ### Out-of-Scope Use
377
+
378
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
379
+ -->
380
+
381
+ ## Evaluation
382
+
383
+ ### Metrics
384
+
385
+ #### Information Retrieval
386
+
387
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
388
+
389
+ | Metric | Value |
390
+ |:--------------------|:-----------|
391
+ | cosine_accuracy@1 | 0.6122 |
392
+ | cosine_accuracy@3 | 0.8878 |
393
+ | cosine_accuracy@5 | 0.9388 |
394
+ | cosine_accuracy@10 | 0.9898 |
395
+ | cosine_precision@1 | 0.6122 |
396
+ | cosine_precision@3 | 0.2959 |
397
+ | cosine_precision@5 | 0.1878 |
398
+ | cosine_precision@10 | 0.099 |
399
+ | cosine_recall@1 | 0.6122 |
400
+ | cosine_recall@3 | 0.8878 |
401
+ | cosine_recall@5 | 0.9388 |
402
+ | cosine_recall@10 | 0.9898 |
403
+ | **cosine_ndcg@10** | **0.8165** |
404
+ | cosine_mrr@10 | 0.7593 |
405
+ | cosine_map@100 | 0.76 |
406
+
407
+ <!--
408
+ ## Bias, Risks and Limitations
409
+
410
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
411
+ -->
412
+
413
+ <!--
414
+ ### Recommendations
415
+
416
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
417
+ -->
418
+
419
+ ## Training Details
420
+
421
+ ### Training Dataset
422
+
423
+ #### Unnamed Dataset
424
+
425
+ * Size: 400 training samples
426
+ * Columns: <code>sentence_0</code> and <code>sentence_1</code>
427
+ * Approximate statistics based on the first 400 samples:
428
+ | | sentence_0 | sentence_1 |
429
+ |:--------|:-----------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------|
430
+ | type | string | string |
431
+ | details | <ul><li>min: 14 tokens</li><li>mean: 24.87 tokens</li><li>max: 53 tokens</li></ul> | <ul><li>min: 44 tokens</li><li>mean: 129.25 tokens</li><li>max: 188 tokens</li></ul> |
432
+ * Samples:
433
+ | sentence_0 | sentence_1 |
434
+ |:----------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
435
+ | <code>What is the recommended age for annual influenza vaccination according to the context?</code> | <code>recommend annual influenza vaccination for all people six <br>months and older who do not have contraindications. 15,16 <br>Vaccination efforts should target people at increased risk of <br>complicated or severe influenza (Table 117-19) and those who <br>care for or live with high-risk individuals, including health <br>care professionals. 15 Two previous FPM articles provided <br>communication strategies and tools for increasing influenza <br>vaccination rates in practice. 20,21<br>Multiple formulations of the influenza vaccine are avail -<br>able, including inactivated influenza vaccines (IIV); a recom-</code> |
436
+ | <code>Who should vaccination efforts specifically target to prevent complicated or severe influenza?</code> | <code>recommend annual influenza vaccination for all people six <br>months and older who do not have contraindications. 15,16 <br>Vaccination efforts should target people at increased risk of <br>complicated or severe influenza (Table 117-19) and those who <br>care for or live with high-risk individuals, including health <br>care professionals. 15 Two previous FPM articles provided <br>communication strategies and tools for increasing influenza <br>vaccination rates in practice. 20,21<br>Multiple formulations of the influenza vaccine are avail -<br>able, including inactivated influenza vaccines (IIV); a recom-</code> |
437
+ | <code>What types of studies were included in the search regarding influenza complications and treatment?</code> | <code>enza complications American Indians, influenza treatment, and <br>influenza universal vaccine. The search included meta-analyses, <br>randomized controlled trials, clinical trials, and reviews. Search <br>dates: December 1, 2018, to October 5, 2019.<br>The Authors<br>DAVID Y. GAITONDE, MD, is a core clinical faculty member <br>and chief of endocrinology service at Dwight D. Eisenhower <br>Army Medical Center, Fort Gordon, Ga.<br>CPT. FAITH C. MOORE, USA, MC, is a resident in the Depart -<br>ment of Internal Medicine at Dwight D. Eisenhower Army <br>Medical Center.<br>MAJ. MACKENZIE K. MORGAN, USA, MC, is chief of infec-</code> |
438
+ * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
439
+ ```json
440
+ {
441
+ "loss": "MultipleNegativesRankingLoss",
442
+ "matryoshka_dims": [
443
+ 768,
444
+ 512,
445
+ 256,
446
+ 128,
447
+ 64
448
+ ],
449
+ "matryoshka_weights": [
450
+ 1,
451
+ 1,
452
+ 1,
453
+ 1,
454
+ 1
455
+ ],
456
+ "n_dims_per_step": -1
457
+ }
458
+ ```
459
+
460
+ ### Training Hyperparameters
461
+ #### Non-Default Hyperparameters
462
+
463
+ - `eval_strategy`: steps
464
+ - `per_device_train_batch_size`: 10
465
+ - `per_device_eval_batch_size`: 10
466
+ - `num_train_epochs`: 10
467
+ - `multi_dataset_batch_sampler`: round_robin
468
+
469
+ #### All Hyperparameters
470
+ <details><summary>Click to expand</summary>
471
+
472
+ - `overwrite_output_dir`: False
473
+ - `do_predict`: False
474
+ - `eval_strategy`: steps
475
+ - `prediction_loss_only`: True
476
+ - `per_device_train_batch_size`: 10
477
+ - `per_device_eval_batch_size`: 10
478
+ - `per_gpu_train_batch_size`: None
479
+ - `per_gpu_eval_batch_size`: None
480
+ - `gradient_accumulation_steps`: 1
481
+ - `eval_accumulation_steps`: None
482
+ - `torch_empty_cache_steps`: None
483
+ - `learning_rate`: 5e-05
484
+ - `weight_decay`: 0.0
485
+ - `adam_beta1`: 0.9
486
+ - `adam_beta2`: 0.999
487
+ - `adam_epsilon`: 1e-08
488
+ - `max_grad_norm`: 1
489
+ - `num_train_epochs`: 10
490
+ - `max_steps`: -1
491
+ - `lr_scheduler_type`: linear
492
+ - `lr_scheduler_kwargs`: {}
493
+ - `warmup_ratio`: 0.0
494
+ - `warmup_steps`: 0
495
+ - `log_level`: passive
496
+ - `log_level_replica`: warning
497
+ - `log_on_each_node`: True
498
+ - `logging_nan_inf_filter`: True
499
+ - `save_safetensors`: True
500
+ - `save_on_each_node`: False
501
+ - `save_only_model`: False
502
+ - `restore_callback_states_from_checkpoint`: False
503
+ - `no_cuda`: False
504
+ - `use_cpu`: False
505
+ - `use_mps_device`: False
506
+ - `seed`: 42
507
+ - `data_seed`: None
508
+ - `jit_mode_eval`: False
509
+ - `use_ipex`: False
510
+ - `bf16`: False
511
+ - `fp16`: False
512
+ - `fp16_opt_level`: O1
513
+ - `half_precision_backend`: auto
514
+ - `bf16_full_eval`: False
515
+ - `fp16_full_eval`: False
516
+ - `tf32`: None
517
+ - `local_rank`: 0
518
+ - `ddp_backend`: None
519
+ - `tpu_num_cores`: None
520
+ - `tpu_metrics_debug`: False
521
+ - `debug`: []
522
+ - `dataloader_drop_last`: False
523
+ - `dataloader_num_workers`: 0
524
+ - `dataloader_prefetch_factor`: None
525
+ - `past_index`: -1
526
+ - `disable_tqdm`: False
527
+ - `remove_unused_columns`: True
528
+ - `label_names`: None
529
+ - `load_best_model_at_end`: False
530
+ - `ignore_data_skip`: False
531
+ - `fsdp`: []
532
+ - `fsdp_min_num_params`: 0
533
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
534
+ - `fsdp_transformer_layer_cls_to_wrap`: None
535
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
536
+ - `deepspeed`: None
537
+ - `label_smoothing_factor`: 0.0
538
+ - `optim`: adamw_torch
539
+ - `optim_args`: None
540
+ - `adafactor`: False
541
+ - `group_by_length`: False
542
+ - `length_column_name`: length
543
+ - `ddp_find_unused_parameters`: None
544
+ - `ddp_bucket_cap_mb`: None
545
+ - `ddp_broadcast_buffers`: False
546
+ - `dataloader_pin_memory`: True
547
+ - `dataloader_persistent_workers`: False
548
+ - `skip_memory_metrics`: True
549
+ - `use_legacy_prediction_loop`: False
550
+ - `push_to_hub`: False
551
+ - `resume_from_checkpoint`: None
552
+ - `hub_model_id`: None
553
+ - `hub_strategy`: every_save
554
+ - `hub_private_repo`: None
555
+ - `hub_always_push`: False
556
+ - `gradient_checkpointing`: False
557
+ - `gradient_checkpointing_kwargs`: None
558
+ - `include_inputs_for_metrics`: False
559
+ - `include_for_metrics`: []
560
+ - `eval_do_concat_batches`: True
561
+ - `fp16_backend`: auto
562
+ - `push_to_hub_model_id`: None
563
+ - `push_to_hub_organization`: None
564
+ - `mp_parameters`:
565
+ - `auto_find_batch_size`: False
566
+ - `full_determinism`: False
567
+ - `torchdynamo`: None
568
+ - `ray_scope`: last
569
+ - `ddp_timeout`: 1800
570
+ - `torch_compile`: False
571
+ - `torch_compile_backend`: None
572
+ - `torch_compile_mode`: None
573
+ - `dispatch_batches`: None
574
+ - `split_batches`: None
575
+ - `include_tokens_per_second`: False
576
+ - `include_num_input_tokens_seen`: False
577
+ - `neftune_noise_alpha`: None
578
+ - `optim_target_modules`: None
579
+ - `batch_eval_metrics`: False
580
+ - `eval_on_start`: False
581
+ - `use_liger_kernel`: False
582
+ - `eval_use_gather_object`: False
583
+ - `average_tokens_across_devices`: False
584
+ - `prompts`: None
585
+ - `batch_sampler`: batch_sampler
586
+ - `multi_dataset_batch_sampler`: round_robin
587
+
588
+ </details>
589
+
590
+ ### Training Logs
591
+ | Epoch | Step | cosine_ndcg@10 |
592
+ |:-----:|:----:|:--------------:|
593
+ | 1.0 | 40 | 0.8359 |
594
+ | 1.25 | 50 | 0.8312 |
595
+ | 2.0 | 80 | 0.8304 |
596
+ | 2.5 | 100 | 0.8156 |
597
+ | 3.0 | 120 | 0.8016 |
598
+ | 3.75 | 150 | 0.7952 |
599
+ | 4.0 | 160 | 0.7880 |
600
+ | 5.0 | 200 | 0.8021 |
601
+ | 6.0 | 240 | 0.8215 |
602
+ | 6.25 | 250 | 0.8286 |
603
+ | 7.0 | 280 | 0.8079 |
604
+ | 7.5 | 300 | 0.8043 |
605
+ | 8.0 | 320 | 0.8126 |
606
+ | 8.75 | 350 | 0.8099 |
607
+ | 9.0 | 360 | 0.8126 |
608
+ | 10.0 | 400 | 0.8165 |
609
+
610
+
611
+ ### Framework Versions
612
+ - Python: 3.11.11
613
+ - Sentence Transformers: 3.4.1
614
+ - Transformers: 4.48.3
615
+ - PyTorch: 2.5.1+cu124
616
+ - Accelerate: 1.3.0
617
+ - Datasets: 3.3.2
618
+ - Tokenizers: 0.21.0
619
+
620
+ ## Citation
621
+
622
+ ### BibTeX
623
+
624
+ #### Sentence Transformers
625
+ ```bibtex
626
+ @inproceedings{reimers-2019-sentence-bert,
627
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
628
+ author = "Reimers, Nils and Gurevych, Iryna",
629
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
630
+ month = "11",
631
+ year = "2019",
632
+ publisher = "Association for Computational Linguistics",
633
+ url = "https://arxiv.org/abs/1908.10084",
634
+ }
635
+ ```
636
+
637
+ #### MatryoshkaLoss
638
+ ```bibtex
639
+ @misc{kusupati2024matryoshka,
640
+ title={Matryoshka Representation Learning},
641
+ 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},
642
+ year={2024},
643
+ eprint={2205.13147},
644
+ archivePrefix={arXiv},
645
+ primaryClass={cs.LG}
646
+ }
647
+ ```
648
+
649
+ #### MultipleNegativesRankingLoss
650
+ ```bibtex
651
+ @misc{henderson2017efficient,
652
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
653
+ 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},
654
+ year={2017},
655
+ eprint={1705.00652},
656
+ archivePrefix={arXiv},
657
+ primaryClass={cs.CL}
658
+ }
659
+ ```
660
+
661
+ <!--
662
+ ## Glossary
663
+
664
+ *Clearly define terms in order to be accessible across audiences.*
665
+ -->
666
+
667
+ <!--
668
+ ## Model Card Authors
669
+
670
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
671
+ -->
672
+
673
+ <!--
674
+ ## Model Card Contact
675
+
676
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
677
+ -->
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.48.3",
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.48.3",
5
+ "pytorch": "2.5.1+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:4a53e8e3ff3653033059dd70347c211845c2612fb2f788b51fe92b4477d9fe9d
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