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
Welcome to the community
The community tab is the place to discuss and collaborate with the HF community!