Loading…
Loading…
A 118M-parameter embedder for search over mixed Arabic and English text, including the hard case: an Arabic query finding an English passage.
Fine-tuned from intfloat/multilingual-e5-small with mined hard negatives and cross-lingual training pairs.
Code, benchmark and full results: github.com/mahmoudzahran01/arabic-english-retrieval-eval.
Companion reranker: mzahran1/arabic-english-reranker-mminilm.
Test MRR@10 x 100 on a bilingual benchmark built from TyDi-QA, ARCD and XQuAD (6,823 test queries; disjoint train/dev/test articles; leakage-audited). Mean ± std over 3 training seeds (this checkpoint is seed 13, macro 75.7).
| Model | params | ar->ar | en->en | ar->en | en->ar | macro |
|---|---|---|---|---|---|---|
| multilingual-e5-small (base) | 118M | 76.8 | 87.8 | 41.4 | 61.7 | 66.9 |
| bge-m3 | 568M | 80.2 | 87.8 | 63.3 | 67.8 | 74.8 |
| this model | 118M | 80.3 ± 0.2 | 87.3 ± 0.2 | 54.7 ± 0.6 | 80.4 ± 0.4 | 75.7 ± 0.1 |
| this model + the companion reranker (top-50) | 118M + 118M | 86.7 | 90.6 | 72.3 | 83.7 | 83.3 |
Above bge-m3 on the macro average at a fifth of its size, and +12.6 on en->ar; bge-m3 is still better on ar->en alone (63.3 vs 54.7), and the reranker closes that gap.
The e5 prefixes are required: query: for queries and passage: for documents.
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("mzahran1/arabic-english-e5-small-retrieval")
query = model.encode(["query: متى تأسست جامعة الملك عبدالله للعلوم والتقنية؟"])
docs = model.encode([
"passage: The King Abdullah University of Science and Technology was founded in 2009 in Thuwal.",
"passage: Riyadh is the capital of Saudi Arabia and its largest city.",
])
print(model.similarity(query, docs)) # the KAUST passage scores highest
MIT, like the base model. The training data keeps its own licences (TyDi-QA Apache-2.0, ARCD MIT, SQuAD CC BY-SA 4.0).
intfloat/multilingual-e5-small