rubensmau commited on
Commit
338cb23
1 Parent(s): 668be41

End of training

Browse files
README.md ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - generated_from_trainer
4
+ datasets:
5
+ - funsd
6
+ model-index:
7
+ - name: layoutlm-funsd
8
+ results: []
9
+ ---
10
+
11
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
12
+ should probably proofread and complete it, then remove this comment. -->
13
+
14
+ # layoutlm-funsd
15
+
16
+ This model is a fine-tuned version of [microsoft/layoutlm-base-uncased](https://huggingface.co/microsoft/layoutlm-base-uncased) on the funsd dataset.
17
+ It achieves the following results on the evaluation set:
18
+ - Loss: 0.6832
19
+ - Answer: {'precision': 0.7075575027382256, 'recall': 0.7985166872682324, 'f1': 0.7502903600464577, 'number': 809}
20
+ - Header: {'precision': 0.31932773109243695, 'recall': 0.31932773109243695, 'f1': 0.31932773109243695, 'number': 119}
21
+ - Question: {'precision': 0.784366576819407, 'recall': 0.819718309859155, 'f1': 0.8016528925619835, 'number': 1065}
22
+ - Overall Precision: 0.7259
23
+ - Overall Recall: 0.7812
24
+ - Overall F1: 0.7525
25
+ - Overall Accuracy: 0.8047
26
+
27
+ ## Model description
28
+
29
+ More information needed
30
+
31
+ ## Intended uses & limitations
32
+
33
+ More information needed
34
+
35
+ ## Training and evaluation data
36
+
37
+ More information needed
38
+
39
+ ## Training procedure
40
+
41
+ ### Training hyperparameters
42
+
43
+ The following hyperparameters were used during training:
44
+ - learning_rate: 3e-05
45
+ - train_batch_size: 16
46
+ - eval_batch_size: 8
47
+ - seed: 42
48
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
49
+ - lr_scheduler_type: linear
50
+ - num_epochs: 15
51
+ - mixed_precision_training: Native AMP
52
+
53
+ ### Training results
54
+
55
+ | Training Loss | Epoch | Step | Validation Loss | Answer | Header | Question | Overall Precision | Overall Recall | Overall F1 | Overall Accuracy |
56
+ |:-------------:|:-----:|:----:|:---------------:|:--------------------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------------:|:------------------------------------------------------------------------------------------------------------:|:-----------------:|:--------------:|:----------:|:----------------:|
57
+ | 1.8109 | 1.0 | 10 | 1.6140 | {'precision': 0.013268998793727383, 'recall': 0.013597033374536464, 'f1': 0.013431013431013432, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.10519645120405577, 'recall': 0.07793427230046948, 'f1': 0.08953613807982741, 'number': 1065} | 0.0581 | 0.0472 | 0.0521 | 0.3634 |
58
+ | 1.468 | 2.0 | 20 | 1.2385 | {'precision': 0.13105413105413105, 'recall': 0.11372064276885044, 'f1': 0.12177365982792852, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.4378029079159935, 'recall': 0.5089201877934272, 'f1': 0.4706904038211029, 'number': 1065} | 0.3268 | 0.3181 | 0.3224 | 0.5793 |
59
+ | 1.0973 | 3.0 | 30 | 0.9328 | {'precision': 0.41563275434243174, 'recall': 0.41409147095179233, 'f1': 0.41486068111455104, 'number': 809} | {'precision': 0.03125, 'recall': 0.008403361344537815, 'f1': 0.013245033112582781, 'number': 119} | {'precision': 0.6483720930232558, 'recall': 0.6544600938967137, 'f1': 0.6514018691588785, 'number': 1065} | 0.5400 | 0.5183 | 0.5289 | 0.7016 |
60
+ | 0.8233 | 4.0 | 40 | 0.7582 | {'precision': 0.6106290672451193, 'recall': 0.695920889987639, 'f1': 0.6504910456383594, 'number': 809} | {'precision': 0.17543859649122806, 'recall': 0.08403361344537816, 'f1': 0.11363636363636363, 'number': 119} | {'precision': 0.6941176470588235, 'recall': 0.72018779342723, 'f1': 0.7069124423963133, 'number': 1065} | 0.6430 | 0.6724 | 0.6573 | 0.7595 |
61
+ | 0.6573 | 5.0 | 50 | 0.6894 | {'precision': 0.6411332633788038, 'recall': 0.7552533992583437, 'f1': 0.6935300794551646, 'number': 809} | {'precision': 0.2696629213483146, 'recall': 0.20168067226890757, 'f1': 0.23076923076923078, 'number': 119} | {'precision': 0.7267080745341615, 'recall': 0.7690140845070422, 'f1': 0.7472627737226277, 'number': 1065} | 0.6704 | 0.7296 | 0.6987 | 0.7838 |
62
+ | 0.5504 | 6.0 | 60 | 0.6623 | {'precision': 0.6652675760755509, 'recall': 0.7836835599505563, 'f1': 0.7196367763904654, 'number': 809} | {'precision': 0.19736842105263158, 'recall': 0.12605042016806722, 'f1': 0.15384615384615385, 'number': 119} | {'precision': 0.731626754748142, 'recall': 0.831924882629108, 'f1': 0.7785588752196836, 'number': 1065} | 0.6853 | 0.7702 | 0.7253 | 0.7933 |
63
+ | 0.4731 | 7.0 | 70 | 0.6464 | {'precision': 0.6681127982646421, 'recall': 0.761433868974042, 'f1': 0.7117273252455227, 'number': 809} | {'precision': 0.22641509433962265, 'recall': 0.20168067226890757, 'f1': 0.21333333333333335, 'number': 119} | {'precision': 0.7656794425087108, 'recall': 0.8253521126760563, 'f1': 0.7943967464979665, 'number': 1065} | 0.6981 | 0.7622 | 0.7287 | 0.8003 |
64
+ | 0.428 | 8.0 | 80 | 0.6407 | {'precision': 0.6865671641791045, 'recall': 0.796044499381953, 'f1': 0.7372638809387521, 'number': 809} | {'precision': 0.22321428571428573, 'recall': 0.21008403361344538, 'f1': 0.21645021645021645, 'number': 119} | {'precision': 0.7692307692307693, 'recall': 0.8262910798122066, 'f1': 0.7967406066093254, 'number': 1065} | 0.7060 | 0.7772 | 0.7399 | 0.8053 |
65
+ | 0.3776 | 9.0 | 90 | 0.6475 | {'precision': 0.7108843537414966, 'recall': 0.7750309023485785, 'f1': 0.7415730337078651, 'number': 809} | {'precision': 0.23770491803278687, 'recall': 0.24369747899159663, 'f1': 0.24066390041493776, 'number': 119} | {'precision': 0.7615780445969125, 'recall': 0.8338028169014085, 'f1': 0.796055580457194, 'number': 1065} | 0.7115 | 0.7747 | 0.7418 | 0.8022 |
66
+ | 0.3434 | 10.0 | 100 | 0.6694 | {'precision': 0.6895074946466809, 'recall': 0.796044499381953, 'f1': 0.7389558232931727, 'number': 809} | {'precision': 0.2831858407079646, 'recall': 0.2689075630252101, 'f1': 0.27586206896551724, 'number': 119} | {'precision': 0.7693661971830986, 'recall': 0.8206572769953052, 'f1': 0.79418446160836, 'number': 1065} | 0.7100 | 0.7777 | 0.7423 | 0.8007 |
67
+ | 0.3082 | 11.0 | 110 | 0.6749 | {'precision': 0.6961206896551724, 'recall': 0.7985166872682324, 'f1': 0.7438111686816349, 'number': 809} | {'precision': 0.2905982905982906, 'recall': 0.2857142857142857, 'f1': 0.288135593220339, 'number': 119} | {'precision': 0.7794779477947795, 'recall': 0.8131455399061033, 'f1': 0.7959558823529411, 'number': 1065} | 0.7171 | 0.7757 | 0.7452 | 0.7985 |
68
+ | 0.2933 | 12.0 | 120 | 0.6635 | {'precision': 0.7130242825607064, 'recall': 0.7985166872682324, 'f1': 0.7533527696793003, 'number': 809} | {'precision': 0.28448275862068967, 'recall': 0.2773109243697479, 'f1': 0.28085106382978725, 'number': 119} | {'precision': 0.78125, 'recall': 0.8215962441314554, 'f1': 0.8009153318077803, 'number': 1065} | 0.7255 | 0.7797 | 0.7516 | 0.8056 |
69
+ | 0.278 | 13.0 | 130 | 0.6760 | {'precision': 0.7122381477398015, 'recall': 0.7985166872682324, 'f1': 0.752913752913753, 'number': 809} | {'precision': 0.3170731707317073, 'recall': 0.3277310924369748, 'f1': 0.32231404958677684, 'number': 119} | {'precision': 0.7897111913357401, 'recall': 0.8215962441314554, 'f1': 0.8053382420616658, 'number': 1065} | 0.7297 | 0.7827 | 0.7553 | 0.8049 |
70
+ | 0.2699 | 14.0 | 140 | 0.6824 | {'precision': 0.7041484716157205, 'recall': 0.7972805933250927, 'f1': 0.7478260869565218, 'number': 809} | {'precision': 0.3305785123966942, 'recall': 0.33613445378151263, 'f1': 0.33333333333333337, 'number': 119} | {'precision': 0.7845601436265709, 'recall': 0.8206572769953052, 'f1': 0.8022028453419, 'number': 1065} | 0.7248 | 0.7822 | 0.7524 | 0.8045 |
71
+ | 0.2645 | 15.0 | 150 | 0.6832 | {'precision': 0.7075575027382256, 'recall': 0.7985166872682324, 'f1': 0.7502903600464577, 'number': 809} | {'precision': 0.31932773109243695, 'recall': 0.31932773109243695, 'f1': 0.31932773109243695, 'number': 119} | {'precision': 0.784366576819407, 'recall': 0.819718309859155, 'f1': 0.8016528925619835, 'number': 1065} | 0.7259 | 0.7812 | 0.7525 | 0.8047 |
72
+
73
+
74
+ ### Framework versions
75
+
76
+ - Transformers 4.21.3
77
+ - Pytorch 1.12.1+cu102
78
+ - Datasets 2.4.0
79
+ - Tokenizers 0.12.1
logs/events.out.tfevents.1665152364.ip-172-30-1-140.ec2.internal.18409.0 CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:7d08e12ea593cee782c070a384b86fcef6568c839dc2061090ec9311f7cb8f8b
3
- size 12385
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e010cb43a87b941a0a9c01c54441b62d567b395e94331f1ed1097caace3b3410
3
+ size 14061
preprocessor_config.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "apply_ocr": true,
3
+ "do_resize": true,
4
+ "feature_extractor_type": "LayoutLMv2FeatureExtractor",
5
+ "ocr_lang": null,
6
+ "processor_class": "LayoutLMv2Processor",
7
+ "resample": 2,
8
+ "size": 224
9
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "cls_token": "[CLS]",
3
+ "mask_token": "[MASK]",
4
+ "pad_token": "[PAD]",
5
+ "sep_token": "[SEP]",
6
+ "unk_token": "[UNK]"
7
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": null,
3
+ "apply_ocr": false,
4
+ "cls_token": "[CLS]",
5
+ "cls_token_box": [
6
+ 0,
7
+ 0,
8
+ 0,
9
+ 0
10
+ ],
11
+ "do_basic_tokenize": true,
12
+ "do_lower_case": true,
13
+ "mask_token": "[MASK]",
14
+ "model_max_length": 512,
15
+ "name_or_path": "microsoft/layoutlmv2-base-uncased",
16
+ "never_split": null,
17
+ "only_label_first_subword": true,
18
+ "pad_token": "[PAD]",
19
+ "pad_token_box": [
20
+ 0,
21
+ 0,
22
+ 0,
23
+ 0
24
+ ],
25
+ "pad_token_label": -100,
26
+ "processor_class": "LayoutLMv2Processor",
27
+ "sep_token": "[SEP]",
28
+ "sep_token_box": [
29
+ 1000,
30
+ 1000,
31
+ 1000,
32
+ 1000
33
+ ],
34
+ "special_tokens_map_file": null,
35
+ "strip_accents": null,
36
+ "tokenize_chinese_chars": true,
37
+ "tokenizer_class": "LayoutLMv2Tokenizer",
38
+ "unk_token": "[UNK]"
39
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff