Downloads · 30 days
16
41% of all-time downloads
AzeerDev/SA-STS-Embeddings-0.2B
SA-STS-Embeddings-0.2B is a feature extraction model from AzeerDev. Use it when you need embeddings to search or compare text. It is set up for sentence-transformers. The card lists the license as cc-by-nc-4.0.
Downloads · 30 days
16
41% of all-time downloads
All-time downloads
39
Public
Parameters
163M
1.9 GB on disk
Likes
0
Public
Click a slice to open those files.
.pt1.3 GB · 66%
From the Hugging Face model README

SABER-v0.1 (Saudi Arabic BERT Embeddings for Retrieval) is a state-of-the-art Saudi dialect semantic embedding model, fine-tuned from SA-BERT using MultipleNegativesRankingLoss (MNLR) and Matryoshka Representation Learning over a large, high-quality Saudi Triplet Dataset spanning 21 real-life Saudi domains.
SABER transforms a standard Masked Language Model (MLM) into a powerful semantic encoder capable of capturing deep contextual meaning across Najdi, Hijazi, Gulf-influenced, and mixed Saudi dialectals.
The model achieves state-of-the-art results across both long-paragraph STS evaluation and triplet margin separation, significantly outperforming strong baselines such as ATM2, GATE, LaBSE, mE5-base, MarBERT, and MiniLM.
SABER utilizes a rigorous two-stage optimization pipeline: first, we adapted MARBERT-V2 via Masked Language Modeling (MLM) on 500k Saudi sentences to create the domain-specialized SA-BERT, followed by deep semantic optimization using MultipleNegativesRankingLoss (MNRL) and Matryoshka Representation Learning on curated triplets to produce the final state-of-the-art embedding model.
<div align="center"> <img src="https://cdn-uploads.huggingface.co/production/uploads/628f7a71dd993507cfcbe587/zC5JCPbsnIz-jflmTWae8.png" alt="SABER Training Pipeline" width="500"/> </div>SABER is designed for:
This release is v0.1 — the first public version of SABER.
Saudi dialect NLP remains an underdeveloped space. Most embeddings struggle with dialectal variation, idiomatic expressions, and multi-sentence reasoning. SABER was designed to fill this gap by:
This model is the result of extensive evaluation across STS, triplets, and domain-specific tests.
SABER was trained on Omartificial-Intelligence-Space/SaudiDialect-Triplet-21, which contains:
The dataset includes natural variations in:
SABER was fine-tuned using:
MultipleNegativesRankingLoss (MNLR)
Matryoshka Representation Learning
Triplet Ranking Optimization
Optimizer & Hyperparameters
| Hyperparameter | Value |
|---|---|
| Batch Size | 16 |
| Epochs | 3 |
| Loss | MNLR + Matryoshka |
| Precision | FP16 |
| Negative Sampling | In-batch |
| Gradient Clip | Stable defaults |
| Warmup Ratio | 0.1 |
SABER was evaluated on two benchmarks:
Dataset: 1000 samples (0–5 similarity) generated in Saudi dialect.
| Metric | Score |
|---|---|
| Pearson | 0.9189 |
| Spearman | 0.9045 |
| MAE | 1.69 |
| MSE | 3.82 |
These results surpass: ATM2, GATE, LaBSE, MarBERT, mE5-base, and MiniLM.
Triplets derived from STS via (score ≥3 positive, score ≤1 negative).
| Metric | Score |
|---|---|
| Basic Accuracy | 0.9899 |
| Margin > 0.05 | 0.9845 |
| Margin > 0.10 | 0.9781 |
| Margin > 0.20 | 0.9609 |
Excellent separation across strict thresholds.
from sentence_transformers import SentenceTransformer
from sklearn.metrics.pairwise import cosine_similarity
# Load the model
model = SentenceTransformer("Omartificial-Intelligence-Space/Saudi-Semantic-Embedding-v0.1")
# Define sentences (Saudi Dialect)
s1 = "ودي أسافر للرياض الأسبوع الجاي"
s2 = "أفكر أروح الرياض قريب عشان مشوار مهم"
# Encode
e1 = model.encode([s1])
e2 = model.encode([s2])
# Calculate similarity
sim = cosine_similarity(e1, e2)[0][0]
print("Cosine Similarity:", sim)
| text1 | text2 | |
|---|---|---|
| type | string | string |
| details | <ul><li>min: 5 tokens</li><li>mean: 10.36 tokens</li><li>max: 22 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 10.28 tokens</li><li>max: 19 tokens</li></ul> |
| text1 | text2 |
|---|---|
| <code>هل فيه رحلات بحرية للأطفال في جدة؟</code> | <code>ودي أعرف عن جولات بحرية للأطفال في جدة</code> |
| <code>ودي أحجز تذكرة طيران للرياض الأسبوع الجاي</code> | <code>ناوي أشتري تذكرة للرياض الأسبوع الجاي</code> |
| <code>عطوني أفضل فندق قريب من مطار جدة</code> | <code>أبي فندق قريب من المطار</code> |
{
"loss": "MultipleNegativesRankingLoss",
"matryoshka_dims": [
768
],
"matryoshka_weights": [
1
],
"n_dims_per_step": -1
}
Commercial use of this model is not permitted under the CC BY-NC 4.0 license.
For commercial licensing, partnerships, or enterprise use, please contact:
If you use this model in academic work, please cite:
@inproceedings{nacar-saber-2025,
title = "SAUDI ARABIC EMBEDDING MODEL FOR SEMANTIC SIMILARITY AND RETRIEVAL",
author = "Nacar, Omer",
year = "2025",
url = "https://huggingface.co/Omartificial-Intelligence-Space/SA-STS-Embeddings-0.2B",
}
@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",
}
@misc{kusupati2024matryoshka,
title={Matryoshka Representation Learning},
author={Aditya Kusupati and Gantavya Bhatt and Aniket Rege and Matthew Wallingford and Aditya Sinha and Vivek Ramanujan and William Howard-Snyder and Kaifeng Chen and Sham Kakade and Prateek Jain and Ali Farhadi},
year={2024},
eprint={2205.13147},
archivePrefix={arXiv},
primaryClass={cs.LG}
}
@misc{henderson2017efficient,
title={Efficient Natural Language Response Suggestion for Smart Reply},
author={Matthew Henderson and Rami Al-Rfou and Brian Strope and Yun-hsuan Sung and Laszlo Lukacs and Ruiqi Guo and Sanjiv Kumar and Balint Miklos and Ray Kurzweil},
year={2017},
eprint={1705.00652},
archivePrefix={arXiv},
primaryClass={cs.CL}
}