/ Модель

Характеристики

Контекст
8 192 токена
Параметры
305 млн
Лицензия
Apache 2.0
Архитектура
new · dense
Базовая модель
gte-multilingual-reranker-base
Библиотека
sentence-transformers
Опубликована
29 сен 2026

Mizan-Rerank-v3

Ранжирование текстаТекст → score6 профессий

Арабоязычный реранкер для сортировки фрагментов по релевантности запросу в поисковых и RAG-системах.

394скачиваний за 30 дней1лайквеса обновлены10 окт 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Mizan-Rerank-v3 — арабоязычный cross-encoder-реранкер от разработчиков семейства Mizan. Модель содержит около 305 млн параметров и дообучена на базе Alibaba-NLP/gte-multilingual-reranker-base на 71 тыс. арабских listwise-группах с трудными примерами, включая фрагменты с отрицаниями, подменой сущностей, чисел и дат. Она оценивает релевантность пары «запрос — фрагмент» и сортирует кандидатов для поиска и RAG, в частности в плотных религиозных и энциклопедических текстах.

Модель рассчитана прежде всего на арабский язык. Архитектура принимает до 8192 токенов, однако обучение проводилось на последовательностях до 3072 токенов, а качество на длине свыше 3072 не измерялось. По данным README, она показывает хорошие результаты на арабских тестах и эффективна по скорости; выходной логит можно преобразовать сигмоидой в оценку релевантности, но это не калиброванная вероятность. Для работы требуется trust_remote_code=True. Лицензия — Apache-2.0.

Сценарии применения

  • переранжирование арабских результатов поисковой выдачи
  • выбор наиболее подходящих фрагментов для арабоязычного RAG
  • поиск ответа среди длинных арабских документов
  • отсев фрагментов с противоречиями и подменой фактов
  • сортировка религиозных и энциклопедических текстов по запросу

Ограничения

Качество на последовательностях длиннее 3072 токенов не измерялось, хотя архитектура принимает до 8192. Оценка релевантности не является калиброванной вероятностью; для запуска требуется trust_remote_code=True.

Для каких профессий подходит6

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Также подходит для

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Mizan-Rerank-v3

A compact, fast Arabic reranker that tells the passage that answers the question apart from passages that only look like they do.

Parameters Speed Language Context License

The Mizan reranker family

ModelParametersThroughputHeld-out mean nDCG@10Fiqh nDCG@10
Mizan-Rerank-v3-Turbo150M2,487 pairs/s0.8750.761
Mizan-Rerank-v3 (this model)306M1,238 pairs/s0.8260.669

Pick Turbo for the best accuracy per millisecond; v3 is the larger model with the same behaviour as this release.

Held-out mean nDCG@10 is the mean over the four held-out sets both cards share (NamaaMrTydi unseen, short adversarial, long-context adversarial, Multi-LLM), so it reads 0.826 here while the table below quotes 0.845 over five sets: that figure additionally averages the Arabic Hard Negatives unseen subset, which Turbo cannot use because only 10 of its 12,373 cases are unseen for it.

Mizan-Rerank-v3 is a 306M-parameter Arabic cross-encoder. It was fine-tuned from Alibaba-NLP/gte-multilingual-reranker-base on 71k Arabic listwise groups. Each group pairs the correct passage with adversarial "trap" passages that share most of its words but change its meaning: a negated ruling, a swapped entity, a shifted number or date, an exception applied to the wrong case.

The result is a small model with the accuracy of a much larger one. It has about half the parameters of bge-reranker-v2-m3 (568M) and scores twice as many query–passage pairs per second, yet it ranks higher on average across our held-out Arabic benchmarks. It is built for Arabic search and RAG pipelines, especially over long, dense religious and encyclopedic text, where reranking latency matters.

Summary

