/ Модель

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

Контекст
512 токенов
Параметры
137 млн
Лицензия
CC BY-NC 4.0
Архитектура
dpr · dense
Опубликована
2 мар 2022

dpr-question_encoder-multiset-base

ЭмбеддингиТекст → embedding7 профессий

Англоязычный BERT-энкодер DPR превращает вопросы в векторы для поиска релевантных фрагментов в системах открытого ответа на вопросы.

1 486скачиваний за 30 дней6лайковвеса обновлены21 дек 2022

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

facebook/dpr-question_encoder-multiset-base — англоязычный BERT-энкодер вопросов из набора моделей Dense Passage Retrieval (DPR). Модель разработана для открытого поиска ответов на вопросы и обучена на Natural Questions, TriviaQA, WebQuestions и CuratedTREC. Она преобразует текст вопроса в плотное векторное представление для поиска подходящих фрагментов; обычно используется вместе с совместимым энкодером контекста DPR.

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

  • векторизация вопросов для поиска по корпусу документов
  • поиск фрагментов-кандидатов для открытого ответа на вопросы
  • построение поискового компонента для Natural Questions
  • извлечение релевантных фрагментов из базы знаний по запросу на английском

Ограничения

Модель кодирует вопросы и сама по себе не генерирует ответы; для поиска фрагментов обычно требуется совместимый энкодер контекста. README отмечает риски стереотипных и вредных ассоциаций в предсказаниях, а лицензия CC-BY-NC-4.0 ограничивает коммерческое использование.

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

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

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

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

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

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

Открыть на Hugging Face

dpr-question_encoder-multiset-base

Table of Contents

Model Details

Model Description: Dense Passage Retrieval (DPR) is a set of tools and models for state-of-the-art open-domain Q&A research. dpr-question_encoder-multiset-base is the question encoder trained using the Natural Questions (NQ) dataset, TriviaQA, WebQuestions (WQ), and CuratedTREC (TREC).

How to Get Started with the Model

Use the code below to get started with the model.

from transformers import DPRQuestionEncoder, DPRQuestionEncoderTokenizer

tokenizer = DPRQuestionEncoderTokenizer.from_pretrained("facebook/dpr-question_encoder-multiset-base")
model = DPRQuestionEncoder.from_pretrained("facebook/dpr-question_encoder-multiset-base")
input_ids = tokenizer("Hello, is my dog cute ?", return_tensors="pt")["input_ids"]
embeddings = model(input_ids).pooler_output

Uses

Direct Use

dpr-question_encoder-multiset-base, dpr-ctx_encoder-multiset-base, and dpr-reader-multiset-base can be used for the task of open-domain question answering.

Misuse and Out-of-scope Use

The model should not be used to intentionally create hostile or alienating environments for people. In addition, the set of DPR models was not trained to be factual or true representations of people or events, and therefore using the models to generate such content is out-of-scope for the abilities of this model.

Risks, Limitations and Biases

CONTENT WARNING: Readers should be aware this section may contain content that is disturbing, offensive, and can propogate historical and current stereotypes.

Significant research has explored bias and fairness issues with language models (see, e.g., Sheng et al., 2021 and Bender et al., 2021). Predictions generated by the model can include disturbing and harmful stereotypes across protected classes; identity characteristics; and sensitive, social, and occupational groups.

Training

Training Data

This model was trained using the following datasets:

Training Procedure

The training procedure is described in the associated paper:

Given a collection of M text passages, the goal of our dense passage retriever (DPR) is to index all the passages in a low-dimensional and continuous space, such that it can retrieve efficiently the top k passages relevant to the input question for the reader at run-time.

Our dense passage retriever (DPR) uses a dense encoder EP(·) which maps any text passage to a d- dimensional real-valued vectors and builds an index for all the M passages that we will use for retrieval. At run-time, DPR applies a different encoder EQ(·) that maps the input question to a d-dimensional vector, and retrieves k passages of which vectors are the closest to the question vector.

The authors report that for encoders, they used two independent BERT (Devlin et al., 2019) networks (base, un-cased) and use FAISS (Johnson et al., 2017) during inference time to encode and index passages. See the paper for further details on training, including encoders, inference, positive and negative passages, and in-batch negatives.

Evaluation

The following evaluation information is extracted from the associated paper.

Testing Data, Factors and Metrics

The model developers report the performance of the model on five QA datasets, using the top-k accuracy (k ∈ {20, 100}). The datasets were NQ, TriviaQA, WebQuestions (WQ), CuratedTREC (TREC), and SQuAD v1.1.

Results

Top 20Top 100
NQTriviaQAWQTRECSQuADNQTriviaQAWQTRECSQuAD
79.478.875.089.151.686.084.782.993.967.6

Environmental Impact

Carbon emissions can be estimated using the Machine Learning Impact calculator presented in Lacoste et al. (2019). We present the hardware type and based on the associated paper.

  • Hardware Type: 8 32GB GPUs
  • Hours used: Unknown
  • Cloud Provider: Unknown
  • Compute Region: Unknown
  • Carbon Emitted: Unknown

Technical Specifications

See the associated paper for details on the modeling architecture, objective, compute infrastructure, and training details.

Citation Information

  @inproceedings{karpukhin-etal-2020-dense,
    title = "Dense Passage Retrieval for Open-Domain Question Answering",
    author = "Karpukhin, Vladimir and Oguz, Barlas and Min, Sewon and Lewis, Patrick and Wu, Ledell and Edunov, Sergey and Chen, Danqi and Yih, Wen-tau",
    booktitle = "Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP)",
    month = nov,
    year = "2020",
    address = "Online",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/2020.emnlp-main.550",
    doi = "10.18653/v1/2020.emnlp-main.550",
    pages = "6769--6781",
}

Model Card Authors

This model card was written by the team at Hugging Face.

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
DPRQuestionEncoder
Ревизия весов
5325e4e

0 моделей