/ Модель

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

Контекст
514 токенов
Параметры
305 млн
Лицензия
MIT
Архитектура
xlm-roberta · dense
Базовая модель
multilingual-e5-base
Библиотека
sentence-transformers
Опубликована
6 ноя 2026

galician-reranker-me5-base

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

Перекрёстный энкодер для оценки релевантности и переранжирования результатов поиска по галисийским официальным и административным документам.

33скачиваний за 30 дней0лайковвеса обновлены16 ноя 2026

Бенчмарки

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

Тесты пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь.

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Ранжирование» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы. Опубликованный результат появится на этой странице.

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

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

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

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

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

galician-reranker-me5-base — перекрёстный энкодер XLM-RoBERTa, разработанный Алехандро Родригесом для ранжирования галисийских официальных и административных текстов. Модель дообучена на базе intfloat/multilingual-e5-base и обучалась в том числе методом дистилляции на данных от BAAI/bge-reranker-v2-m3. В метаданных указано 305,2 млн параметров; README описывает исходную конфигурацию как модель на 278 млн параметров. Репозиторий использует библиотеку sentence-transformers и формат safetensors.

Модель получает на вход вопрос и отрывок текста и выдаёт оценку релевантности, чтобы переставить результаты первой стадии поиска — например, BM25 — перед передачей генератору или читателю. Совместный ввод ограничен 512 токенами. Она рассчитана прежде всего на галисийские юридические и административные документы; лицензия MIT.

В тесте DOG-RAG на выдаче BM25 модель показала MRR@3 0,804 и статистически не отличалась от BAAI/bge-reranker-v2-m3. На втором тестовом наборе она уступила этой модели, а при переранжировании выдачи galician-embedding-me5-base снижала MRR. Проверка охватывала небольшие наборы вопросов, преимущественно созданных языковыми моделями; качество на новостях, FAQ и других галисийских текстах не оценивалось. Перекрёстный энкодер обрабатывает каждую пару отдельно, поэтому переранжирование медленнее, чем получение эмбеддинга запроса.

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

  • переранжирование результатов BM25 по галисийским бюллетеням
  • поиск релевантных отрывков в Diario Oficial de Galicia
  • улучшение выдачи юридического RAG перед генерацией ответа
  • сопоставление галисийского вопроса с административным документом

Ограничения

На втором тестовом наборе модель уступила BAAI/bge-reranker-v2-m3; переранжирование результатов galician-embedding-me5-base ухудшало MRR. Проверки ограничены небольшими наборами преимущественно синтетических вопросов, а качество на новостях и FAQ не оценивалось.

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

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

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

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

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

Открыть на Hugging Face

galician-reranker-me5-base

v0.1-rerank1. On a BM25 top 10 over DOG-RAG it ties BAAI/bge-reranker-v2-m3 (MRR@3 0.804 against 0.800) at half the size, and scores above gte-multilingual-reranker-base (0.795) and mxbai-rerank-base-v2 (0.760); none of these margins is significant. On top of a Galician dense retriever it does not help: with alejandro-rodriguez/galician-embedding-me5-base as the first stage, MRR drops from 0.833 to 0.816. Use it to rerank BM25 or a general multilingual retriever, not that model. On a second, smaller test set it falls behind bge-reranker-v2-m3 (BM25 top 10: 0.744 against 0.801), so the tie on DOG-RAG does not carry over to questions from another source. See Evaluation and Second test set.

A Galician cross-encoder reranker for official and administrative text, fine-tuned from intfloat/multilingual-e5-base (278M parameters). Given a question and a passage it returns a relevance score between 0 and 1. It is meant to reorder the top 10 results of a first-stage retriever such as BM25 before they go to a generator or a reader.

It was distilled from BAAI/bge-reranker-v2-m3 (568M) on Galician questions about the Diario Oficial de Galicia (DOG), two provincial bulletins and Parlamento de Galicia debates, plus legal and administrative pairs machine-translated from Spanish. On one L4 GPU it reranked the 9,170 test pairs in 28 s, against 77 s for the teacher.

Training and evaluation code, with the per-query results behind every number on this card: github.com/alejandrorodriguezalvarez884-dot/galician-retrieval.

Usage

pip install "sentence-transformers>=6.2"
from sentence_transformers import CrossEncoder

model = CrossEncoder("alejandro-rodriguez/galician-reranker-me5-base")

