/ Модель

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

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

minilm-l6-h384-italian-cased-ner

Разметка токеновТекст → label
208скачиваний за 30 дней0лайковвеса обновлены14 дек 2024

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

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

Русское описание этой модели ещё готовится. Пока можно заглянуть в карточку модели от автора ниже.

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

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

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

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

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

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

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

Открыть на Hugging Face


This is a MiniLMv2 [1] cased model for the Italian language, fine-tuned for Named Entity Recognition (Person, Location, Organization and Miscellanea classes) on the WikiNER dataset [2], using minilm-l6-h384-italian-cased as a pre-trained model.

The model is trained to perform entity recognition over 4 classes: PER (persons), LOC (locations), ORG (organizations), MISC (miscellanea, mainly events, products and services). It has been fine-tuned for Named Entity Recognition, using the WikiNER Italian dataset plus an additional custom dataset of manually annotated Wikipedia paragraphs. The WikiNER dataset has been splitted in 102.352 training instances and 25.588 test instances, and the model has been trained for 1 epoch with a constant learning rate of 1e-5.

The performances on the test set are reported in the following table:

RecallPrecisionF1
80.8485.3282.85

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

Then, since WikiNER is an automatically annotated (silver standard) dataset, which sometimes contains imperfect annotations, an additional fine-tuning on ~3.500 manually annotated paragraphs has been performed.

from transformers import AutoTokenizer, AutoModelForTokenClassification
import string

tokenizer = AutoTokenizer.from_pretrained("osiria/minilm-l6-h384-italian-cased-ner")
model = AutoModelForTokenClassification.from_pretrained("osiria/minilm-l6-h384-italian-cased-ner")

from transformers import pipeline
ner = pipeline("ner", model = model, tokenizer = tokenizer, aggregation_strategy="simple")

text = "Mi chiamo Marco Rossi, vivo a Roma e lavoro per l'Agenzia Spaziale Italiana, dove mi occupo del controllo del satellite Prisma"
for p in string.punctuation:
    text = text.replace(p, " " + p + " ")

ner(text)

[{'entity_group': 'PER',
  'score': 0.8044705,
  'word': 'Marco Rossi',
  'start': 10,
  'end': 21},
 {'entity_group': 'LOC',
  'score': 0.8467228,
  'word': 'Roma',
  'start': 32,
  'end': 36},
 {'entity_group': 'ORG',
  'score': 0.72725743,
  'word': 'Agenzia Spaziale Italiana',
  'start': 54,
  'end': 79},
 {'entity_group': 'MISC',
  'score': 0.7243446,
  'word': 'Prisma',
  'start': 126,
  'end': 132}]

You can also try the model online using this web app: https://huggingface.co/spaces/osiria/minilm-l6-h384-italian-cased-ner

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

[2] https://www.sciencedirect.com/science/article/pii/S0004370212000276

This model is mainly trained on Wikipedia, so it's particularly suitable for 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).

The model is released under MIT license

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
XLMRobertaForTokenClassification
Ревизия весов
125c646

0 моделей