/ Модель

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

Контекст
512 токенов
Параметры
136 млн
Лицензия
MIT
Опубликована
24 мар 2022

bert-base-NER

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

Англоязычная модель на основе BERT для извлечения имён людей, организаций, местоположений и других именованных сущностей из текста.

113скачиваний за 30 дней2лайкавеса обновлены24 мар 2022

Бенчмарки

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

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

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

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

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

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

optimum/bert-base-NER — англоязычная модель распознавания именованных сущностей, созданная на основе bert-base-cased и дообученная на датасете CoNLL-2003. Она классифицирует токены текста, отмечая имена людей, организации, местоположения и сущности категории MISC; подходит для извлечения таких упоминаний из новостных и других англоязычных текстов. Модель построена на архитектуре BERT для классификации токенов, содержит 135,5 млн параметров, принимает контекст до 512 токенов и доступна в формате ONNX.

В карточке приведены результаты оценки на CoNLL-2003: F1 91,3 на тестовой выборке. Обучение на новостных статьях Reuters ограничивает переносимость на другие жанры и предметные области; иногда модель помечает отдельные части слов, поэтому может потребоваться постобработка. Лицензия — MIT.

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

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

Ограничения

Модель обучена на англоязычных новостных статьях Reuters и может хуже переноситься на другие жанры и предметные области. Иногда она помечает части слов как сущности, поэтому может потребоваться постобработка.

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

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

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

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

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

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

Открыть на Hugging Face

ONNX convert of bert-base-NER

Conversion of bert-base-NER

Model description

bert-base-NER is a fine-tuned BERT model that is ready to use for Named Entity Recognition and achieves state-of-the-art performance for the NER task. It has been trained to recognize four types of entities: location (LOC), organizations (ORG), person (PER) and Miscellaneous (MISC).

Specifically, this model is a bert-base-cased model that was fine-tuned on the English version of the standard CoNLL-2003 Named Entity Recognition dataset.

If you'd like to use a larger BERT-large model fine-tuned on the same dataset, a bert-large-NER version is also available.

Intended uses & limitations

How to use

You can use this model with Transformers pipeline for NER.

from transformers import AutoTokenizer, AutoModelForTokenClassification
from transformers import pipeline

tokenizer = AutoTokenizer.from_pretrained("dslim/bert-base-NER")
model = AutoModelForTokenClassification.from_pretrained("dslim/bert-base-NER")

nlp = pipeline("ner", model=model, tokenizer=tokenizer)
example = "My name is Wolfgang and I live in Berlin"

ner_results = nlp(example)
print(ner_results)

Limitations and bias

This model is limited by its training dataset of entity-annotated news articles from a specific span of time. This may not generalize well for all use cases in different domains. Furthermore, the model occassionally tags subword tokens as entities and post-processing of results may be necessary to handle those cases.

Training data

This model was fine-tuned on English version of the standard CoNLL-2003 Named Entity Recognition dataset.

The training dataset distinguishes between the beginning and continuation of an entity so that if there are back-to-back entities of the same type, the model can output where the second entity begins. As in the dataset, each token will be classified as one of the following classes:

AbbreviationDescription
OOutside of a named entity
B-MISBeginning of a miscellaneous entity right after another miscellaneous entity
I-MISMiscellaneous entity
B-PERBeginning of a person’s name right after another person’s name
I-PERPerson’s name
B-ORGBeginning of an organization right after another organization
I-ORGorganization
B-LOCBeginning of a location right after another location
I-LOCLocation

CoNLL-2003 English Dataset Statistics

This dataset was derived from the Reuters corpus which consists of Reuters news stories. You can read more about how this dataset was created in the CoNLL-2003 paper.

# of training examples per entity type

DatasetLOCMISCORGPER
Train7140343863216600
Dev183792213411842
Test166870216611617

# of articles/sentences/tokens per dataset

DatasetArticlesSentencesTokens
Train94614,987203,621
Dev2163,46651,362
Test2313,68446,435

Training procedure

This model was trained on a single NVIDIA V100 GPU with recommended hyperparameters from the original BERT paper which trained & evaluated the model on CoNLL-2003 NER task.

Eval results

metricdevtest
f195.191.3
precision95.090.7
recall95.391.9

The test metrics are a little lower than the official Google BERT results which encoded document context & experimented with CRF. More on replicating the original results here.

BibTeX entry and citation info

@article{DBLP:journals/corr/abs-1810-04805,
  author    = {Jacob Devlin and
               Ming{-}Wei Chang and
               Kenton Lee and
               Kristina Toutanova},
  title     = {{BERT:} Pre-training of Deep Bidirectional Transformers for Language
               Understanding},
  journal   = {CoRR},
  volume    = {abs/1810.04805},
  year      = {2018},
  url       = {http://arxiv.org/abs/1810.04805},
  archivePrefix = {arXiv},
  eprint    = {1810.04805},
  timestamp = {Tue, 30 Oct 2018 20:39:56 +0100},
  biburl    = {https://dblp.org/rec/journals/corr/abs-1810-04805.bib},
  bibsource = {dblp computer science bibliography, https://dblp.org}
}
@inproceedings{tjong-kim-sang-de-meulder-2003-introduction,
    title = "Introduction to the {C}o{NLL}-2003 Shared Task: Language-Independent Named Entity Recognition",
    author = "Tjong Kim Sang, Erik F.  and
      De Meulder, Fien",
    booktitle = "Proceedings of the Seventh Conference on Natural Language Learning at {HLT}-{NAACL} 2003",
    year = "2003",
    url = "https://www.aclweb.org/anthology/W03-0419",
    pages = "142--147",
}

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

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

GPU в ailist

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

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

В репозитории нет весов в формате PyTorch/safetensors.

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

0 моделей