query = "Cal é o prazo para solicitar as axudas para o aluguer de vivenda?"
passages = [
    "As solicitudes de axuda para o aluguer de vivenda poderán presentarse no prazo dun mes contado a partir do día seguinte ao da publicación desta resolución no Diario Oficial de Galicia.",
    "O Consello da Xunta aprobou o proxecto de lei de orzamentos para o próximo exercicio.",
    "As axudas para o aluguer de vivenda están destinadas a persoas cuxos ingresos non superen 2,5 veces o IPREM.",
]
for hit in model.rank(query, passages, return_documents=True):
    print(f"{hit['score']:.3f}  {hit['text'][:70]}")
# 0.998  As solicitudes de axuda para o aluguer de vivenda poderán presentarse
# 0.731  As axudas para o aluguer de vivenda están destinadas a persoas cuxos i
# 0.009  O Consello da Xunta aprobou o proxecto de lei de orzamentos para o pró

model.predict([(query, passage), ...]) returns the same scores: the model's logit through a sigmoid (set in config_sentence_transformers.json). No prefix or instruction is needed. Question and passage together are truncated at 512 tokens.

Evaluation

proxectonos/dog-rag: 502 questions (917 paraphrases, each one a query) about 122 DOG documents, generated by DeepSeek-V3 and reviewed by native speakers. The index is the public DOG 2025 text from proxectonos/corpus_dominio_legal_administrativo_tmp plus the 122 source documents: 36,318 chunks of 250 words with 50 words of overlap, from 2,661 documents. A first stage retrieves the top 10 chunks, the reranker reorders them and the top 3 are kept; P@3, R@3 and MRR at document level, as in nos-rag-eval. The paper indexed more than 12,000 documents, part of them not public yet, so absolute numbers here are higher than the paper's (BM25 + bge-reranker-v2-m3: 0.800 here, 0.752 in the paper).

On BM25 top 10:

RerankerParamsLicenseP@3R@3MRR
this model278MMIT0.5530.8940.804
BAAI/bge-reranker-v2-m3568MApache-2.00.5460.8860.800
Alibaba-NLP/gte-multilingual-reranker-base306MApache-2.00.5360.8960.795
jinaai/jina-reranker-v3 (reference only)0.6BCC BY-NC 4.00.5410.8810.789
none (BM25 order)0.5190.8780.780
mixedbread-ai/mxbai-rerank-base-v2494MApache-2.00.5220.8580.760
Qwen/Qwen3-Reranker-0.6B596MApache-2.00.5150.8650.751

On bge-m3 top 10:

RerankerP@3R@3MRR
BAAI/bge-reranker-v2-m30.5340.8990.807
this model0.5460.8950.805
jinaai/jina-reranker-v3 (reference only)0.4990.8640.772
Qwen/Qwen3-Reranker-0.6B0.4980.8520.742
none (bge-m3 order)0.5000.8460.740

This model and bge-reranker-v2-m3 were scored in the same job on one NVIDIA L4 (fp16). The other rerankers were scored with the same script on Kaggle T4s, where the BM25 first stage came out at 0.782 instead of 0.780 (tie order), so their rows are close to, but not exactly on, the same candidate lists.

Paired bootstrap over questions (paraphrases of a question resampled together, 10,000 samples), MRR difference and 95 % interval:

  • against bge-reranker-v2-m3, BM25 top 10: +0.004 [−0.013, +0.021], p = 0.65;
  • against bge-reranker-v2-m3, bge-m3 top 10: −0.002 [−0.019, +0.014], p = 0.80;
  • against gte-multilingual-reranker-base, BM25 top 10: +0.009 [−0.010, +0.028], p = 0.34;
  • against the BM25 order: +0.025 [+0.003, +0.046]; against the bge-m3 order: +0.065 [+0.042, +0.088].

After a Holm correction over all the reranker comparisons we report, the gain over the bge-m3 order holds; the gain over the BM25 order does not (adjusted p 0.28), and the ties stay ties.

MRR by DOG-RAG question type, BM25 top 10:

Typethis modelbge-reranker-v2-m3BM25 order
sparsed_context0.6570.5920.626
general0.8460.8410.802
data_extracted0.7760.8000.798
table0.9170.9550.904

It is behind the teacher on questions about tables and extracted figures, and ahead on questions whose answer is spread over the passage.

BM25 already has the right document in its top 10 for 97 % of the questions, so on DOG-RAG almost all of a reranker's gain comes from ordering.

