tomaarsen HF Staff commited on
Commit
8394835
·
verified ·
1 Parent(s): a90d14e

Add new CrossEncoder model

Browse files
README.md ADDED
@@ -0,0 +1,500 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ tags:
5
+ - sentence-transformers
6
+ - cross-encoder
7
+ - generated_from_trainer
8
+ - dataset_size:78704
9
+ - loss:ApproxDiscountedRankMSE
10
+ base_model: microsoft/MiniLM-L12-H384-uncased
11
+ datasets:
12
+ - microsoft/ms_marco
13
+ pipeline_tag: text-ranking
14
+ library_name: sentence-transformers
15
+ metrics:
16
+ - map
17
+ - mrr@10
18
+ - ndcg@10
19
+ co2_eq_emissions:
20
+ emissions: 88.47197743109928
21
+ energy_consumed: 0.22760875280060117
22
+ source: codecarbon
23
+ training_type: fine-tuning
24
+ on_cloud: false
25
+ cpu_model: 13th Gen Intel(R) Core(TM) i7-13700K
26
+ ram_total_size: 31.777088165283203
27
+ hours_used: 0.737
28
+ hardware_used: 1 x NVIDIA GeForce RTX 3090
29
+ model-index:
30
+ - name: CrossEncoder based on microsoft/MiniLM-L12-H384-uncased
31
+ results:
32
+ - task:
33
+ type: cross-encoder-reranking
34
+ name: Cross Encoder Reranking
35
+ dataset:
36
+ name: NanoMSMARCO R100
37
+ type: NanoMSMARCO_R100
38
+ metrics:
39
+ - type: map
40
+ value: 0.4876
41
+ name: Map
42
+ - type: mrr@10
43
+ value: 0.4745
44
+ name: Mrr@10
45
+ - type: ndcg@10
46
+ value: 0.5433
47
+ name: Ndcg@10
48
+ - task:
49
+ type: cross-encoder-reranking
50
+ name: Cross Encoder Reranking
51
+ dataset:
52
+ name: NanoNFCorpus R100
53
+ type: NanoNFCorpus_R100
54
+ metrics:
55
+ - type: map
56
+ value: 0.33
57
+ name: Map
58
+ - type: mrr@10
59
+ value: 0.6007
60
+ name: Mrr@10
61
+ - type: ndcg@10
62
+ value: 0.3697
63
+ name: Ndcg@10
64
+ - task:
65
+ type: cross-encoder-reranking
66
+ name: Cross Encoder Reranking
67
+ dataset:
68
+ name: NanoNQ R100
69
+ type: NanoNQ_R100
70
+ metrics:
71
+ - type: map
72
+ value: 0.5727
73
+ name: Map
74
+ - type: mrr@10
75
+ value: 0.5849
76
+ name: Mrr@10
77
+ - type: ndcg@10
78
+ value: 0.6352
79
+ name: Ndcg@10
80
+ - task:
81
+ type: cross-encoder-nano-beir
82
+ name: Cross Encoder Nano BEIR
83
+ dataset:
84
+ name: NanoBEIR R100 mean
85
+ type: NanoBEIR_R100_mean
86
+ metrics:
87
+ - type: map
88
+ value: 0.4635
89
+ name: Map
90
+ - type: mrr@10
91
+ value: 0.5534
92
+ name: Mrr@10
93
+ - type: ndcg@10
94
+ value: 0.516
95
+ name: Ndcg@10
96
+ ---
97
+
98
+ # CrossEncoder based on microsoft/MiniLM-L12-H384-uncased
99
+
100
+ This is a [Cross Encoder](https://www.sbert.net/docs/cross_encoder/usage/usage.html) model finetuned from [microsoft/MiniLM-L12-H384-uncased](https://huggingface.co/microsoft/MiniLM-L12-H384-uncased) on the [ms_marco](https://huggingface.co/datasets/microsoft/ms_marco) dataset using the [sentence-transformers](https://www.SBERT.net) library. It computes scores for pairs of texts, which can be used for text reranking and semantic search.
101
+
102
+ ## Model Details
103
+
104
+ ### Model Description
105
+ - **Model Type:** Cross Encoder
106
+ - **Base model:** [microsoft/MiniLM-L12-H384-uncased](https://huggingface.co/microsoft/MiniLM-L12-H384-uncased) <!-- at revision 44acabbec0ef496f6dbc93adadea57f376b7c0ec -->
107
+ - **Maximum Sequence Length:** 512 tokens
108
+ - **Number of Output Labels:** 1 label
109
+ - **Training Dataset:**
110
+ - [ms_marco](https://huggingface.co/datasets/microsoft/ms_marco)
111
+ - **Language:** en
112
+ <!-- - **License:** Unknown -->
113
+
114
+ ### Model Sources
115
+
116
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
117
+ - **Documentation:** [Cross Encoder Documentation](https://www.sbert.net/docs/cross_encoder/usage/usage.html)
118
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
119
+ - **Hugging Face:** [Cross Encoders on Hugging Face](https://huggingface.co/models?library=sentence-transformers&other=cross-encoder)
120
+
121
+ ## Usage
122
+
123
+ ### Direct Usage (Sentence Transformers)
124
+
125
+ First install the Sentence Transformers library:
126
+
127
+ ```bash
128
+ pip install -U sentence-transformers
129
+ ```
130
+
131
+ Then you can load this model and run inference.
132
+ ```python
133
+ from sentence_transformers import CrossEncoder
134
+
135
+ # Download from the 🤗 Hub
136
+ model = CrossEncoder("tomaarsen/reranker-msmarco-v1.1-MiniLM-L12-H384-uncased-adrmse")
137
+ # Get scores for pairs of texts
138
+ pairs = [
139
+ ['define monogenic trait', 'An allele is a version of a gene. For example, in fruitflies there is a gene which determines eye colour: one allele gives red eyes, and another gives white eyes; it is the same *gene*, just different versions of that gene. A monogenic trait is one which is encoded by a single gene. e.g. - cystic fibrosis in humans. There is a single gene which determines this trait: the wild-type allele is healthy, while the disease allele gives you cystic fibrosis'],
140
+ ['define monogenic trait', 'Abstract. Monogenic inheritance refers to genetic control of a phenotype or trait by a single gene. For a monogenic trait, mutations in one (dominant) or both (recessive) copies of the gene are sufficient for the trait to be expressed. Digenic inheritance refers to mutation on two genes interacting to cause a genetic phenotype or disease. Triallelic inheritance is a special case of digenic inheritance that requires homozygous mutations at one locus and heterozygous mutations at a second locus to express a phenotype.'],
141
+ ['define monogenic trait', 'A trait that is controlled by a group of nonallelic genes. Supplement. Polygenic traits are controlled by two or more than two genes (usually by many different genes) at different loci on different chromosomes. These genes are described as polygenes.'],
142
+ ['define monogenic trait', "Monogenic Disorders (Single Abnormal Gene). Monogenic autosomal dominant disorders occur through the inheritance of a single copy of a defective gene. These disorders are the result of a single defective gene on the autosomes. They are inherited according to Mendel's Laws (Mendelian disorders). The mutation can be spontaneous and where there is no previous family history. Inheritance patterns can be autosomal dominant, autosomal recessive or X-linked recessive."],
143
+ ['define monogenic trait', 'Adj. 1. monogenic-of or relating to an inheritable character that is controlled by a single pair of genes. genetic science, genetics-the branch of biology that studies heredity and variation in organisms. heritable, inheritable-capable of being inherited; inheritable traits such as eye color; an inheritable title. monogenic. adj. 1. (Genetics) genetics of or relating to an inherited character difference that is controlled by a single gene. 2. (Biology) (of animals) producing offspring of one sex. (ˌmɒn əˈdʒɛn ɪk).'],
144
+ ]
145
+ scores = model.predict(pairs)
146
+ print(scores.shape)
147
+ # (5,)
148
+
149
+ # Or rank different texts based on similarity to a single text
150
+ ranks = model.rank(
151
+ 'define monogenic trait',
152
+ [
153
+ 'An allele is a version of a gene. For example, in fruitflies there is a gene which determines eye colour: one allele gives red eyes, and another gives white eyes; it is the same *gene*, just different versions of that gene. A monogenic trait is one which is encoded by a single gene. e.g. - cystic fibrosis in humans. There is a single gene which determines this trait: the wild-type allele is healthy, while the disease allele gives you cystic fibrosis',
154
+ 'Abstract. Monogenic inheritance refers to genetic control of a phenotype or trait by a single gene. For a monogenic trait, mutations in one (dominant) or both (recessive) copies of the gene are sufficient for the trait to be expressed. Digenic inheritance refers to mutation on two genes interacting to cause a genetic phenotype or disease. Triallelic inheritance is a special case of digenic inheritance that requires homozygous mutations at one locus and heterozygous mutations at a second locus to express a phenotype.',
155
+ 'A trait that is controlled by a group of nonallelic genes. Supplement. Polygenic traits are controlled by two or more than two genes (usually by many different genes) at different loci on different chromosomes. These genes are described as polygenes.',
156
+ "Monogenic Disorders (Single Abnormal Gene). Monogenic autosomal dominant disorders occur through the inheritance of a single copy of a defective gene. These disorders are the result of a single defective gene on the autosomes. They are inherited according to Mendel's Laws (Mendelian disorders). The mutation can be spontaneous and where there is no previous family history. Inheritance patterns can be autosomal dominant, autosomal recessive or X-linked recessive.",
157
+ 'Adj. 1. monogenic-of or relating to an inheritable character that is controlled by a single pair of genes. genetic science, genetics-the branch of biology that studies heredity and variation in organisms. heritable, inheritable-capable of being inherited; inheritable traits such as eye color; an inheritable title. monogenic. adj. 1. (Genetics) genetics of or relating to an inherited character difference that is controlled by a single gene. 2. (Biology) (of animals) producing offspring of one sex. (ˌmɒn əˈdʒɛn ɪk).',
158
+ ]
159
+ )
160
+ # [{'corpus_id': ..., 'score': ...}, {'corpus_id': ..., 'score': ...}, ...]
161
+ ```
162
+
163
+ <!--
164
+ ### Direct Usage (Transformers)
165
+
166
+ <details><summary>Click to see the direct usage in Transformers</summary>
167
+
168
+ </details>
169
+ -->
170
+
171
+ <!--
172
+ ### Downstream Usage (Sentence Transformers)
173
+
174
+ You can finetune this model on your own dataset.
175
+
176
+ <details><summary>Click to expand</summary>
177
+
178
+ </details>
179
+ -->
180
+
181
+ <!--
182
+ ### Out-of-Scope Use
183
+
184
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
185
+ -->
186
+
187
+ ## Evaluation
188
+
189
+ ### Metrics
190
+
191
+ #### Cross Encoder Reranking
192
+
193
+ * Datasets: `NanoMSMARCO_R100`, `NanoNFCorpus_R100` and `NanoNQ_R100`
194
+ * Evaluated with [<code>CrossEncoderRerankingEvaluator</code>](https://sbert.net/docs/package_reference/cross_encoder/evaluation.html#sentence_transformers.cross_encoder.evaluation.CrossEncoderRerankingEvaluator) with these parameters:
195
+ ```json
196
+ {
197
+ "at_k": 10,
198
+ "always_rerank_positives": true
199
+ }
200
+ ```
201
+
202
+ | Metric | NanoMSMARCO_R100 | NanoNFCorpus_R100 | NanoNQ_R100 |
203
+ |:------------|:---------------------|:---------------------|:---------------------|
204
+ | map | 0.4876 (-0.0020) | 0.3300 (+0.0691) | 0.5727 (+0.1531) |
205
+ | mrr@10 | 0.4745 (-0.0030) | 0.6007 (+0.1009) | 0.5849 (+0.1582) |
206
+ | **ndcg@10** | **0.5433 (+0.0028)** | **0.3697 (+0.0446)** | **0.6352 (+0.1345)** |
207
+
208
+ #### Cross Encoder Nano BEIR
209
+
210
+ * Dataset: `NanoBEIR_R100_mean`
211
+ * Evaluated with [<code>CrossEncoderNanoBEIREvaluator</code>](https://sbert.net/docs/package_reference/cross_encoder/evaluation.html#sentence_transformers.cross_encoder.evaluation.CrossEncoderNanoBEIREvaluator) with these parameters:
212
+ ```json
213
+ {
214
+ "dataset_names": [
215
+ "msmarco",
216
+ "nfcorpus",
217
+ "nq"
218
+ ],
219
+ "rerank_k": 100,
220
+ "at_k": 10,
221
+ "always_rerank_positives": true
222
+ }
223
+ ```
224
+
225
+ | Metric | Value |
226
+ |:------------|:---------------------|
227
+ | map | 0.4635 (+0.0734) |
228
+ | mrr@10 | 0.5534 (+0.0854) |
229
+ | **ndcg@10** | **0.5160 (+0.0607)** |
230
+
231
+ <!--
232
+ ## Bias, Risks and Limitations
233
+
234
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
235
+ -->
236
+
237
+ <!--
238
+ ### Recommendations
239
+
240
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
241
+ -->
242
+
243
+ ## Training Details
244
+
245
+ ### Training Dataset
246
+
247
+ #### ms_marco
248
+
249
+ * Dataset: [ms_marco](https://huggingface.co/datasets/microsoft/ms_marco) at [a47ee7a](https://huggingface.co/datasets/microsoft/ms_marco/tree/a47ee7aae8d7d466ba15f9f0bfac3b3681087b3a)
250
+ * Size: 78,704 training samples
251
+ * Columns: <code>query</code>, <code>docs</code>, and <code>labels</code>
252
+ * Approximate statistics based on the first 1000 samples:
253
+ | | query | docs | labels |
254
+ |:--------|:-----------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------|
255
+ | type | string | list | list |
256
+ | details | <ul><li>min: 11 characters</li><li>mean: 32.93 characters</li><li>max: 95 characters</li></ul> | <ul><li>min: 3 elements</li><li>mean: 6.50 elements</li><li>max: 10 elements</li></ul> | <ul><li>min: 3 elements</li><li>mean: 6.50 elements</li><li>max: 10 elements</li></ul> |
257
+ * Samples:
258
+ | query | docs | labels |
259
+ |:----------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------------------------------|
260
+ | <code>what does vegan mean</code> | <code>['A vegan, a person who practices veganism, is an individual who actively avoids the use of animal products for food, clothing or any other purpose. As with many diets and lifestyles, not all vegans approach animal product avoidance in the same ways. For example, some vegans completely avoid all animal by-products, while others consider it acceptable to use honey, silk, and other by-products produced from insects.', 'Fruitarian: Eats only raw fruit, including raw nuts and seeds. Vegan. Does not eat dairy products, eggs, or any other animal product. So in a nutshell, a vegetarian diet excludes flesh, but includes other animal products: A vegan diet is one that excludes all animal products. And I have to say that I have met very few vegans who stop with what they put in their mouths. ', 'Animal Ingredients and Their Alternatives. Adopting a vegan diet means saying “no” to cruelty to animals and environmental destruction and “yes” to compassion and good health. It also means paying attent...</code> | <code>[1, 0, 0, 0, 0, ...]</code> |
261
+ | <code>difference between viral and bacterial conjunctivitis symptoms</code> | <code>["Viral and bacterial conjunctivitis. Viral conjunctivitis and bacterial conjunctivitis may affect one or both eyes. Viral conjunctivitis usually produces a watery discharge. Bacterial conjunctivitis often produces a thicker, yellow-green discharge. Both types can be associated with colds or symptoms of a respiratory infection, such as a sore throat. Both viral and bacterial types are very contagious. They are spread through direct or indirect contact with the eye secretions of someone who's infected", 'A Honor Society of Nursing (STTI) answered. Viral and bacterial conjunctivitis are similar, but differ in several key ways. First, bacterial conjunctivitis can be cured with antibiotics, while the viral form cannot. Second, there is a slight variation in symptoms. With viral conjunctivitis, the discharge from the eye is clearer and less thick than with the bacterial infection. Viral conjunctivitis can also cause painful swelling in the lymph node nearest the ear, a symptom not experienc...</code> | <code>[1, 0, 0, 0, 0, ...]</code> |
262
+ | <code>can single member llc be taxed as s corp</code> | <code>['A single-member limited liability company, as a solely owned LLC is called, gives the owner a choice of how to be taxed -- as a sole proprietorship, an S corporation or a C corporation. The legal structure of the business itself doesn’t change with any of the choices. Under an S corporation classification, a single-member LLC needs to have a large enough profit in excess of the owner’s salary to realize any tax savings on passive income.', 'An S corp may own up to 100 percent of an LLC, or limited liability company. While all but single-member LLCs cannot be shareholders in S corporations, the reverse -- an S corporation owning an LLC -- is legal. The similarity of tax treatment for S corps and LLCs eliminates most of the common concerns about IRS issues. There is, however, one way for an LLC to own stock in an S corp. A single member LLC, taxed as a sole proprietorship, is called a disregarded entity by the IRS. Treated like an unincorporated individual, this LLC could own stock in ...</code> | <code>[1, 0, 0, 0, 0, ...]</code> |
263
+ * Loss: [<code>ApproxDiscountedRankMSE</code>](https://sbert.net/docs/package_reference/cross_encoder/losses.html#approxdiscountedrankmse)
264
+
265
+ ### Evaluation Dataset
266
+
267
+ #### ms_marco
268
+
269
+ * Dataset: [ms_marco](https://huggingface.co/datasets/microsoft/ms_marco) at [a47ee7a](https://huggingface.co/datasets/microsoft/ms_marco/tree/a47ee7aae8d7d466ba15f9f0bfac3b3681087b3a)
270
+ * Size: 1,000 evaluation samples
271
+ * Columns: <code>query</code>, <code>docs</code>, and <code>labels</code>
272
+ * Approximate statistics based on the first 1000 samples:
273
+ | | query | docs | labels |
274
+ |:--------|:-----------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------|
275
+ | type | string | list | list |
276
+ | details | <ul><li>min: 11 characters</li><li>mean: 33.63 characters</li><li>max: 99 characters</li></ul> | <ul><li>min: 3 elements</li><li>mean: 6.50 elements</li><li>max: 10 elements</li></ul> | <ul><li>min: 3 elements</li><li>mean: 6.50 elements</li><li>max: 10 elements</li></ul> |
277
+ * Samples:
278
+ | query | docs | labels |
279
+ |:----------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------------------------------|
280
+ | <code>define monogenic trait</code> | <code>['An allele is a version of a gene. For example, in fruitflies there is a gene which determines eye colour: one allele gives red eyes, and another gives white eyes; it is the same *gene*, just different versions of that gene. A monogenic trait is one which is encoded by a single gene. e.g. - cystic fibrosis in humans. There is a single gene which determines this trait: the wild-type allele is healthy, while the disease allele gives you cystic fibrosis', 'Abstract. Monogenic inheritance refers to genetic control of a phenotype or trait by a single gene. For a monogenic trait, mutations in one (dominant) or both (recessive) copies of the gene are sufficient for the trait to be expressed. Digenic inheritance refers to mutation on two genes interacting to cause a genetic phenotype or disease. Triallelic inheritance is a special case of digenic inheritance that requires homozygous mutations at one locus and heterozygous mutations at a second locus to express a phenotype.', 'A trait that is ...</code> | <code>[1, 1, 0, 0, 0, ...]</code> |
281
+ | <code>behavioral theory definition</code> | <code>["Not to be confused with Behavioralism. Behaviorism (or behaviourism) is an approach to psychology that focuses on an individual's behavior. It combines elements of philosophy, methodology, and psychological theory", 'The initial assumption is that behavior can be explained and further described using behavioral theories. For instance, John Watson and B.F. Skinner advocate the theory that behavior can be acquired through conditioning. Also known as general behavior theory. BEHAVIOR THEORY: Each behavioral theory is an advantage to learning, because it provides teachers with a new and different approach.. No related posts. ', 'behaviorism. noun be·hav·ior·ism. : a school of psychology that takes the objective evidence of behavior (as measured responses to stimuli) as the only concern of its research and the only basis of its theory without reference to conscious experience—compare cognitive psychology. : a school of psychology that takes the objective evidence of behavior (as measured ...</code> | <code>[1, 0, 0, 0, 0, ...]</code> |
282
+ | <code>What is a disease that is pleiotropic?</code> | <code>['Unsourced material may be challenged and removed. (September 2013). Pleiotropy occurs when one gene influences two or more seemingly unrelated phenotypic traits, an example being phenylketonuria, which is a human disease that affects multiple systems but is caused by one gene defect. Consequently, a mutation in a pleiotropic gene may have an effect on some or all traits simultaneously. The underlying mechanism is that the gene codes for a product that is, for example, used by various cells, or has a signaling function on various targets. A classic example of pleiotropy is the human disease phenylketonuria (PKU).', 'Pleiotropic, autosomal dominant disorder affecting connective tissue: Related Diseases. Pleiotropic, autosomal dominant disorder affecting connective tissue: Pleiotropic, autosomal dominant disorder affecting connective tissue is listed as a type of (or associated with) the following medical conditions in our database: 1 Heart conditions. Office of Rare Diseases (ORD) of ...</code> | <code>[1, 0, 0, 0, 0, ...]</code> |
283
+ * Loss: [<code>ApproxDiscountedRankMSE</code>](https://sbert.net/docs/package_reference/cross_encoder/losses.html#approxdiscountedrankmse)
284
+
285
+ ### Training Hyperparameters
286
+ #### Non-Default Hyperparameters
287
+
288
+ - `eval_strategy`: steps
289
+ - `per_device_train_batch_size`: 16
290
+ - `per_device_eval_batch_size`: 16
291
+ - `learning_rate`: 2e-05
292
+ - `num_train_epochs`: 1
293
+ - `warmup_ratio`: 0.1
294
+ - `seed`: 12
295
+ - `bf16`: True
296
+ - `load_best_model_at_end`: True
297
+
298
+ #### All Hyperparameters
299
+ <details><summary>Click to expand</summary>
300
+
301
+ - `overwrite_output_dir`: False
302
+ - `do_predict`: False
303
+ - `eval_strategy`: steps
304
+ - `prediction_loss_only`: True
305
+ - `per_device_train_batch_size`: 16
306
+ - `per_device_eval_batch_size`: 16
307
+ - `per_gpu_train_batch_size`: None
308
+ - `per_gpu_eval_batch_size`: None
309
+ - `gradient_accumulation_steps`: 1
310
+ - `eval_accumulation_steps`: None
311
+ - `torch_empty_cache_steps`: None
312
+ - `learning_rate`: 2e-05
313
+ - `weight_decay`: 0.0
314
+ - `adam_beta1`: 0.9
315
+ - `adam_beta2`: 0.999
316
+ - `adam_epsilon`: 1e-08
317
+ - `max_grad_norm`: 1.0
318
+ - `num_train_epochs`: 1
319
+ - `max_steps`: -1
320
+ - `lr_scheduler_type`: linear
321
+ - `lr_scheduler_kwargs`: {}
322
+ - `warmup_ratio`: 0.1
323
+ - `warmup_steps`: 0
324
+ - `log_level`: passive
325
+ - `log_level_replica`: warning
326
+ - `log_on_each_node`: True
327
+ - `logging_nan_inf_filter`: True
328
+ - `save_safetensors`: True
329
+ - `save_on_each_node`: False
330
+ - `save_only_model`: False
331
+ - `restore_callback_states_from_checkpoint`: False
332
+ - `no_cuda`: False
333
+ - `use_cpu`: False
334
+ - `use_mps_device`: False
335
+ - `seed`: 12
336
+ - `data_seed`: None
337
+ - `jit_mode_eval`: False
338
+ - `use_ipex`: False
339
+ - `bf16`: True
340
+ - `fp16`: False
341
+ - `fp16_opt_level`: O1
342
+ - `half_precision_backend`: auto
343
+ - `bf16_full_eval`: False
344
+ - `fp16_full_eval`: False
345
+ - `tf32`: None
346
+ - `local_rank`: 0
347
+ - `ddp_backend`: None
348
+ - `tpu_num_cores`: None
349
+ - `tpu_metrics_debug`: False
350
+ - `debug`: []
351
+ - `dataloader_drop_last`: False
352
+ - `dataloader_num_workers`: 0
353
+ - `dataloader_prefetch_factor`: None
354
+ - `past_index`: -1
355
+ - `disable_tqdm`: False
356
+ - `remove_unused_columns`: True
357
+ - `label_names`: None
358
+ - `load_best_model_at_end`: True
359
+ - `ignore_data_skip`: False
360
+ - `fsdp`: []
361
+ - `fsdp_min_num_params`: 0
362
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
363
+ - `fsdp_transformer_layer_cls_to_wrap`: None
364
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
365
+ - `deepspeed`: None
366
+ - `label_smoothing_factor`: 0.0
367
+ - `optim`: adamw_torch
368
+ - `optim_args`: None
369
+ - `adafactor`: False
370
+ - `group_by_length`: False
371
+ - `length_column_name`: length
372
+ - `ddp_find_unused_parameters`: None
373
+ - `ddp_bucket_cap_mb`: None
374
+ - `ddp_broadcast_buffers`: False
375
+ - `dataloader_pin_memory`: True
376
+ - `dataloader_persistent_workers`: False
377
+ - `skip_memory_metrics`: True
378
+ - `use_legacy_prediction_loop`: False
379
+ - `push_to_hub`: False
380
+ - `resume_from_checkpoint`: None
381
+ - `hub_model_id`: None
382
+ - `hub_strategy`: every_save
383
+ - `hub_private_repo`: None
384
+ - `hub_always_push`: False
385
+ - `gradient_checkpointing`: False
386
+ - `gradient_checkpointing_kwargs`: None
387
+ - `include_inputs_for_metrics`: False
388
+ - `include_for_metrics`: []
389
+ - `eval_do_concat_batches`: True
390
+ - `fp16_backend`: auto
391
+ - `push_to_hub_model_id`: None
392
+ - `push_to_hub_organization`: None
393
+ - `mp_parameters`:
394
+ - `auto_find_batch_size`: False
395
+ - `full_determinism`: False
396
+ - `torchdynamo`: None
397
+ - `ray_scope`: last
398
+ - `ddp_timeout`: 1800
399
+ - `torch_compile`: False
400
+ - `torch_compile_backend`: None
401
+ - `torch_compile_mode`: None
402
+ - `dispatch_batches`: None
403
+ - `split_batches`: None
404
+ - `include_tokens_per_second`: False
405
+ - `include_num_input_tokens_seen`: False
406
+ - `neftune_noise_alpha`: None
407
+ - `optim_target_modules`: None
408
+ - `batch_eval_metrics`: False
409
+ - `eval_on_start`: False
410
+ - `use_liger_kernel`: False
411
+ - `eval_use_gather_object`: False
412
+ - `average_tokens_across_devices`: False
413
+ - `prompts`: None
414
+ - `batch_sampler`: batch_sampler
415
+ - `multi_dataset_batch_sampler`: proportional
416
+
417
+ </details>
418
+
419
+ ### Training Logs
420
+ | Epoch | Step | Training Loss | Validation Loss | NanoMSMARCO_R100_ndcg@10 | NanoNFCorpus_R100_ndcg@10 | NanoNQ_R100_ndcg@10 | NanoBEIR_R100_mean_ndcg@10 |
421
+ |:----------:|:--------:|:-------------:|:---------------:|:------------------------:|:-------------------------:|:--------------------:|:--------------------------:|
422
+ | 0.0002 | 1 | 6.5753 | - | - | - | - | - |
423
+ | 0.0508 | 250 | 5.1996 | - | - | - | - | - |
424
+ | 0.1016 | 500 | 5.0477 | 4.9713 | 0.3637 (-0.1767) | 0.2937 (-0.0313) | 0.5152 (+0.0146) | 0.3909 (-0.0645) |
425
+ | 0.1525 | 750 | 5.0265 | - | - | - | - | - |
426
+ | 0.2033 | 1000 | 4.9863 | 4.9254 | 0.4041 (-0.1363) | 0.3228 (-0.0022) | 0.4966 (-0.0040) | 0.4079 (-0.0475) |
427
+ | 0.2541 | 1250 | 4.9657 | - | - | - | - | - |
428
+ | 0.3049 | 1500 | 4.923 | 4.8972 | 0.4715 (-0.0689) | 0.3383 (+0.0133) | 0.5861 (+0.0855) | 0.4653 (+0.0099) |
429
+ | 0.3558 | 1750 | 4.9783 | - | - | - | - | - |
430
+ | 0.4066 | 2000 | 4.9509 | 4.9001 | 0.5300 (-0.0104) | 0.3157 (-0.0094) | 0.5672 (+0.0666) | 0.4710 (+0.0156) |
431
+ | 0.4574 | 2250 | 4.9816 | - | - | - | - | - |
432
+ | 0.5082 | 2500 | 4.9406 | 4.9270 | 0.5351 (-0.0053) | 0.3602 (+0.0351) | 0.5859 (+0.0852) | 0.4937 (+0.0384) |
433
+ | 0.5591 | 2750 | 4.915 | - | - | - | - | - |
434
+ | 0.6099 | 3000 | 4.9739 | 4.8886 | 0.5444 (+0.0040) | 0.3660 (+0.0410) | 0.6232 (+0.1225) | 0.5112 (+0.0558) |
435
+ | 0.6607 | 3250 | 4.9531 | - | - | - | - | - |
436
+ | **0.7115** | **3500** | **4.8644** | **4.8992** | **0.5433 (+0.0028)** | **0.3697 (+0.0446)** | **0.6352 (+0.1345)** | **0.5160 (+0.0607)** |
437
+ | 0.7624 | 3750 | 4.9149 | - | - | - | - | - |
438
+ | 0.8132 | 4000 | 4.9287 | 4.8934 | 0.5388 (-0.0017) | 0.3607 (+0.0357) | 0.6386 (+0.1380) | 0.5127 (+0.0573) |
439
+ | 0.8640 | 4250 | 4.929 | - | - | - | - | - |
440
+ | 0.9148 | 4500 | 4.9036 | 4.8838 | 0.5537 (+0.0133) | 0.3588 (+0.0337) | 0.5974 (+0.0967) | 0.5033 (+0.0479) |
441
+ | 0.9656 | 4750 | 4.9278 | - | - | - | - | - |
442
+ | -1 | -1 | - | - | 0.5433 (+0.0028) | 0.3697 (+0.0446) | 0.6352 (+0.1345) | 0.5160 (+0.0607) |
443
+
444
+ * The bold row denotes the saved checkpoint.
445
+
446
+ ### Environmental Impact
447
+ Carbon emissions were measured using [CodeCarbon](https://github.com/mlco2/codecarbon).
448
+ - **Energy Consumed**: 0.228 kWh
449
+ - **Carbon Emitted**: 0.088 kg of CO2
450
+ - **Hours Used**: 0.737 hours
451
+
452
+ ### Training Hardware
453
+ - **On Cloud**: No
454
+ - **GPU Model**: 1 x NVIDIA GeForce RTX 3090
455
+ - **CPU Model**: 13th Gen Intel(R) Core(TM) i7-13700K
456
+ - **RAM Size**: 31.78 GB
457
+
458
+ ### Framework Versions
459
+ - Python: 3.11.6
460
+ - Sentence Transformers: 4.1.0.dev0
461
+ - Transformers: 4.49.0
462
+ - PyTorch: 2.6.0+cu124
463
+ - Accelerate: 1.5.1
464
+ - Datasets: 3.3.2
465
+ - Tokenizers: 0.21.0
466
+
467
+ ## Citation
468
+
469
+ ### BibTeX
470
+
471
+ #### Sentence Transformers
472
+ ```bibtex
473
+ @inproceedings{reimers-2019-sentence-bert,
474
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
475
+ author = "Reimers, Nils and Gurevych, Iryna",
476
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
477
+ month = "11",
478
+ year = "2019",
479
+ publisher = "Association for Computational Linguistics",
480
+ url = "https://arxiv.org/abs/1908.10084",
481
+ }
482
+ ```
483
+
484
+ <!--
485
+ ## Glossary
486
+
487
+ *Clearly define terms in order to be accessible across audiences.*
488
+ -->
489
+
490
+ <!--
491
+ ## Model Card Authors
492
+
493
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
494
+ -->
495
+
496
+ <!--
497
+ ## Model Card Contact
498
+
499
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
500
+ -->
config.json ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "microsoft/MiniLM-L12-H384-uncased",
3
+ "architectures": [
4
+ "BertForSequenceClassification"
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": 384,
11
+ "id2label": {
12
+ "0": "LABEL_0"
13
+ },
14
+ "initializer_range": 0.02,
15
+ "intermediate_size": 1536,
16
+ "label2id": {
17
+ "LABEL_0": 0
18
+ },
19
+ "layer_norm_eps": 1e-12,
20
+ "max_position_embeddings": 512,
21
+ "model_type": "bert",
22
+ "num_attention_heads": 12,
23
+ "num_hidden_layers": 12,
24
+ "pad_token_id": 0,
25
+ "position_embedding_type": "absolute",
26
+ "sentence_transformers": {
27
+ "activation_fn": "torch.nn.modules.activation.Sigmoid",
28
+ "version": "4.1.0.dev0"
29
+ },
30
+ "torch_dtype": "float32",
31
+ "transformers_version": "4.49.0",
32
+ "type_vocab_size": 2,
33
+ "use_cache": true,
34
+ "vocab_size": 30522
35
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bae4a75610a071646d242d1a2e31fe44d9839c583ab9275a537afb201fd1911a
3
+ size 133464836
special_tokens_map.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "cls_token": "[CLS]",
3
+ "mask_token": "[MASK]",
4
+ "pad_token": "[PAD]",
5
+ "sep_token": "[SEP]",
6
+ "unk_token": "[UNK]"
7
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "extra_special_tokens": {},
49
+ "mask_token": "[MASK]",
50
+ "model_max_length": 512,
51
+ "never_split": null,
52
+ "pad_token": "[PAD]",
53
+ "sep_token": "[SEP]",
54
+ "strip_accents": null,
55
+ "tokenize_chinese_chars": true,
56
+ "tokenizer_class": "BertTokenizer",
57
+ "unk_token": "[UNK]"
58
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff