Sentence Similarity
sentence-transformers
Safetensors
Persian
xlm-roberta
feature-extraction
persian
farsi
matryoshka
text-embeddings-inference
Instructions to use hanyeh00/hamsan with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use hanyeh00/hamsan with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("hanyeh00/hamsan") sentences = [ "query: پایتخت ایران کجاست؟", "passage: تهران پایتخت و پرجمعیتترین شهر ایران است.", "passage: اصفهان یکی از شهرهای تاریخی ایران است.", "passage: دریای خزر بزرگترین دریاچهٔ جهان است." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
Download 2_Normalize/config.json from hanyeh00/hamsan: direct link, hf CLI and curl.
- Browser
- Download file 100 Bytes
-
https://huggingface.co/hanyeh00/hamsan/resolve/main/2_Normalize/config.json
- Command line
-
hf download hf://hanyeh00/hamsan/2_Normalize/config.json
-
curl -L -o config.json https://huggingface.co/hanyeh00/hamsan/resolve/main/2_Normalize/config.json
100 Bytes
| { | |
| "module_input_name": "sentence_embedding", | |
| "module_output_name": "sentence_embedding" | |
| } |