HueyNemud
commited on
Commit
•
b570bdb
1
Parent(s):
28cc959
model data
Browse files- README.md +49 -0
- config.json +51 -0
- optimizer.pt +3 -0
- pytorch_model.bin +3 -0
- rng_state.pth +3 -0
- scheduler.pt +3 -0
- sentencepiece.bpe.model +3 -0
- special_tokens_map.json +1 -0
- tokenizer.json +0 -0
- tokenizer_config.json +1 -0
- trainer_state.json +106 -0
- training_args.bin +3 -0
README.md
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
tags:
|
3 |
+
- generated_from_trainer
|
4 |
+
model-index:
|
5 |
+
- name: CamemBERT pretrained on french trade directories from the XIXth century
|
6 |
+
results: []
|
7 |
+
---
|
8 |
+
|
9 |
+
# CamemBERT trained for NER on french trade directories from the XIXth century [GOLD training set]
|
10 |
+
|
11 |
+
This mdoel is part of the material of the paper
|
12 |
+
> Abadie, N., Carlinet, E., Chazalon, J., Duménieu, B. (2022). A
|
13 |
+
> Benchmark of Named Entity Recognition Approaches in Historical
|
14 |
+
> Documents Application to 19𝑡ℎ Century French Directories. In: Uchida,
|
15 |
+
> S., Barney, E., Eglin, V. (eds) Document Analysis Systems. DAS 2022.
|
16 |
+
> Lecture Notes in Computer Science, vol 13237. Springer, Cham.
|
17 |
+
> https://doi.org/10.1007/978-3-031-06555-2_30
|
18 |
+
|
19 |
+
The source code to train this model is available on the [GitHub repository](https://github.com/soduco/paper-ner-bench-das22) of the paper as a Jupyter notebook in `src/ner/40_experiment_2.ipynb`.
|
20 |
+
|
21 |
+
|
22 |
+
## Model description
|
23 |
+
This model adapts the model [Jean-Baptiste/camembert-ner](https://huggingface.co/Jean-Baptiste/camembert-ner) for NER on 6004 manually annotated directory entries referred as the "reference dataset" in the paper.
|
24 |
+
|
25 |
+
Trade directory entries are short and strongly structured texts that giving the name, activity and location of a person or business, e.g:
|
26 |
+
```
|
27 |
+
Peynaud, R. de la Vieille Bouclerie, 18. Richard, Joullain et comp., (commission- —Phéâtre Français. naire, (entrepôt), au port de la Rapée-
|
28 |
+
```
|
29 |
+
|
30 |
+
## Intended uses & limitations
|
31 |
+
This model is intended for reproducibility of the NER evaluation published in the DAS2022 paper.
|
32 |
+
Several derived models trained for NER on trade directories are available on HuggingFace, each trained on a different dataset :
|
33 |
+
- [das22-10-camembert_pretrained_finetuned_ref](): trained for NER on ~6000 directory entries manually corrected.
|
34 |
+
- [das22-10-camembert_pretrained_finetuned_pero](): trained for NER on ~6000 directory entries extracted with PERO-OCR.
|
35 |
+
- [das22-10-camembert_pretrained_finetuned_tess](): trained for NER on ~6000 directory entries extracted with Tesseract.
|
36 |
+
|
37 |
+
|
38 |
+
|
39 |
+
### Training hyperparameters
|
40 |
+
|
41 |
+
### Training results
|
42 |
+
|
43 |
+
### Framework versions
|
44 |
+
|
45 |
+
- Transformers 4.16.0.dev0
|
46 |
+
- Pytorch 1.10.1+cu102
|
47 |
+
- Datasets 1.17.0
|
48 |
+
- Tokenizers 0.10.3
|
49 |
+
|
config.json
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "Jean-Baptiste/camembert-ner",
|
3 |
+
"architectures": [
|
4 |
+
"CamembertForTokenClassification"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"bos_token_id": 5,
|
8 |
+
"classifier_dropout": null,
|
9 |
+
"eos_token_id": 6,
|
10 |
+
"gradient_checkpointing": false,
|
11 |
+
"hidden_act": "gelu",
|
12 |
+
"hidden_dropout_prob": 0.1,
|
13 |
+
"hidden_size": 768,
|
14 |
+
"id2label": {
|
15 |
+
"0": "O",
|
16 |
+
"1": "I-LOC",
|
17 |
+
"2": "I-PER",
|
18 |
+
"3": "I-MISC",
|
19 |
+
"4": "I-ORG",
|
20 |
+
"5": "I-CARDINAL",
|
21 |
+
"6": "I-ACT",
|
22 |
+
"7": "I-TITRE",
|
23 |
+
"8": "I-FT"
|
24 |
+
},
|
25 |
+
"initializer_range": 0.02,
|
26 |
+
"intermediate_size": 3072,
|
27 |
+
"label2id": {
|
28 |
+
"I-ACT": 6,
|
29 |
+
"I-CARDINAL": 5,
|
30 |
+
"I-FT": 8,
|
31 |
+
"I-LOC": 1,
|
32 |
+
"I-MISC": 3,
|
33 |
+
"I-ORG": 4,
|
34 |
+
"I-PER": 2,
|
35 |
+
"I-TITRE": 7,
|
36 |
+
"O": 0
|
37 |
+
},
|
38 |
+
"layer_norm_eps": 1e-05,
|
39 |
+
"max_position_embeddings": 514,
|
40 |
+
"model_type": "camembert",
|
41 |
+
"num_attention_heads": 12,
|
42 |
+
"num_hidden_layers": 12,
|
43 |
+
"output_past": true,
|
44 |
+
"pad_token_id": 1,
|
45 |
+
"position_embedding_type": "absolute",
|
46 |
+
"torch_dtype": "float32",
|
47 |
+
"transformers_version": "4.15.0",
|
48 |
+
"type_vocab_size": 1,
|
49 |
+
"use_cache": true,
|
50 |
+
"vocab_size": 32005
|
51 |
+
}
|
optimizer.pt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c37d05b4b67c765a20a19167530cd720b44e79f8e38eb1c8f2993d3771b2c3d9
|
3 |
+
size 880421605
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:772edbf0c9ac34190896b768916498be532e0720793fcf40175ffd001f264689
|
3 |
+
size 440237809
|
rng_state.pth
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:46225dc591f01a63d58b19f4a6bff66c967753d090e9698eede41c44a82a8a65
|
3 |
+
size 14503
|
scheduler.pt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:fd2a41f0894d3f9924a73ab87921a32296a37ba780af39ec4b4bb5bd073c3579
|
3 |
+
size 623
|
sentencepiece.bpe.model
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:988bc5a00281c6d210a5d34bd143d0363741a432fefe741bf71e61b1869d4314
|
3 |
+
size 810912
|
special_tokens_map.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"bos_token": "<s>", "eos_token": "</s>", "unk_token": "<unk>", "sep_token": "</s>", "pad_token": "<pad>", "cls_token": "<s>", "mask_token": "<mask>", "additional_special_tokens": ["<s>NOTUSED", "</s>NOTUSED"]}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"bos_token": "<s>", "eos_token": "</s>", "sep_token": "</s>", "cls_token": "<s>", "unk_token": "<unk>", "pad_token": "<pad>", "mask_token": {"content": "<mask>", "single_word": false, "lstrip": true, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "additional_special_tokens": ["<s>NOTUSED", "</s>NOTUSED"], "model_max_length": 512, "name_or_path": "Jean-Baptiste/camembert-ner", "special_tokens_map_file": "/root/.cache/huggingface/transformers/fe0e213c44079a9ee091098f81fff2941484006e9ba3001a9bf1ee9f87537599.cb3ec3a6c1200d181228d8825ae9767572abca54efa1bbb37fd83d721b2ef323", "sp_model_kwargs": {}, "tokenizer_class": "CamembertTokenizer"}
|
trainer_state.json
ADDED
@@ -0,0 +1,106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"best_metric": 0.9654395191585274,
|
3 |
+
"best_model_checkpoint": "/content/drive/MyDrive/SODUCO/article_das_2022/42-experiment_2_finetuned_camembert/checkpoint-700",
|
4 |
+
"epoch": 1.8617021276595744,
|
5 |
+
"global_step": 700,
|
6 |
+
"is_hyper_param_search": false,
|
7 |
+
"is_local_process_zero": true,
|
8 |
+
"is_world_process_zero": true,
|
9 |
+
"log_history": [
|
10 |
+
{
|
11 |
+
"epoch": 0.27,
|
12 |
+
"eval_accuracy": 0.9666871542716656,
|
13 |
+
"eval_f1": 0.9407993966817497,
|
14 |
+
"eval_loss": 0.23340629041194916,
|
15 |
+
"eval_precision": 0.9411542814032441,
|
16 |
+
"eval_recall": 0.9404447794949115,
|
17 |
+
"eval_runtime": 2.6624,
|
18 |
+
"eval_samples_per_second": 250.906,
|
19 |
+
"eval_steps_per_second": 15.776,
|
20 |
+
"step": 100
|
21 |
+
},
|
22 |
+
{
|
23 |
+
"epoch": 0.53,
|
24 |
+
"eval_accuracy": 0.9729563614013522,
|
25 |
+
"eval_f1": 0.9542459047260402,
|
26 |
+
"eval_loss": 0.14227047562599182,
|
27 |
+
"eval_precision": 0.9533483822422875,
|
28 |
+
"eval_recall": 0.9551451187335093,
|
29 |
+
"eval_runtime": 2.474,
|
30 |
+
"eval_samples_per_second": 270.009,
|
31 |
+
"eval_steps_per_second": 16.977,
|
32 |
+
"step": 200
|
33 |
+
},
|
34 |
+
{
|
35 |
+
"epoch": 0.8,
|
36 |
+
"eval_accuracy": 0.9794714197910265,
|
37 |
+
"eval_f1": 0.9598046581517656,
|
38 |
+
"eval_loss": 0.10758526623249054,
|
39 |
+
"eval_precision": 0.9565705728191688,
|
40 |
+
"eval_recall": 0.9630606860158312,
|
41 |
+
"eval_runtime": 2.467,
|
42 |
+
"eval_samples_per_second": 270.769,
|
43 |
+
"eval_steps_per_second": 17.024,
|
44 |
+
"step": 300
|
45 |
+
},
|
46 |
+
{
|
47 |
+
"epoch": 1.06,
|
48 |
+
"eval_accuracy": 0.978119237861094,
|
49 |
+
"eval_f1": 0.9622393387187677,
|
50 |
+
"eval_loss": 0.10391023010015488,
|
51 |
+
"eval_precision": 0.9591760299625468,
|
52 |
+
"eval_recall": 0.9653222766679231,
|
53 |
+
"eval_runtime": 2.469,
|
54 |
+
"eval_samples_per_second": 270.56,
|
55 |
+
"eval_steps_per_second": 17.011,
|
56 |
+
"step": 400
|
57 |
+
},
|
58 |
+
{
|
59 |
+
"epoch": 1.33,
|
60 |
+
"learning_rate": 9e-05,
|
61 |
+
"loss": 0.2217,
|
62 |
+
"step": 500
|
63 |
+
},
|
64 |
+
{
|
65 |
+
"epoch": 1.33,
|
66 |
+
"eval_accuracy": 0.9776275353411186,
|
67 |
+
"eval_f1": 0.9546053870785459,
|
68 |
+
"eval_loss": 0.0932990312576294,
|
69 |
+
"eval_precision": 0.954066265060241,
|
70 |
+
"eval_recall": 0.9551451187335093,
|
71 |
+
"eval_runtime": 2.5383,
|
72 |
+
"eval_samples_per_second": 263.164,
|
73 |
+
"eval_steps_per_second": 16.546,
|
74 |
+
"step": 500
|
75 |
+
},
|
76 |
+
{
|
77 |
+
"epoch": 1.6,
|
78 |
+
"eval_accuracy": 0.9740626920712969,
|
79 |
+
"eval_f1": 0.9599096555618294,
|
80 |
+
"eval_loss": 0.10465865582227707,
|
81 |
+
"eval_precision": 0.9586466165413534,
|
82 |
+
"eval_recall": 0.9611760271390878,
|
83 |
+
"eval_runtime": 2.4984,
|
84 |
+
"eval_samples_per_second": 267.37,
|
85 |
+
"eval_steps_per_second": 16.811,
|
86 |
+
"step": 600
|
87 |
+
},
|
88 |
+
{
|
89 |
+
"epoch": 1.86,
|
90 |
+
"eval_accuracy": 0.9805777504609711,
|
91 |
+
"eval_f1": 0.9654395191585274,
|
92 |
+
"eval_loss": 0.08172685652971268,
|
93 |
+
"eval_precision": 0.9621864470235867,
|
94 |
+
"eval_recall": 0.9687146626460611,
|
95 |
+
"eval_runtime": 2.5163,
|
96 |
+
"eval_samples_per_second": 265.472,
|
97 |
+
"eval_steps_per_second": 16.691,
|
98 |
+
"step": 700
|
99 |
+
}
|
100 |
+
],
|
101 |
+
"max_steps": 5000,
|
102 |
+
"num_train_epochs": 14,
|
103 |
+
"total_flos": 275154731817120.0,
|
104 |
+
"trial_name": null,
|
105 |
+
"trial_params": null
|
106 |
+
}
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5ce53345edc52d161ff77c93152d56d9996a5a3d0b7f610badc728a7974e419d
|
3 |
+
size 3055
|