Token Classification
Transformers
Safetensors
French
modernbert
bourdoiscatie commited on
Commit
ede1c69
·
verified ·
1 Parent(s): 91aa667

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +241 -40
README.md CHANGED
@@ -2,68 +2,269 @@
2
  library_name: transformers
3
  license: mit
4
  base_model: almanach/moderncamembert-cv2-base
5
- tags:
6
- - generated_from_trainer
7
  metrics:
8
  - precision
9
  - recall
10
  - f1
11
  - accuracy
12
  model-index:
13
- - name: moderncamembert-cv2-frenchNER_4entities
14
  results: []
 
 
 
 
 
 
 
 
15
  ---
16
 
17
- <!-- This model card has been generated automatically according to the information the Trainer had access to. You
18
- should probably proofread and complete it, then remove this comment. -->
19
 
20
- # moderncamembert-cv2-frenchNER_4entities
21
 
22
- This model is a fine-tuned version of [almanach/moderncamembert-cv2-base](https://huggingface.co/almanach/moderncamembert-cv2-base) on an unknown dataset.
23
- It achieves the following results on the evaluation set:
24
- - Loss: 0.1113
25
- - Precision: 0.9860
26
- - Recall: 0.9860
27
- - F1: 0.9860
28
- - Accuracy: 0.9860
29
 
30
- ## Model description
31
 
32
- More information needed
33
 
34
- ## Intended uses & limitations
35
 
36
- More information needed
37
 
38
- ## Training and evaluation data
39
 
40
- More information needed
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
 
42
- ## Training procedure
43
 
44
- ### Training hyperparameters
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
 
46
- The following hyperparameters were used during training:
47
- - learning_rate: 2e-05
48
- - train_batch_size: 8
49
- - eval_batch_size: 8
50
- - seed: 42
51
- - optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
52
- - lr_scheduler_type: linear
53
- - num_epochs: 3
54
 
55
- ### Training results
 
56
 
57
- | Training Loss | Epoch | Step | Validation Loss | Precision | Recall | F1 | Accuracy |
58
- |:-------------:|:-----:|:------:|:---------------:|:---------:|:------:|:------:|:--------:|
59
- | 0.0274 | 1.0 | 43650 | 0.0892 | 0.9835 | 0.9835 | 0.9835 | 0.9835 |
60
- | 0.0119 | 2.0 | 87300 | 0.0825 | 0.9858 | 0.9858 | 0.9858 | 0.9858 |
61
- | 0.0038 | 3.0 | 130950 | 0.1113 | 0.9860 | 0.9860 | 0.9860 | 0.9860 |
62
 
 
 
 
63
 
64
- ### Framework versions
 
65
 
66
- - Transformers 4.51.3
67
- - Pytorch 2.6.0+cu124
68
- - Datasets 2.16.0
69
- - Tokenizers 0.21.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  library_name: transformers
3
  license: mit
4
  base_model: almanach/moderncamembert-cv2-base
 
 
5
  metrics:
6
  - precision
7
  - recall
8
  - f1
9
  - accuracy
10
  model-index:
11
+ - name: Moderncamembert-3entities
12
  results: []
13
+ datasets:
14
+ - CATIE-AQ/frenchNER_3entities
15
+ language:
16
+ - fr
17
+ widget:
18
+ - text: "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."
19
+ pipeline_tag: token-classification
20
+ co2_eq_emissions: 22
21
  ---
22
 
23
+ # Moderncamembert-3entities
 
24
 
25
+ ## Model Description
26
 
27
+ We present **Moderncamembert-3entities**, which is a [Moderncamembert-cv2-base](https://huggingface.co/almanach/moderncamembert-cv2-base) fine-tuned for the Name Entity Recognition task for the French language on four French NER datasets for 3 entities (LOC, PER, ORG).
28
+ All these datasets were concatenated and cleaned into a single dataset that we called [frenchNER_3entities](https://huggingface.co/datasets/CATIE-AQ/frenchNER_3entities).
29
+ 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.**
 
 
 
 
30
 
31
+ ## Evaluation results
32
 
33
+ The evaluation was carried out using the [**evaluate**](https://pypi.org/project/evaluate/) python package.
34
 
 
35
 
36
+ ### frenchNER_3entities
37
 
38
+ For space reasons, we show only the F1 of the different models. You can see the full results below the table.
39
 
40
+ <table>
41
+ <thead>
42
+ <tr>
43
+ <th><br>Model</th>
44
+ <th><br>Parameters</th>
45
+ <th><br>Context</th>
46
+ <th><br>PER</th>
47
+ <th><br>LOC</th>
48
+ <th><br>ORG</th>
49
+ </tr>
50
+ </thead>
51
+ <tbody>
52
+ <tr>
53
+ <td rowspan="1"><br><a href="https://hf.co/Jean-Baptiste/camembert-ner">Jean-Baptiste/camembert-ner</a></td>
54
+ <td><br>110M</td>
55
+ <td><br>512 tokens</td>
56
+ <td><br>0.941</td>
57
+ <td><br>0.883</td>
58
+ <td><br>0.658</td>
59
+ </tr>
60
+ <tr>
61
+ <td rowspan="1"><br><a href="https://hf.co/cmarkea/distilcamembert-base-ner">cmarkea/distilcamembert-base-ner</a></td>
62
+ <td><br>67.5M</td>
63
+ <td><br>512 tokens</td>
64
+ <td><br>0.942</td>
65
+ <td><br>0.882</td>
66
+ <td><br>0.647</td>
67
+ </tr>
68
+ <tr>
69
+ <td rowspan="1"><br><a href="https://hf.co/CATIE-AQ/NERmembert-base-4entities">NERmembert-base-4entities</a></td>
70
+ <td><br>110M</td>
71
+ <td><br>512 tokens</td>
72
+ <td><br>0.951</td>
73
+ <td><br>0.894</td>
74
+ <td><br>0.671</td>
75
+ </tr>
76
+ <tr>
77
+ <td rowspan="1"><br><a href="https://hf.co/CATIE-AQ/NERmembert-large-4entities">NERmembert-large-4entities</a></td>
78
+ <td><br>336M</td>
79
+ <td><br>512 tokens</td>
80
+ <td><br>0.958</td>
81
+ <td><br>0.901</td>
82
+ <td><br>0.685</td>
83
+ </tr>
84
+ <tr>
85
+ <td rowspan="1"><br><a href="https://hf.co/CATIE-AQ/NERmembert-base-3entities">NERmembert-base-3entities</a></td>
86
+ <td><br>110M</td>
87
+ <td><br>512 tokens</td>
88
+ <td><br>0.966</td>
89
+ <td><br>0.940</td>
90
+ <td><br>0.876</td>
91
+ </tr>
92
+ <tr>
93
+ <td rowspan="1"><br><a href="https://hf.co/CATIE-AQ/NERmembert2-3entities">NERmembert2-3entities</a></td>
94
+ <td><br>111M</td>
95
+ <td><br>1024 tokens</td>
96
+ <td><br>0.967</td>
97
+ <td><br>0.942</td>
98
+ <td><br>0.875</td>
99
+ </tr>
100
+ <tr>
101
+ <td rowspan="1"><a href="https://huggingface.co/CATIE-AQ/NERmemberta-3entities">NERmemberta-3entities</a></td>
102
+ <td><br>111M</td>
103
+ <td><br>1024 tokens</td>
104
+ <td><br><b>0.970</b></td>
105
+ <td><br>0.943</td>
106
+ <td><br>0.881</td>
107
+ </tr>
108
+ <tr>
109
+ <td rowspan="1"><br>Moderncamembert_3entities (this model)</td>
110
+ <td><br>136M</td>
111
+ <td><br>8192 tokens</td>
112
+ <td><br>0.969</td>
113
+ <td><br>0.944</td>
114
+ <td><br>0.881</td>
115
+ </tr>
116
+ <tr>
117
+ <td rowspan="1"><br><a href="https://hf.co/CATIE-AQ/NERmembert-large-3entities">NERmembert-large-3entities</a></td>
118
+ <td><br>336M</td>
119
+ <td><br>512 tokens</td>
120
+ <td><br>0.969</td>
121
+ <td><br><b>0.947</b></td>
122
+ <td><br><b>0.890</b></td>
123
+ </tr>
124
+ </tr>
125
+ </tbody>
126
+ </table>
127
 
 
128
 
129
+ <details>
130
+ <summary>Full results</summary>
131
+ <code>
132
+ {'LOC': {'precision': 0.9416666666666667,<br>
133
+ 'recall': 0.9469231691557534,<br>
134
+ 'f1': 0.9442876027128823,<br>
135
+ 'number': 75061},<br>
136
+ 'O': {'precision': 0.9946557304890683,<br>
137
+ 'recall': 0.9940143723727719,<br>
138
+ 'f1': 0.9943349480099875,<br>
139
+ 'number': 932066},<br>
140
+ 'ORG': {'precision': 0.886804772363032,<br>
141
+ 'recall': 0.8749890187121145,<br>
142
+ 'f1': 0.8808572734106688,<br>
143
+ 'number': 34149},<br>
144
+ 'PER': {'precision': 0.965375959374459,<br>
145
+ 'recall': 0.9725258115524137,<br>
146
+ 'f1': 0.9689376958407905,<br>
147
+ 'number': 86008},<br>
148
+ 'overall_precision': 0.9856336114058214,<br>
149
+ 'overall_recall': 0.9856336114058214,<br>
150
+ 'overall_f1': 0.9856336114058214,<br>
151
+ 'overall_accuracy': 0.9856336114058214}
152
+ </code>
153
+ </details>
154
 
155
+ ## Usage
 
 
 
 
 
 
 
156
 
157
+ ```python
158
+ from transformers import pipeline
159
 
160
+ ner = pipeline('token-classification', model='CATIE-AQ/Moderncamembert-3entities', tokenizer='CATIE-AQ/Moderncamembert-3entities', aggregation_strategy="simple")
 
 
 
 
161
 
162
+ result = ner(
163
+ "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."
164
+ )
165
 
166
+ print(result)
167
+ ```
168
 
169
+ ## Environmental Impact
170
+
171
+ *Carbon emissions were estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700). The hardware, runtime, cloud provider, and compute region were utilized to estimate the carbon impact.*
172
+
173
+ - **Hardware Type:** A100 PCIe 40/80GB
174
+ - **Hours used:** 2h48min
175
+ - **Cloud Provider:** Private Infrastructure
176
+ - **Carbon Efficiency (kg/kWh):** 0.032 (estimated from [electricitymaps](https://app.electricitymaps.com/zone/FR) for the day of April 15, 2025.)
177
+ - **Carbon Emitted** *(Power consumption x Time x Carbon produced based on location of power grid)*: 0.022 kg eq. CO2
178
+
179
+
180
+
181
+
182
+ ## Citations
183
+
184
+ ### Moderncamembert-3entities
185
+ ```
186
+ @misc {NERmemberta2024,
187
+ author = { {BOURDOIS, Loïck} },
188
+ organization = { {Centre Aquitain des Technologies de l'Information et Electroniques} },
189
+ title = { Moderncamembert-3entities},
190
+ year = 2025,
191
+ url = { https://huggingface.co/CATIE-AQ/Moderncamembert-3entities },
192
+ doi = { 10.57967/hf/3640 },
193
+ publisher = { Hugging Face }
194
+ }
195
+ ```
196
+
197
+ ### Moderncamembert-cv2-base
198
+ ```
199
+ @misc{antoun2025modernbertdebertav3examiningarchitecture,
200
+ title={ModernBERT or DeBERTaV3? Examining Architecture and Data Influence on Transformer Encoder Models Performance},
201
+ author={Wissam Antoun and Benoît Sagot and Djamé Seddah},
202
+ year={2025},
203
+ eprint={2504.08716},
204
+ archivePrefix={arXiv},
205
+ primaryClass={cs.CL},
206
+ url={https://arxiv.org/abs/2504.08716},
207
+ }
208
+ ```
209
+
210
+ ### NERmemBERTa-3entities
211
+ ```
212
+ @misc {NERmemberta2024,
213
+ author = { {BOURDOIS, Loïck} },
214
+ organization = { {Centre Aquitain des Technologies de l'Information et Electroniques} },
215
+ title = { NERmemberta-3entities},
216
+ year = 2024,
217
+ url = { https://huggingface.co/CATIE-AQ/NERmemberta-3entities },
218
+ doi = { 10.57967/hf/3640 },
219
+ publisher = { Hugging Face }
220
+ }
221
+ ```
222
+ ### CamemBERT 2.0
223
+ ```
224
+ @misc{antoun2024camembert20smarterfrench,
225
+ title={CamemBERT 2.0: A Smarter French Language Model Aged to Perfection},
226
+ author={Wissam Antoun and Francis Kulumba and Rian Touchent and Éric de la Clergerie and Benoît Sagot and Djamé Seddah},
227
+ year={2024},
228
+ eprint={2411.08868},
229
+ archivePrefix={arXiv},
230
+ primaryClass={cs.CL},
231
+ url={https://arxiv.org/abs/2411.08868},
232
+ }
233
+ ```
234
+ ### NERmemBERT
235
+ ```
236
+ @misc {NERmembert2024,
237
+ author = { {BOURDOIS, Loïck} },
238
+ organization = { {Centre Aquitain des Technologies de l'Information et Electroniques} },
239
+ title = { NERmembert-base-3entities },
240
+ year = 2024,
241
+ url = { https://huggingface.co/CATIE-AQ/NERmembert-base-3entities },
242
+ doi = { 10.57967/hf/1752 },
243
+ publisher = { Hugging Face }
244
+ }
245
+ ```
246
+
247
+ ### CamemBERT
248
+ ```
249
+ @inproceedings{martin2020camembert,
250
+ title={CamemBERT: a Tasty French Language Model},
251
+ 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},
252
+ booktitle={Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics},
253
+ year={2020}}
254
+ ```
255
+
256
+ ### frenchNER_3entities
257
+ ```
258
+ @misc {frenchNER2024,
259
+ author = { {BOURDOIS, Loïck} },
260
+ organization = { {Centre Aquitain des Technologies de l'Information et Electroniques} },
261
+ title = { frenchNER_4entities },
262
+ year = 2024,
263
+ url = { https://huggingface.co/CATIE-AQ/frenchNER_3entities },
264
+ doi = { 10.57967/hf/1751 },
265
+ publisher = { Hugging Face }
266
+ }
267
+ ```
268
+
269
+ ## License
270
+ MIT