codersan/FaMiniLM
0547
1---2tags:3- sentence-transformers4- sentence-similarity5- feature-extraction6- generated_from_trainer7- dataset_size:1311578- loss:MultipleNegativesRankingLoss9base_model: sentence-transformers/all-MiniLM-L6-v210widget:11- source_sentence: عواقب ممنوعیت یادداشت های 500 روپیه و 1000 روپیه در مورد اقتصاد هند چیست؟12 sentences:13 - آیا باید در فیزیک و علوم کامپیوتر دو برابر کنم؟14 - چگونه اقتصاد هند پس از ممنوعیت 500 1000 یادداشت تحت تأثیر قرار گرفت؟15 - آیا آلمان در اجازه پناهندگان سوری به کشور خود اشتباه کرد؟16- source_sentence: بهترین شماره پشتیبانی فنی QuickBooks در نیویورک ، ایالات متحده کدام است؟17 sentences:18 - فناوری هایی که اکثر مردم از آنها نمی دانند چیست؟19 - بهترین شماره پشتیبانی QuickBooks در آرکانزاس چیست؟20 - چرا در مقایسه با طرف نزدیک ، دهانه های زیادی در قسمت دور ماه وجود دارد؟21- source_sentence: >-22 اقدامات احتیاطی ایمنی در مورد استفاده از اسلحه های پیشنهادی NRA در میشیگان23 چیست؟24 sentences:25 - پیروزی ترامپ چگونه بر کانادا تأثیر خواهد گذاشت؟26 - >-27 اقدامات احتیاطی ایمنی در مورد استفاده از اسلحه های پیشنهادی NRA در آیداهو28 چیست؟29 - مزایای خرید بیمه عمر چیست؟30- source_sentence: چرا این همه افراد ناراضی هستند؟31 sentences:32 - چرا آب نبات تافی آب شور در مغولستان وارد می شود؟33 - برای یک رابطه موفق از راه دور چه چیزی طول می کشد؟34 - چرا مردم ناراضی هستند؟35- source_sentence: برای تبدیل شدن به نویسنده برتر Quora ، چند بازدید و پاسخ لازم است؟36 sentences:37 - >-38 چگونه می توانم نویسنده برتر Quora شوم ، از صعود بیشتر و آمار بهتر استفاده39 کنم؟40 - >-41 چرا بسیاری از افرادی که سؤالاتی را در Quora ارسال می کنند ، ابتدا Google را42 بررسی می کنند؟43 - >-44 من به دنبال خرید دوچرخه جدید هستم.Suzuki Gixxer 155 یا Honda Hornet45 160r.کدام یک را بخرید؟46pipeline_tag: sentence-similarity47library_name: sentence-transformers48license: mit49datasets:50- codersan/PersianSimilarSentences51language:52- fa53- en54---55 56# SentenceTransformer based on sentence-transformers/all-MiniLM-L6-v257 58This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [sentence-transformers/all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-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.59 60## Model Details61 62This model, FaMiniLM, was developed alongside FaLaBSE as part of the research paper "MetaRAG and WikiFaQA: A Co-designed Framework and Benchmark for Advancing Persian Long-Context RAG". It serves as a lightweight Persian sentence encoder. FaMiniLM was created by fine-tuning the all-MiniLM-L6-v2 model—which had no prior Persian knowledge—on the custom PersianSimilarSentences dataset. The training was specifically designed to build Persian semantic understanding from the ground up.63 64### Model Description65- **Model Type:** Sentence Transformer66- **Base model:** [sentence-transformers/all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2) <!-- at revision c9745ed1d9f207416be6d2e6f8de32d1f16199bf -->67- **Maximum Sequence Length:** 256 tokens68- **Output Dimensionality:** 384 dimensions69- **Similarity Function:** Cosine Similarity70<!-- - **Training Dataset:** Unknown -->71<!-- - **Language:** Unknown -->72<!-- - **License:** Unknown -->73 74 75### Full Model Architecture76 77```78SentenceTransformer(79 (0): Transformer({'max_seq_length': 256, 'do_lower_case': False}) with Transformer model: BertModel 80 (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})81 (2): Normalize()82)83```84 85## Usage86 87### Direct Usage (Sentence Transformers)88 89First install the Sentence Transformers library:90 91```bash92pip install -U sentence-transformers93```94 95Then you can load this model and run inference.96```python97from sentence_transformers import SentenceTransformer98 99# Download from the 🤗 Hub100model = SentenceTransformer("codersan/validadted_all-MiniLM_onV9")101# Run inference102sentences = [103 'برای تبدیل شدن به نویسنده برتر Quora ، چند بازدید و پاسخ لازم است؟',104 'چگونه می توانم نویسنده برتر Quora شوم ، از صعود بیشتر و آمار بهتر استفاده کنم؟',105 'من به دنبال خرید دوچرخه جدید هستم.Suzuki Gixxer 155 یا Honda Hornet 160r.کدام یک را بخرید؟',106]107embeddings = model.encode(sentences)108print(embeddings.shape)109# [3, 384]110 111# Get the similarity scores for the embeddings112similarities = model.similarity(embeddings, embeddings)113print(similarities.shape)114# [3, 3]115```116 117<!--118### Direct Usage (Transformers)119 120<details><summary>Click to see the direct usage in Transformers</summary>121 122</details>123-->124 125<!--126### Downstream Usage (Sentence Transformers)127 128You can finetune this model on your own dataset.129 130<details><summary>Click to expand</summary>131 132</details>133-->134 135<!--136### Out-of-Scope Use137 138*List how the model may foreseeably be misused and address what users ought not to do with the model.*139-->140 141<!--142## Bias, Risks and Limitations143 144*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*145-->146 147<!--148### Recommendations149 150*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*151-->152 153## Training Details154 155### Training Hyperparameters156#### Non-Default Hyperparameters157 158- `per_device_train_batch_size`: 64159- `learning_rate`: 2e-05160- `weight_decay`: 0.01161- `num_train_epochs`: 15162- `warmup_ratio`: 0.1163- `batch_sampler`: no_duplicates164 165### Framework Versions166- Python: 3.10.12167- Sentence Transformers: 3.3.1168- Transformers: 4.47.0169- PyTorch: 2.5.1+cu121170- Accelerate: 1.2.1171- Datasets: 3.2.0172- Tokenizers: 0.21.0173 174## Citation175 176### BibTeX177 178#### WikiFaQA paper179```bibtex180 181```182 183 184<!--185## Glossary186 187*Clearly define terms in order to be accessible across audiences.*188-->189 190<!--191## Model Card Authors192 193*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*194-->195 196<!--197## Model Card Contact198 199*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*200-->