Second test set: reviewed DOG 2025 questions

DOG-RAG's questions were written by an LLM, and so were this model's training questions. A second test set on the same index has 108 questions about 94 DOG 2025 documents that are not in DOG-RAG, drafted by another LLM (Claude Opus 5.5) and reviewed by a Galician linguist (97 kept as drafted, 11 edited). It was built to test the embedder; the reranker rows below were added after its analysis plan was fixed, so read them as exploratory.

First stageRerankerP@3R@3MRR
BM25BAAI/bge-reranker-v2-m30.5340.8800.801
BM25this model0.5000.8610.744
BM25none0.4380.7960.698
galician-embedding-me5-basenone0.5060.8800.815
galician-embedding-me5-basethis model0.4980.8610.750

Paired bootstrap over questions (10,000 samples), MRR difference and 95 % interval:

  • against bge-reranker-v2-m3, BM25 top 10: −0.057 [−0.100, −0.015], p = 0.007;
  • against the BM25 order: +0.046 [−0.008, +0.100], p = 0.10;
  • on top of galician-embedding-me5-base, against that model alone: −0.065 [−0.120, −0.011], p = 0.02.

On these questions it is clearly behind its teacher. The gap is on general questions (0.743 against 0.853, 50 questions) and questions whose answer is spread over the passage (0.714 against 0.845, 14); on questions about a concrete datum it is level or slightly ahead (0.767 against 0.742, 40). 108 questions can't say why. One possibility is that the distilled model fits the style of the training questions more closely than its teacher does.

On top of a Galician embedder

Same index and protocol, Apple M5 (fp32), first stage from galician-embedding-me5-base v0.2-mix:

First stageRerankerMRR
galician-embedding-me5-basenone0.833
galician-embedding-me5-basethis model0.816
hybrid BM25 + galician-embedding-me5-basethis model0.816
BM25this model0.803

The embedder already puts the right document first more often than this reranker does when it reorders the embedder's own list (−0.017, not significant). The same happens with bge-reranker-v2-m3 on top of the embedder's training run 4 (0.830 alone, 0.822 reranked).

Is the distillation needed?

The same groups, seed and schedule were trained again with the teacher's scores left out of the loss (alpha 1, one-hot target only), on a Kaggle T4. The teacher still chose which BM25 candidates to drop as probable answers, so this removes the soft labels, not the teacher.

Dev MRR@10BM25 top 10bge-m3 top 10
this model (alpha 0.5)0.5340.8030.804
no teacher scores (alpha 1)0.5330.8020.793
bge-reranker-v2-m30.5290.8010.806

Read on the Kaggle job's candidate lists, which differ from the table above by BM25 tie order. Paired difference, no teacher minus this model: −0.001 [−0.014, +0.011] on BM25, −0.012 [−0.025, +0.002] on bge-m3. The hard negatives and the data carry the result; the soft labels add at most about a point on a dense first stage, which one run per setting can't confirm.

Training

The checkpoint is step 2,000 of 4,416 (one epoch), chosen on dev.

SettingValue
Losssoftmax cross-entropy over each question's group against a target that is 0.5 × one-hot(positive) + 0.5 × softmax(bge-reranker-v2-m3 logits)
Group1 positive and up to 7 negatives per question
Batch16 questions (4 per step, 4 accumulation steps)
Learning rate2e-5, linear decay, 10 % warmup
Steps4,416 (1 epoch), dev every 500; best kept (step 2,000)
Max sequence length512 tokens, question and passage together
Precisionfp32 weights, fp16 autocast
Seed0
Compute128 min scoring the 845,714 training pairs with the teacher, 125 min of training, on one NVIDIA L4

Model selection used 454 synthetic questions over DOG 2024 (kept out of training), each searched with BM25 over its own passage plus 5,000 DOG 2024 distractors; the top 10 was reranked and scored with MRR@10. Dev MRR@10: BM25 order 0.479, bge-reranker-v2-m3 0.529, this model before training 0.175, at step 2,000 0.534. DOG-RAG was read once, for that checkpoint.

sentence-transformers 6.2.0, transformers 5.22.1, torch 2.15.0.

Training data

70,659 questions, each with one positive passage, from alejandro-rodriguez/galician-retrieval-pairs (the BM25 candidates below are not in that dataset; the code builds them from it). No DOG text from 2024 or later was used: DOG 2025 is the test index and DOG 2024 the dev set. Training questions sharing an 8-word sequence with a DOG-RAG question, and passages sharing a 20-word sequence with a DOG-RAG context, were removed.

SourceQuestionsLicense
SINAI/ALIA-es-legal-administrative-triplets (SINAI, Universidad de Jaén), query and positive translated to Galician with Nós MT29,832CC BY-SA 4.0
DOG 1995 to 2023, from proxectonos/corpus_dominio_legal_administrativo_tmp, with synthetic questions24,968CC BY 4.0
ParlaMint-ES-GA 5.0, Parlamento de Galicia debates 2015 to 2022, with synthetic questions7,209CC BY 4.0
BOP A Coruña, with synthetic questions5,153CC BY 4.0
BOP Pontevedra, with synthetic questions3,497CC BY 4.0

The synthetic questions were written by BSC-LT/salamandra-7b-instruct. Negatives come from two places: BAAI/bge-m3 hard negatives (ranks 10 to 50, never from the positive's own document; 200,054) and the BM25 top 8 over the pool of all training passages (264,334). bge-reranker-v2-m3 scored every pair; a BM25 candidate scoring within 0.1 of the positive was treated as a probable second answer and dropped (124,301). 1,081 questions left with no negative were dropped.

Limitations

  • Two small test sets, both with LLM-written questions, as were most training questions. On DOG-RAG it ties bge-reranker-v2-m3; on the second set it is clearly behind it. Where model size and speed are not a constraint, bge-reranker-v2-m3 is the safer choice. It was not tested on news, FAQ or other Galician text.
  • It lowers MRR when it reorders the top 10 of galician-embedding-me5-base (see above).
  • Most training questions are synthetic, and the SINAI part is machine-translated from Spanish. Questions people actually type may be shorter or mix Spanish and Galician.
  • It is weaker than bge-reranker-v2-m3 on table and extracted-figure questions (see above).
  • Run-to-run spread: a first training run with the same data and settings, lost before upload, scored 0.800 on BM25 top 10 and 0.795 on bge-m3 top 10.
  • The test index has 2,661 documents, not the 12,000+ of the paper, so absolute scores are optimistic.
  • A cross-encoder runs the whole model on every candidate. Reranking 10 passages of 250 words takes about 0.66 s per question (median; 0.8 s at p90) on a laptop CPU (Apple M5, 4 threads, fp32) and 0.29 s on its GPU (MPS), against 13 ms to encode a question with the embedder.
  • Official bulletins contain names of people (appointments, grants, sanctions). The model was trained on that text.

License and attribution

MIT, the license of multilingual-e5-base; the notice is in LICENSE. Credits:

  • intfloat/multilingual-e5-base, Copyright (c) Microsoft Corporation, MIT. Wang et al. (2024), Multilingual E5 Text Embeddings: A Technical Report, arXiv:2402.05672.
  • BAAI/bge-reranker-v2-m3, Apache-2.0, the distillation teacher and the filter for negatives; BAAI/bge-m3, MIT, for mining.
  • SINAI/ALIA-es-legal-administrative-triplets, SINAI research group, Universidad de Jaén, CC BY-SA 4.0.
  • proxectonos/Nos_MT-CT2-es-gl, MIT, Copyright (c) 2023 Proxecto Nós. Bardanca Outeirinho et al. (2024), PROPOR 2024.
  • proxectonos/corpus_dominio_legal_administrativo_tmp, CC BY 4.0, and the publishers of the bulletins: Xunta de Galicia (DOG), Deputación da Coruña and Deputación de Pontevedra.
  • ParlaMint-ES-GA 5.0, CC BY 4.0, Instituto da Lingua Galega (Universidade de Santiago de Compostela). Erjavec et al. (2024), Language Resources and Evaluation, doi:10.1007/s10579-024-09798-w.
  • BSC-LT/salamandra-7b-instruct (Apache-2.0) for the synthetic questions.
  • Evaluation: DOG-RAG (Apache-2.0) and the nos-rag-eval protocol (MIT) from Proxecto Nós. Rodríguez et al. (2026), DOG-RAG: A Galician Benchmark for Legal Retrieval-Augmented Generation, SEPLN 2026, CEUR-WS Vol-4301, Poster9. jina-reranker-v3 (CC BY-NC 4.0) appears only as an evaluation row; it was not used for any training data.

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

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

GPU в ailist

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

Можно запустить

Подбираем GPU…

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

0 моделей