diff --git a/1_Pooling/config.json b/1_Pooling/config.json new file mode 100644 index 0000000000000000000000000000000000000000..a97f8d140b6aee43dfac9fc4521b2842657c5608 --- /dev/null +++ b/1_Pooling/config.json @@ -0,0 +1,10 @@ +{ + "word_embedding_dimension": 384, + "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 +} \ No newline at end of file diff --git a/checkpoint-1386/1_Pooling/config.json b/checkpoint-1386/1_Pooling/config.json new file mode 100644 index 0000000000000000000000000000000000000000..a97f8d140b6aee43dfac9fc4521b2842657c5608 --- /dev/null +++ b/checkpoint-1386/1_Pooling/config.json @@ -0,0 +1,10 @@ +{ + "word_embedding_dimension": 384, + "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 +} \ No newline at end of file diff --git a/checkpoint-1386/README.md b/checkpoint-1386/README.md new file mode 100644 index 0000000000000000000000000000000000000000..e7fce08a6b26f72fadc423535cf0154e5f8e63ed --- /dev/null +++ b/checkpoint-1386/README.md @@ -0,0 +1,460 @@ +--- +language: +- en +license: apache-2.0 +tags: +- sentence-transformers +- sentence-similarity +- feature-extraction +- generated_from_trainer +- dataset_size:2130621 +- loss:ContrastiveLoss +base_model: sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2 +widget: +- source_sentence: Kim Chol-sam + sentences: + - Stankevich Sergey Nikolayevich + - Kim Chin-So’k + - Julen Lopetegui Agote +- source_sentence: دينا بنت عبد الحميد + sentences: + - Alexia van Amsberg + - Anthony Nicholas Colin Maitland Biddulph, 5th Baron Biddulph + - Dina bint Abdul-Hamíd +- source_sentence: Մուհամեդ բեն Նաիֆ Ալ Սաուդ + sentences: + - Karpov Anatoly Evgenyevich + - GNPower Mariveles Coal Plant [former] + - Muhammed bin Nayef bin Abdul Aziz Al Saud +- source_sentence: Edward Gnehm + sentences: + - Шауэрте, Хартмут + - Ханзада Филипп, Эдинбург герцогі + - AFX +- source_sentence: Schori i Lidingö + sentences: + - Yordan Canev + - ကားပေါ့ အန်နာတိုလီ + - BYSTROV, Mikhail Ivanovich +pipeline_tag: sentence-similarity +library_name: sentence-transformers +metrics: +- cosine_accuracy +- cosine_accuracy_threshold +- cosine_f1 +- cosine_f1_threshold +- cosine_precision +- cosine_recall +- cosine_ap +- cosine_mcc +model-index: +- name: sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2-name-matcher-original + results: + - task: + type: binary-classification + name: Binary Classification + dataset: + name: sentence transformers paraphrase multilingual MiniLM L12 v2 + type: sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2 + metrics: + - type: cosine_accuracy + value: 0.9846242227629088 + name: Cosine Accuracy + - type: cosine_accuracy_threshold + value: 0.6801187992095947 + name: Cosine Accuracy Threshold + - type: cosine_f1 + value: 0.9765449140552956 + name: Cosine F1 + - type: cosine_f1_threshold + value: 0.6780189275741577 + name: Cosine F1 Threshold + - type: cosine_precision + value: 0.9721848413657824 + name: Cosine Precision + - type: cosine_recall + value: 0.9809442711989229 + name: Cosine Recall + - type: cosine_ap + value: 0.9955904030209028 + name: Cosine Ap + - type: cosine_mcc + value: 0.9651303277408154 + name: Cosine Mcc +--- + +# sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2-name-matcher-original + +This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2](https://huggingface.co/sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2). It maps sentences & paragraphs to a 384-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more. + +## Model Details + +### Model Description +- **Model Type:** Sentence Transformer +- **Base model:** [sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2](https://huggingface.co/sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2) +- **Maximum Sequence Length:** 128 tokens +- **Output Dimensionality:** 384 dimensions +- **Similarity Function:** Cosine Similarity + +- **Language:** en +- **License:** apache-2.0 + +### Model Sources + +- **Documentation:** [Sentence Transformers Documentation](https://sbert.net) +- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers) +- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers) + +### Full Model Architecture + +``` +SentenceTransformer( + (0): Transformer({'max_seq_length': 128, 'do_lower_case': False}) with Transformer model: BertModel + (1): Pooling({'word_embedding_dimension': 384, '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}) +) +``` + +## Usage + +### Direct Usage (Sentence Transformers) + +First install the Sentence Transformers library: + +```bash +pip install -U sentence-transformers +``` + +Then you can load this model and run inference. +```python +from sentence_transformers import SentenceTransformer + +# Download from the 🤗 Hub +model = SentenceTransformer("sentence_transformers_model_id") +# Run inference +sentences = [ + 'Schori i Lidingö', + 'Yordan Canev', + 'ကားပေါ့ အန်နာတိုလီ', +] +embeddings = model.encode(sentences) +print(embeddings.shape) +# [3, 384] + +# Get the similarity scores for the embeddings +similarities = model.similarity(embeddings, embeddings) +print(similarities.shape) +# [3, 3] +``` + + + + + + + +## Evaluation + +### Metrics + +#### Binary Classification + +* Dataset: `sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2` +* Evaluated with [BinaryClassificationEvaluator](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.BinaryClassificationEvaluator) + +| Metric | Value | +|:--------------------------|:-----------| +| cosine_accuracy | 0.9846 | +| cosine_accuracy_threshold | 0.6801 | +| cosine_f1 | 0.9765 | +| cosine_f1_threshold | 0.678 | +| cosine_precision | 0.9722 | +| cosine_recall | 0.9809 | +| **cosine_ap** | **0.9956** | +| cosine_mcc | 0.9651 | + + + + + +## Training Details + +### Training Dataset + +#### Unnamed Dataset + +* Size: 2,130,621 training samples +* Columns: sentence1, sentence2, and label +* Approximate statistics based on the first 1000 samples: + | | sentence1 | sentence2 | label | + |:--------|:---------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|:---------------------------------------------------------------| + | type | string | string | float | + | details | | | | +* Samples: + | sentence1 | sentence2 | label | + |:----------------------------------|:------------------------------------|:-----------------| + | 캐스린 설리번 | Kathryn D. Sullivanová | 1.0 | + | ଶିବରାଜ ଅଧାଲରାଓ ପାଟିଲ | Aleksander Lubocki | 0.0 | + | Пырванов, Георги | アナトーリー・セルジュコフ | 0.0 | +* Loss: [ContrastiveLoss](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#contrastiveloss) with these parameters: + ```json + { + "distance_metric": "SiameseDistanceMetric.COSINE_DISTANCE", + "margin": 0.5, + "size_average": true + } + ``` + +### Evaluation Dataset + +#### Unnamed Dataset + +* Size: 2,663,276 evaluation samples +* Columns: sentence1, sentence2, and label +* Approximate statistics based on the first 1000 samples: + | | sentence1 | sentence2 | label | + |:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------| + | type | string | string | float | + | details | | | | +* Samples: + | sentence1 | sentence2 | label | + |:--------------------------------------|:---------------------------------------|:-----------------| + | Ева Херман | I Xuan Karlos | 0.0 | + | Кличков Андрій Євгенович | Андрэй Яўгенавіч Клычкоў | 1.0 | + | Кинах А. | Senator John Hickenlooper | 0.0 | +* Loss: [ContrastiveLoss](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#contrastiveloss) with these parameters: + ```json + { + "distance_metric": "SiameseDistanceMetric.COSINE_DISTANCE", + "margin": 0.5, + "size_average": true + } + ``` + +### Training Hyperparameters +#### Non-Default Hyperparameters + +- `eval_strategy`: epoch +- `per_device_train_batch_size`: 768 +- `per_device_eval_batch_size`: 768 +- `gradient_accumulation_steps`: 4 +- `learning_rate`: 3e-05 +- `weight_decay`: 0.01 +- `num_train_epochs`: 4 +- `warmup_ratio`: 0.1 +- `fp16`: True +- `load_best_model_at_end`: True +- `optim`: adafactor + +#### All Hyperparameters +
Click to expand + +- `overwrite_output_dir`: False +- `do_predict`: False +- `eval_strategy`: epoch +- `prediction_loss_only`: True +- `per_device_train_batch_size`: 768 +- `per_device_eval_batch_size`: 768 +- `per_gpu_train_batch_size`: None +- `per_gpu_eval_batch_size`: None +- `gradient_accumulation_steps`: 4 +- `eval_accumulation_steps`: None +- `torch_empty_cache_steps`: None +- `learning_rate`: 3e-05 +- `weight_decay`: 0.01 +- `adam_beta1`: 0.9 +- `adam_beta2`: 0.999 +- `adam_epsilon`: 1e-08 +- `max_grad_norm`: 1.0 +- `num_train_epochs`: 4 +- `max_steps`: -1 +- `lr_scheduler_type`: linear +- `lr_scheduler_kwargs`: {} +- `warmup_ratio`: 0.1 +- `warmup_steps`: 0 +- `log_level`: passive +- `log_level_replica`: warning +- `log_on_each_node`: True +- `logging_nan_inf_filter`: True +- `save_safetensors`: True +- `save_on_each_node`: False +- `save_only_model`: False +- `restore_callback_states_from_checkpoint`: False +- `no_cuda`: False +- `use_cpu`: False +- `use_mps_device`: False +- `seed`: 42 +- `data_seed`: None +- `jit_mode_eval`: False +- `use_ipex`: False +- `bf16`: False +- `fp16`: True +- `fp16_opt_level`: O1 +- `half_precision_backend`: auto +- `bf16_full_eval`: False +- `fp16_full_eval`: False +- `tf32`: None +- `local_rank`: 0 +- `ddp_backend`: None +- `tpu_num_cores`: None +- `tpu_metrics_debug`: False +- `debug`: [] +- `dataloader_drop_last`: False +- `dataloader_num_workers`: 0 +- `dataloader_prefetch_factor`: None +- `past_index`: -1 +- `disable_tqdm`: False +- `remove_unused_columns`: True +- `label_names`: None +- `load_best_model_at_end`: True +- `ignore_data_skip`: False +- `fsdp`: [] +- `fsdp_min_num_params`: 0 +- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False} +- `tp_size`: 0 +- `fsdp_transformer_layer_cls_to_wrap`: None +- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None} +- `deepspeed`: None +- `label_smoothing_factor`: 0.0 +- `optim`: adafactor +- `optim_args`: None +- `adafactor`: False +- `group_by_length`: False +- `length_column_name`: length +- `ddp_find_unused_parameters`: None +- `ddp_bucket_cap_mb`: None +- `ddp_broadcast_buffers`: False +- `dataloader_pin_memory`: True +- `dataloader_persistent_workers`: False +- `skip_memory_metrics`: True +- `use_legacy_prediction_loop`: False +- `push_to_hub`: False +- `resume_from_checkpoint`: None +- `hub_model_id`: None +- `hub_strategy`: every_save +- `hub_private_repo`: None +- `hub_always_push`: False +- `gradient_checkpointing`: False +- `gradient_checkpointing_kwargs`: None +- `include_inputs_for_metrics`: False +- `include_for_metrics`: [] +- `eval_do_concat_batches`: True +- `fp16_backend`: auto +- `push_to_hub_model_id`: None +- `push_to_hub_organization`: None +- `mp_parameters`: +- `auto_find_batch_size`: False +- `full_determinism`: False +- `torchdynamo`: None +- `ray_scope`: last +- `ddp_timeout`: 1800 +- `torch_compile`: False +- `torch_compile_backend`: None +- `torch_compile_mode`: None +- `include_tokens_per_second`: False +- `include_num_input_tokens_seen`: False +- `neftune_noise_alpha`: None +- `optim_target_modules`: None +- `batch_eval_metrics`: False +- `eval_on_start`: False +- `use_liger_kernel`: False +- `eval_use_gather_object`: False +- `average_tokens_across_devices`: False +- `prompts`: None +- `batch_sampler`: batch_sampler +- `multi_dataset_batch_sampler`: proportional + +
+ +### Training Logs +| Epoch | Step | Training Loss | Validation Loss | sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_ap | +|:------:|:----:|:-------------:|:---------------:|:---------------------------------------------------------------------:| +| -1 | -1 | - | - | 0.7140 | +| 0.7207 | 500 | 0.038 | - | - | +| 0.9989 | 693 | - | 0.0028 | 0.9911 | +| 1.4425 | 1000 | 0.0128 | - | - | +| 1.9989 | 1386 | - | 0.0021 | 0.9956 | + + +### Framework Versions +- Python: 3.12.9 +- Sentence Transformers: 3.4.1 +- Transformers: 4.51.3 +- PyTorch: 2.7.0+cu126 +- Accelerate: 1.6.0 +- Datasets: 3.6.0 +- Tokenizers: 0.21.1 + +## Citation + +### BibTeX + +#### Sentence Transformers +```bibtex +@inproceedings{reimers-2019-sentence-bert, + title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks", + author = "Reimers, Nils and Gurevych, Iryna", + booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing", + month = "11", + year = "2019", + publisher = "Association for Computational Linguistics", + url = "https://arxiv.org/abs/1908.10084", +} +``` + +#### ContrastiveLoss +```bibtex +@inproceedings{hadsell2006dimensionality, + author={Hadsell, R. and Chopra, S. and LeCun, Y.}, + booktitle={2006 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR'06)}, + title={Dimensionality Reduction by Learning an Invariant Mapping}, + year={2006}, + volume={2}, + number={}, + pages={1735-1742}, + doi={10.1109/CVPR.2006.100} +} +``` + + + + + + \ No newline at end of file diff --git a/checkpoint-1386/config.json b/checkpoint-1386/config.json new file mode 100644 index 0000000000000000000000000000000000000000..26e48501fdf44110239e00ad4d438aee8679504a --- /dev/null +++ b/checkpoint-1386/config.json @@ -0,0 +1,25 @@ +{ + "architectures": [ + "BertModel" + ], + "attention_probs_dropout_prob": 0.1, + "classifier_dropout": null, + "gradient_checkpointing": false, + "hidden_act": "gelu", + "hidden_dropout_prob": 0.1, + "hidden_size": 384, + "initializer_range": 0.02, + "intermediate_size": 1536, + "layer_norm_eps": 1e-12, + "max_position_embeddings": 512, + "model_type": "bert", + "num_attention_heads": 12, + "num_hidden_layers": 12, + "pad_token_id": 0, + "position_embedding_type": "absolute", + "torch_dtype": "float32", + "transformers_version": "4.51.3", + "type_vocab_size": 2, + "use_cache": true, + "vocab_size": 250037 +} diff --git a/checkpoint-1386/config_sentence_transformers.json b/checkpoint-1386/config_sentence_transformers.json new file mode 100644 index 0000000000000000000000000000000000000000..dcf436801f55bd22a257de2aad7eef5cfd06efaa --- /dev/null +++ b/checkpoint-1386/config_sentence_transformers.json @@ -0,0 +1,10 @@ +{ + "__version__": { + "sentence_transformers": "3.4.1", + "transformers": "4.51.3", + "pytorch": "2.7.0+cu126" + }, + "prompts": {}, + "default_prompt_name": null, + "similarity_fn_name": "cosine" +} \ No newline at end of file diff --git a/checkpoint-1386/model.safetensors b/checkpoint-1386/model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..d2e01043a8ccef7aa373f5618ce0d01e869e7597 --- /dev/null +++ b/checkpoint-1386/model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e63c4102bbc807f6f65e6dfc340ebdf81b6d809419616e5c686dc0ae4ee24c69 +size 470637416 diff --git a/checkpoint-1386/modules.json b/checkpoint-1386/modules.json new file mode 100644 index 0000000000000000000000000000000000000000..f7640f94e81bb7f4f04daf1668850b38763a13d9 --- /dev/null +++ b/checkpoint-1386/modules.json @@ -0,0 +1,14 @@ +[ + { + "idx": 0, + "name": "0", + "path": "", + "type": "sentence_transformers.models.Transformer" + }, + { + "idx": 1, + "name": "1", + "path": "1_Pooling", + "type": "sentence_transformers.models.Pooling" + } +] \ No newline at end of file diff --git a/checkpoint-1386/optimizer.pt b/checkpoint-1386/optimizer.pt new file mode 100644 index 0000000000000000000000000000000000000000..1ceb3da28e6e09293766035251914eaaccc068d3 --- /dev/null +++ b/checkpoint-1386/optimizer.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:23860257dbcfd9b5b597ed0f71ec9d1d0888d586ddccbe366e3c4cea28a49c54 +size 1715019 diff --git a/checkpoint-1386/rng_state.pth b/checkpoint-1386/rng_state.pth new file mode 100644 index 0000000000000000000000000000000000000000..0e1d2cea903a56a37e239bf6617ac96d038c2e40 --- /dev/null +++ b/checkpoint-1386/rng_state.pth @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cafafda98c3eee33da2fc3dc512fb690207c63cd6c23669bf103b6115333673f +size 14645 diff --git a/checkpoint-1386/scaler.pt b/checkpoint-1386/scaler.pt new file mode 100644 index 0000000000000000000000000000000000000000..79a79c76ea8e0c8590655d5cc9f51a2c46c1d391 --- /dev/null +++ b/checkpoint-1386/scaler.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:80cf4f866900877d5a70b5a4212850bd6349868cb41fa3deed374b2e1ff32fd1 +size 1383 diff --git a/checkpoint-1386/scheduler.pt b/checkpoint-1386/scheduler.pt new file mode 100644 index 0000000000000000000000000000000000000000..4c4bea9017104956e6b3d74d66f8d3a7a8684d75 --- /dev/null +++ b/checkpoint-1386/scheduler.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cf0f4146f2cb078d3608133188b68bec6910432c8f56446c257e96b3d46d2b17 +size 1465 diff --git a/checkpoint-1386/sentence_bert_config.json b/checkpoint-1386/sentence_bert_config.json new file mode 100644 index 0000000000000000000000000000000000000000..5fd10429389515d3e5cccdeda08cae5fea1ae82e --- /dev/null +++ b/checkpoint-1386/sentence_bert_config.json @@ -0,0 +1,4 @@ +{ + "max_seq_length": 128, + "do_lower_case": false +} \ No newline at end of file diff --git a/checkpoint-1386/special_tokens_map.json b/checkpoint-1386/special_tokens_map.json new file mode 100644 index 0000000000000000000000000000000000000000..b1879d702821e753ffe4245048eee415d54a9385 --- /dev/null +++ b/checkpoint-1386/special_tokens_map.json @@ -0,0 +1,51 @@ +{ + "bos_token": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false + }, + "cls_token": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false + }, + "eos_token": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false + }, + "mask_token": { + "content": "", + "lstrip": true, + "normalized": false, + "rstrip": false, + "single_word": false + }, + "pad_token": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false + }, + "sep_token": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false + }, + "unk_token": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false + } +} diff --git a/checkpoint-1386/tokenizer.json b/checkpoint-1386/tokenizer.json new file mode 100644 index 0000000000000000000000000000000000000000..e3420945e193cc0791136cdc6e5cd69801c838af --- /dev/null +++ b/checkpoint-1386/tokenizer.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cad551d5600a84242d0973327029452a1e3672ba6313c2a3c3d69c4310e12719 +size 17082987 diff --git a/checkpoint-1386/tokenizer_config.json b/checkpoint-1386/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..facf4436a8f11c26085c16a14f4e576853927a9e --- /dev/null +++ b/checkpoint-1386/tokenizer_config.json @@ -0,0 +1,65 @@ +{ + "added_tokens_decoder": { + "0": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": true + }, + "1": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": true + }, + "2": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": true + }, + "3": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": true + }, + "250001": { + "content": "", + "lstrip": true, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": true + } + }, + "bos_token": "", + "clean_up_tokenization_spaces": false, + "cls_token": "", + "do_lower_case": true, + "eos_token": "", + "extra_special_tokens": {}, + "mask_token": "", + "max_length": 128, + "model_max_length": 128, + "pad_to_multiple_of": null, + "pad_token": "", + "pad_token_type_id": 0, + "padding_side": "right", + "sep_token": "", + "stride": 0, + "strip_accents": null, + "tokenize_chinese_chars": true, + "tokenizer_class": "BertTokenizer", + "truncation_side": "right", + "truncation_strategy": "longest_first", + "unk_token": "" +} diff --git a/checkpoint-1386/trainer_state.json b/checkpoint-1386/trainer_state.json new file mode 100644 index 0000000000000000000000000000000000000000..d8192d5fa18329c51ecf875c1ab151aab43a8f87 --- /dev/null +++ b/checkpoint-1386/trainer_state.json @@ -0,0 +1,89 @@ +{ + "best_global_step": 1386, + "best_metric": 0.002118302509188652, + "best_model_checkpoint": "data/fine-tuned-sbert-sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2-original-adafactor/checkpoint-1386", + "epoch": 1.998918918918919, + "eval_steps": 100, + "global_step": 1386, + "is_hyper_param_search": false, + "is_local_process_zero": true, + "is_world_process_zero": true, + "log_history": [ + { + "epoch": 0.7207207207207207, + "grad_norm": 0.15965162217617035, + "learning_rate": 2.7341619887730554e-05, + "loss": 0.038, + "step": 500 + }, + { + "epoch": 0.9989189189189189, + "eval_loss": 0.002777691464871168, + "eval_runtime": 792.7494, + "eval_samples_per_second": 3359.543, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_accuracy": 0.975327415818089, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_accuracy_threshold": 0.7701693773269653, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_ap": 0.9911172257655966, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_f1": 0.9624723810391563, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_f1_threshold": 0.7597355842590332, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_mcc": 0.9441287064717891, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_precision": 0.9527175567355498, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_recall": 0.9724290300680068, + "eval_steps_per_second": 4.375, + "step": 693 + }, + { + "epoch": 1.4425225225225224, + "grad_norm": 0.11966603249311447, + "learning_rate": 2.1327185244587008e-05, + "loss": 0.0128, + "step": 1000 + }, + { + "epoch": 1.998918918918919, + "eval_loss": 0.002118302509188652, + "eval_runtime": 789.0568, + "eval_samples_per_second": 3375.265, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_accuracy": 0.9846242227629088, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_accuracy_threshold": 0.6801187992095947, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_ap": 0.9955904030209028, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_f1": 0.9765449140552956, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_f1_threshold": 0.6780189275741577, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_mcc": 0.9651303277408154, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_precision": 0.9721848413657824, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_recall": 0.9809442711989229, + "eval_steps_per_second": 4.395, + "step": 1386 + } + ], + "logging_steps": 500, + "max_steps": 2772, + "num_input_tokens_seen": 0, + "num_train_epochs": 4, + "save_steps": 100, + "stateful_callbacks": { + "EarlyStoppingCallback": { + "args": { + "early_stopping_patience": 1, + "early_stopping_threshold": 0.0 + }, + "attributes": { + "early_stopping_patience_counter": 0 + } + }, + "TrainerControl": { + "args": { + "should_epoch_stop": false, + "should_evaluate": false, + "should_log": false, + "should_save": true, + "should_training_stop": false + }, + "attributes": {} + } + }, + "total_flos": 0.0, + "train_batch_size": 768, + "trial_name": null, + "trial_params": null +} diff --git a/checkpoint-1386/training_args.bin b/checkpoint-1386/training_args.bin new file mode 100644 index 0000000000000000000000000000000000000000..65b989c1e3d30efe64e2dc0572f41454e6d26706 --- /dev/null +++ b/checkpoint-1386/training_args.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ee490aac80277022fdde76dd6763dbabee88802149f3f246e7d0572b504fcdaf +size 6097 diff --git a/checkpoint-1386/unigram.json b/checkpoint-1386/unigram.json new file mode 100644 index 0000000000000000000000000000000000000000..2faa9ec874108d53a017ff2c7ab98d155fb21a82 --- /dev/null +++ b/checkpoint-1386/unigram.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:da145b5e7700ae40f16691ec32a0b1fdc1ee3298db22a31ea55f57a966c4a65d +size 14763260 diff --git a/checkpoint-2079/1_Pooling/config.json b/checkpoint-2079/1_Pooling/config.json new file mode 100644 index 0000000000000000000000000000000000000000..a97f8d140b6aee43dfac9fc4521b2842657c5608 --- /dev/null +++ b/checkpoint-2079/1_Pooling/config.json @@ -0,0 +1,10 @@ +{ + "word_embedding_dimension": 384, + "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 +} \ No newline at end of file diff --git a/checkpoint-2079/README.md b/checkpoint-2079/README.md new file mode 100644 index 0000000000000000000000000000000000000000..2f6f6062257574a5d84a84b819ba0067bed9bbea --- /dev/null +++ b/checkpoint-2079/README.md @@ -0,0 +1,463 @@ +--- +language: +- en +license: apache-2.0 +tags: +- sentence-transformers +- sentence-similarity +- feature-extraction +- generated_from_trainer +- dataset_size:2130621 +- loss:ContrastiveLoss +base_model: sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2 +widget: +- source_sentence: Kim Chol-sam + sentences: + - Stankevich Sergey Nikolayevich + - Kim Chin-So’k + - Julen Lopetegui Agote +- source_sentence: دينا بنت عبد الحميد + sentences: + - Alexia van Amsberg + - Anthony Nicholas Colin Maitland Biddulph, 5th Baron Biddulph + - Dina bint Abdul-Hamíd +- source_sentence: Մուհամեդ բեն Նաիֆ Ալ Սաուդ + sentences: + - Karpov Anatoly Evgenyevich + - GNPower Mariveles Coal Plant [former] + - Muhammed bin Nayef bin Abdul Aziz Al Saud +- source_sentence: Edward Gnehm + sentences: + - Шауэрте, Хартмут + - Ханзада Филипп, Эдинбург герцогі + - AFX +- source_sentence: Schori i Lidingö + sentences: + - Yordan Canev + - ကားပေါ့ အန်နာတိုလီ + - BYSTROV, Mikhail Ivanovich +pipeline_tag: sentence-similarity +library_name: sentence-transformers +metrics: +- cosine_accuracy +- cosine_accuracy_threshold +- cosine_f1 +- cosine_f1_threshold +- cosine_precision +- cosine_recall +- cosine_ap +- cosine_mcc +model-index: +- name: sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2-name-matcher-original + results: + - task: + type: binary-classification + name: Binary Classification + dataset: + name: sentence transformers paraphrase multilingual MiniLM L12 v2 + type: sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2 + metrics: + - type: cosine_accuracy + value: 0.9879171547865789 + name: Cosine Accuracy + - type: cosine_accuracy_threshold + value: 0.7181636691093445 + name: Cosine Accuracy Threshold + - type: cosine_f1 + value: 0.9815604299892273 + name: Cosine F1 + - type: cosine_f1_threshold + value: 0.7181636691093445 + name: Cosine F1 Threshold + - type: cosine_precision + value: 0.9775832353646149 + name: Cosine Precision + - type: cosine_recall + value: 0.98557011840788 + name: Cosine Recall + - type: cosine_ap + value: 0.996840725826042 + name: Cosine Ap + - type: cosine_mcc + value: 0.9725931427811844 + name: Cosine Mcc +--- + +# sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2-name-matcher-original + +This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2](https://huggingface.co/sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2). It maps sentences & paragraphs to a 384-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more. + +## Model Details + +### Model Description +- **Model Type:** Sentence Transformer +- **Base model:** [sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2](https://huggingface.co/sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2) +- **Maximum Sequence Length:** 128 tokens +- **Output Dimensionality:** 384 dimensions +- **Similarity Function:** Cosine Similarity + +- **Language:** en +- **License:** apache-2.0 + +### Model Sources + +- **Documentation:** [Sentence Transformers Documentation](https://sbert.net) +- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers) +- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers) + +### Full Model Architecture + +``` +SentenceTransformer( + (0): Transformer({'max_seq_length': 128, 'do_lower_case': False}) with Transformer model: BertModel + (1): Pooling({'word_embedding_dimension': 384, '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}) +) +``` + +## Usage + +### Direct Usage (Sentence Transformers) + +First install the Sentence Transformers library: + +```bash +pip install -U sentence-transformers +``` + +Then you can load this model and run inference. +```python +from sentence_transformers import SentenceTransformer + +# Download from the 🤗 Hub +model = SentenceTransformer("sentence_transformers_model_id") +# Run inference +sentences = [ + 'Schori i Lidingö', + 'Yordan Canev', + 'ကားပေါ့ အန်နာတိုလီ', +] +embeddings = model.encode(sentences) +print(embeddings.shape) +# [3, 384] + +# Get the similarity scores for the embeddings +similarities = model.similarity(embeddings, embeddings) +print(similarities.shape) +# [3, 3] +``` + + + + + + + +## Evaluation + +### Metrics + +#### Binary Classification + +* Dataset: `sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2` +* Evaluated with [BinaryClassificationEvaluator](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.BinaryClassificationEvaluator) + +| Metric | Value | +|:--------------------------|:-----------| +| cosine_accuracy | 0.9879 | +| cosine_accuracy_threshold | 0.7182 | +| cosine_f1 | 0.9816 | +| cosine_f1_threshold | 0.7182 | +| cosine_precision | 0.9776 | +| cosine_recall | 0.9856 | +| **cosine_ap** | **0.9968** | +| cosine_mcc | 0.9726 | + + + + + +## Training Details + +### Training Dataset + +#### Unnamed Dataset + +* Size: 2,130,621 training samples +* Columns: sentence1, sentence2, and label +* Approximate statistics based on the first 1000 samples: + | | sentence1 | sentence2 | label | + |:--------|:---------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|:---------------------------------------------------------------| + | type | string | string | float | + | details |
  • min: 3 tokens
  • mean: 9.32 tokens
  • max: 57 tokens
