/ Модель

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

Контекст
514 токенов
Параметры
138 млн
Лицензия
MIT
Архитектура
camembert · dense
Базовая модель
camembert-base
Библиотека
transformers
Опубликована
15 дек 2023

NERmembert-base-3entities

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

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

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

Бенчмарки

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

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

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

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

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

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

NERmembert-base-3entities — модель для распознавания именованных сущностей во французском тексте, разработанная Centre Aquitain des Technologies de l'Information et Electroniques и автором Loïck Bourdois. Она основана на CamemBERT base, дообученной для выделения персон (PER), организаций (ORG) и географических объектов (LOC).

Модель обучалась на объединённом и очищенном наборе frenchNER_3entities из пяти французских датасетов для NER: около 420 тысяч размеченных предложений, включая обучающую, валидационную и тестовую выборки. Архитектура — CamembertForTokenClassification, размер — 137,8 млн параметров, максимальная длина контекста — 514 токенов. Модель принимает французский текст и возвращает метки сущностей для его токенов.

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

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

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

Ограничения

Модель размечает три типа сущностей — персон, организации и места; другие категории в README не заявлены. Таблицы с численными результатами оценки опущены, поэтому из доступного текста нельзя оценить точность.

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

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

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

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

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

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

Открыть на Hugging Face

NERmembert-base-3entities

Model Description

We present NERmembert-base-3entities, which is a CamemBERT base fine-tuned for the Name Entity Recognition task for the French language on five French NER datasets for 3 entities (LOC, PER, ORG).
All these datasets were concatenated and cleaned into a single dataset that we called frenchNER_3entities.
This represents a total of over 420,264 rows, of which 346,071 are for training, 32,951 for validation and 41,242 for testing.
Our methodology is described in a blog post available in English or French.

Dataset

The dataset used is frenchNER_3entities, which represents ~420k sentences labeled in 4 categories:

LabelExamples
PER"La Bruyère", "Gaspard de Coligny", "Wittgenstein"
ORG"UTBM", "American Airlines", "id Software"
LOC"République du Cap-Vert", "Créteil", "Bordeaux"

The distribution of the entities is as follows:

Evaluation results

The evaluation was carried out using the evaluate python package.

frenchNER_3entities

For space reasons, we show only the F1 of the different models. You can see the full results below the table.

In detail:

multiconer

For space reasons, we show only the F1 of the different models. You can see the full results below the table.

multinerd

For space reasons, we show only the F1 of the different models. You can see the full results below the table.

wikiner

For space reasons, we show only the F1 of the different models. You can see the full results below the table.

wikiann

For space reasons, we show only the F1 of the different models. You can see the full results below the table.

Usage

Code

from transformers import pipeline

ner = pipeline('token-classification', model='CATIE-AQ/NERmembert-base-3entities', tokenizer='CATIE-AQ/NERmembert-base-3entities', aggregation_strategy="simple")

result = ner(
"Le dévoilement du logo officiel des JO s'est déroulé le 21 octobre 2019 au Grand Rex. Ce nouvel emblème et cette nouvelle typographie ont été conçus par le designer Sylvain Boyer avec les agences Royalties & Ecobranding. Rond, il rassemble trois symboles : une médaille d'or, la flamme olympique et Marianne, symbolisée par un visage de femme mais privée de son bonnet phrygien caractéristique. La typographie dessinée fait référence à l'Art déco, mouvement artistique des années 1920, décennie pendant laquelle ont eu lieu pour la dernière fois les Jeux olympiques à Paris en 1924. Pour la première fois, ce logo sera unique pour les Jeux olympiques et les Jeux paralympiques."
)

print(result)
[{'entity_group': 'LOC', 'score': 0.9463236, 'word': 'Grand Rex', 'start': 75, 'end': 84},
{'entity_group': 'PER', 'score': 0.9865267, 'word': 'Sylvain Boyer', 'start': 165, 'end': 178},
{'entity_group': 'ORG', 'score': 0.8532809, 'word': 'Royalties', 'start': 196, 'end': 205},
{'entity_group': 'ORG', 'score': 0.9034991, 'word': 'Ecobranding', 'start': 208, 'end': 219},
{'entity_group': 'PER', 'score': 0.56342626, 'word': 'Marianne', 'start': 299, 'end': 307},
{'entity_group': 'LOC', 'score': 0.5433658, 'word': 'Paris', 'start': 568, 'end': 573}]

Try it through Space

A Space has been created to test the model. It is available here.

Training procedure

Training hyperparameters

The following hyperparameters were used during training:

  • learning_rate: 2e-05
  • train_batch_size: 8
  • eval_batch_size: 8
  • seed: 42
  • optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
  • lr_scheduler_type: linear
  • num_epochs: 3

Training results

Training LossEpochStepValidation LossPrecisionRecallF1Accuracy
0.02941.0436500.09030.92020.94270.93130.9835
0.02022.0873000.08520.92570.95140.93830.9854
0.01223.01309500.08760.92920.95340.94110.9858

Framework versions

  • Transformers 4.36.0
  • Pytorch 2.1.1
  • Datasets 2.14.7
  • Tokenizers 0.15.0

