/ Модель

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

Лицензия
Apache 2.0
Архитектура
gemma4 · dense
Базовая модель
gemma-4-E4B-it
Библиотека
transformers
Опубликована
2 ноя 2026

RE3RANK-Gemma-4-E4B

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

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

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

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

RE3RANK-Gemma-4-E4B — реранкер RE³Rank на базе Google Gemma 4 E4B Instruct, разработанный авторами модели. Он переупорядочивает кандидатов, найденных первым этапом поиска: генератор формирует рассуждение по запросу и кандидатам, а отдельный скорер оценивает кандидатов по вниманию выбранных голов к их тексту. Генератор и скорер обучались совместно; для скоринга используются головы 35-0 и 29-4.

Модель предназначена для улучшения ранжирования результатов в поисковых и RAG-системах. В оценке на девяти наборах данных при ранжировании до 50 кандидатов от Qwen3-Embedding-8B показала средние R@1 44,51%, R@3 77,14%, R@5 84,06% и NDCG@10 82,54%. Репозиторий содержит генератор в формате bf16 и отдельные веса скорера в fp32; для работы скорера требуется базовая модель и загрузчик из проекта RE³Rank. Используется только текстовый декодер: визуальные и аудио компоненты базовой модели не задействованы. Лицензия — Apache-2.0.

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

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

Ограничения

Модель рассчитана на переупорядочивание уже полученного списка кандидатов и сама не выполняет первичный поиск. Для запуска скорера необходимы базовая Gemma 4 E4B Instruct и загрузчик из проекта RE³Rank; языковая поддержка отдельно не указана.

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

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

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

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

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

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

Открыть на Hugging Face

RE3RANK-Gemma-4-E4B

A RE³Rank reranker built on google/gemma-4-E4B-it. Paper: Re³Rank: Listwise Reranking with Reasoning-Conditioned Retrieval Heads. Code: https://github.com/ryehr/RE3RANK.

Overview of RE³Rank. A first-stage retriever returns candidates for the question from the corpus. The generator writes a reasoning trace from the question and the candidates, and the scorer reads the same input followed by the reasoning trace. Of all attention heads in the scorer, only a few selected RRHeads are used: each candidate is scored by the attention mass that these heads route from the reasoning trace positions to it. The ranking loss ℒrank updates both components and reaches the generator through a straight-through estimator.

RE³Rank reranks the candidates of a first-stage retriever in two steps:

  1. Generator. The model in thinking mode reads the candidates and the question (system prompt "You are a helpful assistant.", the native reasoning channel forced open) and writes a reasoning trace, as it would to answer the question. It is never told to rerank.
  2. Scorer. A second copy of the backbone, truncated at its top scoring layer, reads the same prompt followed by the trace. The score of a candidate is the attention mass that the trace tokens put on its tokens through the scoring heads 35-0,29-4 (layer-head), averaged over the trace tokens and the heads.

Generator and scorer were trained jointly.

Files

pathcontent
/ (repository root)the generator: a Gemma4ForConditionalGeneration checkpoint (bf16) with the tokenizer, chat template and processor config of google/gemma-4-E4B-it
scorer/scorer.safetensorsthe trained scorer (fp32)
scorer/config.jsonbase model, scoring heads, and the frozen tables the loader takes from the base model (from_base)

Only the text decoder of the generator was trained; the vision and audio towers are those of the base model and are not used. model-dropped.safetensors holds the K/V projection and K-norm weights of the KV-shared layers, copied from the base model: transformers does not instantiate them, but vLLM expects them.

The scorer is loaded by re3rank.scorer.load_scorer of the code repository, which builds the truncated backbone from google/gemma-4-E4B-it and loads scorer/scorer.safetensors on top of it.

Usage

Set up the environment of the code repository (PyTorch, transformers, vLLM), then:

git clone https://github.com/ryehr/RE3RANK && cd RE3RANK && pip install -e .
hf download Ryehr/RE3RANK-Gemma-4-E4B --local-dir re3rank-gemma-4-e4b

# 1. the generator writes one greedy reasoning trace per item (vLLM)
python scripts/eval/generate_traces.py --model re3rank-gemma-4-e4b --tokenizer google/gemma-4-E4B-it \
    --data items.json --out traces.json
# 2. the scorer ranks the candidates of every item; --out holds the scores, one per candidate
python scripts/eval/score.py --model google/gemma-4-E4B-it --heads 35-0,29-4 --ckpt re3rank-gemma-4-e4b \
    --traces traces.json --data items.json --out scores.json --keep-nogold

items.json is a list of items, each a question with its candidates in first-stage order:

[{"id": "q1", "question": "...",
  "paragraphs": [{"title": "...", "paragraph_text": "..."}, "..."]}]

The model was trained and evaluated with 50 candidates per question (the top-50 of Qwen3-Embedding-8B). A candidate may carry "is_supporting": true/false; with labels, score.py also prints the recall metrics. The whole nine-set evaluation of the paper runs with

CKPT=Ryehr/RE3RANK-Gemma-4-E4B BASE=google/gemma-4-E4B-it HEADS=35-0,29-4 bash scripts/eval/run_eval.sh

after building the evaluation sets with scripts/data/ (see the repository README).

Results

Macro average over nine sets (HotpotQA, 2WikiMultihopQA, MuSiQue, NQ, PopQA, NarrativeQA, DetectiveQA, LoCoMo, LongMemEval; 9,205 queries), reranking the top-50 candidates of Qwen3-Embedding-8B. Recall is conditional: only queries with a gold candidate among the 50 count, and R@k divides by the number of gold candidates in the pool; NDCG@10 uses binary relevance. In %:

R@1R@3R@5NDCG@10
44.5177.1484.0682.54

Training

394 updates of 96 items (about one epoch) over a 38k-question mixture of NarrativeQA, MuSiQue, ConvoMem, QAConv and FriendsQA training questions with their Qwen3-Embedding-8B top-50 candidates; the evaluation questions are not used for training. Traces were sampled at temperature 1.0 with at most 1,024 tokens; 8-bit paged AdamW, learning rate 1e-5 for both models.

License

Apache-2.0, as the base model (license).

Citation

@misc{yan2026re3ranklistwisererankingreasoningconditioned,
      title={Re$^3$Rank: Listwise Reranking with Reasoning-Conditioned Retrieval Heads},
      author={Ruiyi Yan and Zhuoyuan Mao and Yugo Murawaki and Yiwen Guo},
      year={2026},
      eprint={2611.02550},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2611.02550},
}

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
Gemma4ForConditionalGeneration
Ревизия весов
140e624

0 моделей