|
  • min: 3 tokens
  • mean: 9.16 tokens
  • max: 54 tokens
|
  • min: 0.0
  • mean: 0.34
  • max: 1.0
| +* Samples: + | sentence1 | sentence2 | label | + |:----------------------------------|:------------------------------------|:-----------------| + | 캐스린 설리번 | Kathryn D. Sullivanová | 1.0 | + | ଶିବରାଜ ଅଧାଲରାଓ ପାଟିଲ | Aleksander Lubocki | 0.0 | + | Пырванов, Георги | アナトーリー・セルジュコフ | 0.0 | +* Loss: [ContrastiveLoss](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#contrastiveloss) with these parameters: + ```json + { + "distance_metric": "SiameseDistanceMetric.COSINE_DISTANCE", + "margin": 0.5, + "size_average": true + } + ``` + +### Evaluation Dataset + +#### Unnamed Dataset + +* Size: 2,663,276 evaluation samples +* Columns: sentence1, sentence2, and label +* Approximate statistics based on the first 1000 samples: + | | sentence1 | sentence2 | label | + |:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------| + | type | string | string | float | + | details |
  • min: 3 tokens
  • mean: 9.34 tokens
  • max: 102 tokens
|
  • min: 4 tokens
  • mean: 9.11 tokens
  • max: 100 tokens
|
  • min: 0.0
  • mean: 0.33
  • max: 1.0
| +* Samples: + | sentence1 | sentence2 | label | + |:--------------------------------------|:---------------------------------------|:-----------------| + | Ева Херман | I Xuan Karlos | 0.0 | + | Кличков Андрій Євгенович | Андрэй Яўгенавіч Клычкоў | 1.0 | + | Кинах А. | Senator John Hickenlooper | 0.0 | +* Loss: [ContrastiveLoss](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#contrastiveloss) with these parameters: + ```json + { + "distance_metric": "SiameseDistanceMetric.COSINE_DISTANCE", + "margin": 0.5, + "size_average": true + } + ``` + +### Training Hyperparameters +#### Non-Default Hyperparameters + +- `eval_strategy`: epoch +- `per_device_train_batch_size`: 768 +- `per_device_eval_batch_size`: 768 +- `gradient_accumulation_steps`: 4 +- `learning_rate`: 3e-05 +- `weight_decay`: 0.01 +- `num_train_epochs`: 4 +- `warmup_ratio`: 0.1 +- `fp16`: True +- `load_best_model_at_end`: True +- `optim`: adafactor + +#### All Hyperparameters +
Click to expand + +- `overwrite_output_dir`: False +- `do_predict`: False +- `eval_strategy`: epoch +- `prediction_loss_only`: True +- `per_device_train_batch_size`: 768 +- `per_device_eval_batch_size`: 768 +- `per_gpu_train_batch_size`: None +- `per_gpu_eval_batch_size`: None +- `gradient_accumulation_steps`: 4 +- `eval_accumulation_steps`: None +- `torch_empty_cache_steps`: None +- `learning_rate`: 3e-05 +- `weight_decay`: 0.01 +- `adam_beta1`: 0.9 +- `adam_beta2`: 0.999 +- `adam_epsilon`: 1e-08 +- `max_grad_norm`: 1.0 +- `num_train_epochs`: 4 +- `max_steps`: -1 +- `lr_scheduler_type`: linear +- `lr_scheduler_kwargs`: {} +- `warmup_ratio`: 0.1 +- `warmup_steps`: 0 +- `log_level`: passive +- `log_level_replica`: warning +- `log_on_each_node`: True +- `logging_nan_inf_filter`: True +- `save_safetensors`: True +- `save_on_each_node`: False +- `save_only_model`: False +- `restore_callback_states_from_checkpoint`: False +- `no_cuda`: False +- `use_cpu`: False +- `use_mps_device`: False +- `seed`: 42 +- `data_seed`: None +- `jit_mode_eval`: False +- `use_ipex`: False +- `bf16`: False +- `fp16`: True +- `fp16_opt_level`: O1 +- `half_precision_backend`: auto +- `bf16_full_eval`: False +- `fp16_full_eval`: False +- `tf32`: None +- `local_rank`: 0 +- `ddp_backend`: None +- `tpu_num_cores`: None +- `tpu_metrics_debug`: False +- `debug`: [] +- `dataloader_drop_last`: False +- `dataloader_num_workers`: 0 +- `dataloader_prefetch_factor`: None +- `past_index`: -1 +- `disable_tqdm`: False +- `remove_unused_columns`: True +- `label_names`: None +- `load_best_model_at_end`: True +- `ignore_data_skip`: False +- `fsdp`: [] +- `fsdp_min_num_params`: 0 +- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False} +- `tp_size`: 0 +- `fsdp_transformer_layer_cls_to_wrap`: None +- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None} +- `deepspeed`: None +- `label_smoothing_factor`: 0.0 +- `optim`: adafactor +- `optim_args`: None +- `adafactor`: False +- `group_by_length`: False +- `length_column_name`: length +- `ddp_find_unused_parameters`: None +- `ddp_bucket_cap_mb`: None +- `ddp_broadcast_buffers`: False +- `dataloader_pin_memory`: True +- `dataloader_persistent_workers`: False +- `skip_memory_metrics`: True +- `use_legacy_prediction_loop`: False +- `push_to_hub`: False +- `resume_from_checkpoint`: None +- `hub_model_id`: None +- `hub_strategy`: every_save +- `hub_private_repo`: None +- `hub_always_push`: False +- `gradient_checkpointing`: False +- `gradient_checkpointing_kwargs`: None +- `include_inputs_for_metrics`: False +- `include_for_metrics`: [] +- `eval_do_concat_batches`: True +- `fp16_backend`: auto +- `push_to_hub_model_id`: None +- `push_to_hub_organization`: None +- `mp_parameters`: +- `auto_find_batch_size`: False +- `full_determinism`: False +- `torchdynamo`: None +- `ray_scope`: last +- `ddp_timeout`: 1800 +- `torch_compile`: False +- `torch_compile_backend`: None +- `torch_compile_mode`: None +- `include_tokens_per_second`: False +- `include_num_input_tokens_seen`: False +- `neftune_noise_alpha`: None +- `optim_target_modules`: None +- `batch_eval_metrics`: False +- `eval_on_start`: False +- `use_liger_kernel`: False +- `eval_use_gather_object`: False +- `average_tokens_across_devices`: False +- `prompts`: None +- `batch_sampler`: batch_sampler +- `multi_dataset_batch_sampler`: proportional + +
+ +### Training Logs +| Epoch | Step | Training Loss | Validation Loss | sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_ap | +|:------:|:----:|:-------------:|:---------------:|:---------------------------------------------------------------------:| +| -1 | -1 | - | - | 0.7140 | +| 0.7207 | 500 | 0.038 | - | - | +| 0.9989 | 693 | - | 0.0028 | 0.9911 | +| 1.4425 | 1000 | 0.0128 | - | - | +| 1.9989 | 1386 | - | 0.0021 | 0.9956 | +| 2.1643 | 1500 | 0.0084 | - | - | +| 2.8850 | 2000 | 0.0065 | - | - | +| 2.9989 | 2079 | - | 0.0015 | 0.9968 | + + +### Framework Versions +- Python: 3.12.9 +- Sentence Transformers: 3.4.1 +- Transformers: 4.51.3 +- PyTorch: 2.7.0+cu126 +- Accelerate: 1.6.0 +- Datasets: 3.6.0 +- Tokenizers: 0.21.1 + +## Citation + +### BibTeX + +#### Sentence Transformers +```bibtex +@inproceedings{reimers-2019-sentence-bert, + title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks", + author = "Reimers, Nils and Gurevych, Iryna", + booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing", + month = "11", + year = "2019", + publisher = "Association for Computational Linguistics", + url = "https://arxiv.org/abs/1908.10084", +} +``` + +#### ContrastiveLoss +```bibtex +@inproceedings{hadsell2006dimensionality, + author={Hadsell, R. and Chopra, S. and LeCun, Y.}, + booktitle={2006 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR'06)}, + title={Dimensionality Reduction by Learning an Invariant Mapping}, + year={2006}, + volume={2}, + number={}, + pages={1735-1742}, + doi={10.1109/CVPR.2006.100} +} +``` + + + + + + \ No newline at end of file diff --git a/checkpoint-2079/config.json b/checkpoint-2079/config.json new file mode 100644 index 0000000000000000000000000000000000000000..26e48501fdf44110239e00ad4d438aee8679504a --- /dev/null +++ b/checkpoint-2079/config.json @@ -0,0 +1,25 @@ +{ + "architectures": [ + "BertModel" + ], + "attention_probs_dropout_prob": 0.1, + "classifier_dropout": null, + "gradient_checkpointing": false, + "hidden_act": "gelu", + "hidden_dropout_prob": 0.1, + "hidden_size": 384, + "initializer_range": 0.02, + "intermediate_size": 1536, + "layer_norm_eps": 1e-12, + "max_position_embeddings": 512, + "model_type": "bert", + "num_attention_heads": 12, + "num_hidden_layers": 12, + "pad_token_id": 0, + "position_embedding_type": "absolute", + "torch_dtype": "float32", + "transformers_version": "4.51.3", + "type_vocab_size": 2, + "use_cache": true, + "vocab_size": 250037 +} diff --git a/checkpoint-2079/config_sentence_transformers.json b/checkpoint-2079/config_sentence_transformers.json new file mode 100644 index 0000000000000000000000000000000000000000..dcf436801f55bd22a257de2aad7eef5cfd06efaa --- /dev/null +++ b/checkpoint-2079/config_sentence_transformers.json @@ -0,0 +1,10 @@ +{ + "__version__": { + "sentence_transformers": "3.4.1", + "transformers": "4.51.3", + "pytorch": "2.7.0+cu126" + }, + "prompts": {}, + "default_prompt_name": null, + "similarity_fn_name": "cosine" +} \ No newline at end of file diff --git a/checkpoint-2079/model.safetensors b/checkpoint-2079/model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..8cd0ac735560ce07b6eaa9920bbcbc853373fd3a --- /dev/null +++ b/checkpoint-2079/model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:be4aae24e60c6b621f1ba97cb0d24aabcab5321c4240d46d5edb7e80659934ee +size 470637416 diff --git a/checkpoint-2079/modules.json b/checkpoint-2079/modules.json new file mode 100644 index 0000000000000000000000000000000000000000..f7640f94e81bb7f4f04daf1668850b38763a13d9 --- /dev/null +++ b/checkpoint-2079/modules.json @@ -0,0 +1,14 @@ +[ + { + "idx": 0, + "name": "0", + "path": "", + "type": "sentence_transformers.models.Transformer" + }, + { + "idx": 1, + "name": "1", + "path": "1_Pooling", + "type": "sentence_transformers.models.Pooling" + } +] \ No newline at end of file diff --git a/checkpoint-2079/optimizer.pt b/checkpoint-2079/optimizer.pt new file mode 100644 index 0000000000000000000000000000000000000000..11242a58022c29a7f4989c59bc4850b2bedaa592 --- /dev/null +++ b/checkpoint-2079/optimizer.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c9e098921ba43359be5ed80e5ba27c5533b3a15897c5d1e31312ca9a0532d345 +size 1715019 diff --git a/checkpoint-2079/rng_state.pth b/checkpoint-2079/rng_state.pth new file mode 100644 index 0000000000000000000000000000000000000000..7aca73bbfbfbe67944f0d78581aca7162bce6c09 --- /dev/null +++ b/checkpoint-2079/rng_state.pth @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:77bc5024a787692a4d7f38816d8d4cebfac75844ad0e708d5509da8b49d34e47 +size 14645 diff --git a/checkpoint-2079/scaler.pt b/checkpoint-2079/scaler.pt new file mode 100644 index 0000000000000000000000000000000000000000..519b3a3a3f32d908b25eea621abfd90a82b214f7 --- /dev/null +++ b/checkpoint-2079/scaler.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f10354d1d65a8ea0cab60b6880392a6fdef91bdc8d2eafbb18ca1599d3a27f7d +size 1383 diff --git a/checkpoint-2079/scheduler.pt b/checkpoint-2079/scheduler.pt new file mode 100644 index 0000000000000000000000000000000000000000..42450f363e1f6bb55324eb9d1c579a55f6a169ec --- /dev/null +++ b/checkpoint-2079/scheduler.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4f50b78397a5b4f9a0d3308e8b1ad396b4267f9f2fa04a1619312b44f7b2ef77 +size 1465 diff --git a/checkpoint-2079/sentence_bert_config.json b/checkpoint-2079/sentence_bert_config.json new file mode 100644 index 0000000000000000000000000000000000000000..5fd10429389515d3e5cccdeda08cae5fea1ae82e --- /dev/null +++ b/checkpoint-2079/sentence_bert_config.json @@ -0,0 +1,4 @@ +{ + "max_seq_length": 128, + "do_lower_case": false +} \ No newline at end of file diff --git a/checkpoint-2079/special_tokens_map.json b/checkpoint-2079/special_tokens_map.json new file mode 100644 index 0000000000000000000000000000000000000000..b1879d702821e753ffe4245048eee415d54a9385 --- /dev/null +++ b/checkpoint-2079/special_tokens_map.json @@ -0,0 +1,51 @@ +{ + "bos_token": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false + }, + "cls_token": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false + }, + "eos_token": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false + }, + "mask_token": { + "content": "", + "lstrip": true, + "normalized": false, + "rstrip": false, + "single_word": false + }, + "pad_token": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false + }, + "sep_token": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false + }, + "unk_token": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false + } +} diff --git a/checkpoint-2079/tokenizer.json b/checkpoint-2079/tokenizer.json new file mode 100644 index 0000000000000000000000000000000000000000..e3420945e193cc0791136cdc6e5cd69801c838af --- /dev/null +++ b/checkpoint-2079/tokenizer.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cad551d5600a84242d0973327029452a1e3672ba6313c2a3c3d69c4310e12719 +size 17082987 diff --git a/checkpoint-2079/tokenizer_config.json b/checkpoint-2079/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..facf4436a8f11c26085c16a14f4e576853927a9e --- /dev/null +++ b/checkpoint-2079/tokenizer_config.json @@ -0,0 +1,65 @@ +{ + "added_tokens_decoder": { + "0": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": true + }, + "1": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": true + }, + "2": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": true + }, + "3": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": true + }, + "250001": { + "content": "", + "lstrip": true, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": true + } + }, + "bos_token": "", + "clean_up_tokenization_spaces": false, + "cls_token": "", + "do_lower_case": true, + "eos_token": "", + "extra_special_tokens": {}, + "mask_token": "", + "max_length": 128, + "model_max_length": 128, + "pad_to_multiple_of": null, + "pad_token": "", + "pad_token_type_id": 0, + "padding_side": "right", + "sep_token": "", + "stride": 0, + "strip_accents": null, + "tokenize_chinese_chars": true, + "tokenizer_class": "BertTokenizer", + "truncation_side": "right", + "truncation_strategy": "longest_first", + "unk_token": "" +} diff --git a/checkpoint-2079/trainer_state.json b/checkpoint-2079/trainer_state.json new file mode 100644 index 0000000000000000000000000000000000000000..a6a2d12b3198c559f75fdd9ad95562d2a7a9d1ba --- /dev/null +++ b/checkpoint-2079/trainer_state.json @@ -0,0 +1,119 @@ +{ + "best_global_step": 2079, + "best_metric": 0.0014588695485144854, + "best_model_checkpoint": "data/fine-tuned-sbert-sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2-original-adafactor/checkpoint-2079", + "epoch": 2.998918918918919, + "eval_steps": 100, + "global_step": 2079, + "is_hyper_param_search": false, + "is_local_process_zero": true, + "is_world_process_zero": true, + "log_history": [ + { + "epoch": 0.7207207207207207, + "grad_norm": 0.15965162217617035, + "learning_rate": 2.7341619887730554e-05, + "loss": 0.038, + "step": 500 + }, + { + "epoch": 0.9989189189189189, + "eval_loss": 0.002777691464871168, + "eval_runtime": 792.7494, + "eval_samples_per_second": 3359.543, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_accuracy": 0.975327415818089, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_accuracy_threshold": 0.7701693773269653, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_ap": 0.9911172257655966, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_f1": 0.9624723810391563, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_f1_threshold": 0.7597355842590332, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_mcc": 0.9441287064717891, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_precision": 0.9527175567355498, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_recall": 0.9724290300680068, + "eval_steps_per_second": 4.375, + "step": 693 + }, + { + "epoch": 1.4425225225225224, + "grad_norm": 0.11966603249311447, + "learning_rate": 2.1327185244587008e-05, + "loss": 0.0128, + "step": 1000 + }, + { + "epoch": 1.998918918918919, + "eval_loss": 0.002118302509188652, + "eval_runtime": 789.0568, + "eval_samples_per_second": 3375.265, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_accuracy": 0.9846242227629088, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_accuracy_threshold": 0.6801187992095947, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_ap": 0.9955904030209028, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_f1": 0.9765449140552956, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_f1_threshold": 0.6780189275741577, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_mcc": 0.9651303277408154, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_precision": 0.9721848413657824, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_recall": 0.9809442711989229, + "eval_steps_per_second": 4.395, + "step": 1386 + }, + { + "epoch": 2.1643243243243244, + "grad_norm": 0.04637068510055542, + "learning_rate": 1.5312750601443466e-05, + "loss": 0.0084, + "step": 1500 + }, + { + "epoch": 2.885045045045045, + "grad_norm": 0.07652924209833145, + "learning_rate": 9.29831595829992e-06, + "loss": 0.0065, + "step": 2000 + }, + { + "epoch": 2.998918918918919, + "eval_loss": 0.0014588695485144854, + "eval_runtime": 782.4422, + "eval_samples_per_second": 3403.799, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_accuracy": 0.9879171547865789, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_accuracy_threshold": 0.7181636691093445, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_ap": 0.996840725826042, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_f1": 0.9815604299892273, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_f1_threshold": 0.7181636691093445, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_mcc": 0.9725931427811844, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_precision": 0.9775832353646149, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_recall": 0.98557011840788, + "eval_steps_per_second": 4.432, + "step": 2079 + } + ], + "logging_steps": 500, + "max_steps": 2772, + "num_input_tokens_seen": 0, + "num_train_epochs": 4, + "save_steps": 100, + "stateful_callbacks": { + "EarlyStoppingCallback": { + "args": { + "early_stopping_patience": 1, + "early_stopping_threshold": 0.0 + }, + "attributes": { + "early_stopping_patience_counter": 0 + } + }, + "TrainerControl": { + "args": { + "should_epoch_stop": false, + "should_evaluate": false, + "should_log": false, + "should_save": true, + "should_training_stop": false + }, + "attributes": {} + } + }, + "total_flos": 0.0, + "train_batch_size": 768, + "trial_name": null, + "trial_params": null +} diff --git a/checkpoint-2079/training_args.bin b/checkpoint-2079/training_args.bin new file mode 100644 index 0000000000000000000000000000000000000000..65b989c1e3d30efe64e2dc0572f41454e6d26706 --- /dev/null +++ b/checkpoint-2079/training_args.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ee490aac80277022fdde76dd6763dbabee88802149f3f246e7d0572b504fcdaf +size 6097 diff --git a/checkpoint-2079/unigram.json b/checkpoint-2079/unigram.json new file mode 100644 index 0000000000000000000000000000000000000000..2faa9ec874108d53a017ff2c7ab98d155fb21a82 --- /dev/null +++ b/checkpoint-2079/unigram.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:da145b5e7700ae40f16691ec32a0b1fdc1ee3298db22a31ea55f57a966c4a65d +size 14763260 diff --git a/checkpoint-2772/1_Pooling/config.json b/checkpoint-2772/1_Pooling/config.json new file mode 100644 index 0000000000000000000000000000000000000000..a97f8d140b6aee43dfac9fc4521b2842657c5608 --- /dev/null +++ b/checkpoint-2772/1_Pooling/config.json @@ -0,0 +1,10 @@ +{ + "word_embedding_dimension": 384, + "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 +} \ No newline at end of file diff --git a/checkpoint-2772/README.md b/checkpoint-2772/README.md new file mode 100644 index 0000000000000000000000000000000000000000..9a84e5978ee70bae5e9e71ca5147d9d57b96935b --- /dev/null +++ b/checkpoint-2772/README.md @@ -0,0 +1,465 @@ +--- +language: +- en +license: apache-2.0 +tags: +- sentence-transformers +- sentence-similarity +- feature-extraction +- generated_from_trainer +- dataset_size:2130621 +- loss:ContrastiveLoss +base_model: sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2 +widget: +- source_sentence: Kim Chol-sam + sentences: + - Stankevich Sergey Nikolayevich + - Kim Chin-So’k + - Julen Lopetegui Agote +- source_sentence: دينا بنت عبد الحميد + sentences: + - Alexia van Amsberg + - Anthony Nicholas Colin Maitland Biddulph, 5th Baron Biddulph + - Dina bint Abdul-Hamíd +- source_sentence: Մուհամեդ բեն Նաիֆ Ալ Սաուդ + sentences: + - Karpov Anatoly Evgenyevich + - GNPower Mariveles Coal Plant [former] + - Muhammed bin Nayef bin Abdul Aziz Al Saud +- source_sentence: Edward Gnehm + sentences: + - Шауэрте, Хартмут + - Ханзада Филипп, Эдинбург герцогі + - AFX +- source_sentence: Schori i Lidingö + sentences: + - Yordan Canev + - ကားပေါ့ အန်နာတိုလီ + - BYSTROV, Mikhail Ivanovich +pipeline_tag: sentence-similarity +library_name: sentence-transformers +metrics: +- cosine_accuracy +- cosine_accuracy_threshold +- cosine_f1 +- cosine_f1_threshold +- cosine_precision +- cosine_recall +- cosine_ap +- cosine_mcc +model-index: +- name: sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2-name-matcher-original + results: + - task: + type: binary-classification + name: Binary Classification + dataset: + name: sentence transformers paraphrase multilingual MiniLM L12 v2 + type: sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2 + metrics: + - type: cosine_accuracy + value: 0.9885216725241056 + name: Cosine Accuracy + - type: cosine_accuracy_threshold + value: 0.7183246612548828 + name: Cosine Accuracy Threshold + - type: cosine_f1 + value: 0.9824706124974221 + name: Cosine F1 + - type: cosine_f1_threshold + value: 0.7085607051849365 + name: Cosine F1 Threshold + - type: cosine_precision + value: 0.9782229269572558 + name: Cosine Precision + - type: cosine_recall + value: 0.9867553479166427 + name: Cosine Recall + - type: cosine_ap + value: 0.9971022799526896 + name: Cosine Ap + - type: cosine_mcc + value: 0.9739458779668466 + name: Cosine Mcc +--- + +# sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2-name-matcher-original + +This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2](https://huggingface.co/sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2). It maps sentences & paragraphs to a 384-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more. + +## Model Details + +### Model Description +- **Model Type:** Sentence Transformer +- **Base model:** [sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2](https://huggingface.co/sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2) +- **Maximum Sequence Length:** 128 tokens +- **Output Dimensionality:** 384 dimensions +- **Similarity Function:** Cosine Similarity + +- **Language:** en +- **License:** apache-2.0 + +### Model Sources + +- **Documentation:** [Sentence Transformers Documentation](https://sbert.net) +- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers) +- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers) + +### Full Model Architecture + +``` +SentenceTransformer( + (0): Transformer({'max_seq_length': 128, 'do_lower_case': False}) with Transformer model: BertModel + (1): Pooling({'word_embedding_dimension': 384, '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}) +) +``` + +## Usage + +### Direct Usage (Sentence Transformers) + +First install the Sentence Transformers library: + +```bash +pip install -U sentence-transformers +``` + +Then you can load this model and run inference. +```python +from sentence_transformers import SentenceTransformer + +# Download from the 🤗 Hub +model = SentenceTransformer("sentence_transformers_model_id") +# Run inference +sentences = [ + 'Schori i Lidingö', + 'Yordan Canev', + 'ကားပေါ့ အန်နာတိုလီ', +] +embeddings = model.encode(sentences) +print(embeddings.shape) +# [3, 384] + +# Get the similarity scores for the embeddings +similarities = model.similarity(embeddings, embeddings) +print(similarities.shape) +# [3, 3] +``` + + + + + + + +## Evaluation + +### Metrics + +#### Binary Classification + +* Dataset: `sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2` +* Evaluated with [BinaryClassificationEvaluator](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.BinaryClassificationEvaluator) + +| Metric | Value | +|:--------------------------|:-----------| +| cosine_accuracy | 0.9885 | +| cosine_accuracy_threshold | 0.7183 | +| cosine_f1 | 0.9825 | +| cosine_f1_threshold | 0.7086 | +| cosine_precision | 0.9782 | +| cosine_recall | 0.9868 | +| **cosine_ap** | **0.9971** | +| cosine_mcc | 0.9739 | + + + + + +## Training Details + +### Training Dataset + +#### Unnamed Dataset + +* Size: 2,130,621 training samples +* Columns: sentence1, sentence2, and label +* Approximate statistics based on the first 1000 samples: + | | sentence1 | sentence2 | label | + |:--------|:---------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|:---------------------------------------------------------------| + | type | string | string | float | + | details |
  • min: 3 tokens
  • mean: 9.32 tokens
  • max: 57 tokens
