Instructions to use HassanB4/aragenre-e5-large-mnrl-augmented-defs with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use HassanB4/aragenre-e5-large-mnrl-augmented-defs with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("HassanB4/aragenre-e5-large-mnrl-augmented-defs") sentences = [ "هذا شخص سعيد", "هذا كلب سعيد", "هذا شخص سعيد جدا", "اليوم هو يوم مشمس" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
AraGenre E5-Large MNRL — Augmented Definitions
intfloat/multilingual-e5-large fine-tuned with MultipleNegativesRankingLoss on Arabic text paired with hand-augmented English genre definitions, for hierarchical Arabic genre classification (broad_genre + specific_genre).
Authors: Hassan Barmandah (NAMAA Community; Umm Al-Qura University), Israa Elhosiny (NAMAA Community), Yousra El-Ghawi (NAMAA Community), Omer Nacar (NAMAA Community)
⚠️ Generalization Note
This model's development-set score (0.9316 hierarchical F1) is not representative of real-world performance. Per the project's system-description paper, this entire lineage of fine-tuned/ensembled sentence encoders — which scored well on the 110-item, 6-genre AraGenre dev set — collapsed to 0.22–0.44 hierarchical F1 on the actual 27,972-item hidden test set (74 specific genres under 6 broad genres). The cause: these models were calibrated to a hand-augmented definition style that does not match the test set's official genre definitions or its much larger taxonomy.
The system that actually won for this team — 0.7013 hierarchical F1, 3rd of 18 teams on the official CodaBench leaderboard — was a separate, zero-shot DeepSeek-LLM pipeline with no fine-tuning at all (stage2_llm_zeroshot_pipeline/ in the project repo). This model is not that system. It is released here for transparency and reproducibility of the project's full experimental record, not as a recommended production classifier.
Approach
intfloat/multilingual-e5-large fine-tuned with MultipleNegativesRankingLoss (single phase) on (text, augmented definition) pairs from the 7 AraGenre TRAIN genres. This was the first recipe in its lineage to cross 0.90 hierarchical F1 on dev.
Base model
intfloat/multilingual-e5-large
Training data
AraGenre TRAIN genres only (7), with hand-augmented definitions. No dev labels were used in training.
Hyperparameters
- Epochs: 12
- Batch size: 32
- Learning rate: 5e-5
Usage
python e5_large_mnrl_augmented_defs.py
See the project repository for the full script and data-loading requirements.
Citation
If you use this work, please cite our system-description paper:
@inproceedings{barmandah-etal-2026-namaa,
title = {NAMAA at AraGenre 2026: From Encoder Baselines to Self-Consistent LLM Ensembling for Hierarchical Arabic Genre Classification},
author = {Barmandah, Hassan and Elhosiny, Israa and El-Ghawi, Yousra and Nacar, Omer},
booktitle = {Proceedings of the 4th Arabic Natural Language Processing Conference (ArabicNLP 2026)},
address = {Budapest, Hungary},
publisher = {Association for Computational Linguistics},
year = {2026},
}
Please also cite the AraGenre 2026 shared task overview paper:
@inproceedings{elhaj-etal-2026-aragenre,
title = {AraGenre 2026: A Hierarchical Definition-Guided Arabic Genre Classification Shared Task},
author = {El-Haj, Mo and Ezzini, Saad and Abudalfa, Shadi and Lamsiyah, Salima and Jarrar, Mustafa},
booktitle = {Proceedings of the 4th Arabic Natural Language Processing Conference (ArabicNLP 2026)},
address = {Budapest, Hungary},
publisher = {Association for Computational Linguistics},
year = {2026},
}
License
Apache 2.0
- Downloads last month
- 18
Model tree for HassanB4/aragenre-e5-large-mnrl-augmented-defs
Base model
intfloat/multilingual-e5-largeCollection including HassanB4/aragenre-e5-large-mnrl-augmented-defs
Evaluation results
- Hierarchical Macro F1 (DEVELOPMENT SET, not a test-set metric) on AraGenre 2026 Development Setself-reported0.932