Highlights

  • Accurate for its size. Held-out mean nDCG@10 is 0.845 at 306M parameters. The 568M bge-reranker-v2-m3 scores 0.802, the gte base 0.783 and Mizan-Rerank-V2 0.723.
  • Fast. On one RTX 4090 in fp16 it scores 1,228 pairs/s, 2.0× bge-reranker-v2-m3's 600 pairs/s, with 23% less peak GPU memory (see Efficiency).
  • Picks the right passage first. Hit@1 on held-out long-context adversarial queries is 0.570, vs 0.336 for bge-reranker-v2-m3, 0.314 for gte base and 0.227 for Mizan-Rerank-V2.
  • Rarely puts a contradiction on top. Across 2,666 held-out adversarial queries, the top-ranked passage is a contradicting trap 32.5% of the time. For bge-reranker-v2-m3 the figure is 56.8%; for Mizan-Rerank-V2, 73.0%.
  • A drop-in upgrade over Mizan-Rerank-V2. It has the same architecture, size and speed, and scores higher on every benchmark.

Usage

Sentence Transformers

pip install -U sentence-transformers
from sentence_transformers import CrossEncoder

model = CrossEncoder("ALJIACHI/Mizan-Rerank-v3", trust_remote_code=True, max_length=3072)

query = "ما هي فوائد فيتامين د؟"
passages = [
    "يساعد فيتامين د على امتصاص الكالسيوم وتقوية العظام، كما يدعم عمل الجهاز المناعي.",
    "يستخدم فيتامين د في بعض الصناعات الغذائية كمادة مضافة لتدعيم الحليب.",
    "أطلقت وزارة الزراعة حملة وطنية لزيادة الوعي بأهمية الزراعة العضوية.",
]

scores = model.predict([(query, passage) for passage in passages])
print(scores)  # ≈ [0.875, 0.023, 0.010]  (sigmoid relevance scores)

for hit in model.rank(query, passages, return_documents=True):
    print(f"{hit['score']:.3f}  {hit['text']}")

Transformers

import torch
from transformers import AutoModelForSequenceClassification, AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained("ALJIACHI/Mizan-Rerank-v3")
model = AutoModelForSequenceClassification.from_pretrained(
    "ALJIACHI/Mizan-Rerank-v3", trust_remote_code=True, torch_dtype=torch.float16
).to("cuda").eval()

query = "ما هي فوائد فيتامين د؟"
passages = [
    "يساعد فيتامين د على امتصاص الكالسيوم وتقوية العظام، كما يدعم عمل الجهاز المناعي.",
    "أطلقت وزارة الزراعة حملة وطنية لزيادة الوعي بأهمية الزراعة العضوية.",
]

with torch.inference_mode():
    features = tokenizer([query] * len(passages), passages, padding=True, truncation=True,
                         max_length=3072, return_tensors="pt").to("cuda")
    scores = torch.sigmoid(model(**features).logits.squeeze(-1).float())

for passage, score in sorted(zip(passages, scores.tolist()), key=lambda item: -item[1]):
    print(f"{score:.3f}  {passage}")

Practical notes

  • Sequence length. The model was trained on query + passage inputs of up to 3,072 tokens and is benchmarked here at 2,048. The architecture accepts 8,192 positions, but quality beyond 3,072 tokens has not been measured. If your query + passage inputs fit in 512 tokens, max_length=512 is much faster.
  • Scores. The sigmoid of the single output logit is a relevance score. It works for ranking and for coarse cut-offs, but it is not a calibrated probability: tune any threshold on your own data.
  • trust_remote_code=True is required. The architecture code (modeling.py, configuration.py) comes from the gte base model and ships in this repository.

Evaluation

All four models were scored by the same script (benchmark/benchmark_rerankers.py) with the same inputs: float32, max_length=2048, and the full candidate list of every query. Metrics use graded gains (correct passage 3, partially correct passage 1, trap or irrelevant passage 0).

MetricMeaning
nDCG@10quality of the whole ranking
MRR@101 / rank of the correct passage
Hit@1share of queries where the correct passage is ranked first

Held-out benchmarks