|
  • min: 3 tokens
  • mean: 9.16 tokens
  • max: 54 tokens
|
  • min: 0.0
  • mean: 0.34
  • max: 1.0
| +* Samples: + | sentence1 | sentence2 | label | + |:----------------------------------|:------------------------------------|:-----------------| + | 캐스린 설리번 | Kathryn D. Sullivanová | 1.0 | + | ଶିବରାଜ ଅଧାଲରାଓ ପାଟିଲ | Aleksander Lubocki | 0.0 | + | Пырванов, Георги | アナトーリー・セルジュコフ | 0.0 | +* Loss: [ContrastiveLoss](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#contrastiveloss) with these parameters: + ```json + { + "distance_metric": "SiameseDistanceMetric.COSINE_DISTANCE", + "margin": 0.5, + "size_average": true + } + ``` + +### Evaluation Dataset + +#### Unnamed Dataset + +* Size: 2,663,276 evaluation samples +* Columns: sentence1, sentence2, and label +* Approximate statistics based on the first 1000 samples: + | | sentence1 | sentence2 | label | + |:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------| + | type | string | string | float | + | details |
  • min: 3 tokens
  • mean: 9.34 tokens
  • max: 102 tokens
|
  • min: 4 tokens
  • mean: 9.11 tokens
  • max: 100 tokens
|
  • min: 0.0
  • mean: 0.33
  • max: 1.0
| +* Samples: + | sentence1 | sentence2 | label | + |:--------------------------------------|:---------------------------------------|:-----------------| + | Ева Херман | I Xuan Karlos | 0.0 | + | Кличков Андрій Євгенович | Андрэй Яўгенавіч Клычкоў | 1.0 | + | Кинах А. | Senator John Hickenlooper | 0.0 | +* Loss: [ContrastiveLoss](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#contrastiveloss) with these parameters: + ```json + { + "distance_metric": "SiameseDistanceMetric.COSINE_DISTANCE", + "margin": 0.5, + "size_average": true + } + ``` + +### Training Hyperparameters +#### Non-Default Hyperparameters + +- `eval_strategy`: epoch +- `per_device_train_batch_size`: 768 +- `per_device_eval_batch_size`: 768 +- `gradient_accumulation_steps`: 4 +- `learning_rate`: 3e-05 +- `weight_decay`: 0.01 +- `num_train_epochs`: 4 +- `warmup_ratio`: 0.1 +- `fp16`: True +- `load_best_model_at_end`: True +- `optim`: adafactor + +#### All Hyperparameters +
Click to expand + +- `overwrite_output_dir`: False +- `do_predict`: False +- `eval_strategy`: epoch +- `prediction_loss_only`: True +- `per_device_train_batch_size`: 768 +- `per_device_eval_batch_size`: 768 +- `per_gpu_train_batch_size`: None +- `per_gpu_eval_batch_size`: None +- `gradient_accumulation_steps`: 4 +- `eval_accumulation_steps`: None +- `torch_empty_cache_steps`: None +- `learning_rate`: 3e-05 +- `weight_decay`: 0.01 +- `adam_beta1`: 0.9 +- `adam_beta2`: 0.999 +- `adam_epsilon`: 1e-08 +- `max_grad_norm`: 1.0 +- `num_train_epochs`: 4 +- `max_steps`: -1 +- `lr_scheduler_type`: linear +- `lr_scheduler_kwargs`: {} +- `warmup_ratio`: 0.1 +- `warmup_steps`: 0 +- `log_level`: passive +- `log_level_replica`: warning +- `log_on_each_node`: True +- `logging_nan_inf_filter`: True +- `save_safetensors`: True +- `save_on_each_node`: False +- `save_only_model`: False +- `restore_callback_states_from_checkpoint`: False +- `no_cuda`: False +- `use_cpu`: False +- `use_mps_device`: False +- `seed`: 42 +- `data_seed`: None +- `jit_mode_eval`: False +- `use_ipex`: False +- `bf16`: False +- `fp16`: True +- `fp16_opt_level`: O1 +- `half_precision_backend`: auto +- `bf16_full_eval`: False +- `fp16_full_eval`: False +- `tf32`: None +- `local_rank`: 0 +- `ddp_backend`: None +- `tpu_num_cores`: None +- `tpu_metrics_debug`: False +- `debug`: [] +- `dataloader_drop_last`: False +- `dataloader_num_workers`: 0 +- `dataloader_prefetch_factor`: None +- `past_index`: -1 +- `disable_tqdm`: False +- `remove_unused_columns`: True +- `label_names`: None +- `load_best_model_at_end`: True +- `ignore_data_skip`: False +- `fsdp`: [] +- `fsdp_min_num_params`: 0 +- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False} +- `tp_size`: 0 +- `fsdp_transformer_layer_cls_to_wrap`: None +- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None} +- `deepspeed`: None +- `label_smoothing_factor`: 0.0 +- `optim`: adafactor +- `optim_args`: None +- `adafactor`: False +- `group_by_length`: False +- `length_column_name`: length +- `ddp_find_unused_parameters`: None +- `ddp_bucket_cap_mb`: None +- `ddp_broadcast_buffers`: False +- `dataloader_pin_memory`: True +- `dataloader_persistent_workers`: False +- `skip_memory_metrics`: True +- `use_legacy_prediction_loop`: False +- `push_to_hub`: False +- `resume_from_checkpoint`: None +- `hub_model_id`: None +- `hub_strategy`: every_save +- `hub_private_repo`: None +- `hub_always_push`: False +- `gradient_checkpointing`: False +- `gradient_checkpointing_kwargs`: None +- `include_inputs_for_metrics`: False +- `include_for_metrics`: [] +- `eval_do_concat_batches`: True +- `fp16_backend`: auto +- `push_to_hub_model_id`: None +- `push_to_hub_organization`: None +- `mp_parameters`: +- `auto_find_batch_size`: False +- `full_determinism`: False +- `torchdynamo`: None +- `ray_scope`: last +- `ddp_timeout`: 1800 +- `torch_compile`: False +- `torch_compile_backend`: None +- `torch_compile_mode`: None +- `include_tokens_per_second`: False +- `include_num_input_tokens_seen`: False +- `neftune_noise_alpha`: None +- `optim_target_modules`: None +- `batch_eval_metrics`: False +- `eval_on_start`: False +- `use_liger_kernel`: False +- `eval_use_gather_object`: False +- `average_tokens_across_devices`: False +- `prompts`: None +- `batch_sampler`: batch_sampler +- `multi_dataset_batch_sampler`: proportional + +
+ +### Training Logs +| Epoch | Step | Training Loss | Validation Loss | sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_ap | +|:------:|:----:|:-------------:|:---------------:|:---------------------------------------------------------------------:| +| -1 | -1 | - | - | 0.7140 | +| 0.7207 | 500 | 0.038 | - | - | +| 0.9989 | 693 | - | 0.0028 | 0.9911 | +| 1.4425 | 1000 | 0.0128 | - | - | +| 1.9989 | 1386 | - | 0.0021 | 0.9956 | +| 2.1643 | 1500 | 0.0084 | - | - | +| 2.8850 | 2000 | 0.0065 | - | - | +| 2.9989 | 2079 | - | 0.0015 | 0.9968 | +| 3.6068 | 2500 | 0.0056 | - | - | +| 3.9989 | 2772 | - | 0.0014 | 0.9971 | + + +### Framework Versions +- Python: 3.12.9 +- Sentence Transformers: 3.4.1 +- Transformers: 4.51.3 +- PyTorch: 2.7.0+cu126 +- Accelerate: 1.6.0 +- Datasets: 3.6.0 +- Tokenizers: 0.21.1 + +## Citation + +### BibTeX + +#### Sentence Transformers +```bibtex +@inproceedings{reimers-2019-sentence-bert, + title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks", + author = "Reimers, Nils and Gurevych, Iryna", + booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing", + month = "11", + year = "2019", + publisher = "Association for Computational Linguistics", + url = "https://arxiv.org/abs/1908.10084", +} +``` + +#### ContrastiveLoss +```bibtex +@inproceedings{hadsell2006dimensionality, + author={Hadsell, R. and Chopra, S. and LeCun, Y.}, + booktitle={2006 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR'06)}, + title={Dimensionality Reduction by Learning an Invariant Mapping}, + year={2006}, + volume={2}, + number={}, + pages={1735-1742}, + doi={10.1109/CVPR.2006.100} +} +``` + + + + + + \ No newline at end of file diff --git a/checkpoint-2772/config.json b/checkpoint-2772/config.json new file mode 100644 index 0000000000000000000000000000000000000000..26e48501fdf44110239e00ad4d438aee8679504a --- /dev/null +++ b/checkpoint-2772/config.json @@ -0,0 +1,25 @@ +{ + "architectures": [ + "BertModel" + ], + "attention_probs_dropout_prob": 0.1, + "classifier_dropout": null, + "gradient_checkpointing": false, + "hidden_act": "gelu", + "hidden_dropout_prob": 0.1, + "hidden_size": 384, + "initializer_range": 0.02, + "intermediate_size": 1536, + "layer_norm_eps": 1e-12, + "max_position_embeddings": 512, + "model_type": "bert", + "num_attention_heads": 12, + "num_hidden_layers": 12, + "pad_token_id": 0, + "position_embedding_type": "absolute", + "torch_dtype": "float32", + "transformers_version": "4.51.3", + "type_vocab_size": 2, + "use_cache": true, + "vocab_size": 250037 +} diff --git a/checkpoint-2772/config_sentence_transformers.json b/checkpoint-2772/config_sentence_transformers.json new file mode 100644 index 0000000000000000000000000000000000000000..dcf436801f55bd22a257de2aad7eef5cfd06efaa --- /dev/null +++ b/checkpoint-2772/config_sentence_transformers.json @@ -0,0 +1,10 @@ +{ + "__version__": { + "sentence_transformers": "3.4.1", + "transformers": "4.51.3", + "pytorch": "2.7.0+cu126" + }, + "prompts": {}, + "default_prompt_name": null, + "similarity_fn_name": "cosine" +} \ No newline at end of file diff --git a/checkpoint-2772/model.safetensors b/checkpoint-2772/model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..2a8c6a1dee5b1f6a8892e79a11f68f590faf9973 --- /dev/null +++ b/checkpoint-2772/model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:86cbcc5809568045ff4d80ea5eff6ddee83cd424541447967273a7023c7e187e +size 470637416 diff --git a/checkpoint-2772/modules.json b/checkpoint-2772/modules.json new file mode 100644 index 0000000000000000000000000000000000000000..f7640f94e81bb7f4f04daf1668850b38763a13d9 --- /dev/null +++ b/checkpoint-2772/modules.json @@ -0,0 +1,14 @@ +[ + { + "idx": 0, + "name": "0", + "path": "", + "type": "sentence_transformers.models.Transformer" + }, + { + "idx": 1, + "name": "1", + "path": "1_Pooling", + "type": "sentence_transformers.models.Pooling" + } +] \ No newline at end of file diff --git a/checkpoint-2772/optimizer.pt b/checkpoint-2772/optimizer.pt new file mode 100644 index 0000000000000000000000000000000000000000..9bd1fbad4bb9ae4a9a2f7efdb6032bce3861cdbd --- /dev/null +++ b/checkpoint-2772/optimizer.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ac3e5f9bb09ee4343f28e1fd561f33a38c1f23ae8dae410e77420c9278ae6ac8 +size 1715019 diff --git a/checkpoint-2772/rng_state.pth b/checkpoint-2772/rng_state.pth new file mode 100644 index 0000000000000000000000000000000000000000..31e770ff31240d06bc2a3276c51abd81e5939015 --- /dev/null +++ b/checkpoint-2772/rng_state.pth @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cd92514717bc3cb44100d9bb038875d49cd30e2d1925b33a6ddd1f8bbba8e940 +size 14645 diff --git a/checkpoint-2772/scaler.pt b/checkpoint-2772/scaler.pt new file mode 100644 index 0000000000000000000000000000000000000000..a2233c7bd1582b63aac0399e4f2f7c1c477c9d78 --- /dev/null +++ b/checkpoint-2772/scaler.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:01d00f48ebab6e58e9ae555bb7a1dc0eb436c3b5115601ee219420aae460b550 +size 1383 diff --git a/checkpoint-2772/scheduler.pt b/checkpoint-2772/scheduler.pt new file mode 100644 index 0000000000000000000000000000000000000000..006ea736b7fd9bd40174b2a1b3c05a2d65172f62 --- /dev/null +++ b/checkpoint-2772/scheduler.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0c76e070cc219bc8a3b3a9bbab555445f78c28c96a21cc55f454628bf0d5ef07 +size 1465 diff --git a/checkpoint-2772/sentence_bert_config.json b/checkpoint-2772/sentence_bert_config.json new file mode 100644 index 0000000000000000000000000000000000000000..5fd10429389515d3e5cccdeda08cae5fea1ae82e --- /dev/null +++ b/checkpoint-2772/sentence_bert_config.json @@ -0,0 +1,4 @@ +{ + "max_seq_length": 128, + "do_lower_case": false +} \ No newline at end of file diff --git a/checkpoint-2772/special_tokens_map.json b/checkpoint-2772/special_tokens_map.json new file mode 100644 index 0000000000000000000000000000000000000000..b1879d702821e753ffe4245048eee415d54a9385 --- /dev/null +++ b/checkpoint-2772/special_tokens_map.json @@ -0,0 +1,51 @@ +{ + "bos_token": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false + }, + "cls_token": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false + }, + "eos_token": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false + }, + "mask_token": { + "content": "", + "lstrip": true, + "normalized": false, + "rstrip": false, + "single_word": false + }, + "pad_token": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false + }, + "sep_token": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false + }, + "unk_token": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false + } +} diff --git a/checkpoint-2772/tokenizer.json b/checkpoint-2772/tokenizer.json new file mode 100644 index 0000000000000000000000000000000000000000..e3420945e193cc0791136cdc6e5cd69801c838af --- /dev/null +++ b/checkpoint-2772/tokenizer.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cad551d5600a84242d0973327029452a1e3672ba6313c2a3c3d69c4310e12719 +size 17082987 diff --git a/checkpoint-2772/tokenizer_config.json b/checkpoint-2772/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..facf4436a8f11c26085c16a14f4e576853927a9e --- /dev/null +++ b/checkpoint-2772/tokenizer_config.json @@ -0,0 +1,65 @@ +{ + "added_tokens_decoder": { + "0": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": true + }, + "1": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": true + }, + "2": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": true + }, + "3": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": true + }, + "250001": { + "content": "", + "lstrip": true, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": true + } + }, + "bos_token": "", + "clean_up_tokenization_spaces": false, + "cls_token": "", + "do_lower_case": true, + "eos_token": "", + "extra_special_tokens": {}, + "mask_token": "", + "max_length": 128, + "model_max_length": 128, + "pad_to_multiple_of": null, + "pad_token": "", + "pad_token_type_id": 0, + "padding_side": "right", + "sep_token": "", + "stride": 0, + "strip_accents": null, + "tokenize_chinese_chars": true, + "tokenizer_class": "BertTokenizer", + "truncation_side": "right", + "truncation_strategy": "longest_first", + "unk_token": "" +} diff --git a/checkpoint-2772/trainer_state.json b/checkpoint-2772/trainer_state.json new file mode 100644 index 0000000000000000000000000000000000000000..52f0cacdeca59f0b1fc2fbc8f5ac86d5a7e3f39d --- /dev/null +++ b/checkpoint-2772/trainer_state.json @@ -0,0 +1,142 @@ +{ + "best_global_step": 2772, + "best_metric": 0.001379696768708527, + "best_model_checkpoint": "data/fine-tuned-sbert-sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2-original-adafactor/checkpoint-2772", + "epoch": 3.998918918918919, + "eval_steps": 100, + "global_step": 2772, + "is_hyper_param_search": false, + "is_local_process_zero": true, + "is_world_process_zero": true, + "log_history": [ + { + "epoch": 0.7207207207207207, + "grad_norm": 0.15965162217617035, + "learning_rate": 2.7341619887730554e-05, + "loss": 0.038, + "step": 500 + }, + { + "epoch": 0.9989189189189189, + "eval_loss": 0.002777691464871168, + "eval_runtime": 792.7494, + "eval_samples_per_second": 3359.543, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_accuracy": 0.975327415818089, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_accuracy_threshold": 0.7701693773269653, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_ap": 0.9911172257655966, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_f1": 0.9624723810391563, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_f1_threshold": 0.7597355842590332, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_mcc": 0.9441287064717891, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_precision": 0.9527175567355498, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_recall": 0.9724290300680068, + "eval_steps_per_second": 4.375, + "step": 693 + }, + { + "epoch": 1.4425225225225224, + "grad_norm": 0.11966603249311447, + "learning_rate": 2.1327185244587008e-05, + "loss": 0.0128, + "step": 1000 + }, + { + "epoch": 1.998918918918919, + "eval_loss": 0.002118302509188652, + "eval_runtime": 789.0568, + "eval_samples_per_second": 3375.265, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_accuracy": 0.9846242227629088, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_accuracy_threshold": 0.6801187992095947, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_ap": 0.9955904030209028, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_f1": 0.9765449140552956, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_f1_threshold": 0.6780189275741577, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_mcc": 0.9651303277408154, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_precision": 0.9721848413657824, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_recall": 0.9809442711989229, + "eval_steps_per_second": 4.395, + "step": 1386 + }, + { + "epoch": 2.1643243243243244, + "grad_norm": 0.04637068510055542, + "learning_rate": 1.5312750601443466e-05, + "loss": 0.0084, + "step": 1500 + }, + { + "epoch": 2.885045045045045, + "grad_norm": 0.07652924209833145, + "learning_rate": 9.29831595829992e-06, + "loss": 0.0065, + "step": 2000 + }, + { + "epoch": 2.998918918918919, + "eval_loss": 0.0014588695485144854, + "eval_runtime": 782.4422, + "eval_samples_per_second": 3403.799, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_accuracy": 0.9879171547865789, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_accuracy_threshold": 0.7181636691093445, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_ap": 0.996840725826042, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_f1": 0.9815604299892273, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_f1_threshold": 0.7181636691093445, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_mcc": 0.9725931427811844, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_precision": 0.9775832353646149, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_recall": 0.98557011840788, + "eval_steps_per_second": 4.432, + "step": 2079 + }, + { + "epoch": 3.606846846846847, + "grad_norm": 0.04797244444489479, + "learning_rate": 3.2838813151563755e-06, + "loss": 0.0056, + "step": 2500 + }, + { + "epoch": 3.998918918918919, + "eval_loss": 0.001379696768708527, + "eval_runtime": 780.7313, + "eval_samples_per_second": 3411.258, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_accuracy": 0.9885216725241056, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_accuracy_threshold": 0.7183246612548828, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_ap": 0.9971022799526896, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_f1": 0.9824706124974221, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_f1_threshold": 0.7085607051849365, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_mcc": 0.9739458779668466, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_precision": 0.9782229269572558, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_recall": 0.9867553479166427, + "eval_steps_per_second": 4.442, + "step": 2772 + } + ], + "logging_steps": 500, + "max_steps": 2772, + "num_input_tokens_seen": 0, + "num_train_epochs": 4, + "save_steps": 100, + "stateful_callbacks": { + "EarlyStoppingCallback": { + "args": { + "early_stopping_patience": 1, + "early_stopping_threshold": 0.0 + }, + "attributes": { + "early_stopping_patience_counter": 0 + } + }, + "TrainerControl": { + "args": { + "should_epoch_stop": false, + "should_evaluate": false, + "should_log": false, + "should_save": true, + "should_training_stop": true + }, + "attributes": {} + } + }, + "total_flos": 0.0, + "train_batch_size": 768, + "trial_name": null, + "trial_params": null +} diff --git a/checkpoint-2772/training_args.bin b/checkpoint-2772/training_args.bin new file mode 100644 index 0000000000000000000000000000000000000000..65b989c1e3d30efe64e2dc0572f41454e6d26706 --- /dev/null +++ b/checkpoint-2772/training_args.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ee490aac80277022fdde76dd6763dbabee88802149f3f246e7d0572b504fcdaf +size 6097 diff --git a/checkpoint-2772/unigram.json b/checkpoint-2772/unigram.json new file mode 100644 index 0000000000000000000000000000000000000000..2faa9ec874108d53a017ff2c7ab98d155fb21a82 --- /dev/null +++ b/checkpoint-2772/unigram.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:da145b5e7700ae40f16691ec32a0b1fdc1ee3298db22a31ea55f57a966c4a65d +size 14763260 diff --git a/checkpoint-693/1_Pooling/config.json b/checkpoint-693/1_Pooling/config.json new file mode 100644 index 0000000000000000000000000000000000000000..a97f8d140b6aee43dfac9fc4521b2842657c5608 --- /dev/null +++ b/checkpoint-693/1_Pooling/config.json @@ -0,0 +1,10 @@ +{ + "word_embedding_dimension": 384, + "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 +} \ No newline at end of file diff --git a/checkpoint-693/README.md b/checkpoint-693/README.md new file mode 100644 index 0000000000000000000000000000000000000000..87afec63e9872aeb6d09fa8e4f09cf6444dd321d --- /dev/null +++ b/checkpoint-693/README.md @@ -0,0 +1,458 @@ +--- +language: +- en +license: apache-2.0 +tags: +- sentence-transformers +- sentence-similarity +- feature-extraction +- generated_from_trainer +- dataset_size:2130621 +- loss:ContrastiveLoss +base_model: sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2 +widget: +- source_sentence: Kim Chol-sam + sentences: + - Stankevich Sergey Nikolayevich + - Kim Chin-So’k + - Julen Lopetegui Agote +- source_sentence: دينا بنت عبد الحميد + sentences: + - Alexia van Amsberg + - Anthony Nicholas Colin Maitland Biddulph, 5th Baron Biddulph + - Dina bint Abdul-Hamíd +- source_sentence: Մուհամեդ բեն Նաիֆ Ալ Սաուդ + sentences: + - Karpov Anatoly Evgenyevich + - GNPower Mariveles Coal Plant [former] + - Muhammed bin Nayef bin Abdul Aziz Al Saud +- source_sentence: Edward Gnehm + sentences: + - Шауэрте, Хартмут + - Ханзада Филипп, Эдинбург герцогі + - AFX +- source_sentence: Schori i Lidingö + sentences: + - Yordan Canev + - ကားပေါ့ အန်နာတိုလီ + - BYSTROV, Mikhail Ivanovich +pipeline_tag: sentence-similarity +library_name: sentence-transformers +metrics: +- cosine_accuracy +- cosine_accuracy_threshold +- cosine_f1 +- cosine_f1_threshold +- cosine_precision +- cosine_recall +- cosine_ap +- cosine_mcc +model-index: +- name: sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2-name-matcher-original + results: + - task: + type: binary-classification + name: Binary Classification + dataset: + name: sentence transformers paraphrase multilingual MiniLM L12 v2 + type: sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2 + metrics: + - type: cosine_accuracy + value: 0.975327415818089 + name: Cosine Accuracy + - type: cosine_accuracy_threshold + value: 0.7701693773269653 + name: Cosine Accuracy Threshold + - type: cosine_f1 + value: 0.9624723810391563 + name: Cosine F1 + - type: cosine_f1_threshold + value: 0.7597355842590332 + name: Cosine F1 Threshold + - type: cosine_precision + value: 0.9527175567355498 + name: Cosine Precision + - type: cosine_recall + value: 0.9724290300680068 + name: Cosine Recall + - type: cosine_ap + value: 0.9911172257655966 + name: Cosine Ap + - type: cosine_mcc + value: 0.9441287064717891 + name: Cosine Mcc +--- + +# sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2-name-matcher-original + +This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2](https://huggingface.co/sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2). It maps sentences & paragraphs to a 384-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more. + +## Model Details + +### Model Description +- **Model Type:** Sentence Transformer +- **Base model:** [sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2](https://huggingface.co/sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2) +- **Maximum Sequence Length:** 128 tokens +- **Output Dimensionality:** 384 dimensions +- **Similarity Function:** Cosine Similarity + +- **Language:** en +- **License:** apache-2.0 + +### Model Sources + +- **Documentation:** [Sentence Transformers Documentation](https://sbert.net) +- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers) +- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers) + +### Full Model Architecture + +``` +SentenceTransformer( + (0): Transformer({'max_seq_length': 128, 'do_lower_case': False}) with Transformer model: BertModel + (1): Pooling({'word_embedding_dimension': 384, '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}) +) +``` + +## Usage + +### Direct Usage (Sentence Transformers) + +First install the Sentence Transformers library: + +```bash +pip install -U sentence-transformers +``` + +Then you can load this model and run inference. +```python +from sentence_transformers import SentenceTransformer + +# Download from the 🤗 Hub +model = SentenceTransformer("sentence_transformers_model_id") +# Run inference +sentences = [ + 'Schori i Lidingö', + 'Yordan Canev', + 'ကားပေါ့ အန်နာတိုလီ', +] +embeddings = model.encode(sentences) +print(embeddings.shape) +# [3, 384] + +# Get the similarity scores for the embeddings +similarities = model.similarity(embeddings, embeddings) +print(similarities.shape) +# [3, 3] +``` + + + + + + + +## Evaluation + +### Metrics + +#### Binary Classification + +* Dataset: `sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2` +* Evaluated with [BinaryClassificationEvaluator](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.BinaryClassificationEvaluator) + +| Metric | Value | +|:--------------------------|:-----------| +| cosine_accuracy | 0.9753 | +| cosine_accuracy_threshold | 0.7702 | +| cosine_f1 | 0.9625 | +| cosine_f1_threshold | 0.7597 | +| cosine_precision | 0.9527 | +| cosine_recall | 0.9724 | +| **cosine_ap** | **0.9911** | +| cosine_mcc | 0.9441 | + + + + + +## Training Details + +### Training Dataset + +#### Unnamed Dataset + +* Size: 2,130,621 training samples +* Columns: sentence1, sentence2, and label +* Approximate statistics based on the first 1000 samples: + | | sentence1 | sentence2 | label | + |:--------|:---------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|:---------------------------------------------------------------| + | type | string | string | float | + | details |
  • min: 3 tokens
  • mean: 9.32 tokens
  • max: 57 tokens
