CoolFace
Modelpublic

codersan/newfa_e5small_6

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes82downloads
README.md428 linesDownload Raw Back to root
1---2tags:3- sentence-transformers4- sentence-similarity5- feature-extraction6- generated_from_trainer7- dataset_size:1429648- loss:MultipleNegativesRankingLoss9base_model: intfloat/multilingual-e5-small10widget:11- source_sentence: نمونه هایی از تئوری های توطئه ها که به نظر می رسد درست است؟12  sentences:13  - آیا نظریه های توطئه ای وجود دارد که احتمالاً صادق است؟نظریه های توطئه ای که معلوم14    شد درست است؟15  - بازیگران پانتومیم در حال اجرا بر روی صحنه هستند.16  - چرا میل الکترون فلورین کمتر از کلر است ، در حالی که فلورین الکترونگاتیو ترین عنصر17    است؟18- source_sentence: بهترین و بدون درد برای کشتن خودم چیست؟19  sentences:20  - بهترین استراتژی ها برای آماده سازی برای GMAT چیست؟21  - آیا ارزش دارد دو سال برای NIT کاهش یابد؟22  - بدون درد ترین روش برای خودکشی چیست؟23- source_sentence: چه کاری باید انجام دهم در حالی که B-Tech را در مهندسی مکانیک برای24    چشم انداز بهتر شغلی دنبال می کنم؟25  sentences:26  - چگونه می توانیم مشاوره کسب و کار را شروع کنیم؟27  - فرصت های شغلی در شرکت ها پس از M.Tech در مهندسی هوافضا با B.Tech در مهندسی مکانیک28    چیست؟29  - آیا روانپزشکی یک شبه علوم است؟30- source_sentence: چرا گربه ها وقتی خیار را در مقابل آن قرار می دهید می ترسند؟31  sentences:32  - چرا گربه ها از خیار ترسیده اند؟33  - هک در زندگی روزمره چیست؟34  - چگونه می توانم به سرعت وزن خود را افزایش دهم؟35- source_sentence: مرزهای صفحه چیست؟برخی از انواع چیست؟36  sentences:37  - مرزهای صفحه چیست؟38  - اتانول چند ایزومر دارد؟39  - چه سؤالاتی در مورد Quora پرسیده نشده است؟40pipeline_tag: sentence-similarity41library_name: sentence-transformers42---43 44# SentenceTransformer based on intfloat/multilingual-e5-small45 46This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [intfloat/multilingual-e5-small](https://huggingface.co/intfloat/multilingual-e5-small). 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.47 48## Model Details49 50### Model Description51- **Model Type:** Sentence Transformer52- **Base model:** [intfloat/multilingual-e5-small](https://huggingface.co/intfloat/multilingual-e5-small) <!-- at revision c007d7ef6fd86656326059b28395a7a03a7c5846 -->53- **Maximum Sequence Length:** 512 tokens54- **Output Dimensionality:** 384 dimensions55- **Similarity Function:** Cosine Similarity56<!-- - **Training Dataset:** Unknown -->57<!-- - **Language:** Unknown -->58<!-- - **License:** Unknown -->59 60### Model Sources61 62- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)63- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)64- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)65 66### Full Model Architecture67 68```69SentenceTransformer(70  (0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: BertModel 71  (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})72  (2): Normalize()73)74```75 76## Usage77 78### Direct Usage (Sentence Transformers)79 80First install the Sentence Transformers library:81 82```bash83pip install -U sentence-transformers84```85 86Then you can load this model and run inference.87```python88from sentence_transformers import SentenceTransformer89 90# Download from the 🤗 Hub91model = SentenceTransformer("codersan/newfa_e5small_6")92# Run inference93sentences = [94    'مرزهای صفحه چیست؟برخی از انواع چیست؟',95    'مرزهای صفحه چیست؟',96    'اتانول چند ایزومر دارد؟',97]98embeddings = model.encode(sentences)99print(embeddings.shape)100# [3, 384]101 102# Get the similarity scores for the embeddings103similarities = model.similarity(embeddings, embeddings)104print(similarities.shape)105# [3, 3]106```107 108<!--109### Direct Usage (Transformers)110 111<details><summary>Click to see the direct usage in Transformers</summary>112 113</details>114-->115 116<!--117### Downstream Usage (Sentence Transformers)118 119You can finetune this model on your own dataset.120 121<details><summary>Click to expand</summary>122 123</details>124-->125 126<!--127### Out-of-Scope Use128 129*List how the model may foreseeably be misused and address what users ought not to do with the model.*130-->131 132<!--133## Bias, Risks and Limitations134 135*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*136-->137 138<!--139### Recommendations140 141*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*142-->143 144## Training Details145 146### Training Dataset147 148#### Unnamed Dataset149 150 151* Size: 142,964 training samples152* Columns: <code>anchor</code> and <code>positive</code>153* Approximate statistics based on the first 1000 samples:154  |         | anchor                                                                            | positive                                                                          |155  |:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|156  | type    | string                                                                            | string                                                                            |157  | details | <ul><li>min: 6 tokens</li><li>mean: 16.39 tokens</li><li>max: 90 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 15.68 tokens</li><li>max: 57 tokens</li></ul> |158* Samples:159  | anchor                                                                       | positive                                                           |160  |:-----------------------------------------------------------------------------|:-------------------------------------------------------------------|161  | <code>گاو یونجه می خورد</code>                                               | <code>گاو در حال چریدن است</code>                                  |162  | <code>ماشینی به شکلی خطرناک از روی دختری می‌پرد.</code>                      | <code>دختر با بی‌احتیاطی روی ماشین می‌پرد.</code>                  |163  | <code>چگونه می توانم کارتهای هدیه iTunes رایگان را در هند دریافت کنم؟</code> | <code>چگونه می توانم کارتهای هدیه iTunes رایگان دریافت کنم؟</code> |164* Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:165  ```json166  {167      "scale": 20.0,168      "similarity_fct": "cos_sim"169  }170  ```171 172### Training Hyperparameters173#### Non-Default Hyperparameters174 175- `per_device_train_batch_size`: 64176- `learning_rate`: 2e-05177- `weight_decay`: 0.01178- `max_grad_norm`: 0.2179- `batch_sampler`: no_duplicates180 181#### All Hyperparameters182<details><summary>Click to expand</summary>183 184- `overwrite_output_dir`: False185- `do_predict`: False186- `eval_strategy`: no187- `prediction_loss_only`: True188- `per_device_train_batch_size`: 64189- `per_device_eval_batch_size`: 8190- `per_gpu_train_batch_size`: None191- `per_gpu_eval_batch_size`: None192- `gradient_accumulation_steps`: 1193- `eval_accumulation_steps`: None194- `torch_empty_cache_steps`: None195- `learning_rate`: 2e-05196- `weight_decay`: 0.01197- `adam_beta1`: 0.9198- `adam_beta2`: 0.999199- `adam_epsilon`: 1e-08200- `max_grad_norm`: 0.2201- `num_train_epochs`: 3202- `max_steps`: -1203- `lr_scheduler_type`: linear204- `lr_scheduler_kwargs`: {}205- `warmup_ratio`: 0.0206- `warmup_steps`: 0207- `log_level`: passive208- `log_level_replica`: warning209- `log_on_each_node`: True210- `logging_nan_inf_filter`: True211- `save_safetensors`: True212- `save_on_each_node`: False213- `save_only_model`: False214- `restore_callback_states_from_checkpoint`: False215- `no_cuda`: False216- `use_cpu`: False217- `use_mps_device`: False218- `seed`: 42219- `data_seed`: None220- `jit_mode_eval`: False221- `use_ipex`: False222- `bf16`: False223- `fp16`: False224- `fp16_opt_level`: O1225- `half_precision_backend`: auto226- `bf16_full_eval`: False227- `fp16_full_eval`: False228- `tf32`: None229- `local_rank`: 0230- `ddp_backend`: None231- `tpu_num_cores`: None232- `tpu_metrics_debug`: False233- `debug`: []234- `dataloader_drop_last`: False235- `dataloader_num_workers`: 0236- `dataloader_prefetch_factor`: None237- `past_index`: -1238- `disable_tqdm`: False239- `remove_unused_columns`: True240- `label_names`: None241- `load_best_model_at_end`: False242- `ignore_data_skip`: False243- `fsdp`: []244- `fsdp_min_num_params`: 0245- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}246- `fsdp_transformer_layer_cls_to_wrap`: None247- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}248- `deepspeed`: None249- `label_smoothing_factor`: 0.0250- `optim`: adamw_torch251- `optim_args`: None252- `adafactor`: False253- `group_by_length`: False254- `length_column_name`: length255- `ddp_find_unused_parameters`: None256- `ddp_bucket_cap_mb`: None257- `ddp_broadcast_buffers`: False258- `dataloader_pin_memory`: True259- `dataloader_persistent_workers`: False260- `skip_memory_metrics`: True261- `use_legacy_prediction_loop`: False262- `push_to_hub`: False263- `resume_from_checkpoint`: None264- `hub_model_id`: None265- `hub_strategy`: every_save266- `hub_private_repo`: None267- `hub_always_push`: False268- `gradient_checkpointing`: False269- `gradient_checkpointing_kwargs`: None270- `include_inputs_for_metrics`: False271- `include_for_metrics`: []272- `eval_do_concat_batches`: True273- `fp16_backend`: auto274- `push_to_hub_model_id`: None275- `push_to_hub_organization`: None276- `mp_parameters`: 277- `auto_find_batch_size`: False278- `full_determinism`: False279- `torchdynamo`: None280- `ray_scope`: last281- `ddp_timeout`: 1800282- `torch_compile`: False283- `torch_compile_backend`: None284- `torch_compile_mode`: None285- `dispatch_batches`: None286- `split_batches`: None287- `include_tokens_per_second`: False288- `include_num_input_tokens_seen`: False289- `neftune_noise_alpha`: None290- `optim_target_modules`: None291- `batch_eval_metrics`: False292- `eval_on_start`: False293- `use_liger_kernel`: False294- `eval_use_gather_object`: False295- `average_tokens_across_devices`: False296- `prompts`: None297- `batch_sampler`: no_duplicates298- `multi_dataset_batch_sampler`: proportional299 300</details>301 302### Training Logs303| Epoch  | Step | Training Loss |304|:------:|:----:|:-------------:|305| 0.0448 | 100  | 0.186         |306| 0.0895 | 200  | 0.0907        |307| 0.1343 | 300  | 0.088         |308| 0.1791 | 400  | 0.0675        |309| 0.2238 | 500  | 0.0663        |310| 0.2686 | 600  | 0.0643        |311| 0.3133 | 700  | 0.0742        |312| 0.3581 | 800  | 0.0664        |313| 0.4029 | 900  | 0.0662        |314| 0.4476 | 1000 | 0.0567        |315| 0.4924 | 1100 | 0.0706        |316| 0.5372 | 1200 | 0.0662        |317| 0.5819 | 1300 | 0.0599        |318| 0.6267 | 1400 | 0.0556        |319| 0.6714 | 1500 | 0.0682        |320| 0.7162 | 1600 | 0.0604        |321| 0.7610 | 1700 | 0.0593        |322| 0.8057 | 1800 | 0.0579        |323| 0.8505 | 1900 | 0.0569        |324| 0.8953 | 2000 | 0.0575        |325| 0.9400 | 2100 | 0.0566        |326| 0.9848 | 2200 | 0.054         |327| 1.0295 | 2300 | 0.0538        |328| 1.0743 | 2400 | 0.0507        |329| 1.1191 | 2500 | 0.0503        |330| 1.1638 | 2600 | 0.0401        |331| 1.2086 | 2700 | 0.0373        |332| 1.2534 | 2800 | 0.036         |333| 1.2981 | 2900 | 0.0462        |334| 1.3429 | 3000 | 0.0479        |335| 1.3876 | 3100 | 0.046         |336| 1.4324 | 3200 | 0.0392        |337| 1.4772 | 3300 | 0.0391        |338| 1.5219 | 3400 | 0.0476        |339| 1.5667 | 3500 | 0.0412        |340| 1.6115 | 3600 | 0.038         |341| 1.6562 | 3700 | 0.0448        |342| 1.7010 | 3800 | 0.0431        |343| 1.7457 | 3900 | 0.0441        |344| 1.7905 | 4000 | 0.0459        |345| 1.8353 | 4100 | 0.0357        |346| 1.8800 | 4200 | 0.0429        |347| 1.9248 | 4300 | 0.047         |348| 1.9696 | 4400 | 0.0365        |349| 2.0143 | 4500 | 0.0397        |350| 2.0591 | 4600 | 0.0395        |351| 2.1038 | 4700 | 0.0389        |352| 2.1486 | 4800 | 0.0322        |353| 2.1934 | 4900 | 0.031         |354| 2.2381 | 5000 | 0.028         |355| 2.2829 | 5100 | 0.0336        |356| 2.3277 | 5200 | 0.0398        |357| 2.3724 | 5300 | 0.0392        |358| 2.4172 | 5400 | 0.0315        |359| 2.4620 | 5500 | 0.03          |360| 2.5067 | 5600 | 0.041         |361| 2.5515 | 5700 | 0.0319        |362| 2.5962 | 5800 | 0.0316        |363| 2.6410 | 5900 | 0.036         |364| 2.6858 | 6000 | 0.035         |365| 2.7305 | 6100 | 0.0371        |366| 2.7753 | 6200 | 0.039         |367| 2.8201 | 6300 | 0.0323        |368| 2.8648 | 6400 | 0.0345        |369| 2.9096 | 6500 | 0.0375        |370| 2.9543 | 6600 | 0.0336        |371| 2.9991 | 6700 | 0.033         |372 373 374### Framework Versions375- Python: 3.10.12376- Sentence Transformers: 3.3.1377- Transformers: 4.47.0378- PyTorch: 2.5.1+cu121379- Accelerate: 1.2.1380- Datasets: 4.0.0381- Tokenizers: 0.21.0382 383## Citation384 385### BibTeX386 387#### Sentence Transformers388```bibtex389@inproceedings{reimers-2019-sentence-bert,390    title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",391    author = "Reimers, Nils and Gurevych, Iryna",392    booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",393    month = "11",394    year = "2019",395    publisher = "Association for Computational Linguistics",396    url = "https://arxiv.org/abs/1908.10084",397}398```399 400#### MultipleNegativesRankingLoss401```bibtex402@misc{henderson2017efficient,403    title={Efficient Natural Language Response Suggestion for Smart Reply},404    author={Matthew Henderson and Rami Al-Rfou and Brian Strope and Yun-hsuan Sung and Laszlo Lukacs and Ruiqi Guo and Sanjiv Kumar and Balint Miklos and Ray Kurzweil},405    year={2017},406    eprint={1705.00652},407    archivePrefix={arXiv},408    primaryClass={cs.CL}409}410```411 412<!--413## Glossary414 415*Clearly define terms in order to be accessible across audiences.*416-->417 418<!--419## Model Card Authors420 421*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*422-->423 424<!--425## Model Card Contact426 427*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*428-->