It maps Arabic sentences and paragraphs into a
768-dimensional semantic space
, optimized for
semantic textual similarity
,
semantic search
,
paraphrase mining
,
text classification
, and
clustering
tasks.
The model achieves
Spearman correlation of 0.8311
on STS benchmarks and supports sequences up to
8192 tokens
, making it ideal for
long-form Arabic understanding and retrieval-augmented generation (RAG)
applications.
The fine-tuned
mmbert-base-arabic-nli
demonstrates a significant improvement in semantic understanding across both MTEB benchmarks, achieving up to
+30 points
over the base mmBERT in cross-domain Arabic sentence similarity.
from sentence_transformers import SentenceTransformer
# 🔹 Load the model from Hugging Face Hub
model = SentenceTransformer("Omartificial-Intelligence-Space/mmbert-base-arabic-nli")
# 🔹 Example Arabic sentences
sentences = [
"متوسط درجة الحرارة في أورلاندو، فلوريدا.",
"تقع أورلاندو في وسط فلوريدا، ويبلغ متوسط درجة الحرارة الإجمالية فيها 83 درجة فهرنهايت، ومتوسط منخفض يبلغ 62 درجة.",
"تتمتع جنوب فلوريدا بمناخ دافئ ورطب على مدار العام، مما يجعلها وجهة مثالية للعطلات."
]
# 🔹 Generate embeddings
embeddings = model.encode(sentences)
print("Shape of embeddings:", embeddings.shape)
# Output: (3, 768)# 🔹 Compute pairwise cosine similarities
similarities = model.similarity(embeddings, embeddings)
print(similarities)
# tensor([# [1.0000, 0.8495, 0.7115],# [0.8495, 1.0000, 0.7436],# [0.7115, 0.7436, 1.0000]# ])
Citation
BibTeX
Sentence Transformers
@inproceedings{reimers-2019-sentence-bert,
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
author = "Reimers, Nils and Gurevych, Iryna",
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
month = "11",
year = "2019",
publisher = "Association for Computational Linguistics",
url = "https://arxiv.org/abs/1908.10084",
}
GISTEmbedLoss
@misc{solatorio2024gistembed,
title={GISTEmbed: Guided In-sample Selection of Training Negatives for Text Embedding Fine-tuning},
author={Aivin V. Solatorio},
year={2024},
eprint={2402.16829},
archivePrefix={arXiv},
primaryClass={cs.LG}
}
Runs of Omartificial-Intelligence-Space mmbert-base-arabic-nli on huggingface.co
156
Total runs
0
24-hour runs
1
3-day runs
1
7-day runs
143
30-day runs
More Information About mmbert-base-arabic-nli huggingface.co Model
mmbert-base-arabic-nli huggingface.co is an AI model on huggingface.co that provides mmbert-base-arabic-nli's model effect (), which can be used instantly with this Omartificial-Intelligence-Space mmbert-base-arabic-nli model. huggingface.co supports a free trial of the mmbert-base-arabic-nli model, and also provides paid use of the mmbert-base-arabic-nli. Support call mmbert-base-arabic-nli model through api, including Node.js, Python, http.
mmbert-base-arabic-nli huggingface.co is an online trial and call api platform, which integrates mmbert-base-arabic-nli's modeling effects, including api services, and provides a free online trial of mmbert-base-arabic-nli, you can try mmbert-base-arabic-nli online for free by clicking the link below.
Omartificial-Intelligence-Space mmbert-base-arabic-nli online free url in huggingface.co:
mmbert-base-arabic-nli is an open source model from GitHub that offers a free installation service, and any user can find mmbert-base-arabic-nli on GitHub to install. At the same time, huggingface.co provides the effect of mmbert-base-arabic-nli install, users can directly use mmbert-base-arabic-nli installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
mmbert-base-arabic-nli install url in huggingface.co: