Instructions to use ALJIACHI/Mizan-Rerank-V2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use ALJIACHI/Mizan-Rerank-V2 with sentence-transformers:
from sentence_transformers import CrossEncoder model = CrossEncoder("ALJIACHI/Mizan-Rerank-V2", trust_remote_code=True) query = "Which planet is known as the Red Planet?" passages = [ "Venus is often called Earth's twin because of its similar size and proximity.", "Mars, known for its reddish appearance, is often referred to as the Red Planet.", "Jupiter, the largest planet in our solar system, has a prominent red spot.", "Saturn, famous for its rings, is sometimes mistaken for the Red Planet." ] scores = model.predict([(query, passage) for passage in passages]) print(scores) - Notebooks
- Google Colab
- Kaggle
Mizan-Rerank-v2 โ deprecated
This model is deprecated. Use the current Mizan reranker family instead.
Mizan-Rerank-v3-Turbo is the best replacement for v2: same family, same interface, but half the size (150M vs 305M), about twice the throughput, and higher on every held-out benchmark we measure. Mizan-Rerank-v3 is the larger option (306M) if you prefer it.
The current family
| Model | Parameters | Throughput | Held-out mean nDCG@10 | Fiqh nDCG@10 | Status |
|---|---|---|---|---|---|
| Mizan-Rerank-v3-Turbo | 150M | 2,487 pairs/s | 0.875 | 0.761 | recommended replacement for v2 |
| Mizan-Rerank-v3 | 306M | 1,238 pairs/s | 0.826 | 0.669 | recommended |
| Mizan-Rerank-v2 (this model) | 305M | 1,191 pairs/s | 0.685 | 0.618 | deprecated |
Held-out mean nDCG@10 is the mean over four held-out Arabic sets (MTEB NamaaMrTydi unseen subset, short adversarial, long-context adversarial, Multi-LLM); Fiqh nDCG@10 is measured on real fatwa-search queries with production candidate lists.
Migrating
The interface is identical, so migration is one line. Both models need trust_remote_code=True:
from sentence_transformers import CrossEncoder
# Before
model = CrossEncoder("ALJIACHI/Mizan-Rerank-v2", max_length=8192, trust_remote_code=True)
# After (recommended: half the size, ~2ร the throughput, more accurate)
model = CrossEncoder("ALJIACHI/Mizan-Rerank-v3-Turbo", max_length=3072, trust_remote_code=True)
# Or the larger model
model = CrossEncoder("ALJIACHI/Mizan-Rerank-v3", max_length=3072, trust_remote_code=True)
Scores are not calibrated across versions, so if your pipeline uses an absolute score threshold to filter candidates, re-tune that threshold after switching.
Links
- Recommended replacement: Mizan-Rerank-v3-Turbo
- Larger model: Mizan-Rerank-v3
- Live demo (both models, with a switcher): ALJIACHI/Mizan-Rerank-V2-Demo
- License: Apache 2.0
Note for existing work
The weights are unchanged and stay online for reproducibility: existing pipelines pinned to
ALJIACHI/Mizan-Rerank-v2 keep working. This card was reduced to a redirect on 2026-10-11; the full previous
documentation (benchmarks, training configuration, usage examples) remains in the repository history, and the
model's own benchmark chart is still at chart-1.png.
Citation
@software{Mizan_Rerank_v2_2026,
author = {Ali Aljiachi},
title = {Mizan-Rerank-v2: Arabic Long-Context Text Reranking Model},
year = {2026},
publisher = {Hugging Face},
url = {https://huggingface.co/ALJIACHI/Mizan-Rerank-v2}
}
For new work, cite the replacement:
@software{Mizan_Rerank_v3_Turbo_2026,
author = {Ali Aljiachi},
title = {Mizan-Rerank-v3-Turbo: Compact Arabic Long-Context Reranker},
year = {2026},
publisher = {Hugging Face},
url = {https://huggingface.co/ALJIACHI/Mizan-Rerank-v3-Turbo}
}
- Downloads last month
- 2,149
Model tree for ALJIACHI/Mizan-Rerank-V2
Base model
Alibaba-NLP/gte-multilingual-reranker-base