/ Модель

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

Контекст
512 токенов
Параметры
212 млн
Лицензия
MIT
Архитектура
deberta-v2 · dense
Базовая модель
deberta-v3-base
Библиотека
transformers
Опубликована
19 ноя 2026

deberta-v3-squad2

Ответы на вопросыТекст → текст6 профессий
81скачиваний за 30 дней0лайковвеса обновлены19 ноя 2026

Описание модели

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

Англоязычная модель на базе DeBERTa-v3 для извлечения ответов и отказа от ответа по тексту из SQuAD 2.0.

Ingsyling/deberta-v3-squad2 — модель извлечения ответов на вопросы, созданная Дэвидом Фалеем как личный эксперимент и продолжение учебного проекта. Она основана на microsoft/deberta-v3-base и дообучена на английском датасете SQuAD 2.0. Получив вопрос и текстовый фрагмент, модель выделяет непрерывный отрывок из этого фрагмента либо возвращает пустой ответ, если подходящего ответа нет.

Модель предназначена для ответов на вопросы по англоязычным текстам, включая определение случаев, когда ответ в тексте отсутствует. В карточке сообщается результат 87,69 F1 на dev-наборе SQuAD 2.0. По метаданным модель содержит 211,6 млн параметров, использует архитектуру DeBERTa V2 для извлечения ответов, принимает текст и имеет контекстное окно 512 токенов. Лицензия — MIT.

Ответы извлекаются из исходного фрагмента: модель не объединяет сведения из нескольких предложений и не выполняет многошаговое рассуждение. Она может ошибочно отвечать на вопросы без ответа, особенно на вопросы «почему»; для длинных документов требуется разделение на перекрывающиеся фрагменты и настройка порога отказа. Модель обучалась на англоязычных статьях Википедии, не проверялась на других языках и типах текстов и может быть медленнее меньших альтернатив. Ошибочные ответы в медицинских, юридических и финансовых сценариях требуют проверки человеком.

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

  • поиск ответа на вопрос в англоязычном абзаце
  • извлечение фактов из текста Википедии
  • проверка, содержится ли ответ на вопрос в документе
  • создание системы вопрос-ответ по англоязычным текстам

Ограничения

Модель извлекает только непрерывный фрагмент текста и не объединяет сведения или не рассуждает по нескольким предложениям; ошибки на вопросах без ответа и длинных документах требуют настройки порога. Обучена на англоязычной Википедии, не проверена на других языках и типах текстов; ответы в медицинских, юридических и финансовых сценариях следует проверять.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus, LLM Stats

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

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

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

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

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

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

Открыть на Hugging Face

DeBERTa-v3-base fine-tuned on SQuAD 2.0

microsoft/deberta-v3-base fine-tuned for extractive question answering on SQuAD 2.0. Given a passage and a question, it marks the words in the passage that answer the question, or says that the passage does not contain an answer.

A personal experiment by David Faleye, continuing a CSCI 390 course project (Ingsyling/distilbert-squad2). The goal was to beat deepset/roberta-base-squad2 with a model trained on a free GPU. Code, configuration and training notebook: https://github.com/Davidfaleye360/qa-experiments

How to use it

from transformers import pipeline

qa = pipeline("question-answering", model="Ingsyling/deberta-v3-squad2")
result = qa(
    question="In what country is Normandy located?",
    context="The Normans gave their name to Normandy, a region in France.",
    handle_impossible_answer=True,   # allow "no answer"; the answer is then an empty string
)
print(result["answer"])   # " France." (see the note below)

This needs transformers 4.x (version 5 removed the question-answering pipeline) and the sentencepiece and protobuf packages for the DeBERTa-v3 tokenizer.

The pipeline can return the answer with a leading space and a neighbouring punctuation mark (" France."), because DeBERTa-v3's tokenizer counts the space before a word as part of that word. The scores below were measured with the project's own code (src/predict.py and src/evaluate.py in the repository), which trims that space and returns "France" for this example.

Results

SQuAD 2.0 dev set, 11,873 questions, at the default no-answer threshold. The project's scoring code and the official squad_v2 metric give the same numbers, on a Colab T4 and on an Apple M2 laptop.

Exact MatchF1Questions
All84.8687.6911,873
Answerable83.3789.025,928
Unanswerable86.3686.365,945

For comparison, measured with the same code:

ModelExact MatchF1Answerable F1Unanswerable F1Parameters
This model84.8687.6989.0286.36184 M
deepset/roberta-base-squad279.9082.9184.0181.82124 M
Ingsyling/distilbert-squad264.1467.3872.1762.5966 M

This model is 4.8 F1 points ahead of RoBERTa, on both answerable and unanswerable questions. The DeBERTa-v3 authors report about 88 F1 for the base model on SQuAD 2.0.

Training

SettingValue
DataSQuAD 2.0 training set, 130,319 questions (131,467 windows)
Window384 tokens, 128 tokens of overlap
Epochs2 (16,434 steps)
Batch size16 (8 per step, gradients accumulated over 2 steps)
Learning rate3e-5, linear warm-up over the first 10% of steps, then linear decay
Weight decay0.01
Precisionmixed (fp16)
Seed42
Hardware and timeone Tesla T4 (Google Colab), 1 hour 39 minutes, 7.0 GB GPU memory at most

Training batches are padded only to their longest window, and windows of similar length are grouped together, so most steps process far fewer than 384 tokens per window (the average window is about 164 tokens). Unanswerable questions, and windows that do not contain the whole answer, are labelled with the [CLS] position. The training loss fell from 5.22 to about 0.5. All settings are in configs/deberta.yaml in the repository.

Limitations

  • It copies, it does not reason. The answer is always one continuous piece of the passage. Questions whose answer has to be put together from several sentences are beyond it.
  • Unanswerable questions are still the main weakness. 45% of its 1,797 errors on the dev set are answers to unanswerable questions (811, against 1,081 for RoBERTa), and "why" questions are the hardest kind (76 F1 on answerable "why" questions, against 94 for "when").
  • The default threshold is slightly too eager. Requiring the best answer to beat "no answer" by about 1.9 (a no-answer threshold of −1.9) raises F1 from 87.69 to 88.33, chosen and scored on different halves of the dev set. The pipeline above does not apply a threshold.
  • Long documents need care. It reads at most 384 tokens at a time; longer texts are split into overlapping windows. On three whole dev articles (12 to 26 windows per question), F1 fell from 91.6 / 85.8 / 80.9 with the right paragraph to 86.4 / 73.5 / 73.5 when picking the window whose answer beats its own "no answer" score by the most, still above our DistilBERT given the right paragraph (70.6 / 60.1 / 59.3). The no-answer threshold needs re-tuning for long texts.
  • English Wikipedia only. It was trained on Wikipedia paragraphs and has not been tested on other kinds of text or other languages.
  • Bigger and slower than the alternatives above: 735 MB, and a median of 85 ms per question on an Apple M2 laptop CPU, against 53 ms for deepset/roberta-base-squad2 and 27 ms for the DistilBERT model.
  • Do not use it where a wrong answer has consequences (medical, legal, financial) without a person checking.

Licences

The base model microsoft/deberta-v3-base is released under the MIT licence. SQuAD 2.0 is released under CC BY-SA 4.0.

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей