/ Модель

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

Контекст
512 токенов
Параметры
534 млн
Лицензия
CC BY-NC-ND 4.0
Архитектура
Provence · dense
Базовая модель
trecdl22-crossencoder-debertav3
Опубликована
11 дек 2024

provence-reranker-debertav3-v1

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

Англоязычный реранкер Naver Labs Europe, который отбирает релевантные предложения в найденном контексте и сокращает его для RAG и ответов на вопросы.

1 432скачиваний за 30 дней73лайкавеса обновлены26 сен 2025

Бенчмарки

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

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

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

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

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

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

Provence-reranker-debertav3-v1 — модель Naver Labs Europe для отбора релевантного контекста в системах поиска и генерации с дополнением контекста (RAG). Она принимает вопрос и найденный фрагмент текста, оценивает релевантность предложений и удаляет предложения, не относящиеся к вопросу. Модель также сохраняет возможность ранжировать фрагменты по релевантности.

Модель основана на DeBERTav3-reranker, дообученном на базе DeBERTa-v3-large, и содержит 533,8 млн параметров по метаданным Hugging Face. Она совместно кодирует предложения фрагмента, что помогает учитывать связи между ними, и автоматически выбирает предложения для сохранения по пороговому значению. Заявленный предел контекста — 512 токенов. Модель рассчитана на английский язык и может использоваться перед любой LLM для сокращения контекста и снижения шума при ответах на вопросы.

В README сообщается о проверке на наборах из разных областей и о сохранении качества ответов при удалении нерелевантных предложений; результат зависит от порога сжатия и конкретного сценария. Лицензия в метаданных — CC BY-NC-ND 4.0; README также указывает CC BY-NC-ND 4.0, несмотря на упоминание ShareAlike в тексте названия лицензии.

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

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

Ограничения

Поддерживается английский язык, а максимальная длина контекста составляет 512 токенов. Уровень сжатия и возможное влияние на качество ответов зависят от выбранного порога.

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

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

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

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

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

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

Открыть на Hugging Face

Model Card for Provence-reranker

Provence is a lightweight context pruning model for retrieval-augmented generation, particularly optimized for question answering. Given a user question and a retrieved passage, Provence removes sentences from the passage that are not relevant to the user question. This speeds up generation and reduces context noise, in a plug-and-play manner for any LLM.

Paper: https://arxiv.org/abs/2501.16214, accepted to ICLR 2025

Blogpost: https://huggingface.co/blog/nadiinchi/provence

Developed by: Naver Labs Europe
License: Provence is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 license [CC BY-NC-ND 4.0 license]. License file

  • Model: provence-reranker-debertav3-v1 (Provence for Pruning and Reranking Of retrieVEd relevaNt ContExt)
  • Backbone model: DeBERTav3-reranker (trained from DeBERTa-v3-large)
  • Model size: 430 million parameters
  • Context length: 512 tokens

NEW! The multilingual version of the model, based on BGE-reranker-v2-m3, is available here.

Training and evaluation code & data are available in the Bergen repo

Usage

Provence uses nltk:

pip install nltk
python -c "import nltk; nltk.download('punkt_tab')"

Pruning a single context for a single question:

from transformers import AutoModel

provence = AutoModel.from_pretrained("naver/provence-reranker-debertav3-v1", trust_remote_code=True)

context = "Shepherd’s pie. History. In early cookery books, the dish was a means of using leftover roasted meat of any kind, and the pie dish was lined on the sides and bottom with mashed potato, as well as having a mashed potato crust on top. Variations and similar dishes. Other potato-topped pies include: The modern ”Cumberland pie” is a version with either beef or lamb and a layer of bread- crumbs and cheese on top. In medieval times, and modern-day Cumbria, the pastry crust had a filling of meat with fruits and spices.. In Quebec, a varia- tion on the cottage pie is called ”Paˆte ́ chinois”. It is made with ground beef on the bottom layer, canned corn in the middle, and mashed potato on top.. The ”shepherdess pie” is a vegetarian version made without meat, or a vegan version made without meat and dairy.. In the Netherlands, a very similar dish called ”philosopher’s stew” () often adds ingredients like beans, apples, prunes, or apple sauce.. In Brazil, a dish called in refers to the fact that a manioc puree hides a layer of sun-dried meat."
question = 'What goes on the bottom of Shepherd’s pie?'

provence_output = provence.process(question, context)
# print(f"Provence Output: {provence_output}")
# Provence Output: {'reranking_score': 3.022725, pruned_context': 'In early cookery books, the dish was a means of using leftover roasted meat of any kind, and the pie dish was lined on the sides and bottom with mashed potato, as well as having a mashed potato crust on top.']]

You can also pass a list of questions and a list of lists of contexts (multiple contexts per question to be pruned) for batched processing.

Setting always_select_title=True will keep the first sentence "Shepherd’s pie". This is especially useful for Wikipedia articles where the title is often needed to understand the context. More details on how the title is defined are given below.

provence_output = provence.process(question, context, always_select_title=True)
# print(f"Provence Output: {provence_output}")
# Provence Output: {'reranking_score': 3.022725, pruned_context': 'Shepherd’s pie. In early cookery books, the dish was a means of using leftover roasted meat of any kind, and the pie dish was lined on the sides and bottom with mashed potato, as well as having a mashed potato crust on top.']]

Model interface

Interface of the process function:

  • question: Union[List[str], str]: an input question (str) or a list of input questions (for batched processing)
  • context: Union[List[List[str]], str]: context(s) to be pruned. This can be either a single string (in case of a singe str question), or a list of lists contexts (a list of contexts per question), with len(contexts) equal to len(questions)
  • title: Optional[Union[List[List[str]], str]], default: “first_sentence”: an optional argument for defining titles. If title=first_sentence, then the first sentence of each context is assumed to be the title. If title=None, then it is assumed that no titles are provided. Titles can be also passed as a list of lists of str, i.e. titles shaped the same way as contexts. Titles are only used if always_select_title=True.
  • threshold (float, $ \in [0, 1]$, default 0.1): which threshold to use for context pruning. We recommend 0.1 for more conservative pruning (no performance drop or lowest performance drops) and 0.5 for higher compression, but this value can be further tuned to meet the specific use case requirements.
  • always_select_title (bool, default: True): if True, the first sentence (title) will be included into the selection each time the model select a non-empty selection of sentences. This is important, e.g., for Wikipedia passages, to provide proper contextualization for the next sentences.
  • batch_size (int, default: 32)
  • reorder (bool, default: False): if True, the provided contexts for each question will be reordered according to the computed question-passage relevance scores. If False, the original user-provided order of contexts will be preserved.
  • top_k (int, default: 5): if reorder=True, specifies the number of top-ranked passages to keep for each question.
  • enable_warnings (bool, default: True): whether the user prefers the warning about model usage to be printed, e.g. too long contexts or questions.

Model features

  • Provence encodes all sentences in the passage together: this enables capturing of coreferences between sentences and provides more accurate context pruning.
  • Provence automatically detects the number of sentences to keep, based on a threshold. We found that the default value of a threshold works well across various domains, but the threshold can be adjusted further to better meet the particular use case needs.
  • Provence is robust to various domains, being trained on a combination of diverse MS Marco and Natural Questions data.
  • Provence works out-of-the-box with any LLM.

Model Details

  • Input: user question (e.g., a sentence) + retrieved context passage (e.g., a paragraph)
  • Output: pruned context passage, i.e., irrelevant sentences are removed + relevance score (can be used for reranking)
  • Model Architecture: The model was initialized from DeBERTav3-reranker and finetuned with two objectives: (1) output a binary mask which can be used to prune irrelevant sentences; and (2) preserve initial reranking capabilities.
  • Training data: MS Marco (document) + NQ training sets, with synthetic silver labelling of which sentences to keep, produced using LLama-3-8B.
  • Languages covered: English
  • Context length: 512 tokens (similar to the pretrained DeBERTa model)
  • Evaluation: we evaluate Provence on 7 datasets from various domains: Wikipedia, biomedical data, course syllabi, and news. Evaluation is conducted on the model trained only on MS Marco data. We find that Provence is able to prune irrelevant sentences with little-to-no drop in performance, in all domains, and outperforms existing baselines on the Pareto front (top right corners of the plots).

Check out more analysis in the paper!

License

This work is licensed under CC BY-NC 4.0.

Cite

@misc{chirkova2025provenceefficientrobustcontext,
      title={Provence: efficient and robust context pruning for retrieval-augmented generation}, 
      author={Nadezhda Chirkova and Thibault Formal and Vassilina Nikoulina and Stéphane Clinchant},
      year={2025},
      eprint={2501.16214},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2501.16214}, 
}

Acknowledgements

Model trained at Naver Labs Europe
Team:

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

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

GPU в ailist

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

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

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

Класс архитектуры
Provence
Ревизия весов
ef49e23

0 моделей