SanadAI-AraModernBERT-IslamicNER
Arabic Named Entity Recognition model for IslamicEval 2026 Task 1: Span Detection.
This model performs token-level span detection for Islamic texts, identifying important semantic spans including Quranic verses, Hadith components, and citation sources.
The model is based on AraModernBERT and fine-tuned for Arabic Islamic text understanding.
Model Details
- Base Model:
NAMAA-Space/AraModernBert-Base-V1.0
- Architecture: ModernBERT for Token Classification
- Task: Span Detection / Token Classification
- Language: Arabic
- Training Dataset:
AbirKorched9/IslamicEval2026-Task1-augmented
- Training Epochs: 15
- Framework: PyTorch + Hugging Face Transformers
Labels
The model predicts the following entity spans:
| Label | Description |
|---|
ayah | Quranic verse spans |
matn | Hadith text content |
isnad | Hadith narration chain |
claimed_source | Citation/source references |
Dataset Composition
The training dataset combines:
| Source | Examples |
|---|
| IslamicEval 2026 Task 1 training data | 4,726 |
| Synthetic Quran augmentation | 6,000 |
| Synthetic Hadith augmentation | 6,000 |
| Hard negative passages | 20 |
| Total | 16,726 |
The dataset includes automatically generated Quran and Hadith examples together with manually selected hard negatives from Shamela books to improve robustness against false Hadith detection.
Training
The model was fine-tuned using:
- Hugging Face Transformers
- Custom weighted loss training
- AraModernBERT encoder
- Token-level classification objective
- Class weighting to handle entity imbalance
Training configuration:
- Epochs:
15
- Maximum sequence length:
1024
- Mixed precision training: FP16
- Best checkpoint selected using development evaluation metrics
Training Code
The complete training, inference, and post-processing pipeline used to train this model is publicly available:
The implementation includes:
- Dataset preparation and parsing
- Arabic span annotation processing
- AraModernBERT fine-tuning pipeline
- Weighted loss training for imbalanced span labels
- Inference pipeline
- Span-level post-processing and submission generation
The released code allows reproducing the training and inference procedure used for the IslamicEval 2026 Task 1 submission.
Evaluation
Evaluation was performed on the official IslamicEval 2026 Task 1 split.
| Split | F1 Score |
|---|
| Development Set (+postprocessing) | 96.61 |
| Test Set (+postprocessing) | 97.35 |
Intended Use
This model can be used for:
- Arabic Islamic text processing
- Hadith structure extraction
- Quran verse identification
- Retrieval-augmented generation preprocessing
- Arabic NLP research
- Information extraction pipelines