BenchmarkQueriesMizan-Rerank-v3Mizan-Rerank-V2gte-multilingual-reranker-basebge-reranker-v2-m3
MTEB NamaaMrTydi, unseen subset¹5730.87840.82200.87710.8897
Arabic Hard Negatives, unseen subset¹3140.92000.87800.90620.9035
Adversarial short (test)²6020.84320.69650.75650.7938
Adversarial long-context (test)²1,7030.82800.62030.67470.6873
Multi-LLM benchmark²3610.75360.59980.69920.7365
Average nDCG@100.84460.72330.78270.8022
Average MRR@100.79080.63120.71600.7427
Average Hit@10.64610.42210.53070.5764

¹ Queries whose question and correct passage never occur in the v3 training pool (hashes in benchmark/seen_in_training.json). ² Internal test sets, not released. They share no queries or passages with the training data (verified by exact match), and the long-context split is by source article.

Public benchmarks

Adversarial benchmarks

Where the gain comes from: ranking the correct passage first. Hit@1 is where v3 differs most from the other models, especially when traps share most of their text with the answer:

Hit@1

Contradiction ranked first

For RAG the worst failure is not a missing answer but a passage that says the opposite ranked at the top: a negated ruling, a reversed condition, a wrong number. Every adversarial test query has one correct passage and several contradicting traps. The table shows how often a trap was ranked #1 (lower is better):

Test setQueriesMizan-Rerank-v3Mizan-Rerank-V2gte-multilingual-reranker-basebge-reranker-v2-m3
Adversarial short60220.1% (121)62.1% (374)51.3% (309)43.5% (262)
Adversarial long-context1,70333.4% (568)76.4% (1,301)68.2% (1,161)62.0% (1,056)
Multi-LLM36149.3% (178)75.3% (272)64.0% (231)54.0% (195)

Across all 2,666 queries, v3 ranks a trap first 32.5% of the time. For bge-reranker-v2-m3 the figure is 56.8%; for gte base, 63.8%; for Mizan-Rerank-V2, 73.0%:

Contradiction ranked first

Reproduce with python compare_generated_test_models.py --dataset-file <test.jsonl> ... --chart contradiction_first.png (in the training repository; the test sets are internal).

nDCG@10

ModelNamaaMrTydi (full, 918)NamaaMrTydi (unseen, 573)Arabic Hard Neg. (full, 12,373)³Arabic Hard Neg. (unseen, 314)Adversarial shortAdversarial long-ctxMulti-LLM
Mizan-Rerank-v30.88850.87840.91030.92000.84320.82800.7536
Mizan-Rerank-V20.83120.82200.84470.87800.69650.62030.5998
gte-multilingual-reranker-base0.88740.87710.89600.90620.75650.67470.6992
bge-reranker-v2-m30.89950.88970.90820.90350.79380.68730.7365

MRR@10

ModelNamaaMrTydi (full)NamaaMrTydi (unseen)Arabic Hard Neg. (full)³Arabic Hard Neg. (unseen)Adversarial shortAdversarial long-ctxMulti-LLM
Mizan-Rerank-v30.85180.83850.87960.89260.77310.76580.6841
Mizan-Rerank-V20.77550.76350.79190.83620.59520.49830.4629
gte-multilingual-reranker-base0.84980.83620.86070.87430.68260.57650.6105
bge-reranker-v2-m30.86620.85310.87710.87110.73740.58790.6643

Hit@1

ModelNamaaMrTydi (full)NamaaMrTydi (unseen)Arabic Hard Neg. (full)³Arabic Hard Neg. (unseen)Adversarial shortAdversarial long-ctxMulti-LLM
Mizan-Rerank-v30.76910.75220.78820.81210.61460.56960.4820
Mizan-Rerank-V20.64920.63350.64330.71340.34050.22670.1967
gte-multilingual-reranker-base0.75490.73470.76000.78340.46180.31360.3601
bge-reranker-v2-m30.78650.76270.79160.78660.54490.33650.4515

³ 97% of these queries occur in the v3 training pool, so the full-set score is not a fair measure for v3 and is not bolded or used in any average.

Efficiency

Every model scored the same 2,048 Arabic query–passage pairs from MTEB NamaaMrTydi. The run used one NVIDIA RTX 4090, float16, batch size 32 and max_length=512, after a warm-up (benchmark/speed_benchmark.py):

