Sentence Similarity
sentence-transformers
Safetensors
xlm-roberta
feature-extraction
Generated from Trainer
dataset_size:594028
loss:MultipleNegativesRankingLoss
text-embeddings-inference
Instructions to use DoDucAnh/MNLP_M2_document_encoder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use DoDucAnh/MNLP_M2_document_encoder with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("DoDucAnh/MNLP_M2_document_encoder") sentences = [ "'আমি' শব্দটি কোন লিঙ্গ?\nA. উভয় লিঙ্গ\nB. ক্লীব লিঙ্গ\nC. পুংলিঙ্গ\nD. স্ত্রী লিঙ্গ", "F.P. Dobroslavin, tibbin müxtəlif sahələri üzrə tanınmış bir alimdir, ancaq daha çox baş vermiş tədqiqatlara görə seçilir. Onun əməyinin sanitar-gigiyenik sahəyə təsiri əhəmiyyətlidir.", "বাংলা ভাষায় শব্দগুলোর লিঙ্গ সাধারণত তিনটি মূল শ্রেণিতে ভাগ হয়: পুংলিঙ্গ (পুরুষ), স্ত্রী লিঙ্গ (মহিলা), এবং ক্লীব লিঙ্গ (যার কোনো লিঙ্গ নেই)।", "Waves are disturbances that transfer energy from one place to another without transferring matter. Think of a ripple on a pond – the water molecules don't travel across the pond with the ripple; they mostly move up and down as the energy passes through them." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
| { | |
| "added_tokens_decoder": { | |
| "0": { | |
| "content": "<s>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "1": { | |
| "content": "<pad>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "2": { | |
| "content": "</s>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "3": { | |
| "content": "<unk>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "250001": { | |
| "content": "<mask>", | |
| "lstrip": true, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| } | |
| }, | |
| "additional_special_tokens": [], | |
| "bos_token": "<s>", | |
| "clean_up_tokenization_spaces": true, | |
| "cls_token": "<s>", | |
| "eos_token": "</s>", | |
| "extra_special_tokens": {}, | |
| "mask_token": "<mask>", | |
| "model_max_length": 512, | |
| "pad_token": "<pad>", | |
| "sep_token": "</s>", | |
| "tokenizer_class": "XLMRobertaTokenizer", | |
| "unk_token": "<unk>" | |
| } | |