/ Модель

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

Контекст
512 токенов
Лицензия
CC BY-NC-SA 4.0
Архитектура
span-marker · dense
Базовая модель
bert-base-multilingual-cased
Библиотека
span-marker
Опубликована
7 авг 2023

span-marker-mbert-base-multinerd

Разметка токеновТекст → label9 профессий

Многоязычная модель NER на базе SpanMarker и multilingual BERT для поиска имен, организаций, мест и других сущностей в тексте.

50 072скачиваний за 30 дней72лайкавеса обновлены12 сен 2023

Бенчмарки

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

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

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

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

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

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

Модель tomaarsen/span-marker-mbert-base-multinerd — модель для распознавания именованных сущностей (NER), разработанная на базе SpanMarker и обученная на датасете MultiNERD. В качестве кодировщика используется bert-base-multilingual-cased; модель дообучена для классификации фрагментов текста и выделения сущностей.

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

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

Ограничения

Вариант с регистрозависимым кодировщиком может хуже справляться с текстами, где регистр букв часто нарушен; для таких данных в карточке рекомендован uncased-вариант. Лицензия CC BY-NC-SA 4.0 ограничивает коммерческое использование.

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

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

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

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

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

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

Открыть на Hugging Face

SpanMarker for Multilingual Named Entity Recognition

This is a SpanMarker model that can be used for multilingual Named Entity Recognition trained on the MultiNERD dataset. In particular, this SpanMarker model uses bert-base-multilingual-cased as the underlying encoder. See train.py for the training script.

Is your data not (always) capitalized correctly? Then consider using this uncased variant of this model by @lxyuan for better performance: lxyuan/span-marker-bert-base-multilingual-uncased-multinerd.

Metrics

LanguagePrecisionRecallF1
all93.3991.5992.48
de95.2194.3294.76
en95.0795.2995.18
es93.5089.6591.53
fr93.8690.0791.92
it91.6393.5792.59
nl94.8691.7493.27
pl93.5191.8392.66
pt94.4891.3092.86
ru93.7093.1093.39
zh88.3685.7187.02

Label set

ClassDescriptionExamples
PER (person)PeopleRay Charles, Jessica Alba, Leonardo DiCaprio, Roger Federer, Anna Massey.
ORG (organization)Associations, companies, agencies, institutions, nationalities and religious or political groupsUniversity of Edinburgh, San Francisco Giants, Google, Democratic Party.
LOC (location)Physical locations (e.g. mountains, bodies of water), geopolitical entities (e.g. cities, states), and facilities (e.g. bridges, buildings, airports).Rome, Lake Paiku, Chrysler Building, Mount Rushmore, Mississippi River.
ANIM (animal)Breeds of dogs, cats and other animals, including their scientific names.Maine Coon, African Wild Dog, Great White Shark, New Zealand Bellbird.
BIO (biological)Genus of fungus, bacteria and protoctists, families of viruses, and other biological entities.Herpes Simplex Virus, Escherichia Coli, Salmonella, Bacillus Anthracis.
CEL (celestial)Planets, stars, asteroids, comets, nebulae, galaxies and other astronomical objects.Sun, Neptune, Asteroid 187 Lamberta, Proxima Centauri, V838 Monocerotis.
DIS (disease)Physical, mental, infectious, non-infectious, deficiency, inherited, degenerative, social and self-inflicted diseases.Alzheimer’s Disease, Cystic Fibrosis, Dilated Cardiomyopathy, Arthritis.
EVE (event)Sport events, battles, wars and other events.American Civil War, 2003 Wimbledon Championships, Cannes Film Festival.
FOOD (food)Foods and drinks.Carbonara, Sangiovese, Cheddar Beer Fondue, Pizza Margherita.
INST (instrument)Technological instruments, mechanical instruments, musical instruments, and other tools.Spitzer Space Telescope, Commodore 64, Skype, Apple Watch, Fender Stratocaster.
MEDIA (media)Titles of films, books, magazines, songs and albums, fictional characters and languages.Forbes, American Psycho, Kiss Me Once, Twin Peaks, Disney Adventures.
PLANT (plant)Types of trees, flowers, and other plants, including their scientific names.Salix, Quercus Petraea, Douglas Fir, Forsythia, Artemisia Maritima.
MYTH (mythological)Mythological and religious entities.Apollo, Persephone, Aphrodite, Saint Peter, Pope Gregory I, Hercules.
TIME (time)Specific and well-defined time intervals, such as eras, historical periods, centuries, years and important days. No months and days of the week.Renaissance, Middle Ages, Christmas, Great Depression, 17th Century, 2012.
VEHI (vehicle)Cars, motorcycles and other vehicles.Ferrari Testarossa, Suzuki Jimny, Honda CR-X, Boeing 747, Fairey Fulmar.