ModelParametersThroughput (pairs/s)Peak GPU memoryHeld-out mean nDCG@10
Mizan-Rerank-v3306M1,2281.10 GiB0.845
Mizan-Rerank-V2306M1,2191.10 GiB0.723
gte-multilingual-reranker-base306M1,2331.10 GiB0.783
bge-reranker-v2-m3568M6001.43 GiB0.802

Accuracy vs. speed

At the same latency budget, v3 can rerank twice as many candidates as bge-reranker-v2-m3. It reaches the highest held-out accuracy of the four models while running at the speed of the smallest.

Training

Data (71,044 listwise groups)

Every group is one query with one correct passage, up to 5 hard negatives and, for adversarial groups, one partially correct passage.

SourceGroupsShareWhat it teaches
Long-context adversarial (OpenWiki articles, LLM-generated)36,28051%find the answer inside long, dense passages, whether it sits at the beginning, middle or end
Short adversarial (LLM-generated)12,03017%reject near-duplicate traps in short passages
Arabic Mr. TyDi retrieval replay8,52512%keep general open-domain retrieval ability
Hadith question–passage pairs4,7367%classical religious text
Arabic news similarity pairs with LLM hard negatives4,7377%topical near-misses
Fatwa Q&A pairs with TF-IDF-mined negatives4,7367%jurisprudence rulings on nearby cases

The adversarial negatives cover 12 trap types, each a minimal edit that changes the meaning while keeping most of the words: negation_flip, exception_scope, entity_role_reversal, entity_swap, ordered_precedence, temporal_boundary, numeric_boundary, quantifier_change, causal_direction, condition_swap, conclusion_flip, attribution_shift.

Leakage controls: the adversarial train, validation and test splits are split by source article. Extra training data sharing a source article or a query with any validation or test set was removed. The three legacy sources were additionally filtered against every evaluation set by 8-word shingles. All held-out sets above were re-checked against the final training pool by exact query and passage match.

Objective

For each group the model scores all candidates jointly:

  • Pointwise: binary cross-entropy, targets 1 / 0.5 / 0 for correct / partial / negative, pos_weight=1.24, weight 0.5.
  • Pairwise: softplus margin loss softplus(s_neg − s_pos + 0.2) for every negative, weight 1.0.
  • Partial order: the same margin loss for correct > partial > negative, weight 0.5 within the pairwise term.

Configuration

ParameterValue
InitializationAlibaba-NLP/gte-multilingual-reranker-base
Max sequence length (query + passage)3,072 tokens
Candidates per group1 correct + 1 partial (if present) + up to 5 negatives
Batch4 groups/GPU × 8 accumulation × 2 GPUs = 64 groups per update
OptimizerAdamW, lr 1e-6, weight decay 0.01, grad-norm clip 1.0
Schedulecosine, 10% warmup, 7 epochs (7,777 updates)
Precisionbf16, gradient checkpointing, SDPA attention
Hardware2 × NVIDIA RTX 4090
Checkpoint selectionepoch with the best mean validation nDCG@10 (long-context + short adversarial) → epoch 6

Training curve

Framework versions

Python 3.10.14 · PyTorch 2.8.0+cu126 · Transformers 4.55.4 · Sentence Transformers 5.4.1 · Accelerate 1.10.0 · Tokenizers 0.21.0

Citation

@software{Mizan_Rerank_v3_2026,
  author    = {Ali Aljiachi},
  title     = {Mizan-Rerank-v3: Adversarially Trained Arabic Long-Context Reranker},
  year      = {2026},
  publisher = {Hugging Face},
  url       = {https://huggingface.co/ALJIACHI/Mizan-Rerank-v3}
}

License

Apache 2.0, the same license as the base model Alibaba-NLP/gte-multilingual-reranker-base.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · sentence-transformers

Нельзя запустить

Модели нужен код из репозитория; автор пока не в списке доверенных организаций.

Класс архитектуры
NewForSequenceClassification
Ревизия весов
5c749ef

0 моделей