Environmental Impact

Carbon emissions were estimated using the Machine Learning Impact calculator presented in Lacoste et al. (2019). The hardware, runtime, cloud provider, and compute region were utilized to estimate the carbon impact.

  • Hardware Type: A100 PCIe 40/80GB
  • Hours used: 1h45min
  • Cloud Provider: Private Infrastructure
  • Carbon Efficiency (kg/kWh): 0.079 (estimated from electricitymaps for the day of December 15, 2023.)
  • Carbon Emitted (Power consumption x Time x Carbon produced based on location of power grid): 0.035 kg eq. CO2

Citations

NERembert-base-3entities

@misc {NERmembert2024,
    author       = { {BOURDOIS, Loïck} },  
    organization = { {Centre Aquitain des Technologies de l'Information et Electroniques} },  
	title        = { NERmembert-base-3entities },
	year         = 2024,
	url          = { https://huggingface.co/CATIE-AQ/NERmembert-base-3entities },
	doi          = { 10.57967/hf/1752 },
	publisher    = { Hugging Face }
}

multiconer

@inproceedings{multiconer2-report,  
    title={{SemEval-2023 Task 2: Fine-grained Multilingual Named Entity Recognition (MultiCoNER 2)}},  
    author={Fetahu, Besnik and Kar, Sudipta and Chen, Zhiyu and Rokhlenko, Oleg and Malmasi, Shervin},  
    booktitle={Proceedings of the 17th International Workshop on Semantic Evaluation (SemEval-2023)},  
    year={2023},  
    publisher={Association for Computational Linguistics}}

@article{multiconer2-data,  
    title={{MultiCoNER v2: a Large Multilingual dataset for Fine-grained and Noisy Named Entity Recognition}},  
    author={Fetahu, Besnik and Chen, Zhiyu and Kar, Sudipta and Rokhlenko, Oleg and Malmasi, Shervin},  
    year={2023}}

multinerd

@inproceedings{tedeschi-navigli-2022-multinerd,  
    title = "{M}ulti{NERD}: A Multilingual, Multi-Genre and Fine-Grained Dataset for Named Entity Recognition (and Disambiguation)",  
    author = "Tedeschi, Simone and  Navigli, Roberto",  
    booktitle = "Findings of the Association for Computational Linguistics: NAACL 2022",  
    month = jul,  
    year = "2022",  
    address = "Seattle, United States",  
    publisher = "Association for Computational Linguistics",  
    url = "https://aclanthology.org/2022.findings-naacl.60",  
    doi = "10.18653/v1/2022.findings-naacl.60",  
    pages = "801--812"}

pii-masking-200k

@misc {ai4privacy_2023,  
    author = { {ai4Privacy} },  
    title = { pii-masking-200k (Revision 1d4c0a1) },  
    year = 2023,  
    url = { https://huggingface.co/datasets/ai4privacy/pii-masking-200k },  
    doi = { 10.57967/hf/1532 },  
    publisher = { Hugging Face }}

wikiann

@inproceedings{rahimi-etal-2019-massively,  
    title = "Massively Multilingual Transfer for {NER}",  
    author = "Rahimi, Afshin and Li, Yuan and Cohn, Trevor",  
    booktitle = "Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics",  
    month = jul,  
    year = "2019",  
    address = "Florence, Italy",  
    publisher = "Association for Computational Linguistics",  
    url = "https://www.aclweb.org/anthology/P19-1015",  
    pages = "151--164"}

wikiner

@article{NOTHMAN2013151,  
    title = {Learning multilingual named entity recognition from Wikipedia},  
    journal = {Artificial Intelligence},  
    volume = {194},  
    pages = {151-175},  
    year = {2013},  
    note = {Artificial Intelligence, Wikipedia and Semi-Structured Resources},  
    issn = {0004-3702},  
    doi = {https://doi.org/10.1016/j.artint.2012.03.006},  
    url = {https://www.sciencedirect.com/science/article/pii/S0004370212000276},  
    author = {Joel Nothman and Nicky Ringland and Will Radford and Tara Murphy and James R. Curran}}

frenchNER_3entities

@misc {frenchNER2024,  
    author       = { {BOURDOIS, Loïck} },  
    organization  = { {Centre Aquitain des Technologies de l'Information et Electroniques} },  
    title        = { frenchNER_3entities },  
    year         = 2024,  
    url          = { https://huggingface.co/CATIE-AQ/frenchNER_3entities },  
    doi          = { 10.57967/hf/1751 },  
    publisher    = { Hugging Face }  
}

CamemBERT

@inproceedings{martin2020camembert,  
  title={CamemBERT: a Tasty French Language Model},  
  author={Martin, Louis and Muller, Benjamin and Su{\'a}rez, Pedro Javier Ortiz and Dupont, Yoann and Romary, Laurent and de la Clergerie, {\'E}ric Villemonte and Seddah, Djam{\'e} and Sagot, Beno{\^\i}t},  
  booktitle={Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics},  
  year={2020}}

License

MIT

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей