WeihaoLi commited on
Commit
a4ed05d
·
verified ·
1 Parent(s): 50898a7

Upload model from ../experiments/HiT-biobert-v1.1-icd9-temp/final

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,510 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - sentence-transformers
4
+ - sentence-similarity
5
+ - feature-extraction
6
+ - dense
7
+ - generated_from_trainer
8
+ - dataset_size:148295
9
+ - loss:SymmetricLoss
10
+ base_model: dmis-lab/biobert-v1.1
11
+ widget:
12
+ - source_sentence: Complications of pregnancy; childbirth; and the puerperium → Complications
13
+ during labor → Forceps delivery
14
+ sentences:
15
+ - Complications of pregnancy; childbirth; and the puerperium → Complications during
16
+ labor
17
+ - Complications of pregnancy; childbirth; and the puerperium → Other complications
18
+ of birth; puerperium affecting management of mother
19
+ - Complications of pregnancy; childbirth; and the puerperium → Normal pregnancy
20
+ and/or delivery → Other pregnancy and delivery including normal
21
+ - source_sentence: Complications of pregnancy; childbirth; and the puerperium → Complications
22
+ mainly related to pregnancy → Early or threatened labor
23
+ sentences:
24
+ - Complications of pregnancy; childbirth; and the puerperium → Complications mainly
25
+ related to pregnancy
26
+ - Complications of pregnancy; childbirth; and the puerperium → Abortion-related
27
+ disorders → Postabortion complications
28
+ - Complications of pregnancy; childbirth; and the puerperium → Indications for care
29
+ in pregnancy; labor; and delivery
30
+ - source_sentence: Diseases of the respiratory system → Respiratory infections → Acute
31
+ bronchitis
32
+ sentences:
33
+ - Diseases of the respiratory system → Asthma → Asthma
34
+ - Diseases of the respiratory system → Lung disease due to external agents
35
+ - Diseases of the respiratory system → Respiratory infections
36
+ - source_sentence: Diseases of the circulatory system → Diseases of the heart → Cardiac
37
+ arrest and ventricular fibrillation
38
+ sentences:
39
+ - Diseases of the circulatory system → Hypertension → Essential hypertension
40
+ - Diseases of the circulatory system → Cerebrovascular disease
41
+ - Diseases of the circulatory system → Diseases of the heart
42
+ - source_sentence: Infectious and parasitic diseases → Mycoses
43
+ sentences:
44
+ - Diseases of the skin and subcutaneous tissue → Skin and subcutaneous tissue infections
45
+ - Mental illness
46
+ - Infectious and parasitic diseases
47
+ pipeline_tag: sentence-similarity
48
+ library_name: sentence-transformers
49
+ ---
50
+
51
+ # HierarchyTransformer based on dmis-lab/biobert-v1.1
52
+
53
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [dmis-lab/biobert-v1.1](https://huggingface.co/dmis-lab/biobert-v1.1). 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.
54
+
55
+ ## Model Details
56
+
57
+ ### Model Description
58
+ - **Model Type:** Sentence Transformer
59
+ - **Base model:** [dmis-lab/biobert-v1.1](https://huggingface.co/dmis-lab/biobert-v1.1) <!-- at revision 551ca18efd7f052c8dfa0b01c94c2a8e68bc5488 -->
60
+ - **Maximum Sequence Length:** 256 tokens
61
+ - **Output Dimensionality:** 768 dimensions
62
+ - **Similarity Function:** Cosine Similarity
63
+ <!-- - **Training Dataset:** Unknown -->
64
+ <!-- - **Language:** Unknown -->
65
+ <!-- - **License:** Unknown -->
66
+
67
+ ### Model Sources
68
+
69
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
70
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/huggingface/sentence-transformers)
71
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
72
+
73
+ ### Full Model Architecture
74
+
75
+ ```
76
+ HierarchyTransformer(
77
+ (0): Transformer({'max_seq_length': 256, 'do_lower_case': False, 'architecture': 'BertModel'})
78
+ (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})
79
+ )
80
+ ```
81
+
82
+ ## Usage
83
+
84
+ ### Direct Usage (Sentence Transformers)
85
+
86
+ First install the Sentence Transformers library:
87
+
88
+ ```bash
89
+ pip install -U sentence-transformers
90
+ ```
91
+
92
+ Then you can load this model and run inference.
93
+ ```python
94
+ from sentence_transformers import SentenceTransformer
95
+
96
+ # Download from the 🤗 Hub
97
+ model = SentenceTransformer("sentence_transformers_model_id")
98
+ # Run inference
99
+ sentences = [
100
+ 'Infectious and parasitic diseases → Mycoses',
101
+ 'Infectious and parasitic diseases',
102
+ 'Mental illness',
103
+ ]
104
+ embeddings = model.encode(sentences)
105
+ print(embeddings.shape)
106
+ # [3, 768]
107
+
108
+ # Get the similarity scores for the embeddings
109
+ similarities = model.similarity(embeddings, embeddings)
110
+ print(similarities)
111
+ # tensor([[1.0000, 0.6610, 0.3361],
112
+ # [0.6610, 1.0000, 0.2730],
113
+ # [0.3361, 0.2730, 1.0000]])
114
+ ```
115
+
116
+ <!--
117
+ ### Direct Usage (Transformers)
118
+
119
+ <details><summary>Click to see the direct usage in Transformers</summary>
120
+
121
+ </details>
122
+ -->
123
+
124
+ <!--
125
+ ### Downstream Usage (Sentence Transformers)
126
+
127
+ You can finetune this model on your own dataset.
128
+
129
+ <details><summary>Click to expand</summary>
130
+
131
+ </details>
132
+ -->
133
+
134
+ <!--
135
+ ### Out-of-Scope Use
136
+
137
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
138
+ -->
139
+
140
+ <!--
141
+ ## Bias, Risks and Limitations
142
+
143
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
144
+ -->
145
+
146
+ <!--
147
+ ### Recommendations
148
+
149
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
150
+ -->
151
+
152
+ ## Training Details
153
+
154
+ ### Training Dataset
155
+
156
+ #### Unnamed Dataset
157
+
158
+ * Size: 148,295 training samples
159
+ * Columns: <code>child</code>, <code>parent</code>, <code>parent_negative</code>, and <code>child_negative</code>
160
+ * Approximate statistics based on the first 1000 samples:
161
+ | | child | parent | parent_negative | child_negative |
162
+ |:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|
163
+ | type | string | string | string | string |
164
+ | details | <ul><li>min: 8 tokens</li><li>mean: 25.19 tokens</li><li>max: 65 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 16.22 tokens</li><li>max: 41 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 16.94 tokens</li><li>max: 34 tokens</li></ul> | <ul><li>min: 11 tokens</li><li>mean: 23.48 tokens</li><li>max: 65 tokens</li></ul> |
165
+ * Samples:
166
+ | child | parent | parent_negative | child_negative |
167
+ |:---------------------------------------------------------------------|:-----------------------------------------------|:----------------------------|:----------------------------------------------------------------------------------------------------|
168
+ | <code>Infectious and parasitic diseases → Bacterial infection</code> | <code>Infectious and parasitic diseases</code> | <code>Mental illness</code> | <code>Diseases of the nervous system and sense organs → Central nervous system infection</code> |
169
+ | <code>Infectious and parasitic diseases → Bacterial infection</code> | <code>Infectious and parasitic diseases</code> | <code>Mental illness</code> | <code>Diseases of the digestive system → Intestinal infection</code> |
170
+ | <code>Infectious and parasitic diseases → Bacterial infection</code> | <code>Infectious and parasitic diseases</code> | <code>Mental illness</code> | <code>Diseases of the skin and subcutaneous tissue → Skin and subcutaneous tissue infections</code> |
171
+ * Loss: <code>hierarchy_transformers.losses.symmetric_loss.SymmetricLoss</code> with these parameters:
172
+ ```json
173
+ {
174
+ "distance_metric": "PoincareBall(c=0.0013021096820011735).dist and dist0",
175
+ "HyperbolicChildTriplet": {
176
+ "weight": 1.0,
177
+ "distance_metric": "PoincareBall(c=0.0013021096820011735).dist",
178
+ "margin": 3.0
179
+ },
180
+ "HyperbolicParentTriplet": {
181
+ "weight": 1.0,
182
+ "distance_metric": "PoincareBall(c=0.0013021096820011735).dist",
183
+ "margin": 3.0
184
+ }
185
+ }
186
+ ```
187
+
188
+ ### Training Hyperparameters
189
+ #### Non-Default Hyperparameters
190
+
191
+ - `eval_strategy`: epoch
192
+ - `per_device_train_batch_size`: 128
193
+ - `per_device_eval_batch_size`: 512
194
+ - `learning_rate`: 1e-05
195
+ - `num_train_epochs`: 10
196
+ - `warmup_steps`: 500
197
+ - `load_best_model_at_end`: True
198
+
199
+ #### All Hyperparameters
200
+ <details><summary>Click to expand</summary>
201
+
202
+ - `overwrite_output_dir`: False
203
+ - `do_predict`: False
204
+ - `eval_strategy`: epoch
205
+ - `prediction_loss_only`: True
206
+ - `per_device_train_batch_size`: 128
207
+ - `per_device_eval_batch_size`: 512
208
+ - `per_gpu_train_batch_size`: None
209
+ - `per_gpu_eval_batch_size`: None
210
+ - `gradient_accumulation_steps`: 1
211
+ - `eval_accumulation_steps`: None
212
+ - `torch_empty_cache_steps`: None
213
+ - `learning_rate`: 1e-05
214
+ - `weight_decay`: 0.0
215
+ - `adam_beta1`: 0.9
216
+ - `adam_beta2`: 0.999
217
+ - `adam_epsilon`: 1e-08
218
+ - `max_grad_norm`: 1.0
219
+ - `num_train_epochs`: 10
220
+ - `max_steps`: -1
221
+ - `lr_scheduler_type`: linear
222
+ - `lr_scheduler_kwargs`: {}
223
+ - `warmup_ratio`: 0.0
224
+ - `warmup_steps`: 500
225
+ - `log_level`: passive
226
+ - `log_level_replica`: warning
227
+ - `log_on_each_node`: True
228
+ - `logging_nan_inf_filter`: True
229
+ - `save_safetensors`: True
230
+ - `save_on_each_node`: False
231
+ - `save_only_model`: False
232
+ - `restore_callback_states_from_checkpoint`: False
233
+ - `no_cuda`: False
234
+ - `use_cpu`: False
235
+ - `use_mps_device`: False
236
+ - `seed`: 42
237
+ - `data_seed`: None
238
+ - `jit_mode_eval`: False
239
+ - `bf16`: False
240
+ - `fp16`: False
241
+ - `fp16_opt_level`: O1
242
+ - `half_precision_backend`: auto
243
+ - `bf16_full_eval`: False
244
+ - `fp16_full_eval`: False
245
+ - `tf32`: None
246
+ - `local_rank`: 0
247
+ - `ddp_backend`: None
248
+ - `tpu_num_cores`: None
249
+ - `tpu_metrics_debug`: False
250
+ - `debug`: []
251
+ - `dataloader_drop_last`: False
252
+ - `dataloader_num_workers`: 0
253
+ - `dataloader_prefetch_factor`: None
254
+ - `past_index`: -1
255
+ - `disable_tqdm`: False
256
+ - `remove_unused_columns`: True
257
+ - `label_names`: None
258
+ - `load_best_model_at_end`: True
259
+ - `ignore_data_skip`: False
260
+ - `fsdp`: []
261
+ - `fsdp_min_num_params`: 0
262
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
263
+ - `fsdp_transformer_layer_cls_to_wrap`: None
264
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
265
+ - `parallelism_config`: None
266
+ - `deepspeed`: None
267
+ - `label_smoothing_factor`: 0.0
268
+ - `optim`: adamw_torch_fused
269
+ - `optim_args`: None
270
+ - `adafactor`: False
271
+ - `group_by_length`: False
272
+ - `length_column_name`: length
273
+ - `project`: huggingface
274
+ - `trackio_space_id`: trackio
275
+ - `ddp_find_unused_parameters`: None
276
+ - `ddp_bucket_cap_mb`: None
277
+ - `ddp_broadcast_buffers`: False
278
+ - `dataloader_pin_memory`: True
279
+ - `dataloader_persistent_workers`: False
280
+ - `skip_memory_metrics`: True
281
+ - `use_legacy_prediction_loop`: False
282
+ - `push_to_hub`: False
283
+ - `resume_from_checkpoint`: None
284
+ - `hub_model_id`: None
285
+ - `hub_strategy`: every_save
286
+ - `hub_private_repo`: None
287
+ - `hub_always_push`: False
288
+ - `hub_revision`: None
289
+ - `gradient_checkpointing`: False
290
+ - `gradient_checkpointing_kwargs`: None
291
+ - `include_inputs_for_metrics`: False
292
+ - `include_for_metrics`: []
293
+ - `eval_do_concat_batches`: True
294
+ - `fp16_backend`: auto
295
+ - `push_to_hub_model_id`: None
296
+ - `push_to_hub_organization`: None
297
+ - `mp_parameters`:
298
+ - `auto_find_batch_size`: False
299
+ - `full_determinism`: False
300
+ - `torchdynamo`: None
301
+ - `ray_scope`: last
302
+ - `ddp_timeout`: 1800
303
+ - `torch_compile`: False
304
+ - `torch_compile_backend`: None
305
+ - `torch_compile_mode`: None
306
+ - `include_tokens_per_second`: False
307
+ - `include_num_input_tokens_seen`: no
308
+ - `neftune_noise_alpha`: None
309
+ - `optim_target_modules`: None
310
+ - `batch_eval_metrics`: False
311
+ - `eval_on_start`: False
312
+ - `use_liger_kernel`: False
313
+ - `liger_kernel_config`: None
314
+ - `eval_use_gather_object`: False
315
+ - `average_tokens_across_devices`: True
316
+ - `prompts`: None
317
+ - `batch_sampler`: batch_sampler
318
+ - `multi_dataset_batch_sampler`: proportional
319
+ - `router_mapping`: {}
320
+ - `learning_rate_mapping`: {}
321
+
322
+ </details>
323
+
324
+ ### Training Logs
325
+ <details><summary>Click to expand</summary>
326
+
327
+ | Epoch | Step | Training Loss |
328
+ |:-------:|:--------:|:-------------:|
329
+ | 0.0863 | 100 | 2.1613 |
330
+ | 0.1726 | 200 | 0.5936 |
331
+ | 0.2588 | 300 | 0.1998 |
332
+ | 0.3451 | 400 | 0.1107 |
333
+ | 0.4314 | 500 | 0.0567 |
334
+ | 0.5177 | 600 | 0.0452 |
335
+ | 0.6040 | 700 | 0.032 |
336
+ | 0.6903 | 800 | 0.0279 |
337
+ | 0.7765 | 900 | 0.0218 |
338
+ | 0.8628 | 1000 | 0.0235 |
339
+ | 0.9491 | 1100 | 0.018 |
340
+ | 1.0 | 1159 | - |
341
+ | 1.0354 | 1200 | 0.0192 |
342
+ | 1.1217 | 1300 | 0.0176 |
343
+ | 1.2079 | 1400 | 0.0137 |
344
+ | 1.2942 | 1500 | 0.0119 |
345
+ | 1.3805 | 1600 | 0.0139 |
346
+ | 1.4668 | 1700 | 0.0138 |
347
+ | 1.5531 | 1800 | 0.0123 |
348
+ | 1.6393 | 1900 | 0.0104 |
349
+ | 1.7256 | 2000 | 0.0117 |
350
+ | 1.8119 | 2100 | 0.0097 |
351
+ | 1.8982 | 2200 | 0.0133 |
352
+ | 1.9845 | 2300 | 0.01 |
353
+ | **2.0** | **2318** | **-** |
354
+ | 2.0708 | 2400 | 0.0109 |
355
+ | 2.1570 | 2500 | 0.0074 |
356
+ | 2.2433 | 2600 | 0.0072 |
357
+ | 2.3296 | 2700 | 0.015 |
358
+ | 2.4159 | 2800 | 0.0069 |
359
+ | 2.5022 | 2900 | 0.0107 |
360
+ | 2.5884 | 3000 | 0.0094 |
361
+ | 2.6747 | 3100 | 0.0105 |
362
+ | 2.7610 | 3200 | 0.0095 |
363
+ | 2.8473 | 3300 | 0.0072 |
364
+ | 2.9336 | 3400 | 0.0084 |
365
+ | 3.0 | 3477 | - |
366
+ | 3.0198 | 3500 | 0.0104 |
367
+ | 3.1061 | 3600 | 0.0078 |
368
+ | 3.1924 | 3700 | 0.008 |
369
+ | 3.2787 | 3800 | 0.0086 |
370
+ | 3.3650 | 3900 | 0.0085 |
371
+ | 3.4513 | 4000 | 0.0081 |
372
+ | 3.5375 | 4100 | 0.0093 |
373
+ | 3.6238 | 4200 | 0.0107 |
374
+ | 3.7101 | 4300 | 0.008 |
375
+ | 3.7964 | 4400 | 0.0099 |
376
+ | 3.8827 | 4500 | 0.0058 |
377
+ | 3.9689 | 4600 | 0.0084 |
378
+ | 4.0 | 4636 | - |
379
+ | 4.0552 | 4700 | 0.01 |
380
+ | 4.1415 | 4800 | 0.0053 |
381
+ | 4.2278 | 4900 | 0.0075 |
382
+ | 4.3141 | 5000 | 0.0077 |
383
+ | 4.4003 | 5100 | 0.0065 |
384
+ | 4.4866 | 5200 | 0.0089 |
385
+ | 4.5729 | 5300 | 0.0082 |
386
+ | 4.6592 | 5400 | 0.0093 |
387
+ | 4.7455 | 5500 | 0.0076 |
388
+ | 4.8318 | 5600 | 0.0095 |
389
+ | 4.9180 | 5700 | 0.0078 |
390
+ | 5.0 | 5795 | - |
391
+ | 5.0043 | 5800 | 0.0055 |
392
+ | 5.0906 | 5900 | 0.0061 |
393
+ | 5.1769 | 6000 | 0.005 |
394
+ | 5.2632 | 6100 | 0.0075 |
395
+ | 5.3494 | 6200 | 0.0079 |
396
+ | 5.4357 | 6300 | 0.006 |
397
+ | 5.5220 | 6400 | 0.0095 |
398
+ | 5.6083 | 6500 | 0.0099 |
399
+ | 5.6946 | 6600 | 0.0084 |
400
+ | 5.7808 | 6700 | 0.008 |
401
+ | 5.8671 | 6800 | 0.0064 |
402
+ | 5.9534 | 6900 | 0.0097 |
403
+ | 6.0 | 6954 | - |
404
+ | 6.0397 | 7000 | 0.0063 |
405
+ | 6.1260 | 7100 | 0.0069 |
406
+ | 6.2123 | 7200 | 0.0095 |
407
+ | 6.2985 | 7300 | 0.0067 |
408
+ | 6.3848 | 7400 | 0.0056 |
409
+ | 6.4711 | 7500 | 0.0074 |
410
+ | 6.5574 | 7600 | 0.0086 |
411
+ | 6.6437 | 7700 | 0.0072 |
412
+ | 6.7299 | 7800 | 0.0065 |
413
+ | 6.8162 | 7900 | 0.0052 |
414
+ | 6.9025 | 8000 | 0.0101 |
415
+ | 6.9888 | 8100 | 0.0086 |
416
+ | 7.0 | 8113 | - |
417
+ | 7.0751 | 8200 | 0.0065 |
418
+ | 7.1613 | 8300 | 0.0106 |
419
+ | 7.2476 | 8400 | 0.0049 |
420
+ | 7.3339 | 8500 | 0.0074 |
421
+ | 7.4202 | 8600 | 0.0065 |
422
+ | 7.5065 | 8700 | 0.004 |
423
+ | 7.5928 | 8800 | 0.0075 |
424
+ | 7.6790 | 8900 | 0.009 |
425
+ | 7.7653 | 9000 | 0.0059 |
426
+ | 7.8516 | 9100 | 0.0063 |
427
+ | 7.9379 | 9200 | 0.0095 |
428
+ | 8.0 | 9272 | - |
429
+ | 8.0242 | 9300 | 0.0082 |
430
+ | 8.1104 | 9400 | 0.0067 |
431
+ | 8.1967 | 9500 | 0.0063 |
432
+ | 8.2830 | 9600 | 0.0071 |
433
+ | 8.3693 | 9700 | 0.0064 |
434
+ | 8.4556 | 9800 | 0.0072 |
435
+ | 8.5418 | 9900 | 0.0059 |
436
+ | 8.6281 | 10000 | 0.0085 |
437
+ | 8.7144 | 10100 | 0.0083 |
438
+ | 8.8007 | 10200 | 0.0046 |
439
+ | 8.8870 | 10300 | 0.0055 |
440
+ | 8.9733 | 10400 | 0.008 |
441
+ | 9.0 | 10431 | - |
442
+ | 9.0595 | 10500 | 0.0066 |
443
+ | 9.1458 | 10600 | 0.0068 |
444
+ | 9.2321 | 10700 | 0.0093 |
445
+ | 9.3184 | 10800 | 0.0067 |
446
+ | 9.4047 | 10900 | 0.0054 |
447
+ | 9.4909 | 11000 | 0.0079 |
448
+ | 9.5772 | 11100 | 0.0052 |
449
+ | 9.6635 | 11200 | 0.0073 |
450
+ | 9.7498 | 11300 | 0.0088 |
451
+ | 9.8361 | 11400 | 0.005 |
452
+ | 9.9223 | 11500 | 0.0069 |
453
+ | 10.0 | 11590 | - |
454
+
455
+ * The bold row denotes the saved checkpoint.
456
+ </details>
457
+
458
+ ### Framework Versions
459
+ - Python: 3.10.13
460
+ - Sentence Transformers: 5.1.2
461
+ - Transformers: 4.57.1
462
+ - PyTorch: 2.9.0+cu128
463
+ - Accelerate: 1.11.0
464
+ - Datasets: 4.3.0
465
+ - Tokenizers: 0.22.1
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
+ #### SymmetricLoss
485
+ ```bibtex
486
+ @article{he2024language,
487
+ title={Language models as hierarchy encoders},
488
+ author={He, Yuan and Yuan, Zhangdie and Chen, Jiaoyan and Horrocks, Ian},
489
+ journal={arXiv preprint arXiv:2401.11374},
490
+ year={2024}
491
+ }
492
+ ```
493
+
494
+ <!--
495
+ ## Glossary
496
+
497
+ *Clearly define terms in order to be accessible across audiences.*
498
+ -->
499
+
500
+ <!--
501
+ ## Model Card Authors
502
+
503
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
504
+ -->
505
+
506
+ <!--
507
+ ## Model Card Contact
508
+
509
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
510
+ -->
config.json ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "BertModel"
4
+ ],
5
+ "attention_probs_dropout_prob": 0.1,
6
+ "classifier_dropout": null,
7
+ "dtype": "float32",
8
+ "gradient_checkpointing": false,
9
+ "hidden_act": "gelu",
10
+ "hidden_dropout_prob": 0.1,
11
+ "hidden_size": 768,
12
+ "initializer_range": 0.02,
13
+ "intermediate_size": 3072,
14
+ "layer_norm_eps": 1e-12,
15
+ "max_position_embeddings": 512,
16
+ "model_type": "bert",
17
+ "num_attention_heads": 12,
18
+ "num_hidden_layers": 12,
19
+ "pad_token_id": 0,
20
+ "position_embedding_type": "absolute",
21
+ "transformers_version": "4.57.1",
22
+ "type_vocab_size": 2,
23
+ "use_cache": true,
24
+ "vocab_size": 28996
25
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model_type": "HierarchyTransformer",
3
+ "__version__": {
4
+ "sentence_transformers": "5.1.2",
5
+ "transformers": "4.57.1",
6
+ "pytorch": "2.9.0+cu128"
7
+ },
8
+ "prompts": {
9
+ "query": "",
10
+ "document": ""
11
+ },
12
+ "default_prompt_name": null,
13
+ "similarity_fn_name": "cosine"
14
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d9e98e0837b48f23cbfb96e8d7534a0c2a80a3fffcc27819b8cfc9ee0b890b83
3
+ size 433263448
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": 256,
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": false,
48
+ "extra_special_tokens": {},
49
+ "mask_token": "[MASK]",
50
+ "model_max_length": 256,
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