/ Модель

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

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

NERmembert-large-4entities

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

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

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

Бенчмарки

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

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

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

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

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

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

NERmembert-large-4entities — модель CamemBERT large, дообученная Лои́ком Бурдуа из Centre Aquitain des Technologies de l'Information et Electroniques для распознавания именованных сущностей во французском тексте. Она присваивает метки токенам и выделяет четыре типа сущностей: людей (PER), организации (ORG), географические названия (LOC) и прочие сущности (MISC).

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

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

Ограничения

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

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

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

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

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

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

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

Открыть на Hugging Face

NERmembert-large-4entities

Model Description

We present NERmembert-large-4entities, which is a CamemBERT large fine-tuned for the Name Entity Recognition task for the French language on four French NER datasets for 4 entities (LOC, PER, ORG, MISC).
All these datasets were concatenated and cleaned into a single dataset that we called frenchNER_4entities.
There are a total of 384,773 rows, of which 328,757 are for training, 24,131 for validation and 31,885 for testing.
Our methodology is described in a blog post available in English or French.

Dataset

The dataset used is frenchNER_4entities, which represents ~385k 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"
MISC"Wolfenstein 3D", "Révolution française", "Coupe du monde de football"

The distribution of the entities is as follows:

Evaluation results

The evaluation was carried out using the evaluate python package.

frenchNER_4entities

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.

Usage

Code

from transformers import pipeline

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

results = 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': 'MISC', 'score': 0.9922348, 'word': 'JO', 'start': 35, 'end': 38},
{'entity_group': 'LOC', 'score': 0.9995632, 'word': 'Grand Rex', 'start': 74, 'end': 84},
{'entity_group': 'PER', 'score': 0.99612623, 'word': 'Sylvain Boyer', 'start': 164, 'end': 178},
{'entity_group': 'ORG', 'score': 0.87376696, 'word': 'Royalties & Ecobranding', 'start': 195, 'end': 219},
{'entity_group': 'PER', 'score': 0.8121169, 'word': 'Marianne', 'start': 298, 'end': 307},
{'entity_group': 'MISC', 'score': 0.7016645, 'word': 'Art déco', 'start': 438, 'end': 446},
{'entity_group': 'MISC', 'score': 0.99880475, 'word': 'Jeux olympiques', 'start': 549, 'end': 565},
{'entity_group': 'LOC', 'score': 0.98473144, 'word': 'Paris', 'start': 567, 'end': 573},
{'entity_group': 'MISC', 'score': 0.99421215, 'word': 'Jeux olympiques', 'start': 634, 'end': 650},
{'entity_group': 'MISC', 'score': 0.9936283, 'word': 'Jeux paralympiques', 'start': 657, 'end': 676}]

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.03471.0410950.05370.98320.98320.98320.9832
0.02372.0821900.04480.98580.98580.98580.9858
0.01193.01232850.05320.98600.98600.98600.9860

Framework versions

  • Transformers 4.36.2
  • Pytorch 2.1.2
  • Datasets 2.16.1
  • 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: 4h17min
  • Cloud Provider: Private Infrastructure
  • Carbon Efficiency (kg/kWh): 0.078 (estimated from electricitymaps for the day of January 10, 2024.)
  • Carbon Emitted (Power consumption x Time x Carbon produced based on location of power grid): 0.08 kg eq. CO2

Citations

NERmembert-large-4entities

@misc {NERmembert2024,
    author       = { {BOURDOIS, Loïck} },  
    organization = { {Centre Aquitain des Technologies de l'Information et Electroniques} },  
	title        = { NERmembert-large-4entities (Revision 1cd8be5) },
	year         = 2024,
	url          = { https://huggingface.co/CATIE-AQ/NERmembert-large-4entities },
	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_4entities

@misc {frenchNER2024,  
    author       = { {BOURDOIS, Loïck} },  
    organization  = { {Centre Aquitain des Technologies de l'Information et Electroniques} },  
    title        = { frenchNER_4entities },  
    year         = 2024,  
    url          = { https://huggingface.co/CATIE-AQ/frenchNER_4entities },  
    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
Ревизия весов
9d57fb7

0 моделей