/ Модель

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

Контекст
512 токенов
Лицензия
Apache 2.0
Архитектура
distilbert · dense
Базовая модель
distilbert-base-uncased
Библиотека
transformers
Опубликована
19 ноя 2026

distilbert-squad2-distilled

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

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

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

Компактная англоязычная DistilBERT-модель извлекает ответ на вопрос из текста или сообщает, что ответа в отрывке нет.

Ingsyling/distilbert-squad2-distilled — экспериментальная модель Давида Фалея для извлекающего ответа на вопросы. Это DistilBERT с 66 млн параметров, дообученный на SQuAD 2.0 с использованием правильных ответов и оценок модели-учителя DeBERTa-v3. Получив вопрос и отрывок текста, модель выделяет непрерывный фрагмент отрывка или возвращает пустой ответ, если не находит ответа.

Модель рассчитана на англоязычные вопросы по абзацам Википедии. Контекстное окно — 512 токенов; обучение использовало окна по 384 токена с перекрытием. На валидационной выборке SQuAD 2.0 модель показала F1 69,76; дистилляция улучшила результат исходного варианта того же размера, особенно на вопросах без ответа. Модель компактна, но заметно уступает учителю и RoBERTa; она копирует фрагмент текста и не выполняет рассуждения за пределами него. Автор сообщает, что её не проверяли на других жанрах и языках. Лицензия — Apache-2.0.

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

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

Ограничения

Возвращает только непрерывный фрагмент исходного текста и не рассуждает за его пределами; качество заметно ниже, чем у модели-учителя и RoBERTa. Проверялась на англоязычной Википедии и валидационной выборке SQuAD 2.0, поэтому для других текстов и языков её качество не подтверждено; ответы в медицинских, юридических и финансовых сценариях требуют проверки человеком.

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

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

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

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

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

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

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

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

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

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

Открыть на Hugging Face

DistilBERT distilled from DeBERTa-v3 on SQuAD 2.0

distilbert-base-uncased fine-tuned for extractive question answering on SQuAD 2.0, learning from a stronger "teacher" model as well as from the correct answers. 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. It is the course project's model, Ingsyling/distilbert-squad2, trained again with the same settings, except that half of what it learns from is the scores of Ingsyling/deberta-v3-squad2 (87.7 F1). The goal was a more accurate model at the same size and speed. 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/distilbert-squad2-distilled")
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"

This needs transformers 4.x (version 5 removed the question-answering pipeline).

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
All66.6469.7611,873
Answerable66.8773.125,928
Unanswerable66.4166.415,945

For comparison, measured with the same code:

ModelExact MatchF1Answerable F1Unanswerable F1Parameters
This model66.6469.7673.1266.4166 M
Ingsyling/distilbert-squad2 (same model, no teacher)64.1467.3872.1762.5966 M
deepset/roberta-base-squad279.9082.9184.0181.82124 M
Ingsyling/deberta-v3-squad2 (the teacher)84.8687.6989.0286.36184 M

Learning from the teacher adds 2.5 Exact Match and 2.4 F1 points to the same model trained without it. Most of the gain is on unanswerable questions (+3.8), against +1.0 F1 on answerable ones: the teacher's score for "no answer" shows the student how sure to be. It closes 15% of the gap to RoBERTa (15.5 → 13.2 F1 points).

Training

SettingValue
DataSQuAD 2.0 training set, 130,319 questions (131,754 windows)
Window384 tokens, 128 tokens of overlap
Epochs2 (16,470 steps)
Batch size16
Learning rate3e-5, linear warm-up over the first 10% of steps, then linear decay
Weight decay0.01
Precisionmixed (fp16)
Seed42
TeacherIngsyling/deberta-v3-squad2
Loss0.5 × difference from the teacher (KL divergence, temperature 2) + 0.5 × difference from the correct answer (cross-entropy)
Hardware and timeone Tesla T4 (Google Colab): 17 minutes for the teacher's scores, then 38 minutes of training, 2.4 GB GPU memory at most

How the teacher's scores reach the student. The teacher gives every word piece a score for "the answer starts here" and "the answer ends here". DeBERTa-v3 and DistilBERT cut text into different word pieces, so the scores are matched by character position: the teacher reads exactly the stretch of passage each student window covers, and a student word piece that starts (or ends) at the same character as a teacher word piece gets that piece's start (or end) score. Student word pieces with no match, such as the middle of a word, get a very low score. The [CLS] position carries the "no answer" score for both. The teacher's top choice after this matching agreed with the training label in 78.5% of 2,000 checked windows; most disagreements were the teacher picking a slightly longer or shorter span. The teacher runs once, before training, and its scores are reused in both epochs.

All settings are in configs/distill.yaml and the method in src/distill.py in the repository. The training loss (teacher part plus label part) fell from 10.9 to about 1.2; it is not comparable with the loss of a model trained on the labels alone.

Limitations

  • It copies, it does not reason. The answer is always one continuous piece of the passage.
  • Still far behind its teacher and RoBERTa: 18 F1 points below the teacher and 13 below RoBERTa. Distillation narrows the gap a little; it does not make a 66 M parameter model as good as a 184 M one.
  • The default threshold is too eager. Requiring the best answer to beat "no answer" by about 1.95 (a no-answer threshold of −1.95) raises F1 from 69.76 to 70.43, chosen and scored on different halves of the dev set. The pipeline above does not apply a threshold.
  • The teacher was trained on the same questions. Its scores on the training set are more confident than on new text, so they carry less extra information than a teacher's scores usually do.
  • Not tested beyond the dev set: the error analysis, long-document test and speed measurement done for the other models were not repeated. The network is the same as the course project's DistilBERT (about 27 ms per question on an Apple M2 laptop CPU), so its speed should be the same.
  • English Wikipedia only. It was trained on Wikipedia paragraphs and has not been tested on other kinds of text or other languages.
  • Do not use it where a wrong answer has consequences (medical, legal, financial) without a person checking.

Licences

The base model distilbert-base-uncased is released under the Apache 2.0 licence, and the teacher's base model microsoft/deberta-v3-base under the MIT licence. SQuAD 2.0 is released under CC BY-SA 4.0.

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей