Sentence Similarity
sentence-transformers
Safetensors
Persian
bert
feature-extraction
loss:CachedMultipleNegativesRankingLoss
text-embeddings-inference
Instructions to use PartAI/Tooka-SBERT-V2-Small with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use PartAI/Tooka-SBERT-V2-Small with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("PartAI/Tooka-SBERT-V2-Small") sentences = [ "درنا از پرندگان مهاجر با پاهای بلند و گردن دراز است.", "درناها با قامتی بلند و بالهای پهن، از زیباترین پرندگان مهاجر به شمار میروند.", "درناها پرندگانی کوچک با پاهای کوتاه هستند که مهاجرت نمیکنند.", "ایران برای بار دیگر توانست به مدال طلا دست یابد." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -66,7 +66,7 @@ sentences = [
|
|
| 66 |
]
|
| 67 |
embeddings = model.encode(sentences)
|
| 68 |
print(embeddings.shape)
|
| 69 |
-
# [3,
|
| 70 |
|
| 71 |
# Get the similarity scores for the embeddings
|
| 72 |
similarities = model.similarity(embeddings, embeddings)
|
|
|
|
| 66 |
]
|
| 67 |
embeddings = model.encode(sentences)
|
| 68 |
print(embeddings.shape)
|
| 69 |
+
# [3, 768]
|
| 70 |
|
| 71 |
# Get the similarity scores for the embeddings
|
| 72 |
similarities = model.similarity(embeddings, embeddings)
|