|
  • min: 3 tokens
  • mean: 9.16 tokens
  • max: 54 tokens
|
  • min: 0.0
  • mean: 0.34
  • max: 1.0
| +* Samples: + | sentence1 | sentence2 | label | + |:----------------------------------|:------------------------------------|:-----------------| + | 캐스린 설리번 | Kathryn D. Sullivanová | 1.0 | + | ଶିବରାଜ ଅଧାଲରାଓ ପାଟିଲ | Aleksander Lubocki | 0.0 | + | Пырванов, Георги | アナトーリー・セルジュコフ | 0.0 | +* Loss: [ContrastiveLoss](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#contrastiveloss) with these parameters: + ```json + { + "distance_metric": "SiameseDistanceMetric.COSINE_DISTANCE", + "margin": 0.5, + "size_average": true + } + ``` + +### Evaluation Dataset + +#### Unnamed Dataset + +* Size: 2,663,276 evaluation samples +* Columns: sentence1, sentence2, and label +* Approximate statistics based on the first 1000 samples: + | | sentence1 | sentence2 | label | + |:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------| + | type | string | string | float | + | details |
  • min: 3 tokens
  • mean: 9.34 tokens
  • max: 102 tokens
|
  • min: 4 tokens
  • mean: 9.11 tokens
  • max: 100 tokens
|
  • min: 0.0
  • mean: 0.33
  • max: 1.0
| +* Samples: + | sentence1 | sentence2 | label | + |:--------------------------------------|:---------------------------------------|:-----------------| + | Ева Херман | I Xuan Karlos | 0.0 | + | Кличков Андрій Євгенович | Андрэй Яўгенавіч Клычкоў | 1.0 | + | Кинах А. | Senator John Hickenlooper | 0.0 | +* Loss: [ContrastiveLoss](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#contrastiveloss) with these parameters: + ```json + { + "distance_metric": "SiameseDistanceMetric.COSINE_DISTANCE", + "margin": 0.5, + "size_average": true + } + ``` + +### Training Hyperparameters +#### Non-Default Hyperparameters + +- `eval_strategy`: epoch +- `per_device_train_batch_size`: 768 +- `per_device_eval_batch_size`: 768 +- `gradient_accumulation_steps`: 4 +- `learning_rate`: 3e-05 +- `weight_decay`: 0.01 +- `num_train_epochs`: 4 +- `warmup_ratio`: 0.1 +- `fp16`: True +- `load_best_model_at_end`: True +- `optim`: adafactor + +#### All Hyperparameters +
Click to expand + +- `overwrite_output_dir`: False +- `do_predict`: False +- `eval_strategy`: epoch +- `prediction_loss_only`: True +- `per_device_train_batch_size`: 768 +- `per_device_eval_batch_size`: 768 +- `per_gpu_train_batch_size`: None +- `per_gpu_eval_batch_size`: None +- `gradient_accumulation_steps`: 4 +- `eval_accumulation_steps`: None +- `torch_empty_cache_steps`: None +- `learning_rate`: 3e-05 +- `weight_decay`: 0.01 +- `adam_beta1`: 0.9 +- `adam_beta2`: 0.999 +- `adam_epsilon`: 1e-08 +- `max_grad_norm`: 1.0 +- `num_train_epochs`: 4 +- `max_steps`: -1 +- `lr_scheduler_type`: linear +- `lr_scheduler_kwargs`: {} +- `warmup_ratio`: 0.1 +- `warmup_steps`: 0 +- `log_level`: passive +- `log_level_replica`: warning +- `log_on_each_node`: True +- `logging_nan_inf_filter`: True +- `save_safetensors`: True +- `save_on_each_node`: False +- `save_only_model`: False +- `restore_callback_states_from_checkpoint`: False +- `no_cuda`: False +- `use_cpu`: False +- `use_mps_device`: False +- `seed`: 42 +- `data_seed`: None +- `jit_mode_eval`: False +- `use_ipex`: False +- `bf16`: False +- `fp16`: True +- `fp16_opt_level`: O1 +- `half_precision_backend`: auto +- `bf16_full_eval`: False +- `fp16_full_eval`: False +- `tf32`: None +- `local_rank`: 0 +- `ddp_backend`: None +- `tpu_num_cores`: None +- `tpu_metrics_debug`: False +- `debug`: [] +- `dataloader_drop_last`: False +- `dataloader_num_workers`: 0 +- `dataloader_prefetch_factor`: None +- `past_index`: -1 +- `disable_tqdm`: False +- `remove_unused_columns`: True +- `label_names`: None +- `load_best_model_at_end`: True +- `ignore_data_skip`: False +- `fsdp`: [] +- `fsdp_min_num_params`: 0 +- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False} +- `tp_size`: 0 +- `fsdp_transformer_layer_cls_to_wrap`: None +- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None} +- `deepspeed`: None +- `label_smoothing_factor`: 0.0 +- `optim`: adafactor +- `optim_args`: None +- `adafactor`: False +- `group_by_length`: False +- `length_column_name`: length +- `ddp_find_unused_parameters`: None +- `ddp_bucket_cap_mb`: None +- `ddp_broadcast_buffers`: False +- `dataloader_pin_memory`: True +- `dataloader_persistent_workers`: False +- `skip_memory_metrics`: True +- `use_legacy_prediction_loop`: False +- `push_to_hub`: False +- `resume_from_checkpoint`: None +- `hub_model_id`: None +- `hub_strategy`: every_save +- `hub_private_repo`: None +- `hub_always_push`: False +- `gradient_checkpointing`: False +- `gradient_checkpointing_kwargs`: None +- `include_inputs_for_metrics`: False +- `include_for_metrics`: [] +- `eval_do_concat_batches`: True +- `fp16_backend`: auto +- `push_to_hub_model_id`: None +- `push_to_hub_organization`: None +- `mp_parameters`: +- `auto_find_batch_size`: False +- `full_determinism`: False +- `torchdynamo`: None +- `ray_scope`: last +- `ddp_timeout`: 1800 +- `torch_compile`: False +- `torch_compile_backend`: None +- `torch_compile_mode`: None +- `include_tokens_per_second`: False +- `include_num_input_tokens_seen`: False +- `neftune_noise_alpha`: None +- `optim_target_modules`: None +- `batch_eval_metrics`: False +- `eval_on_start`: False +- `use_liger_kernel`: False +- `eval_use_gather_object`: False +- `average_tokens_across_devices`: False +- `prompts`: None +- `batch_sampler`: batch_sampler +- `multi_dataset_batch_sampler`: proportional + +
+ +### Training Logs +| Epoch | Step | Training Loss | Validation Loss | sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_ap | +|:------:|:----:|:-------------:|:---------------:|:---------------------------------------------------------------------:| +| -1 | -1 | - | - | 0.7140 | +| 0.7207 | 500 | 0.038 | - | - | +| 0.9989 | 693 | - | 0.0028 | 0.9911 | + + +### Framework Versions +- Python: 3.12.9 +- Sentence Transformers: 3.4.1 +- Transformers: 4.51.3 +- PyTorch: 2.7.0+cu126 +- Accelerate: 1.6.0 +- Datasets: 3.6.0 +- Tokenizers: 0.21.1 + +## Citation + +### BibTeX + +#### Sentence Transformers +```bibtex +@inproceedings{reimers-2019-sentence-bert, + title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks", + author = "Reimers, Nils and Gurevych, Iryna", + booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing", + month = "11", + year = "2019", + publisher = "Association for Computational Linguistics", + url = "https://arxiv.org/abs/1908.10084", +} +``` + +#### ContrastiveLoss +```bibtex +@inproceedings{hadsell2006dimensionality, + author={Hadsell, R. and Chopra, S. and LeCun, Y.}, + booktitle={2006 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR'06)}, + title={Dimensionality Reduction by Learning an Invariant Mapping}, + year={2006}, + volume={2}, + number={}, + pages={1735-1742}, + doi={10.1109/CVPR.2006.100} +} +``` + + + + + + \ No newline at end of file diff --git a/checkpoint-693/config.json b/checkpoint-693/config.json new file mode 100644 index 0000000000000000000000000000000000000000..26e48501fdf44110239e00ad4d438aee8679504a --- /dev/null +++ b/checkpoint-693/config.json @@ -0,0 +1,25 @@ +{ + "architectures": [ + "BertModel" + ], + "attention_probs_dropout_prob": 0.1, + "classifier_dropout": null, + "gradient_checkpointing": false, + "hidden_act": "gelu", + "hidden_dropout_prob": 0.1, + "hidden_size": 384, + "initializer_range": 0.02, + "intermediate_size": 1536, + "layer_norm_eps": 1e-12, + "max_position_embeddings": 512, + "model_type": "bert", + "num_attention_heads": 12, + "num_hidden_layers": 12, + "pad_token_id": 0, + "position_embedding_type": "absolute", + "torch_dtype": "float32", + "transformers_version": "4.51.3", + "type_vocab_size": 2, + "use_cache": true, + "vocab_size": 250037 +} diff --git a/checkpoint-693/config_sentence_transformers.json b/checkpoint-693/config_sentence_transformers.json new file mode 100644 index 0000000000000000000000000000000000000000..dcf436801f55bd22a257de2aad7eef5cfd06efaa --- /dev/null +++ b/checkpoint-693/config_sentence_transformers.json @@ -0,0 +1,10 @@ +{ + "__version__": { + "sentence_transformers": "3.4.1", + "transformers": "4.51.3", + "pytorch": "2.7.0+cu126" + }, + "prompts": {}, + "default_prompt_name": null, + "similarity_fn_name": "cosine" +} \ No newline at end of file diff --git a/checkpoint-693/model.safetensors b/checkpoint-693/model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..06cd55927f1f07b1cf79bfc5291950f0470bdac4 --- /dev/null +++ b/checkpoint-693/model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5b6a956772ef690a39d936766b88abb632b4097a69e44693ef370cdba1402b0a +size 470637416 diff --git a/checkpoint-693/modules.json b/checkpoint-693/modules.json new file mode 100644 index 0000000000000000000000000000000000000000..f7640f94e81bb7f4f04daf1668850b38763a13d9 --- /dev/null +++ b/checkpoint-693/modules.json @@ -0,0 +1,14 @@ +[ + { + "idx": 0, + "name": "0", + "path": "", + "type": "sentence_transformers.models.Transformer" + }, + { + "idx": 1, + "name": "1", + "path": "1_Pooling", + "type": "sentence_transformers.models.Pooling" + } +] \ No newline at end of file diff --git a/checkpoint-693/optimizer.pt b/checkpoint-693/optimizer.pt new file mode 100644 index 0000000000000000000000000000000000000000..6b54af43a9998ae53624c0727821518a7be66354 --- /dev/null +++ b/checkpoint-693/optimizer.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2549b503dadc023f022f593ea09e716cc46bbd0f9b5487563b1874212dba9fcf +size 1715019 diff --git a/checkpoint-693/rng_state.pth b/checkpoint-693/rng_state.pth new file mode 100644 index 0000000000000000000000000000000000000000..cf1046ef69b1591483b5336d32c88d39fc7c6bd5 --- /dev/null +++ b/checkpoint-693/rng_state.pth @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f62cce1358dd6e58045d6ce9a84ccca9443e538e49305c0b5fd2413d42a5234f +size 14645 diff --git a/checkpoint-693/scaler.pt b/checkpoint-693/scaler.pt new file mode 100644 index 0000000000000000000000000000000000000000..b543c03e8b1819d4b359b04188c400785292ee37 --- /dev/null +++ b/checkpoint-693/scaler.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7b08803626d75222e2baa22e4c13f53a5ace62bffa12fbbdf01b1d93bc64e8d5 +size 1383 diff --git a/checkpoint-693/scheduler.pt b/checkpoint-693/scheduler.pt new file mode 100644 index 0000000000000000000000000000000000000000..6738a361b23dbcbeb623d201937eab8d2e4cc842 --- /dev/null +++ b/checkpoint-693/scheduler.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:29430865f8e0f9b166864bbe8f7af84a753be1b09712d85e79bf5ff2a4cc577b +size 1465 diff --git a/checkpoint-693/sentence_bert_config.json b/checkpoint-693/sentence_bert_config.json new file mode 100644 index 0000000000000000000000000000000000000000..5fd10429389515d3e5cccdeda08cae5fea1ae82e --- /dev/null +++ b/checkpoint-693/sentence_bert_config.json @@ -0,0 +1,4 @@ +{ + "max_seq_length": 128, + "do_lower_case": false +} \ No newline at end of file diff --git a/checkpoint-693/special_tokens_map.json b/checkpoint-693/special_tokens_map.json new file mode 100644 index 0000000000000000000000000000000000000000..b1879d702821e753ffe4245048eee415d54a9385 --- /dev/null +++ b/checkpoint-693/special_tokens_map.json @@ -0,0 +1,51 @@ +{ + "bos_token": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false + }, + "cls_token": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false + }, + "eos_token": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false + }, + "mask_token": { + "content": "", + "lstrip": true, + "normalized": false, + "rstrip": false, + "single_word": false + }, + "pad_token": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false + }, + "sep_token": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false + }, + "unk_token": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false + } +} diff --git a/checkpoint-693/tokenizer.json b/checkpoint-693/tokenizer.json new file mode 100644 index 0000000000000000000000000000000000000000..e3420945e193cc0791136cdc6e5cd69801c838af --- /dev/null +++ b/checkpoint-693/tokenizer.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cad551d5600a84242d0973327029452a1e3672ba6313c2a3c3d69c4310e12719 +size 17082987 diff --git a/checkpoint-693/tokenizer_config.json b/checkpoint-693/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..facf4436a8f11c26085c16a14f4e576853927a9e --- /dev/null +++ b/checkpoint-693/tokenizer_config.json @@ -0,0 +1,65 @@ +{ + "added_tokens_decoder": { + "0": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": true + }, + "1": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": true + }, + "2": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": true + }, + "3": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": true + }, + "250001": { + "content": "", + "lstrip": true, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": true + } + }, + "bos_token": "", + "clean_up_tokenization_spaces": false, + "cls_token": "", + "do_lower_case": true, + "eos_token": "", + "extra_special_tokens": {}, + "mask_token": "", + "max_length": 128, + "model_max_length": 128, + "pad_to_multiple_of": null, + "pad_token": "", + "pad_token_type_id": 0, + "padding_side": "right", + "sep_token": "", + "stride": 0, + "strip_accents": null, + "tokenize_chinese_chars": true, + "tokenizer_class": "BertTokenizer", + "truncation_side": "right", + "truncation_strategy": "longest_first", + "unk_token": "" +} diff --git a/checkpoint-693/trainer_state.json b/checkpoint-693/trainer_state.json new file mode 100644 index 0000000000000000000000000000000000000000..ad25e6ff7bbb3b9c63f05f9ab563a2911ec79272 --- /dev/null +++ b/checkpoint-693/trainer_state.json @@ -0,0 +1,66 @@ +{ + "best_global_step": 693, + "best_metric": 0.002777691464871168, + "best_model_checkpoint": "data/fine-tuned-sbert-sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2-original-adafactor/checkpoint-693", + "epoch": 0.9989189189189189, + "eval_steps": 100, + "global_step": 693, + "is_hyper_param_search": false, + "is_local_process_zero": true, + "is_world_process_zero": true, + "log_history": [ + { + "epoch": 0.7207207207207207, + "grad_norm": 0.15965162217617035, + "learning_rate": 2.7341619887730554e-05, + "loss": 0.038, + "step": 500 + }, + { + "epoch": 0.9989189189189189, + "eval_loss": 0.002777691464871168, + "eval_runtime": 792.7494, + "eval_samples_per_second": 3359.543, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_accuracy": 0.975327415818089, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_accuracy_threshold": 0.7701693773269653, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_ap": 0.9911172257655966, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_f1": 0.9624723810391563, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_f1_threshold": 0.7597355842590332, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_mcc": 0.9441287064717891, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_precision": 0.9527175567355498, + "eval_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_cosine_recall": 0.9724290300680068, + "eval_steps_per_second": 4.375, + "step": 693 + } + ], + "logging_steps": 500, + "max_steps": 2772, + "num_input_tokens_seen": 0, + "num_train_epochs": 4, + "save_steps": 100, + "stateful_callbacks": { + "EarlyStoppingCallback": { + "args": { + "early_stopping_patience": 1, + "early_stopping_threshold": 0.0 + }, + "attributes": { + "early_stopping_patience_counter": 0 + } + }, + "TrainerControl": { + "args": { + "should_epoch_stop": false, + "should_evaluate": false, + "should_log": false, + "should_save": true, + "should_training_stop": false + }, + "attributes": {} + } + }, + "total_flos": 0.0, + "train_batch_size": 768, + "trial_name": null, + "trial_params": null +} diff --git a/checkpoint-693/training_args.bin b/checkpoint-693/training_args.bin new file mode 100644 index 0000000000000000000000000000000000000000..65b989c1e3d30efe64e2dc0572f41454e6d26706 --- /dev/null +++ b/checkpoint-693/training_args.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ee490aac80277022fdde76dd6763dbabee88802149f3f246e7d0572b504fcdaf +size 6097 diff --git a/checkpoint-693/unigram.json b/checkpoint-693/unigram.json new file mode 100644 index 0000000000000000000000000000000000000000..2faa9ec874108d53a017ff2c7ab98d155fb21a82 --- /dev/null +++ b/checkpoint-693/unigram.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:da145b5e7700ae40f16691ec32a0b1fdc1ee3298db22a31ea55f57a966c4a65d +size 14763260 diff --git a/config.json b/config.json new file mode 100644 index 0000000000000000000000000000000000000000..26e48501fdf44110239e00ad4d438aee8679504a --- /dev/null +++ b/config.json @@ -0,0 +1,25 @@ +{ + "architectures": [ + "BertModel" + ], + "attention_probs_dropout_prob": 0.1, + "classifier_dropout": null, + "gradient_checkpointing": false, + "hidden_act": "gelu", + "hidden_dropout_prob": 0.1, + "hidden_size": 384, + "initializer_range": 0.02, + "intermediate_size": 1536, + "layer_norm_eps": 1e-12, + "max_position_embeddings": 512, + "model_type": "bert", + "num_attention_heads": 12, + "num_hidden_layers": 12, + "pad_token_id": 0, + "position_embedding_type": "absolute", + "torch_dtype": "float32", + "transformers_version": "4.51.3", + "type_vocab_size": 2, + "use_cache": true, + "vocab_size": 250037 +} diff --git a/eval/binary_classification_evaluation_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_results.csv b/eval/binary_classification_evaluation_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_results.csv new file mode 100644 index 0000000000000000000000000000000000000000..34c624633cd67ccbbd8a83004ef88100000c3c25 --- /dev/null +++ b/eval/binary_classification_evaluation_sentence-transformers-paraphrase-multilingual-MiniLM-L12-v2_results.csv @@ -0,0 +1,6 @@ +epoch,steps,cosine_accuracy,cosine_accuracy_threshold,cosine_f1,cosine_precision,cosine_recall,cosine_f1_threshold,cosine_ap,cosine_mcc +0.9989189189189189,693,0.975327415818089,0.7701694,0.9624723810391563,0.9527175567355498,0.9724290300680068,0.7597356,0.9911172257655966,0.9441287064717891 +1.998918918918919,1386,0.9846242227629088,0.6801188,0.9765449140552956,0.9721848413657824,0.9809442711989229,0.6780189,0.9955904030209028,0.9651303277408154 +2.998918918918919,2079,0.9879171547865789,0.71816367,0.9815604299892273,0.9775832353646149,0.98557011840788,0.71816367,0.996840725826042,0.9725931427811844 +3.998918918918919,2772,0.9885216725241056,0.71832466,0.9824706124974221,0.9782229269572558,0.9867553479166427,0.7085607,0.9971022799526896,0.9739458779668466 +3.998918918918919,2772,0.9885216725241056,0.71832466,0.9824706124974221,0.9782229269572558,0.9867553479166427,0.7085607,0.9971022799526896,0.9739458779668466 diff --git a/model.safetensors b/model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..2a8c6a1dee5b1f6a8892e79a11f68f590faf9973 --- /dev/null +++ b/model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:86cbcc5809568045ff4d80ea5eff6ddee83cd424541447967273a7023c7e187e +size 470637416 diff --git a/modules.json b/modules.json new file mode 100644 index 0000000000000000000000000000000000000000..f7640f94e81bb7f4f04daf1668850b38763a13d9 --- /dev/null +++ b/modules.json @@ -0,0 +1,14 @@ +[ + { + "idx": 0, + "name": "0", + "path": "", + "type": "sentence_transformers.models.Transformer" + }, + { + "idx": 1, + "name": "1", + "path": "1_Pooling", + "type": "sentence_transformers.models.Pooling" + } +] \ No newline at end of file diff --git a/sentence_bert_config.json b/sentence_bert_config.json new file mode 100644 index 0000000000000000000000000000000000000000..5fd10429389515d3e5cccdeda08cae5fea1ae82e --- /dev/null +++ b/sentence_bert_config.json @@ -0,0 +1,4 @@ +{ + "max_seq_length": 128, + "do_lower_case": false +} \ No newline at end of file diff --git a/special_tokens_map.json b/special_tokens_map.json new file mode 100644 index 0000000000000000000000000000000000000000..b1879d702821e753ffe4245048eee415d54a9385 --- /dev/null +++ b/special_tokens_map.json @@ -0,0 +1,51 @@ +{ + "bos_token": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false + }, + "cls_token": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false + }, + "eos_token": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false + }, + "mask_token": { + "content": "", + "lstrip": true, + "normalized": false, + "rstrip": false, + "single_word": false + }, + "pad_token": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false + }, + "sep_token": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false + }, + "unk_token": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false + } +} diff --git a/tokenizer.json b/tokenizer.json new file mode 100644 index 0000000000000000000000000000000000000000..e3420945e193cc0791136cdc6e5cd69801c838af --- /dev/null +++ b/tokenizer.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cad551d5600a84242d0973327029452a1e3672ba6313c2a3c3d69c4310e12719 +size 17082987 diff --git a/tokenizer_config.json b/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..facf4436a8f11c26085c16a14f4e576853927a9e --- /dev/null +++ b/tokenizer_config.json @@ -0,0 +1,65 @@ +{ + "added_tokens_decoder": { + "0": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": true + }, + "1": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": true + }, + "2": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": true + }, + "3": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": true + }, + "250001": { + "content": "", + "lstrip": true, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": true + } + }, + "bos_token": "", + "clean_up_tokenization_spaces": false, + "cls_token": "", + "do_lower_case": true, + "eos_token": "", + "extra_special_tokens": {}, + "mask_token": "", + "max_length": 128, + "model_max_length": 128, + "pad_to_multiple_of": null, + "pad_token": "", + "pad_token_type_id": 0, + "padding_side": "right", + "sep_token": "", + "stride": 0, + "strip_accents": null, + "tokenize_chinese_chars": true, + "tokenizer_class": "BertTokenizer", + "truncation_side": "right", + "truncation_strategy": "longest_first", + "unk_token": "" +} diff --git a/training_args.bin b/training_args.bin new file mode 100644 index 0000000000000000000000000000000000000000..65b989c1e3d30efe64e2dc0572f41454e6d26706 --- /dev/null +++ b/training_args.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ee490aac80277022fdde76dd6763dbabee88802149f3f246e7d0572b504fcdaf +size 6097 diff --git a/unigram.json b/unigram.json new file mode 100644 index 0000000000000000000000000000000000000000..2faa9ec874108d53a017ff2c7ab98d155fb21a82 --- /dev/null +++ b/unigram.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:da145b5e7700ae40f16691ec32a0b1fdc1ee3298db22a31ea55f57a966c4a65d +size 14763260