/ Модель

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

Контекст
514 токенов
Параметры
152 млн
Архитектура
roberta · dense

roberta-hindi

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

Предобученная RoBERTa-модель для хинди, которая заполняет замаскированные фрагменты текста и может дообучаться для задач понимания языка.

202скачиваний за 30 дней2лайкавеса обновлены20 июл 2021

Бенчмарки

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

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

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

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

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

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

RoBERTa Hindi — предобученная языковая модель на архитектуре RoBERTa для языка хинди, созданная участниками Flax/JAX Community Week при поддержке Hugging Face и Google. Модель содержит около 151,8 млн параметров и обучена предсказывать замаскированные токены по корпусам mC4, OSCAR и наборам данных для индийских языков, включая IndicGLUE и Samanantar, а также материалы хинди-новостей и газет.

Модель предназначена для заполнения пропусков в тексте на хинди и может служить основой для дообучения под задачи понимания языка, например классификацию новостей, анализ тональности и разметку именованных сущностей. Она принимает текстовые фрагменты длиной до 512 токенов; применяются токенизация byte-level BPE и словарь из 50 265 токенов. Доступны версии весов PyTorch и Flax.

В README приведены результаты оценки на задачах классификации новостей, распознавания именованных сущностей и анализа отзывов, но качество зависит от набора данных и конкретной задачи. Модель ориентирована на хинди и не описана как универсальная многоязычная модель. Лицензия в предоставленных сведениях не указана.

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

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

Ограничения

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

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

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

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

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

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

Открыть на Hugging Face

RoBERTa base model for Hindi language

Pretrained model on Hindi language using a masked language modeling (MLM) objective. A more interactive & comparison demo is available here.

This is part of the Flax/Jax Community Week, organized by Hugging Face and TPU usage sponsored by Google.

Model description

RoBERTa Hindi is a transformers model pretrained on a large corpus of Hindi data(a combination of mc4, oscar and indic-nlp datasets)

How to use

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

>>> from transformers import pipeline
>>> unmasker = pipeline('fill-mask', model='flax-community/roberta-hindi')
>>> unmasker("हम आपके सुखद <mask> की कामना करते हैं")
[{'score': 0.3310680091381073,
  'sequence': 'हम आपके सुखद सफर की कामना करते हैं',
  'token': 1349,
  'token_str': ' सफर'},
 {'score': 0.15317578613758087,
  'sequence': 'हम आपके सुखद पल की कामना करते हैं',
  'token': 848,
  'token_str': ' पल'},
 {'score': 0.07826550304889679,
  'sequence': 'हम आपके सुखद समय की कामना करते हैं',
  'token': 453,
  'token_str': ' समय'},
 {'score': 0.06304813921451569,
  'sequence': 'हम आपके सुखद पहल की कामना करते हैं',
  'token': 404,
  'token_str': ' पहल'},
 {'score': 0.058322224766016006,
  'sequence': 'हम आपके सुखद अवसर की कामना करते हैं',
  'token': 857,
  'token_str': ' अवसर'}]

Training data

The RoBERTa Hindi model was pretrained on the reunion of the following datasets:

  • OSCAR is a huge multilingual corpus obtained by language classification and filtering of the Common Crawl corpus using the goclassy architecture.
  • mC4 is a multilingual colossal, cleaned version of Common Crawl's web crawl corpus.
  • IndicGLUE is a natural language understanding benchmark.
  • Samanantar is a parallel corpora collection for Indic language.
  • Hindi Text Short and Large Summarization Corpus is a collection of ~180k articles with their headlines and summary collected from Hindi News Websites.
  • Hindi Text Short Summarization Corpus is a collection of ~330k articles with their headlines collected from Hindi News Websites.
  • Old Newspapers Hindi is a cleaned subset of HC Corpora newspapers.

Training procedure

Preprocessing

The texts are tokenized using a byte version of Byte-Pair Encoding (BPE) and a vocabulary size of 50265. The inputs of the model take pieces of 512 contiguous token that may span over documents. The beginning of a new document is marked with <s> and the end of one by </s>.

  • We had to perform cleanup of mC4 and oscar datasets by removing all non hindi (non Devanagari) characters from the datasets.
  • We tried to filter out evaluation set of WikiNER of IndicGlue benchmark by manual labelling where the actual labels were not correct and modifying the downstream evaluation dataset.

The details of the masking procedure for each sentence are the following:

  • 15% of the tokens are masked.
  • In 80% of the cases, the masked tokens are replaced by <mask>.
  • In 10% of the cases, the masked tokens are replaced by a random token (different) from the one they replace.
  • In the 10% remaining cases, the masked tokens are left as is. Contrary to BERT, the masking is done dynamically during pretraining (e.g., it changes at each epoch and is not fixed).

Pretraining

The model was trained on Google Cloud Engine TPUv3-8 machine (with 335 GB of RAM, 1000 GB of hard drive, 96 CPU cores).A randomized shuffle of combined dataset of mC4, oscar and other datasets listed above was used to train the model. Training logs are present in wandb.

Evaluation Results

RoBERTa Hindi is evaluated on various downstream tasks. The results are summarized below.

TaskTask TypeIndicBERTHindiBERTaIndic Transformers Hindi BERTRoBERTa Hindi Guj SanRoBERTa Hindi
BBC News ClassificationGenre Classification76.4466.8677.664.973.67
WikiNERToken Classification-90.6895.0989.6192.76
IITP Product ReviewsSentiment Analysis78.0173.2378.3966.1675.53
IITP Movie ReviewsSentiment Analysis60.9752.2670.6549.3561.29

Team Members

Credits

Huge thanks to Hugging Face 🤗 & Google Jax/Flax team for such a wonderful community week, especially for providing such massive computing resources. Big thanks to Suraj Patil & Patrick von Platen for mentoring during the whole week.

<img src=https://pbs.twimg.com/media/E443fPjX0AY1BsR.jpg:medium>

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей