/ Модель

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

Контекст
514 токенов
Параметры
19,8 млн
Лицензия
MIT
Архитектура
xlm-roberta · dense
Опубликована
2 мая 2023

flare-it

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

Компактная итальянская модель на основе mMiniLMv2 для предсказания замаскированных слов и анализа текста.

144скачиваний за 30 дней2лайкавеса обновлены8 янв 2024

Бенчмарки

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

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

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

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

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

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

FLARE-IT — компактная модель для итальянского языка, разработанная авторами работы Blaze-IT: a lightweight BERT model for the Italian language. Это uncased-вариант на основе Microsoft mMiniLMv2, дополнительно предобученный методом masked language modeling на итальянской Википедии. В README указаны 17 млн параметров, словарь из 14 610 токенов и размер 67 МБ; метаданные Hugging Face указывают 19,8 млн параметров и контекст до 514 токенов.

Модель предназначена для предсказания замаскированных токенов и как компактная основа для анализа итальянского текста. Авторы приводят результаты последующего дообучения на разметке частей речи и именованных сущностей, однако сама модель опубликована с задачей fill-mask. Она рассчитана на быстрый анализ больших объёмов грамотного веб-текста, новостей и вики-страниц. Лицензия — MIT.

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

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

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

Ограничения

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

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

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

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

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

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

Открыть на Hugging Face


This model is a lightweight and uncased version of MiniLM [1] for the Italian language. Its 17M parameters and 67MB size make it 85% lighter than a typical mono-lingual BERT model. It is ideal when memory consumption and execution speed are critical while maintaining high-quality results.

Flare-IT is part of the publication "Blaze-IT: a lightweight BERT model for the Italian language", which has been accepted at AILC CLiC-IT 2023 and published in the conference proceedings. You can find the proceedings here: https://clic2023.ilc.cnr.it/proceedings/ And the published paper here: https://ceur-ws.org/Vol-3596/paper43.pdf

The model builds on mMiniLMv2 [1] (from Microsoft: L6xH384 mMiniLMv2) as a starting point, focusing it on the Italian language while at the same time turning it into an uncased model by modifying the embedding layer (as in [2], but computing document-level frequencies over the Wikipedia dataset and setting a frequency threshold of 0.1%), which brings a considerable reduction in the number of parameters.

To compensate for the deletion of cased tokens, which now forces the model to exploit lowercase representations of words previously capitalized, the model has been further pre-trained on the Italian split of the Wikipedia dataset, using the whole word masking [3] technique to make it more robust to the new uncased representations.

The resulting model has 17M parameters, a vocabulary of 14.610 tokens, and a size of 67MB, which makes it 85% lighter than a typical mono-lingual BERT model and 75% lighter than a standard mono-lingual DistilBERT model.

The model has been trained for masked language modeling on the Italian Wikipedia (~3GB) dataset for 10K steps, using the AdamW optimizer, with a batch size of 512 (obtained through 128 gradient accumulation steps), a sequence length of 512, and a linearly decaying learning rate starting from 5e-5. The training has been performed using dynamic masking between epochs and exploiting the whole word masking technique.

The following metrics have been computed on the Part of Speech Tagging and Named Entity Recognition tasks, using the UD Italian ISDT and WikiNER datasets, respectively. The PoST model has been trained for 5 epochs, and the NER model for 3 epochs, both with a constant learning rate, fixed at 1e-5. For Part of Speech Tagging, the metrics have been computed on the default test set provided with the dataset, while for Named Entity Recognition the metrics have been computed with a 5-fold cross-validation

TaskRecallPrecisionF1
Part of Speech Tagging95.6495.3295.45
Named Entity Recognition82.2780.6481.29

The metrics have been computed at the token level and macro-averaged over the classes.

You can try the model online (fine-tuned on named entity recognition) using this web app: https://huggingface.co/spaces/osiria/flare-it-demo

from transformers import AutoTokenizer, XLMRobertaForMaskedLM
from transformers import pipeline

tokenizer = AutoTokenizer.from_pretrained("osiria/flare-it")
model = XLMRobertaForMaskedLM.from_pretrained("osiria/flare-it")
pipeline_mlm = pipeline(task="fill-mask", model=model, tokenizer=tokenizer)

This lightweight model has been further pre-trained on Wikipedia, so it's particularly suitable as an agile analyzer for large volumes of natively digital text from the world wide web, written in a correct and fluent form (like wikis, web pages, news, etc.). However, it may show limitations when it comes to chaotic text, containing errors and slang expressions (like social media posts) or when it comes to domain-specific text (like medical, financial or legal content).

[1] https://arxiv.org/abs/2012.15828

[2] https://arxiv.org/abs/2010.05609

[3] https://arxiv.org/abs/1906.08101

The model is released under MIT license

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
XLMRobertaForMaskedLM
Ревизия весов
79c7ba3

0 моделей