/ Модель

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

Контекст
512 токенов
Лицензия
Apache 2.0
Архитектура
distilbert · dense
Базовая модель
distilbert-base-cased
Опубликована
25 янв 2024

distilbert-NER

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

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

188 тыс.скачиваний за 30 дней54лайкавеса обновлены8 окт 2024

Бенчмарки

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

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

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

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

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

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

distilbert-NER — англоязычная модель распознавания именованных сущностей, созданная dslim путём дообучения DistilBERT. Она размечает токены в тексте тегами для людей (PER), организаций (ORG), мест (LOC) и прочих сущностей (MISC), включая начало и продолжение сущности.

Модель основана на DistilBERT с архитектурой DistilBertForTokenClassification и содержит 66 млн параметров. Она обучена на английском наборе CoNLL-2003 и принимает контекст до 512 токенов. Компактность DistilBERT помогает снизить размер и ускорить обработку по сравнению с BERT, сохраняя пригодность для извлечения сущностей из новостных и сходных текстов.

Качество может снижаться на текстах, заметно отличающихся от CoNLL-2003; возможны ошибки разметки в сложных предложениях и смещения, унаследованные от обучающих данных. Лицензия — Apache-2.0.

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

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

Ограничения

Обучение на CoNLL-2003 может ограничивать качество на существенно отличающихся текстах; в сложных предложениях возможны ошибки классификации сущностей и смещения обучающих данных.

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

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

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

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

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

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

Открыть на Hugging Face

distilbert-NER

If my open source models have been useful to you, please consider supporting me in building small, useful AI models for everyone (and help me afford med school / help out my parents financially). Thanks!

Model description

distilbert-NER is the fine-tuned version of DistilBERT, which is a distilled variant of the BERT model. DistilBERT has fewer parameters than BERT, making it smaller, faster, and more efficient. distilbert-NER is specifically fine-tuned for the task of Named Entity Recognition (NER).

This model accurately identifies the same four types of entities as its BERT counterparts: location (LOC), organizations (ORG), person (PER), and Miscellaneous (MISC). Although it is a more compact model, distilbert-NER demonstrates a robust performance in NER tasks, balancing between size, speed, and accuracy.

The model was fine-tuned on the English version of the CoNLL-2003 Named Entity Recognition dataset, which is widely recognized for its comprehensive and diverse range of entity types.

Available NER models

Model NameDescriptionParameters
distilbert-NERFine-tuned DistilBERT - a smaller, faster, lighter version of BERT66M
bert-large-NERFine-tuned bert-large-cased - larger model with slightly better performance340M
bert-base-NER-(uncased)Fine-tuned bert-base, available in both cased and uncased versions110M

Intended uses & limitations

How to use

This model can be utilized with the Transformers pipeline for NER, similar to the BERT models.

from transformers import AutoTokenizer, AutoModelForTokenClassification
from transformers import pipeline

tokenizer = AutoTokenizer.from_pretrained("dslim/distilbert-NER")
model = AutoModelForTokenClassification.from_pretrained("dslim/distilbert-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

The performance of distilbert-NER is linked to its training on the CoNLL-2003 dataset. Therefore, it might show limited effectiveness on text data that significantly differs from this training set. Users should be aware of potential biases inherent in the training data and the possibility of entity misclassification in complex sentences.

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-MISCBeginning of a miscellaneous entity right after another miscellaneous entity
I-MISCMiscellaneous 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

MetricScore
Loss0.0710
Precision0.9202
Recall0.9232
F10.9217
Accuracy0.9810

The training and validation losses demonstrate a decrease over epochs, signaling effective learning. The precision, recall, and F1 scores are competitive, showcasing the model's robustness in NER tasks.

BibTeX entry and citation info

For DistilBERT:

@article{sanh2019distilbert,
  title={DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lighter},
  author={Sanh, Victor and Debut, Lysandre and Chaumond, Julien and Wolf, Thomas},
  journal={arXiv preprint arXiv:1910.01108},
  year={2019}
}

For the underlying BERT model:

@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 = {db

lp computer science bibliography, https://dblp.org}
}

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей