PabloAccuosto commited on
Commit
8cb3bc8
·
verified ·
1 Parent(s): b9abc9c

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
1_Pooling/config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "word_embedding_dimension": 1024,
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 CHANGED
@@ -1,3 +1,414 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - sentence-transformers
4
+ - sentence-similarity
5
+ - feature-extraction
6
+ - generated_from_trainer
7
+ - dataset_size:47610
8
+ - loss:MultipleNegativesRankingLoss
9
+ widget:
10
+ - source_sentence: '[MENTION] Gustavus And Louise Pfeiffer Research Foundation [CITY]
11
+ Bangor [COUNTRY] United States'
12
+ sentences:
13
+ - '[MENTION] Gustavus And Louise Pfeiffer Research Foundation [CITY] Bangor [COUNTRY]
14
+ United States'
15
+ - '[MENTION] Fifth Tianjin Central Hospital [CITY] Tianjin [COUNTRY] China'
16
+ - '[MENTION] Purdue Research Foundation [ACRONYM] PRF [CITY] West Lafayette [COUNTRY]
17
+ United States'
18
+ - source_sentence: '[MENTION] ইন্টার-ইউরিভার্সিটি সেন্টার ফর অ্যাস্ট্রোনমি অ্যান্ড
19
+ অ্যাস্ট্রোফিজিক্স [CITY] Pune [COUNTRY] India'
20
+ sentences:
21
+ - '[MENTION] National Centre for Radio Astrophysics [ACRONYM] NCRA TIFR [PARENT]
22
+ Tata Institute of Fundamental Research [ACRONYM] TIFR [CITY] Pune [COUNTRY] India'
23
+ - '[MENTION] Inter-University Centre for Astronomy and Astrophysics [ACRONYM] IUCAA
24
+ [CITY] Pune [COUNTRY] India'
25
+ - '[MENTION] Iskra Medical (Slovenia) [CITY] Radovljica [COUNTRY] Slovenia'
26
+ - source_sentence: '[MENTION] Raytheon Technologies (Canada) [CITY] Calgary [COUNTRY]
27
+ Canada'
28
+ sentences:
29
+ - '[MENTION] Raytheon Technologies (Canada) [ACRONYM] RCL [PARENT] RTX (United States)
30
+ [CITY] Calgary [COUNTRY] Canada'
31
+ - '[MENTION] Yunnan Open University [CITY] Kunming [COUNTRY] China'
32
+ - '[MENTION] ATCO (Canada) [CITY] Calgary [COUNTRY] Canada'
33
+ - source_sentence: '[MENTION] 유한양행 [CITY] Seoul'
34
+ sentences:
35
+ - '[MENTION] Instituto de Medicina Molecular João Lobo Antunes [ACRONYM] IMM [PARENT]
36
+ University of Lisbon [CITY] Lisbon [COUNTRY] Portugal'
37
+ - '[MENTION] Boehringer Ingelheim (South Korea) [PARENT] Boehringer Ingelheim (Germany)
38
+ [CITY] Seoul [COUNTRY] South Korea'
39
+ - '[MENTION] Yuhan (South Korea) [CITY] Seoul [COUNTRY] South Korea'
40
+ - source_sentence: '[MENTION] Hyderabad Cleft Society [COUNTRY] India'
41
+ sentences:
42
+ - '[MENTION] Hyderabad Cleft Society [ACRONYM] HCS [CITY] Hyderabad [COUNTRY] India'
43
+ - '[MENTION] Hyderabad Rheumatology Center [ACRONYM] HRC [CITY] Hyderabad [COUNTRY]
44
+ India'
45
+ - '[MENTION] National Institute of Technology Akita College [PARENT] National Institute
46
+ of Technology [CITY] Akita [COUNTRY] Japan'
47
+ pipeline_tag: sentence-similarity
48
+ library_name: sentence-transformers
49
+ metrics:
50
+ - pearson_cosine
51
+ - spearman_cosine
52
+ model-index:
53
+ - name: SentenceTransformer
54
+ results:
55
+ - task:
56
+ type: semantic-similarity
57
+ name: Semantic Similarity
58
+ dataset:
59
+ name: entity linking eval
60
+ type: entity_linking_eval
61
+ metrics:
62
+ - type: pearson_cosine
63
+ value: 0.7072780089709011
64
+ name: Pearson Cosine
65
+ - type: spearman_cosine
66
+ value: 0.6825742231480432
67
+ name: Spearman Cosine
68
+ ---
69
+
70
+ # SentenceTransformer
71
+
72
+ This is a [sentence-transformers](https://www.SBERT.net) model trained. 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.
73
+
74
+ ## Model Details
75
+
76
+ ### Model Description
77
+ - **Model Type:** Sentence Transformer
78
+ <!-- - **Base model:** [Unknown](https://huggingface.co/unknown) -->
79
+ - **Maximum Sequence Length:** 128 tokens
80
+ - **Output Dimensionality:** 1024 dimensions
81
+ - **Similarity Function:** Cosine Similarity
82
+ <!-- - **Training Dataset:** Unknown -->
83
+ <!-- - **Language:** Unknown -->
84
+ <!-- - **License:** Unknown -->
85
+
86
+ ### Model Sources
87
+
88
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
89
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
90
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
91
+
92
+ ### Full Model Architecture
93
+
94
+ ```
95
+ SentenceTransformer(
96
+ (0): Transformer({'max_seq_length': 128, 'do_lower_case': False}) with Transformer model: XLMRobertaModel
97
+ (1): Pooling({'word_embedding_dimension': 1024, '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})
98
+ (2): Normalize()
99
+ )
100
+ ```
101
+
102
+ ## Usage
103
+
104
+ ### Direct Usage (Sentence Transformers)
105
+
106
+ First install the Sentence Transformers library:
107
+
108
+ ```bash
109
+ pip install -U sentence-transformers
110
+ ```
111
+
112
+ Then you can load this model and run inference.
113
+ ```python
114
+ from sentence_transformers import SentenceTransformer
115
+
116
+ # Download from the 🤗 Hub
117
+ model = SentenceTransformer("sentence_transformers_model_id")
118
+ # Run inference
119
+ sentences = [
120
+ '[MENTION] Hyderabad Cleft Society [COUNTRY] India',
121
+ '[MENTION] Hyderabad Cleft Society [ACRONYM] HCS [CITY] Hyderabad [COUNTRY] India',
122
+ '[MENTION] Hyderabad Rheumatology Center [ACRONYM] HRC [CITY] Hyderabad [COUNTRY] India',
123
+ ]
124
+ embeddings = model.encode(sentences)
125
+ print(embeddings.shape)
126
+ # [3, 1024]
127
+
128
+ # Get the similarity scores for the embeddings
129
+ similarities = model.similarity(embeddings, embeddings)
130
+ print(similarities.shape)
131
+ # [3, 3]
132
+ ```
133
+
134
+ <!--
135
+ ### Direct Usage (Transformers)
136
+
137
+ <details><summary>Click to see the direct usage in Transformers</summary>
138
+
139
+ </details>
140
+ -->
141
+
142
+ <!--
143
+ ### Downstream Usage (Sentence Transformers)
144
+
145
+ You can finetune this model on your own dataset.
146
+
147
+ <details><summary>Click to expand</summary>
148
+
149
+ </details>
150
+ -->
151
+
152
+ <!--
153
+ ### Out-of-Scope Use
154
+
155
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
156
+ -->
157
+
158
+ ## Evaluation
159
+
160
+ ### Metrics
161
+
162
+ #### Semantic Similarity
163
+
164
+ * Dataset: `entity_linking_eval`
165
+ * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
166
+
167
+ | Metric | Value |
168
+ |:--------------------|:-----------|
169
+ | pearson_cosine | 0.7073 |
170
+ | **spearman_cosine** | **0.6826** |
171
+
172
+ <!--
173
+ ## Bias, Risks and Limitations
174
+
175
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
176
+ -->
177
+
178
+ <!--
179
+ ### Recommendations
180
+
181
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
182
+ -->
183
+
184
+ ## Training Details
185
+
186
+ ### Training Dataset
187
+
188
+ #### Unnamed Dataset
189
+
190
+ * Size: 47,610 training samples
191
+ * Columns: <code>sentence_0</code>, <code>sentence_1</code>, and <code>sentence_2</code>
192
+ * Approximate statistics based on the first 1000 samples:
193
+ | | sentence_0 | sentence_1 | sentence_2 |
194
+ |:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|
195
+ | type | string | string | string |
196
+ | details | <ul><li>min: 5 tokens</li><li>mean: 13.61 tokens</li><li>max: 32 tokens</li></ul> | <ul><li>min: 9 tokens</li><li>mean: 18.63 tokens</li><li>max: 56 tokens</li></ul> | <ul><li>min: 10 tokens</li><li>mean: 19.66 tokens</li><li>max: 58 tokens</li></ul> |
197
+ * Samples:
198
+ | sentence_0 | sentence_1 | sentence_2 |
199
+ |:--------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------|
200
+ | <code>[MENTION] The Prince Of Wales'S Institute Of Architecture [CITY] London [COUNTRY] United Kingdom</code> | <code>[MENTION] The Princes Foundation [CITY] London [COUNTRY] United Kingdom</code> | <code>[MENTION] Royal Institute of British Architects [ACRONYM] RIBA [CITY] London [COUNTRY] United Kingdom</code> |
201
+ | <code>[MENTION] Development Finance & Public Policies [COUNTRY] Belgium</code> | <code>[MENTION] Development Finance and Public Policies [ACRONYM] DEFIPP [PARENT] University of Namur [CITY] Namur [COUNTRY] Belgium</code> | <code>[MENTION] Service Public Federal Finances [ACRONYM] SPF [CITY] Brussels [COUNTRY] Belgium</code> |
202
+ | <code>[MENTION] EES [COUNTRY] United States</code> | <code>[MENTION] Emerald Education Systems [ACRONYM] EES [CITY] Pasadena [COUNTRY] United States</code> | <code>[MENTION] ESI Group (United States) [ACRONYM] ESI [PARENT] ESI Group (France) [ACRONYM] ESI [CITY] Farmington Hills [COUNTRY] United States</code> |
203
+ * Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
204
+ ```json
205
+ {
206
+ "scale": 20.0,
207
+ "similarity_fct": "cos_sim"
208
+ }
209
+ ```
210
+
211
+ ### Training Hyperparameters
212
+ #### Non-Default Hyperparameters
213
+
214
+ - `eval_strategy`: steps
215
+ - `per_device_train_batch_size`: 16
216
+ - `per_device_eval_batch_size`: 16
217
+ - `fp16`: True
218
+ - `multi_dataset_batch_sampler`: round_robin
219
+
220
+ #### All Hyperparameters
221
+ <details><summary>Click to expand</summary>
222
+
223
+ - `overwrite_output_dir`: False
224
+ - `do_predict`: False
225
+ - `eval_strategy`: steps
226
+ - `prediction_loss_only`: True
227
+ - `per_device_train_batch_size`: 16
228
+ - `per_device_eval_batch_size`: 16
229
+ - `per_gpu_train_batch_size`: None
230
+ - `per_gpu_eval_batch_size`: None
231
+ - `gradient_accumulation_steps`: 1
232
+ - `eval_accumulation_steps`: None
233
+ - `learning_rate`: 5e-05
234
+ - `weight_decay`: 0.0
235
+ - `adam_beta1`: 0.9
236
+ - `adam_beta2`: 0.999
237
+ - `adam_epsilon`: 1e-08
238
+ - `max_grad_norm`: 1
239
+ - `num_train_epochs`: 3
240
+ - `max_steps`: -1
241
+ - `lr_scheduler_type`: linear
242
+ - `lr_scheduler_kwargs`: {}
243
+ - `warmup_ratio`: 0.0
244
+ - `warmup_steps`: 0
245
+ - `log_level`: passive
246
+ - `log_level_replica`: warning
247
+ - `log_on_each_node`: True
248
+ - `logging_nan_inf_filter`: True
249
+ - `save_safetensors`: True
250
+ - `save_on_each_node`: False
251
+ - `save_only_model`: False
252
+ - `restore_callback_states_from_checkpoint`: False
253
+ - `no_cuda`: False
254
+ - `use_cpu`: False
255
+ - `use_mps_device`: False
256
+ - `seed`: 42
257
+ - `data_seed`: None
258
+ - `jit_mode_eval`: False
259
+ - `use_ipex`: False
260
+ - `bf16`: False
261
+ - `fp16`: True
262
+ - `fp16_opt_level`: O1
263
+ - `half_precision_backend`: auto
264
+ - `bf16_full_eval`: False
265
+ - `fp16_full_eval`: False
266
+ - `tf32`: None
267
+ - `local_rank`: 0
268
+ - `ddp_backend`: None
269
+ - `tpu_num_cores`: None
270
+ - `tpu_metrics_debug`: False
271
+ - `debug`: []
272
+ - `dataloader_drop_last`: False
273
+ - `dataloader_num_workers`: 0
274
+ - `dataloader_prefetch_factor`: None
275
+ - `past_index`: -1
276
+ - `disable_tqdm`: False
277
+ - `remove_unused_columns`: True
278
+ - `label_names`: None
279
+ - `load_best_model_at_end`: False
280
+ - `ignore_data_skip`: False
281
+ - `fsdp`: []
282
+ - `fsdp_min_num_params`: 0
283
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
284
+ - `fsdp_transformer_layer_cls_to_wrap`: None
285
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
286
+ - `deepspeed`: None
287
+ - `label_smoothing_factor`: 0.0
288
+ - `optim`: adamw_torch
289
+ - `optim_args`: None
290
+ - `adafactor`: False
291
+ - `group_by_length`: False
292
+ - `length_column_name`: length
293
+ - `ddp_find_unused_parameters`: None
294
+ - `ddp_bucket_cap_mb`: None
295
+ - `ddp_broadcast_buffers`: False
296
+ - `dataloader_pin_memory`: True
297
+ - `dataloader_persistent_workers`: False
298
+ - `skip_memory_metrics`: True
299
+ - `use_legacy_prediction_loop`: False
300
+ - `push_to_hub`: False
301
+ - `resume_from_checkpoint`: None
302
+ - `hub_model_id`: None
303
+ - `hub_strategy`: every_save
304
+ - `hub_private_repo`: False
305
+ - `hub_always_push`: False
306
+ - `gradient_checkpointing`: False
307
+ - `gradient_checkpointing_kwargs`: None
308
+ - `include_inputs_for_metrics`: False
309
+ - `eval_do_concat_batches`: True
310
+ - `fp16_backend`: auto
311
+ - `push_to_hub_model_id`: None
312
+ - `push_to_hub_organization`: None
313
+ - `mp_parameters`:
314
+ - `auto_find_batch_size`: False
315
+ - `full_determinism`: False
316
+ - `torchdynamo`: None
317
+ - `ray_scope`: last
318
+ - `ddp_timeout`: 1800
319
+ - `torch_compile`: False
320
+ - `torch_compile_backend`: None
321
+ - `torch_compile_mode`: None
322
+ - `dispatch_batches`: None
323
+ - `split_batches`: None
324
+ - `include_tokens_per_second`: False
325
+ - `include_num_input_tokens_seen`: False
326
+ - `neftune_noise_alpha`: None
327
+ - `optim_target_modules`: None
328
+ - `batch_eval_metrics`: False
329
+ - `prompts`: None
330
+ - `batch_sampler`: batch_sampler
331
+ - `multi_dataset_batch_sampler`: round_robin
332
+
333
+ </details>
334
+
335
+ ### Training Logs
336
+ | Epoch | Step | Training Loss | entity_linking_eval_spearman_cosine |
337
+ |:------:|:----:|:-------------:|:-----------------------------------:|
338
+ | 0.1680 | 500 | 0.3431 | - |
339
+ | 0.3360 | 1000 | 0.252 | 0.4769 |
340
+ | 0.5040 | 1500 | 0.291 | - |
341
+ | 0.6720 | 2000 | 0.2445 | 0.6494 |
342
+ | 0.8401 | 2500 | 0.2339 | - |
343
+ | 1.0 | 2976 | - | 0.6694 |
344
+ | 1.0081 | 3000 | 0.2256 | 0.6730 |
345
+ | 1.1761 | 3500 | 0.16 | - |
346
+ | 1.3441 | 4000 | 0.1428 | 0.6750 |
347
+ | 1.5121 | 4500 | 0.1661 | - |
348
+ | 1.6801 | 5000 | 0.139 | 0.6713 |
349
+ | 1.8481 | 5500 | 0.1408 | - |
350
+ | 2.0 | 5952 | - | 0.6768 |
351
+ | 2.0161 | 6000 | 0.1409 | 0.6763 |
352
+ | 2.1841 | 6500 | 0.0759 | - |
353
+ | 2.3522 | 7000 | 0.0702 | 0.6820 |
354
+ | 2.5202 | 7500 | 0.0716 | - |
355
+ | 2.6882 | 8000 | 0.0777 | 0.6805 |
356
+ | 2.8562 | 8500 | 0.0685 | - |
357
+ | 3.0 | 8928 | - | 0.6826 |
358
+
359
+
360
+ ### Framework Versions
361
+ - Python: 3.10.12
362
+ - Sentence Transformers: 3.4.1
363
+ - Transformers: 4.41.2
364
+ - PyTorch: 2.2.0+cu121
365
+ - Accelerate: 1.2.1
366
+ - Datasets: 2.18.0
367
+ - Tokenizers: 0.19.1
368
+
369
+ ## Citation
370
+
371
+ ### BibTeX
372
+
373
+ #### Sentence Transformers
374
+ ```bibtex
375
+ @inproceedings{reimers-2019-sentence-bert,
376
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
377
+ author = "Reimers, Nils and Gurevych, Iryna",
378
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
379
+ month = "11",
380
+ year = "2019",
381
+ publisher = "Association for Computational Linguistics",
382
+ url = "https://arxiv.org/abs/1908.10084",
383
+ }
384
+ ```
385
+
386
+ #### MultipleNegativesRankingLoss
387
+ ```bibtex
388
+ @misc{henderson2017efficient,
389
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
390
+ 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},
391
+ year={2017},
392
+ eprint={1705.00652},
393
+ archivePrefix={arXiv},
394
+ primaryClass={cs.CL}
395
+ }
396
+ ```
397
+
398
+ <!--
399
+ ## Glossary
400
+
401
+ *Clearly define terms in order to be accessible across audiences.*
402
+ -->
403
+
404
+ <!--
405
+ ## Model Card Authors
406
+
407
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
408
+ -->
409
+
410
+ <!--
411
+ ## Model Card Contact
412
+
413
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
414
+ -->
added_tokens.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "[ACRONYM]": 250003,
3
+ "[CITY]": 250005,
4
+ "[COUNTRY]": 250006,
5
+ "[MENTION]": 250002,
6
+ "[PARENT]": 250004
7
+ }
config.json ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "/home/pablo/affilgood/affilgood/entity_linking/data/contrastive/model/finetuned_with_iter0_100percROR_special_tokens",
3
+ "architectures": [
4
+ "XLMRobertaModel"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "bos_token_id": 0,
8
+ "classifier_dropout": null,
9
+ "eos_token_id": 2,
10
+ "hidden_act": "gelu",
11
+ "hidden_dropout_prob": 0.1,
12
+ "hidden_size": 1024,
13
+ "initializer_range": 0.02,
14
+ "intermediate_size": 4096,
15
+ "layer_norm_eps": 1e-05,
16
+ "max_position_embeddings": 514,
17
+ "model_type": "xlm-roberta",
18
+ "num_attention_heads": 16,
19
+ "num_hidden_layers": 24,
20
+ "output_past": true,
21
+ "pad_token_id": 1,
22
+ "position_embedding_type": "absolute",
23
+ "torch_dtype": "float32",
24
+ "transformers_version": "4.41.2",
25
+ "type_vocab_size": 1,
26
+ "use_cache": true,
27
+ "vocab_size": 250007
28
+ }
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.2.0+cu121"
6
+ },
7
+ "prompts": {},
8
+ "default_prompt_name": null,
9
+ "similarity_fn_name": "cosine"
10
+ }
eval/similarity_evaluation_entity_linking_eval_results.csv ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ epoch,steps,cosine_pearson,cosine_spearman
2
+ 1.0,2976,0.6804017422113144,0.6694244550447879
3
+ 2.0,5952,0.7012000194087423,0.6768105861152512
4
+ 3.0,8928,0.7072780089709011,0.6825742231480432
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2175e93d789cd4ea065c2244d4cb51f5d20638d892f9c8c9dbfc96b91bda996d
3
+ size 2239627656
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": 128,
3
+ "do_lower_case": false
4
+ }
sentencepiece.bpe.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cfc8146abe2a0488e9e2a0c56de7952f7c11ab059eca145a0a727afce0db2865
3
+ size 5069051
special_tokens_map.json ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<s>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "cls_token": {
10
+ "content": "<s>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "eos_token": {
17
+ "content": "</s>",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "mask_token": {
24
+ "content": "<mask>",
25
+ "lstrip": true,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ },
30
+ "pad_token": {
31
+ "content": "<pad>",
32
+ "lstrip": false,
33
+ "normalized": false,
34
+ "rstrip": false,
35
+ "single_word": false
36
+ },
37
+ "sep_token": {
38
+ "content": "</s>",
39
+ "lstrip": false,
40
+ "normalized": false,
41
+ "rstrip": false,
42
+ "single_word": false
43
+ },
44
+ "unk_token": {
45
+ "content": "<unk>",
46
+ "lstrip": false,
47
+ "normalized": false,
48
+ "rstrip": false,
49
+ "single_word": false
50
+ }
51
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:44bc27f1c2bc1189b4bda0a3c563b961c21609fbe8f02ca6a16992b626b33190
3
+ size 17083913
tokenizer_config.json ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "<s>",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "1": {
12
+ "content": "<pad>",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "2": {
20
+ "content": "</s>",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "3": {
28
+ "content": "<unk>",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "250001": {
36
+ "content": "<mask>",
37
+ "lstrip": true,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ },
43
+ "250002": {
44
+ "content": "[MENTION]",
45
+ "lstrip": false,
46
+ "normalized": false,
47
+ "rstrip": false,
48
+ "single_word": false,
49
+ "special": true
50
+ },
51
+ "250003": {
52
+ "content": "[ACRONYM]",
53
+ "lstrip": false,
54
+ "normalized": false,
55
+ "rstrip": false,
56
+ "single_word": false,
57
+ "special": true
58
+ },
59
+ "250004": {
60
+ "content": "[PARENT]",
61
+ "lstrip": false,
62
+ "normalized": false,
63
+ "rstrip": false,
64
+ "single_word": false,
65
+ "special": true
66
+ },
67
+ "250005": {
68
+ "content": "[CITY]",
69
+ "lstrip": false,
70
+ "normalized": false,
71
+ "rstrip": false,
72
+ "single_word": false,
73
+ "special": true
74
+ },
75
+ "250006": {
76
+ "content": "[COUNTRY]",
77
+ "lstrip": false,
78
+ "normalized": false,
79
+ "rstrip": false,
80
+ "single_word": false,
81
+ "special": true
82
+ }
83
+ },
84
+ "bos_token": "<s>",
85
+ "clean_up_tokenization_spaces": true,
86
+ "cls_token": "<s>",
87
+ "eos_token": "</s>",
88
+ "mask_token": "<mask>",
89
+ "max_length": 128,
90
+ "model_max_length": 128,
91
+ "pad_to_multiple_of": null,
92
+ "pad_token": "<pad>",
93
+ "pad_token_type_id": 0,
94
+ "padding_side": "right",
95
+ "sep_token": "</s>",
96
+ "stride": 0,
97
+ "tokenizer_class": "XLMRobertaTokenizer",
98
+ "truncation_side": "right",
99
+ "truncation_strategy": "longest_first",
100
+ "unk_token": "<unk>"
101
+ }
training_args.json ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model_name": "/home/pablo/affilgood/affilgood/entity_linking/data/contrastive/model/finetuned_with_iter0_100percROR_special_tokens",
3
+ "data_file": "/home/pablo/affilgood/affilgood/entity_linking/data/contrastive/dataset/iter1_thres60_5neg_more-labels_100percROR_special_tokens.json",
4
+ "output_dir": "/home/pablo/affilgood/affilgood/entity_linking/data/contrastive/model/finetuned_with_iter1_thres60_5neg_more-labels_100percROR_special_tokens",
5
+ "batch_size": 16,
6
+ "epochs": 3,
7
+ "learning_rate": 2e-05,
8
+ "warmup_steps": 1000,
9
+ "max_seq_length": 128,
10
+ "eval_steps": 1000,
11
+ "seed": 42,
12
+ "use_amp": true,
13
+ "num_hard_negatives": 5,
14
+ "temperature": 0.05
15
+ }
training_info.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ Model trained on: 2025-03-25 14:58:11