Sentence Similarity
sentence-transformers
Safetensors
qwen2
feature-extraction
Generated from Trainer
dataset_size:21769
loss:MultipleNegativesRankingLoss
text-embeddings-inference
Instructions to use am-azadi/KaLM-embedding-multilingual-mini-v1_Fine_Tuned_1e with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use am-azadi/KaLM-embedding-multilingual-mini-v1_Fine_Tuned_1e with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("am-azadi/KaLM-embedding-multilingual-mini-v1_Fine_Tuned_1e") sentences = [ "Blooming Canals of Venice, Italy. by: [IG] ", "This comparison shows the values of gasoline in Cádiz and in Gibraltar in 2021 The comparison of fuel prices circulates in Spain at least since 2018", "Genuine image of a Venice canal laden with lotus blossoms The lotus blossoms were digitally inserted into this image by a graphic artist", "PT deputy presented PL for police to carry unloaded weapons Bill \"5439/2022\" for police officers to carry unloaded weapons does not exist" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
| { | |
| "add_prefix_space": false, | |
| "added_tokens_decoder": { | |
| "151643": { | |
| "content": "<|endoftext|>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "151644": { | |
| "content": "<|im_start|>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "151645": { | |
| "content": "<|im_end|>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| } | |
| }, | |
| "additional_special_tokens": [ | |
| "<|im_start|>", | |
| "<|im_end|>" | |
| ], | |
| "auto_map": { | |
| "AutoTokenizer": [ | |
| "HIT-TMG/KaLM-embedding-multilingual-mini-v1--tokenization_qwen.Qwen2Tokenizer", | |
| "HIT-TMG/KaLM-embedding-multilingual-mini-v1--tokenization_qwen.Qwen2TokenizerFast" | |
| ] | |
| }, | |
| "bos_token": null, | |
| "chat_template": "{% for message in messages %}{% if loop.first and messages[0]['role'] != 'system' %}{{ '<|im_start|>system\nYou are a helpful assistant<|im_end|>\n' }}{% endif %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}", | |
| "clean_up_tokenization_spaces": false, | |
| "eos_token": "<|endoftext|>", | |
| "errors": "replace", | |
| "extra_special_tokens": {}, | |
| "max_length": 512, | |
| "model_max_length": 512, | |
| "pad_to_multiple_of": null, | |
| "pad_token": "<|endoftext|>", | |
| "pad_token_type_id": 0, | |
| "padding_side": "left", | |
| "split_special_tokens": false, | |
| "stride": 0, | |
| "tokenizer_class": "Qwen2Tokenizer", | |
| "truncation_side": "right", | |
| "truncation_strategy": "longest_first", | |
| "unk_token": null | |
| } | |