Views
No views yet
| class | precision (%) | recall (%) | f1 (%) | support (#sub-word) |
|---|---|---|---|---|
| global | 98.17 | 98.19 | 98.18 | 378,776 |
| PER | 96.78 | 96.87 | 96.82 | 23,754 |
| LOC | 94.05 | 93.59 | 93.82 | 27,196 |
| ORG | 86.05 | 85.92 | 85.98 | 6,526 |
| MISC | 88.78 | 84.69 | 86.69 | 11,891 |
| O | 99.26 | 99.47 | 99.37 | 309,409 |
| model | time (ms) | PER (%) | LOC (%) | ORG (%) | MISC (%) | O (%) |
|---|---|---|---|---|---|---|
| cmarkea/distilcamembert-base-ner | 43.44 | 96.82 | 93.82 | 85.98 | 86.69 | 99.37 |
| Davlan/bert-base-multilingual-cased-ner-hrl | 87.56 | 79.93 | 72.89 | 61.34 | n/a | 96.04 |
| flair/ner-french | 314.96 | 82.91 | 76.17 | 70.96 | 76.29 | 97.65 |
1from transformers import pipeline
2
3ner = pipeline(
4 task='ner',
5 model="cmarkea/distilcamembert-base-ner",
6 tokenizer="cmarkea/distilcamembert-base-ner",
7 aggregation_strategy="simple"
8)
9result = ner(
10 "Le Crédit Mutuel Arkéa est une banque Française, elle comprend le CMB "
11 "qui est une banque située en Bretagne et le CMSO qui est une banque "
12 "qui se situe principalement en Aquitaine. C'est sous la présidence de "
13 "Louis Lichou, dans les années 1980 que différentes filiales sont créées "
14 "au sein du CMB et forment les principales filiales du groupe qui "
15 "existent encore aujourd'hui (Federal Finance, Suravenir, Financo, etc.)."
16)
17
18result
19[{'entity_group': 'ORG',
20 'score': 0.9974479,
21 'word': 'Crédit Mutuel Arkéa',
22 'start': 3,
23 'end': 22},
24 {'entity_group': 'LOC',
25 'score': 0.9000358,
26 'word': 'Française',
27 'start': 38,
28 'end': 47},
29 {'entity_group': 'ORG',
30 'score': 0.9788757,
31 'word': 'CMB',
32 'start': 66,
33 'end': 69},
34 {'entity_group': 'LOC',
35 'score': 0.99919766,
36 'word': 'Bretagne',
37 'start': 99,
38 'end': 107},
39 {'entity_group': 'ORG',
40 'score': 0.9594884,
41 'word': 'CMSO',
42 'start': 114,
43 'end': 118},
44 {'entity_group': 'LOC',
45 'score': 0.99935514,
46 'word': 'Aquitaine',
47 'start': 169,
48 'end': 178},
49 {'entity_group': 'PER',
50 'score': 0.99911094,
51 'word': 'Louis Lichou',
52 'start': 208,
53 'end': 220},
54 {'entity_group': 'ORG',
55 'score': 0.96226394,
56 'word': 'CMB',
57 'start': 291,
58 'end': 294},
59 {'entity_group': 'ORG',
60 'score': 0.9983959,
61 'word': 'Federal Finance',
62 'start': 374,
63 'end': 389},
64 {'entity_group': 'ORG',
65 'score': 0.9984454,
66 'word': 'Suravenir',
67 'start': 391,
68 'end': 400},
69 {'entity_group': 'ORG',
70 'score': 0.9985084,
71 'word': 'Financo',
72 'start': 402,
73 'end': 409}]1from optimum.onnxruntime import ORTModelForTokenClassification
2from transformers import AutoTokenizer, pipeline
3
4HUB_MODEL = "cmarkea/distilcamembert-base-nli"
5tokenizer = AutoTokenizer.from_pretrained(HUB_MODEL)
6model = ORTModelForTokenClassification.from_pretrained(HUB_MODEL)
7onnx_qa = pipeline("token-classification", model=model, tokenizer=tokenizer)
8
9# Quantized onnx model
10quantized_model = ORTModelForTokenClassification.from_pretrained(
11 HUB_MODEL, file_name="model_quantized.onnx"
12)1@inproceedings{delestre:hal-03674695,
2 TITLE = {{DistilCamemBERT : une distillation du mod{\`e}le fran{\c c}ais CamemBERT}},
3 AUTHOR = {Delestre, Cyrile and Amar, Abibatou},
4 URL = {https://hal.archives-ouvertes.fr/hal-03674695},
5 BOOKTITLE = {{CAp (Conf{\'e}rence sur l'Apprentissage automatique)}},
6 ADDRESS = {Vannes, France},
7 YEAR = {2022},
8 MONTH = Jul,
9 KEYWORDS = {NLP ; Transformers ; CamemBERT ; Distillation},
10 PDF = {https://hal.archives-ouvertes.fr/hal-03674695/file/cap2022.pdf},
11 HAL_ID = {hal-03674695},
12 HAL_VERSION = {v1},
13}