Usage

To use this model for inference, first install the span_marker library:

pip install span_marker

You can then run inference with this model like so:

from span_marker import SpanMarkerModel

# Download from the 🤗 Hub
model = SpanMarkerModel.from_pretrained("tomaarsen/span-marker-mbert-base-multinerd")
# Run inference
entities = model.predict("Amelia Earhart flew her single engine Lockheed Vega 5B across the Atlantic to Paris.")

See the SpanMarker repository for documentation and additional information on this library.

Training procedure

Training hyperparameters

The following hyperparameters were used during training:

  • learning_rate: 5e-05
  • train_batch_size: 32
  • eval_batch_size: 32
  • seed: 42
  • optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
  • lr_scheduler_type: linear
  • lr_scheduler_warmup_ratio: 0.1
  • num_epochs: 1

Training results

Training LossEpochStepValidation LossOverall PrecisionOverall RecallOverall F1Overall Accuracy
0.01790.0110000.01460.81010.76160.78510.9530
0.00990.0220000.00910.85710.84250.84980.9663
0.00850.0330000.00780.87290.85790.86530.9700
0.00750.0440000.00720.88210.87240.87720.9739
0.00740.0550000.00750.86220.88410.87300.9722
0.00740.0660000.00670.90560.85680.88050.9749
0.00660.0770000.00650.90820.85430.88040.9737
0.00630.0880000.00660.90390.86170.88230.9745
0.00620.0990000.00620.93230.84250.88520.9754
0.0070.1100000.00660.88980.87580.88270.9746
0.0060.11110000.00610.89860.88410.89130.9766
0.0060.12120000.00610.91710.86280.88910.9763
0.00620.13130000.00600.92640.86340.89380.9772
0.00590.14140000.00590.93230.85080.88970.9763
0.00590.15150000.00600.90110.88150.89120.9758
0.00590.16160000.00600.92210.85980.88980.9763
0.00560.17170000.00580.90980.88390.89670.9775
0.00550.18180000.00600.91030.87390.89170.9765
0.00540.19190000.00560.91350.87260.89250.9774
0.00520.2200000.00580.91080.88340.89690.9773
0.00530.21210000.00580.90380.88660.89510.9773
0.00570.22220000.00570.91300.87620.89420.9775
0.00560.23230000.00530.93750.86040.89730.9781
0.0050.24240000.00540.92530.88220.90320.9784
0.00550.25250000.00550.91820.88070.89910.9787
0.00490.26260000.00530.93110.87020.89970.9783
0.00510.27270000.00540.91920.88770.90320.9787
0.00510.28280000.00530.93320.87830.90490.9795
0.00490.29290000.00540.93110.86720.89810.9789
0.00470.3300000.00540.91650.89540.90580.9796
0.0050.31310000.00520.90790.90160.90470.9787
0.00510.32320000.00510.91570.90010.90780.9796
0.00460.33330000.00510.91470.89350.90400.9788
0.00460.34340000.00500.92290.88470.90340.9793
0.0050.35350000.00510.91980.89220.90580.9796
0.00470.36360000.00500.93210.88900.91000.9807
0.00480.37370000.00500.90460.91330.90890.9800
0.00460.38380000.00510.91700.89730.90710.9806
0.00480.39390000.00500.94170.87750.90840.9805
0.00420.4400000.00490.92380.89370.90850.9797
0.00380.41410000.00480.93710.89200.91400.9812
0.00420.42420000.00480.93590.88620.91040.9808
0.00510.43430000.00490.90800.90600.90700.9805
0.00370.44440000.00490.93280.88770.90970.9801
0.00410.45450000.00490.92310.89750.91010.9813
0.00460.46460000.00460.93080.89430.91220.9812
0.00380.47470000.00470.92910.89690.91270.9815
0.00430.48480000.00460.93080.89090.91040.9804
0.00430.49490000.00460.92780.89540.91130.9800
0.00390.5500000.00470.91730.90730.91230.9817
0.00430.51510000.00450.93470.89620.91500.9821
0.00470.52520000.00450.92660.90160.91390.9810
0.00350.53530000.00460.91650.91220.91440.9820
0.00380.54540000.00460.92310.90500.91390.9823
0.00360.55550000.00460.93310.90050.91650.9828
0.00370.56560000.00470.92460.90160.91290.9821
0.00350.57570000.00440.93510.90030.91740.9829
0.00430.57580000.00430.92570.90790.91670.9826
0.0040.58590000.00430.92860.90650.91740.9823
0.00410.59600000.00440.93240.90500.91850.9825
0.00390.6610000.00440.92680.90410.91530.9815
0.00380.61620000.00430.93670.89180.91370.9819
0.00370.62630000.00440.92490.91600.92050.9833
0.00360.63640000.00430.93980.89750.91810.9827
0.00360.64650000.00430.92600.91180.91880.9829
0.00350.65660000.00440.93750.89880.91780.9828
0.00340.66670000.00430.92720.91430.92070.9833
0.00330.67680000.00440.93320.90240.91760.9827
0.00350.68690000.00440.93960.89810.91840.9825
0.00380.69700000.00420.92650.91630.92140.9827
0.00350.7710000.00440.93750.90130.91910.9827
0.00370.71720000.00420.92640.91710.92170.9830
0.00390.72730000.00430.93990.90030.91970.9826
0.00390.73740000.00410.93410.90940.92160.9832
0.00350.74750000.00420.93010.91600.92300.9837
0.00370.75760000.00420.93420.91070.92230.9835
0.00340.76770000.00420.93310.91180.92230.9836
0.0030.77780000.00410.93300.91350.92310.9838
0.00340.78790000.00410.93080.90820.91930.9832
0.00370.79800000.00400.93460.91280.92360.9839
0.00320.8810000.00410.93890.91280.92570.9841
0.00310.81820000.00400.92930.91630.92270.9836
0.00320.82830000.00410.93050.91600.92320.9835
0.00340.83840000.00410.93270.91180.92210.9838
0.00280.84850000.00410.92790.92160.92470.9839
0.00310.85860000.00410.93260.91670.92460.9838
0.00290.86870000.00400.93540.91580.92550.9841
0.00310.87880000.00410.93270.91560.92410.9840
0.00330.88890000.00400.93670.91410.92530.9846
0.00310.89900000.00400.93790.91410.92590.9844
0.00310.9910000.00400.92970.91840.92400.9843
0.00340.91920000.00400.92990.91880.92430.9843
0.00360.92930000.00390.93240.91750.92490.9843
0.00280.93940000.00390.93990.91350.92650.9848
0.00290.94950000.00400.93420.91730.92570.9845
0.0030.95960000.00400.93780.91840.92800.9850
0.00290.96970000.00390.93800.91520.92640.9847
0.0030.97980000.00390.93720.91560.92630.9849
0.0030.98990000.00390.93870.91670.92760.9851
0.00310.991000000.00390.93730.91770.92740.9849

Framework versions

  • SpanMarker 1.2.4
  • Transformers 4.28.1
  • Pytorch 1.13.1+cu117
  • Datasets 2.12.0
  • Tokenizers 0.13.2

See also

Contributions

Many thanks to Simone Tedeschi from Babelscape for his insight when training this model and his involvement in the creation of the training dataset.

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

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

GPU в ailist

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

Нельзя запустить

Модели SpanMarker требуют отдельного рантайма.

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

0 моделей