khaled-omar commited on
Commit
49d887a
·
verified ·
1 Parent(s): cc7a4db

Add new SentenceTransformer model

Browse files
1_Pooling/config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "word_embedding_dimension": 768,
3
+ "pooling_mode_cls_token": false,
4
+ "pooling_mode_mean_tokens": true,
5
+ "pooling_mode_max_tokens": false,
6
+ "pooling_mode_mean_sqrt_len_tokens": false,
7
+ "pooling_mode_weightedmean_tokens": false,
8
+ "pooling_mode_lasttoken": false,
9
+ "include_prompt": true
10
+ }
README.md ADDED
@@ -0,0 +1,443 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: sentence-transformers
3
+ tags:
4
+ - sentence-transformers
5
+ - sentence-similarity
6
+ - feature-extraction
7
+ - generated_from_trainer
8
+ - dataset_size:7999
9
+ - loss:MultipleNegativesRankingLoss
10
+ base_model: medicalai/ClinicalBERT
11
+ metrics:
12
+ - cosine_accuracy
13
+ widget:
14
+ - source_sentence: pt,dressing,pi,surgery,2 weeks,o,ozing,regular,dressing,weight,111.
15
+ 800,height,179. 000,temperature,97. 700,pulse,88. 000,res,19. 000 bp,sy,sto,145.
16
+ 000 bp,dia,sto,82. 000 spo,2,:,99,cap,blood sugar,ja,undice,ec,no past medical
17
+ history,no past medical history,no past medical history,no past medical history,no
18
+ past medical history,no past medical history,no past,no,no,no past,no,past,no,no,no,no,no,no,no,no,no,no,no,stable,stable,stable,stable,stable,stable,stable,stable,stable,stable,normal,no,surgical
19
+ history,no,surgical history,no,surgical history,no,no
20
+ sentences:
21
+ - Acne vulgaris
22
+ - Encounter for change or removal of surgical wound dressing
23
+ - Irritant contact dermatitis due to detergents
24
+ - source_sentence: 'fa,dubai,arab emirates,cardiac assessment,chest,pain,nausea,mild,dizzy,sleep,clinic,pulse,70,res,18,res,normal,sao,:,98,air
25
+ time,00 : 39 : 00,bp,140 / 100,cap,< 2 sec,temperature,36,>,3 reacts,right,>,3
26
+ reacts,total,gcs,15,car,mild'
27
+ sentences:
28
+ - Dizziness and giddiness
29
+ - Pruritus, unspecified
30
+ - Acute gastritis without bleeding
31
+ - source_sentence: low,back,pain,1,no,sp,fine,lower back,moderate,1 month,no,diseases,no,no,no,no,no,no,single,normal,no,no,no,normal,normal,normal,normal,cvs,cv,normal,abnormal,-
32
+ genito - urinary,normal,systems _ cns - cns,normal,musc,mu,normal,ps,normal,systems,endo
33
+ - end,normal,normal,haemo,haem,normal,low,back,pain,1 month
34
+ sentences:
35
+ - Headache
36
+ - Muscle spasm of back
37
+ - Other chest pain
38
+ - source_sentence: 'fa,ap,arab,mobility,knee assessment,ambula,tory,c,/,o,pain,swelling,right,cold
39
+ pack,crepebanda,v,pt,transfer,pulse,68r,16,res,normal,sao,: 100,air time,07 :
40
+ 29 : 00,bp,112 / 78,cap,< 2 sec,4 reacts,right,-,>,3,reacts,gcs,15,pain,4,blood,car
41
+ accident,twisted,right ankle'
42
+ sentences:
43
+ - Unspecified injury of right ankle, initial encounter
44
+ - Other spondylosis with radiculopathy, lumbosacral region
45
+ - Right upper quadrant pain
46
+ - source_sentence: irregular,period,few months,moderate,few months ago,none,weight,90.
47
+ 000,height,163. 000,temperature,98. 600,pulse,82. 000,respiration,19. 000 bp,systolic,110.
48
+ 000 bp,diastolic,70. 000,sp,o,2,:,99,cap,blood sugar,ja,und,ice,ec,abd,an,l,girth,head,chest,ch
49
+ ida ch vitamin d deficiency,polycystic ovary syndrome,ch ida ch vitamin d deficiency,polycystic
50
+ ovary syndrome,ch,ida ch vitamin d deficiency,polycystic ovary syndrome,ch,ida
51
+ ch vitamin d deficiency,polycystic ovary syndrome,no,no family,no,no,nation,grade
52
+ 11,grade 11,grade 11,grade 11,no,no,no,no,normal,normal,normal,normal,_ cvs,cv,normal,normal,irregular
53
+ period,cns,cn,normal,mu,normal,normal,normal,normal,normal,normal,irregular period
54
+ sentences:
55
+ - Pain in right hip
56
+ - Radial styloid tenosynovitis [de Quervain]
57
+ - Irregular menstruation, unspecified
58
+ pipeline_tag: sentence-similarity
59
+ model-index:
60
+ - name: SentenceTransformer based on medicalai/ClinicalBERT
61
+ results:
62
+ - task:
63
+ type: triplet
64
+ name: Triplet
65
+ dataset:
66
+ name: ai job validation
67
+ type: ai-job-validation
68
+ metrics:
69
+ - type: cosine_accuracy
70
+ value: 0.9429429173469543
71
+ name: Cosine Accuracy
72
+ - task:
73
+ type: triplet
74
+ name: Triplet
75
+ dataset:
76
+ name: ai job test
77
+ type: ai-job-test
78
+ metrics:
79
+ - type: cosine_accuracy
80
+ value: 0.9290709495544434
81
+ name: Cosine Accuracy
82
+ ---
83
+
84
+ # SentenceTransformer based on medicalai/ClinicalBERT
85
+
86
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [medicalai/ClinicalBERT](https://huggingface.co/medicalai/ClinicalBERT) on the parquet dataset. It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
87
+
88
+ ## Model Details
89
+
90
+ ### Model Description
91
+ - **Model Type:** Sentence Transformer
92
+ - **Base model:** [medicalai/ClinicalBERT](https://huggingface.co/medicalai/ClinicalBERT) <!-- at revision 3bb5faa9f33458dd7801549e88767c3b23264942 -->
93
+ - **Maximum Sequence Length:** 512 tokens
94
+ - **Output Dimensionality:** 768 dimensions
95
+ - **Similarity Function:** Cosine Similarity
96
+ - **Training Dataset:**
97
+ - parquet
98
+ <!-- - **Language:** Unknown -->
99
+ <!-- - **License:** Unknown -->
100
+
101
+ ### Model Sources
102
+
103
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
104
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
105
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
106
+
107
+ ### Full Model Architecture
108
+
109
+ ```
110
+ SentenceTransformer(
111
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: DistilBertModel
112
+ (1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
113
+ )
114
+ ```
115
+
116
+ ## Usage
117
+
118
+ ### Direct Usage (Sentence Transformers)
119
+
120
+ First install the Sentence Transformers library:
121
+
122
+ ```bash
123
+ pip install -U sentence-transformers
124
+ ```
125
+
126
+ Then you can load this model and run inference.
127
+ ```python
128
+ from sentence_transformers import SentenceTransformer
129
+
130
+ # Download from the 🤗 Hub
131
+ model = SentenceTransformer("khaled-omar/distilroberta-ai-job-embeddings")
132
+ # Run inference
133
+ sentences = [
134
+ 'irregular,period,few months,moderate,few months ago,none,weight,90. 000,height,163. 000,temperature,98. 600,pulse,82. 000,respiration,19. 000 bp,systolic,110. 000 bp,diastolic,70. 000,sp,o,2,:,99,cap,blood sugar,ja,und,ice,ec,abd,an,l,girth,head,chest,ch ida ch vitamin d deficiency,polycystic ovary syndrome,ch ida ch vitamin d deficiency,polycystic ovary syndrome,ch,ida ch vitamin d deficiency,polycystic ovary syndrome,ch,ida ch vitamin d deficiency,polycystic ovary syndrome,no,no family,no,no,nation,grade 11,grade 11,grade 11,grade 11,no,no,no,no,normal,normal,normal,normal,_ cvs,cv,normal,normal,irregular period,cns,cn,normal,mu,normal,normal,normal,normal,normal,normal,irregular period',
135
+ 'Irregular menstruation, unspecified',
136
+ 'Radial styloid tenosynovitis [de Quervain]',
137
+ ]
138
+ embeddings = model.encode(sentences)
139
+ print(embeddings.shape)
140
+ # [3, 768]
141
+
142
+ # Get the similarity scores for the embeddings
143
+ similarities = model.similarity(embeddings, embeddings)
144
+ print(similarities.shape)
145
+ # [3, 3]
146
+ ```
147
+
148
+ <!--
149
+ ### Direct Usage (Transformers)
150
+
151
+ <details><summary>Click to see the direct usage in Transformers</summary>
152
+
153
+ </details>
154
+ -->
155
+
156
+ <!--
157
+ ### Downstream Usage (Sentence Transformers)
158
+
159
+ You can finetune this model on your own dataset.
160
+
161
+ <details><summary>Click to expand</summary>
162
+
163
+ </details>
164
+ -->
165
+
166
+ <!--
167
+ ### Out-of-Scope Use
168
+
169
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
170
+ -->
171
+
172
+ ## Evaluation
173
+
174
+ ### Metrics
175
+
176
+ #### Triplet
177
+
178
+ * Datasets: `ai-job-validation` and `ai-job-test`
179
+ * Evaluated with [<code>TripletEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.TripletEvaluator)
180
+
181
+ | Metric | ai-job-validation | ai-job-test |
182
+ |:--------------------|:------------------|:------------|
183
+ | **cosine_accuracy** | **0.9429** | **0.9291** |
184
+
185
+ <!--
186
+ ## Bias, Risks and Limitations
187
+
188
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
189
+ -->
190
+
191
+ <!--
192
+ ### Recommendations
193
+
194
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
195
+ -->
196
+
197
+ ## Training Details
198
+
199
+ ### Training Dataset
200
+
201
+ #### parquet
202
+
203
+ * Dataset: parquet
204
+ * Size: 7,999 training samples
205
+ * Columns: <code>Entities</code>, <code>PosLongDesc</code>, and <code>NegLongDesc</code>
206
+ * Approximate statistics based on the first 1000 samples:
207
+ | | Entities | PosLongDesc | NegLongDesc |
208
+ |:--------|:------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
209
+ | type | string | string | string |
210
+ | details | <ul><li>min: 3 tokens</li><li>mean: 155.39 tokens</li><li>max: 485 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 10.62 tokens</li><li>max: 32 tokens</li></ul> | <ul><li>min: 3 tokens</li><li>mean: 10.35 tokens</li><li>max: 31 tokens</li></ul> |
211
+ * Samples:
212
+ | Entities | PosLongDesc | NegLongDesc |
213
+ |:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------|
214
+ | <code>it,chiness,since 3 months,it,chiness,since,3 months,weight,90. 100,height,178. 000,temperature,98. 060,pulse,84. 000,respiration,0. 000 bp,sy,sto,122. 000 bp,dia,69. 000,sp,o,:,99,cap,blood sugar,ja,undice,ec,abd,an,rth,nonsignificant,nonsignificant,nonsignifican,t,no family,nonsignificant family,nonsignificant family,nonsignificant,no relevant family history,yes,married, smoker, carpenter,married, smoker, carpenter social,married, smoker, carpenter social history,nonsignificant,nonsignificant,nonsignificant,it,chiness,3 months,treatment</code> | <code>Rash and other nonspecific skin eruption</code> | <code>Acute nasopharyngitis [common cold]</code> |
215
+ | <code>amc,dubai,united arab emirates,uma,pa,gut,hari,val,electrocard,gram,pt,amc,sitting,coherent,w /,can,nula,bra,chia,vital,85,18,res,normal,sao,100,air time,17,: 51 : 34,bp,120 / 81,cap,<,2,sec,temperature,> 4 reacts,>,4,reacts,total,gcs,15,pain,0,blood glucose,102,car,accident,drug overdose,intentional</code> | <code>Epileptic seizures related to external causes, not intractable, without status epilepticus</code> | <code>COVID-19</code> |
216
+ | <code>amc gate,dubai,united arab emirates,ssi,test,airports,dubai,concourse,ent assessment,throat,transported,endorsed,pulse :,77r,14,res,normal %,sao,2 :,100,air time,05 :,26,:,00,bp,118 / 69,cap,<,2,sec,temperature,36. 7,pupil,left,>,4,reacts,right,>,4,reacts,gcs,15,pain,2,blood glucose,96,car,accident,no,throatpain</code> | <code>Pain in throat</code> | <code>Encounter for observation for suspected exposure to other biological agents ruled out</code> |
217
+ * Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
218
+ ```json
219
+ {
220
+ "scale": 20.0,
221
+ "similarity_fct": "cos_sim"
222
+ }
223
+ ```
224
+
225
+ ### Evaluation Dataset
226
+
227
+ #### parquet
228
+
229
+ * Dataset: parquet
230
+ * Size: 999 evaluation samples
231
+ * Columns: <code>Entities</code>, <code>PosLongDesc</code>, and <code>NegLongDesc</code>
232
+ * Approximate statistics based on the first 999 samples:
233
+ | | Entities | PosLongDesc | NegLongDesc |
234
+ |:--------|:------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
235
+ | type | string | string | string |
236
+ | details | <ul><li>min: 4 tokens</li><li>mean: 154.58 tokens</li><li>max: 470 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 10.61 tokens</li><li>max: 31 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 10.12 tokens</li><li>max: 35 tokens</li></ul> |
237
+ * Samples:
238
+ | Entities | PosLongDesc | NegLongDesc |
239
+ |:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------|:------------------------------------------------------------|
240
+ | <code>it,chy,redness,3 days,both,it,ching,mild,moderate,3 days,weight,50. 200,height,143. 000,temperature,98. 240,pulse,78. 000,respiration,0. 000 bp,systolic,0. 000 bp,dia,sto,lic,0. 000,sp,o,2,:,99,cap,blood sugar,ja,undice,ec,abd,no past medical history,no past medical history,unknown family medical history,negative family,chronic disease,no diabetic mellitus,no hypertention,negative family,chronic disease,no diabetic mellitus,no hypertention,no,7 years and,7 months,7 years,7 months,no,removal,int,removal,int,red,it,chy,it,chy,redness,3 days</code> | <code>Acute atopic conjunctivitis, bilateral</code> | <code>Deficiency of other specified B group vitamins</code> |
241
+ | <code>pi,mples,pustules,plus,minus,cyst,both side,of the face,too,it,ching,skin,4,pi,notice,increase,laser removal,facial,expose,sun,pust,cyst,it,weight,52,.,800,height,159. 000,temperature,98. 100,pulse,93. 000,res,0. 000 bp,sy,sto,99. 000 bp,sto,60. 000,sp,o,98,cap,blood sugar,ja,undice,ec,no,no,ro,course,ro,not,course,no diabetic mellitus,no,les,no diabetic,mellit,us,no,les,basic,nation,nation,13,years,months,15 years,11 months,old,pu,ules,plus,cyst,side</code> | <code>Local infection of the skin and subcutaneous tissue, unspecified</code> | <code>Inflammatory polyarthropathy</code> |
242
+ | <code>respiratory rate,sp,pain,sy,lic,bp,mm,dia,bp,mm,height,weight,00 kg,repeat,prescription</code> | <code>Menopausal and female climacteric states</code> | <code>COVID-19</code> |
243
+ * Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
244
+ ```json
245
+ {
246
+ "scale": 20.0,
247
+ "similarity_fct": "cos_sim"
248
+ }
249
+ ```
250
+
251
+ ### Training Hyperparameters
252
+ #### Non-Default Hyperparameters
253
+
254
+ - `eval_strategy`: steps
255
+ - `per_device_train_batch_size`: 16
256
+ - `per_device_eval_batch_size`: 16
257
+ - `learning_rate`: 2e-05
258
+ - `num_train_epochs`: 1
259
+ - `warmup_ratio`: 0.1
260
+ - `batch_sampler`: no_duplicates
261
+
262
+ #### All Hyperparameters
263
+ <details><summary>Click to expand</summary>
264
+
265
+ - `overwrite_output_dir`: False
266
+ - `do_predict`: False
267
+ - `eval_strategy`: steps
268
+ - `prediction_loss_only`: True
269
+ - `per_device_train_batch_size`: 16
270
+ - `per_device_eval_batch_size`: 16
271
+ - `per_gpu_train_batch_size`: None
272
+ - `per_gpu_eval_batch_size`: None
273
+ - `gradient_accumulation_steps`: 1
274
+ - `eval_accumulation_steps`: None
275
+ - `learning_rate`: 2e-05
276
+ - `weight_decay`: 0.0
277
+ - `adam_beta1`: 0.9
278
+ - `adam_beta2`: 0.999
279
+ - `adam_epsilon`: 1e-08
280
+ - `max_grad_norm`: 1.0
281
+ - `num_train_epochs`: 1
282
+ - `max_steps`: -1
283
+ - `lr_scheduler_type`: linear
284
+ - `lr_scheduler_kwargs`: {}
285
+ - `warmup_ratio`: 0.1
286
+ - `warmup_steps`: 0
287
+ - `log_level`: passive
288
+ - `log_level_replica`: warning
289
+ - `log_on_each_node`: True
290
+ - `logging_nan_inf_filter`: True
291
+ - `save_safetensors`: True
292
+ - `save_on_each_node`: False
293
+ - `save_only_model`: False
294
+ - `restore_callback_states_from_checkpoint`: False
295
+ - `no_cuda`: False
296
+ - `use_cpu`: False
297
+ - `use_mps_device`: False
298
+ - `seed`: 42
299
+ - `data_seed`: None
300
+ - `jit_mode_eval`: False
301
+ - `use_ipex`: False
302
+ - `bf16`: False
303
+ - `fp16`: False
304
+ - `fp16_opt_level`: O1
305
+ - `half_precision_backend`: auto
306
+ - `bf16_full_eval`: False
307
+ - `fp16_full_eval`: False
308
+ - `tf32`: None
309
+ - `local_rank`: 0
310
+ - `ddp_backend`: None
311
+ - `tpu_num_cores`: None
312
+ - `tpu_metrics_debug`: False
313
+ - `debug`: []
314
+ - `dataloader_drop_last`: False
315
+ - `dataloader_num_workers`: 0
316
+ - `dataloader_prefetch_factor`: None
317
+ - `past_index`: -1
318
+ - `disable_tqdm`: False
319
+ - `remove_unused_columns`: True
320
+ - `label_names`: None
321
+ - `load_best_model_at_end`: False
322
+ - `ignore_data_skip`: False
323
+ - `fsdp`: []
324
+ - `fsdp_min_num_params`: 0
325
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
326
+ - `fsdp_transformer_layer_cls_to_wrap`: None
327
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
328
+ - `deepspeed`: None
329
+ - `label_smoothing_factor`: 0.0
330
+ - `optim`: adamw_torch
331
+ - `optim_args`: None
332
+ - `adafactor`: False
333
+ - `group_by_length`: False
334
+ - `length_column_name`: length
335
+ - `ddp_find_unused_parameters`: None
336
+ - `ddp_bucket_cap_mb`: None
337
+ - `ddp_broadcast_buffers`: False
338
+ - `dataloader_pin_memory`: True
339
+ - `dataloader_persistent_workers`: False
340
+ - `skip_memory_metrics`: True
341
+ - `use_legacy_prediction_loop`: False
342
+ - `push_to_hub`: False
343
+ - `resume_from_checkpoint`: None
344
+ - `hub_model_id`: None
345
+ - `hub_strategy`: every_save
346
+ - `hub_private_repo`: False
347
+ - `hub_always_push`: False
348
+ - `gradient_checkpointing`: False
349
+ - `gradient_checkpointing_kwargs`: None
350
+ - `include_inputs_for_metrics`: False
351
+ - `eval_do_concat_batches`: True
352
+ - `fp16_backend`: auto
353
+ - `push_to_hub_model_id`: None
354
+ - `push_to_hub_organization`: None
355
+ - `mp_parameters`:
356
+ - `auto_find_batch_size`: False
357
+ - `full_determinism`: False
358
+ - `torchdynamo`: None
359
+ - `ray_scope`: last
360
+ - `ddp_timeout`: 1800
361
+ - `torch_compile`: False
362
+ - `torch_compile_backend`: None
363
+ - `torch_compile_mode`: None
364
+ - `dispatch_batches`: None
365
+ - `split_batches`: None
366
+ - `include_tokens_per_second`: False
367
+ - `include_num_input_tokens_seen`: False
368
+ - `neftune_noise_alpha`: None
369
+ - `optim_target_modules`: None
370
+ - `batch_eval_metrics`: False
371
+ - `prompts`: None
372
+ - `batch_sampler`: no_duplicates
373
+ - `multi_dataset_batch_sampler`: proportional
374
+
375
+ </details>
376
+
377
+ ### Training Logs
378
+ | Epoch | Step | Training Loss | Validation Loss | ai-job-validation_cosine_accuracy | ai-job-test_cosine_accuracy |
379
+ |:-----:|:----:|:-------------:|:---------------:|:---------------------------------:|:---------------------------:|
380
+ | -1 | -1 | - | - | 0.5495 | - |
381
+ | 0.2 | 100 | 2.8729 | 1.8172 | 0.8789 | - |
382
+ | 0.4 | 200 | 2.085 | 1.4398 | 0.9259 | - |
383
+ | 0.6 | 300 | 1.8233 | 1.3448 | 0.9339 | - |
384
+ | 0.8 | 400 | 1.6871 | 1.2579 | 0.9409 | - |
385
+ | 1.0 | 500 | 1.4881 | 1.2327 | 0.9429 | - |
386
+ | -1 | -1 | - | - | 0.9429 | 0.9291 |
387
+
388
+
389
+ ### Framework Versions
390
+ - Python: 3.11.4
391
+ - Sentence Transformers: 3.4.1
392
+ - Transformers: 4.41.2
393
+ - PyTorch: 2.3.1+cpu
394
+ - Accelerate: 1.3.0
395
+ - Datasets: 3.2.0
396
+ - Tokenizers: 0.19.1
397
+
398
+ ## Citation
399
+
400
+ ### BibTeX
401
+
402
+ #### Sentence Transformers
403
+ ```bibtex
404
+ @inproceedings{reimers-2019-sentence-bert,
405
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
406
+ author = "Reimers, Nils and Gurevych, Iryna",
407
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
408
+ month = "11",
409
+ year = "2019",
410
+ publisher = "Association for Computational Linguistics",
411
+ url = "https://arxiv.org/abs/1908.10084",
412
+ }
413
+ ```
414
+
415
+ #### MultipleNegativesRankingLoss
416
+ ```bibtex
417
+ @misc{henderson2017efficient,
418
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
419
+ 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},
420
+ year={2017},
421
+ eprint={1705.00652},
422
+ archivePrefix={arXiv},
423
+ primaryClass={cs.CL}
424
+ }
425
+ ```
426
+
427
+ <!--
428
+ ## Glossary
429
+
430
+ *Clearly define terms in order to be accessible across audiences.*
431
+ -->
432
+
433
+ <!--
434
+ ## Model Card Authors
435
+
436
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
437
+ -->
438
+
439
+ <!--
440
+ ## Model Card Contact
441
+
442
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
443
+ -->
config.json ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "medicalai/ClinicalBERT",
3
+ "activation": "gelu",
4
+ "architectures": [
5
+ "DistilBertModel"
6
+ ],
7
+ "attention_dropout": 0.1,
8
+ "dim": 768,
9
+ "dropout": 0.1,
10
+ "hidden_dim": 3072,
11
+ "initializer_range": 0.02,
12
+ "max_position_embeddings": 512,
13
+ "model_type": "distilbert",
14
+ "n_heads": 12,
15
+ "n_layers": 6,
16
+ "output_past": true,
17
+ "pad_token_id": 0,
18
+ "qa_dropout": 0.1,
19
+ "seq_classif_dropout": 0.2,
20
+ "sinusoidal_pos_embds": false,
21
+ "tie_weights_": true,
22
+ "torch_dtype": "float32",
23
+ "transformers_version": "4.41.2",
24
+ "vocab_size": 119547
25
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "3.4.1",
4
+ "transformers": "4.41.2",
5
+ "pytorch": "2.3.1+cpu"
6
+ },
7
+ "prompts": {},
8
+ "default_prompt_name": null,
9
+ "similarity_fn_name": "cosine"
10
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7280c630189118252ab9c92eb1c50ee4c1fd243dc1c41f068e700c33f0664e97
3
+ size 538947416
modules.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ ]
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,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
+ "full_tokenizer_file": null,
49
+ "mask_token": "[MASK]",
50
+ "model_max_length": 1000000000000000019884624838656,
51
+ "never_split": null,
52
+ "pad_token": "[PAD]",
53
+ "sep_token": "[SEP]",
54
+ "strip_accents": null,
55
+ "tokenize_chinese_chars": true,
56
+ "tokenizer_class": "DistilBertTokenizer",
57
+ "unk_token": "[UNK]"
58
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff