/ Модель

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

Контекст
514 токенов
Параметры
95,2 млн
Лицензия
Apache 2.0
Архитектура
roberta · dense
Опубликована
2 мар 2022

distilroberta-base

Заполнение пропусковТекст → текст5 профессий

Дистиллированная англоязычная модель RoBERTa для предсказания пропущенных слов и дообучения на задачах понимания текста.

1,4 млнскачиваний за 30 дней186лайковвеса обновлены19 фев 2024

Бенчмарки

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

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

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

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

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

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

DistilRoBERTa-base — компактная трансформерная языковая модель семейства RoBERTa, созданная Виктором Саном, Лисандром Дебю, Жюльеном Шомоном и Томасом Вольфом из Hugging Face методом дистилляции RoBERTa-base по процедуре DistilBERT. В репозитории указаны 6 слоёв, размерность 768 и 12 голов внимания; метаданные каталога указывают 95,2 млн параметров, а README — 82 млн. Модель чувствительна к регистру, обучена на английском языке и имеет контекст до 514 токенов.

Основное прямое применение — заполнение пропусков в тексте с помощью masked language modeling. Модель также рассчитана на дообучение для задач классификации последовательностей и токенов, а также ответов на вопросы. По сравнению с RoBERTa-base она в среднем работает примерно вдвое быстрее и содержит меньше параметров согласно README. Распространяется по лицензии Apache 2.0.

Модель не предназначена для свободной генерации текста и не обучалась обеспечивать фактическую точность. Её предсказания могут воспроизводить вредные стереотипы и предубеждения; при использовании следует учитывать эти ограничения.

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

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

Ограничения

Модель не предназначена для свободной генерации текста или обеспечения фактической точности; предсказания могут содержать вредные стереотипы и предубеждения. README указывает 82 млн параметров, тогда как метаданные каталога — 95,2 млн.

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

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

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

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

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

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

Открыть на Hugging Face

Model Card for DistilRoBERTa base

Table of Contents

  1. Model Details
  2. Uses
  3. Bias, Risks, and Limitations
  4. Training Details
  5. Evaluation
  6. Environmental Impact
  7. Citation
  8. How To Get Started With the Model

Model Details

Model Description

This model is a distilled version of the RoBERTa-base model. It follows the same training procedure as DistilBERT. The code for the distillation process can be found here. This model is case-sensitive: it makes a difference between english and English.

The model has 6 layers, 768 dimension and 12 heads, totalizing 82M parameters (compared to 125M parameters for RoBERTa-base). On average DistilRoBERTa is twice as fast as Roberta-base.

We encourage users of this model card to check out the RoBERTa-base model card to learn more about usage, limitations and potential biases.

  • Developed by: Victor Sanh, Lysandre Debut, Julien Chaumond, Thomas Wolf (Hugging Face)
  • Model type: Transformer-based language model
  • Language(s) (NLP): English
  • License: Apache 2.0
  • Related Models: RoBERTa-base model card
  • Resources for more information:

Uses

Direct Use and Downstream Use

You can use the raw model for masked language modeling, but it's mostly intended to be fine-tuned on a downstream task. See the model hub to look for fine-tuned versions on a task that interests you.

Note that this model is primarily aimed at being fine-tuned on tasks that use the whole sentence (potentially masked) to make decisions, such as sequence classification, token classification or question answering. For tasks such as text generation you should look at model like GPT2.

Out of Scope Use

The model should not be used to intentionally create hostile or alienating environments for people. The model 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.

Bias, Risks, and Limitations

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 may include disturbing and harmful stereotypes across protected classes; identity characteristics; and sensitive, social, and occupational groups. For example:

>>> from transformers import pipeline
>>> unmasker = pipeline('fill-mask', model='distilroberta-base')
>>> unmasker("The man worked as a <mask>.")
[{'score': 0.1237526461482048,
  'sequence': 'The man worked as a waiter.',
  'token': 38233,
  'token_str': ' waiter'},
 {'score': 0.08968018740415573,
  'sequence': 'The man worked as a waitress.',
  'token': 35698,
  'token_str': ' waitress'},
 {'score': 0.08387645334005356,
  'sequence': 'The man worked as a bartender.',
  'token': 33080,
  'token_str': ' bartender'},
 {'score': 0.061059024184942245,
  'sequence': 'The man worked as a mechanic.',
  'token': 25682,
  'token_str': ' mechanic'},
 {'score': 0.03804653510451317,
  'sequence': 'The man worked as a courier.',
  'token': 37171,
  'token_str': ' courier'}]
  
>>> unmasker("The woman worked as a <mask>.")
[{'score': 0.23149248957633972,
  'sequence': 'The woman worked as a waitress.',
  'token': 35698,
  'token_str': ' waitress'},
 {'score': 0.07563332468271255,
  'sequence': 'The woman worked as a waiter.',
  'token': 38233,
  'token_str': ' waiter'},
 {'score': 0.06983394920825958,
  'sequence': 'The woman worked as a bartender.',
  'token': 33080,
  'token_str': ' bartender'},
 {'score': 0.05411609262228012,
  'sequence': 'The woman worked as a nurse.',
  'token': 9008,
  'token_str': ' nurse'},
 {'score': 0.04995106905698776,
  'sequence': 'The woman worked as a maid.',
  'token': 29754,
  'token_str': ' maid'}]

Recommendations

Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model.

Training Details

DistilRoBERTa was pre-trained on OpenWebTextCorpus, a reproduction of OpenAI's WebText dataset (it is ~4 times less training data than the teacher RoBERTa). See the roberta-base model card for further details on training.

Evaluation

When fine-tuned on downstream tasks, this model achieves the following results (see GitHub Repo):

Glue test results:

TaskMNLIQQPQNLISST-2CoLASTS-BMRPCRTE
84.089.490.892.559.388.386.667.9

Environmental Impact

Carbon emissions can be estimated using the Machine Learning Impact calculator presented in Lacoste et al. (2019).

  • Hardware Type: More information needed
  • Hours used: More information needed
  • Cloud Provider: More information needed
  • Compute Region: More information needed
  • Carbon Emitted: More information needed

Citation

@article{Sanh2019DistilBERTAD,
  title={DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lighter},
  author={Victor Sanh and Lysandre Debut and Julien Chaumond and Thomas Wolf},
  journal={ArXiv},
  year={2019},
  volume={abs/1910.01108}
}

APA

  • Sanh, V., Debut, L., Chaumond, J., & Wolf, T. (2019). DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lighter. arXiv preprint arXiv:1910.01108.

How to Get Started With the Model

You can use the model directly with a pipeline for masked language modeling:

>>> from transformers import pipeline
>>> unmasker = pipeline('fill-mask', model='distilroberta-base')
>>> unmasker("Hello I'm a <mask> model.")
[{'score': 0.04673689603805542,
  'sequence': "Hello I'm a business model.",
  'token': 265,
  'token_str': ' business'},
 {'score': 0.03846118599176407,
  'sequence': "Hello I'm a freelance model.",
  'token': 18150,
  'token_str': ' freelance'},
 {'score': 0.03308931365609169,
  'sequence': "Hello I'm a fashion model.",
  'token': 2734,
  'token_str': ' fashion'},
 {'score': 0.03018997237086296,
  'sequence': "Hello I'm a role model.",
  'token': 774,
  'token_str': ' role'},
 {'score': 0.02111748233437538,
  'sequence': "Hello I'm a Playboy model.",
  'token': 24526,
  'token_str': ' Playboy'}]

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

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

GPU в ailist

Универсальный рантайм · fill-mask

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

Подбираем GPU…

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

0 моделей