This is a
sentence-transformers model trained. It maps sentences & paragraphs to a 1024-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
Then you can load this model and run inference.
1from sentence_transformers import SentenceTransformer
2
3# Download from the 🤗 Hub
4model = SentenceTransformer("PartAI/Tooka-SBERT")
5# Run inference
6sentences = [
7 'درنا از پرندگان مهاجر با پاهای بلند و گردن دراز است.',
8 'درناها با قامتی بلند و بالهای پهن، از زیباترین پرندگان مهاجر به شمار میروند.',
9 'درناها پرندگانی کوچک با پاهای کوتاه هستند که مهاجرت نمیکنند.'
10]
11embeddings = model.encode(sentences)
12print(embeddings.shape)
13# [3, 1024]
14
15# Get the similarity scores for the embeddings
16similarities = model.similarity(embeddings, embeddings)
17print(similarities.shape)
18# [3, 3]
1@inproceedings{reimers-2019-sentence-bert,
2 title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
3 author = "Reimers, Nils and Gurevych, Iryna",
4 booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
5 month = "11",
6 year = "2019",
7 publisher = "Association for Computational Linguistics",
8 url = "https://arxiv.org/abs/1908.10084",
9}
1@misc{gao2021scaling,
2 title={Scaling Deep Contrastive Learning Batch Size under Memory Limited Setup},
3 author={Luyu Gao and Yunyi Zhang and Jiawei Han and Jamie Callan},
4 year={2021},
5 eprint={2101.06983},
6 archivePrefix={arXiv},
7 primaryClass={cs.LG}
8}