marcodifelice commited on
Commit
2f637a7
1 Parent(s): 560b726

End of training

Browse files
README.md ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.6866
19
+ - Answer: {'precision': 0.7130339539978094, 'recall': 0.8046971569839307, 'f1': 0.7560975609756098, 'number': 809}
20
+ - Header: {'precision': 0.3384615384615385, 'recall': 0.3697478991596639, 'f1': 0.35341365461847385, 'number': 119}
21
+ - Question: {'precision': 0.7763975155279503, 'recall': 0.8215962441314554, 'f1': 0.7983576642335766, 'number': 1065}
22
+ - Overall Precision: 0.7235
23
+ - Overall Recall: 0.7878
24
+ - Overall F1: 0.7543
25
+ - Overall Accuracy: 0.8126
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
+
52
+ ### Training results
53
+
54
+ | Training Loss | Epoch | Step | Validation Loss | Answer | Header | Question | Overall Precision | Overall Recall | Overall F1 | Overall Accuracy |
55
+ |:-------------:|:-----:|:----:|:---------------:|:--------------------------------------------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------------:|:-----------------:|:--------------:|:----------:|:----------------:|
56
+ | 1.7968 | 1.0 | 10 | 1.5972 | {'precision': 0.011235955056179775, 'recall': 0.011124845488257108, 'f1': 0.011180124223602483, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.1959544879898862, 'recall': 0.14553990610328638, 'f1': 0.1670258620689655, 'number': 1065} | 0.1030 | 0.0823 | 0.0915 | 0.3535 |
57
+ | 1.4694 | 2.0 | 20 | 1.2467 | {'precision': 0.2002053388090349, 'recall': 0.24103831891223734, 'f1': 0.21873247335950646, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.43186895011169024, 'recall': 0.5446009389671361, 'f1': 0.48172757475083056, 'number': 1065} | 0.3345 | 0.3889 | 0.3596 | 0.6093 |
58
+ | 1.0892 | 3.0 | 30 | 0.9301 | {'precision': 0.49691991786447637, 'recall': 0.5982694684796045, 'f1': 0.5429052159282108, 'number': 809} | {'precision': 0.08108108108108109, 'recall': 0.025210084033613446, 'f1': 0.038461538461538464, 'number': 119} | {'precision': 0.5869205298013245, 'recall': 0.6657276995305165, 'f1': 0.62384513858337, 'number': 1065} | 0.5390 | 0.6001 | 0.5679 | 0.7041 |
59
+ | 0.8148 | 4.0 | 40 | 0.7921 | {'precision': 0.5805243445692884, 'recall': 0.7663782447466008, 'f1': 0.660628662759723, 'number': 809} | {'precision': 0.2, 'recall': 0.12605042016806722, 'f1': 0.15463917525773196, 'number': 119} | {'precision': 0.6657534246575343, 'recall': 0.6845070422535211, 'f1': 0.6749999999999999, 'number': 1065} | 0.6095 | 0.6844 | 0.6448 | 0.7498 |
60
+ | 0.6789 | 5.0 | 50 | 0.7126 | {'precision': 0.6466942148760331, 'recall': 0.7737948084054388, 'f1': 0.7045582442318515, 'number': 809} | {'precision': 0.23809523809523808, 'recall': 0.21008403361344538, 'f1': 0.22321428571428573, 'number': 119} | {'precision': 0.6851535836177475, 'recall': 0.7539906103286385, 'f1': 0.7179257934734019, 'number': 1065} | 0.6477 | 0.7296 | 0.6862 | 0.7822 |
61
+ | 0.5701 | 6.0 | 60 | 0.6734 | {'precision': 0.6524390243902439, 'recall': 0.7935723114956736, 'f1': 0.7161182375906302, 'number': 809} | {'precision': 0.25, 'recall': 0.18487394957983194, 'f1': 0.21256038647342995, 'number': 119} | {'precision': 0.6886564762670957, 'recall': 0.8037558685446009, 'f1': 0.7417677642980937, 'number': 1065} | 0.6566 | 0.7627 | 0.7057 | 0.7949 |
62
+ | 0.497 | 7.0 | 70 | 0.6688 | {'precision': 0.6719745222929936, 'recall': 0.7824474660074165, 'f1': 0.7230154197601371, 'number': 809} | {'precision': 0.2857142857142857, 'recall': 0.2689075630252101, 'f1': 0.277056277056277, 'number': 119} | {'precision': 0.7403267411865864, 'recall': 0.8084507042253521, 'f1': 0.7728904847396768, 'number': 1065} | 0.6883 | 0.7657 | 0.7249 | 0.7976 |
63
+ | 0.4549 | 8.0 | 80 | 0.6561 | {'precision': 0.6881028938906752, 'recall': 0.7935723114956736, 'f1': 0.7370838117106774, 'number': 809} | {'precision': 0.25, 'recall': 0.25210084033613445, 'f1': 0.2510460251046025, 'number': 119} | {'precision': 0.7432784041630529, 'recall': 0.8046948356807512, 'f1': 0.7727682596934174, 'number': 1065} | 0.6931 | 0.7672 | 0.7283 | 0.8045 |
64
+ | 0.4095 | 9.0 | 90 | 0.6514 | {'precision': 0.694206008583691, 'recall': 0.799752781211372, 'f1': 0.7432510051694429, 'number': 809} | {'precision': 0.29411764705882354, 'recall': 0.29411764705882354, 'f1': 0.29411764705882354, 'number': 119} | {'precision': 0.7452830188679245, 'recall': 0.815962441314554, 'f1': 0.7790228597041686, 'number': 1065} | 0.6996 | 0.7782 | 0.7368 | 0.8027 |
65
+ | 0.3629 | 10.0 | 100 | 0.6616 | {'precision': 0.7035010940919038, 'recall': 0.7948084054388134, 'f1': 0.7463726059199072, 'number': 809} | {'precision': 0.29927007299270075, 'recall': 0.3445378151260504, 'f1': 0.3203125, 'number': 119} | {'precision': 0.7564216120460585, 'recall': 0.8018779342723005, 'f1': 0.7784867821330903, 'number': 1065} | 0.7055 | 0.7717 | 0.7371 | 0.8075 |
66
+ | 0.3322 | 11.0 | 110 | 0.6668 | {'precision': 0.7112068965517241, 'recall': 0.8158220024721878, 'f1': 0.75993091537133, 'number': 809} | {'precision': 0.336283185840708, 'recall': 0.31932773109243695, 'f1': 0.32758620689655166, 'number': 119} | {'precision': 0.783273381294964, 'recall': 0.8178403755868544, 'f1': 0.8001837390904916, 'number': 1065} | 0.7288 | 0.7873 | 0.7569 | 0.8120 |
67
+ | 0.3188 | 12.0 | 120 | 0.6768 | {'precision': 0.7225305216426193, 'recall': 0.8046971569839307, 'f1': 0.7614035087719299, 'number': 809} | {'precision': 0.33076923076923076, 'recall': 0.36134453781512604, 'f1': 0.34538152610441764, 'number': 119} | {'precision': 0.7759078830823738, 'recall': 0.8225352112676056, 'f1': 0.7985414767547857, 'number': 1065} | 0.7269 | 0.7878 | 0.7561 | 0.8119 |
68
+ | 0.2936 | 13.0 | 130 | 0.6787 | {'precision': 0.7122692725298588, 'recall': 0.8108776266996292, 'f1': 0.7583815028901735, 'number': 809} | {'precision': 0.35384615384615387, 'recall': 0.3865546218487395, 'f1': 0.3694779116465864, 'number': 119} | {'precision': 0.7807486631016043, 'recall': 0.8225352112676056, 'f1': 0.8010973936899862, 'number': 1065} | 0.7262 | 0.7918 | 0.7576 | 0.8133 |
69
+ | 0.2894 | 14.0 | 140 | 0.6863 | {'precision': 0.7113289760348583, 'recall': 0.8071693448702101, 'f1': 0.7562246670526924, 'number': 809} | {'precision': 0.34108527131782945, 'recall': 0.3697478991596639, 'f1': 0.35483870967741943, 'number': 119} | {'precision': 0.7852650494159928, 'recall': 0.8206572769953052, 'f1': 0.8025711662075299, 'number': 1065} | 0.7273 | 0.7883 | 0.7566 | 0.8111 |
70
+ | 0.2813 | 15.0 | 150 | 0.6866 | {'precision': 0.7130339539978094, 'recall': 0.8046971569839307, 'f1': 0.7560975609756098, 'number': 809} | {'precision': 0.3384615384615385, 'recall': 0.3697478991596639, 'f1': 0.35341365461847385, 'number': 119} | {'precision': 0.7763975155279503, 'recall': 0.8215962441314554, 'f1': 0.7983576642335766, 'number': 1065} | 0.7235 | 0.7878 | 0.7543 | 0.8126 |
71
+
72
+
73
+ ### Framework versions
74
+
75
+ - Transformers 4.27.1
76
+ - Pytorch 1.12.1
77
+ - Datasets 2.6.1
78
+ - Tokenizers 0.13.2
logs/events.out.tfevents.1679302259.MacBook-Pro-di-Marco.local.1763.0 CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:45d0cc7940639c98ca47b0ebd0af570c910e910d36e7c4400421a7026b832dd9
3
- size 13325
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f9423f74489b9c66f199be3c1088d1d19e5652e4adfe4730ae43f0108b71144f
3
+ size 14340
preprocessor_config.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "apply_ocr": true,
3
+ "do_resize": true,
4
+ "feature_extractor_type": "LayoutLMv2FeatureExtractor",
5
+ "image_processor_type": "LayoutLMv2ImageProcessor",
6
+ "ocr_lang": null,
7
+ "processor_class": "LayoutLMv2Processor",
8
+ "resample": 2,
9
+ "size": {
10
+ "height": 224,
11
+ "width": 224
12
+ },
13
+ "tesseract_config": ""
14
+ }
pytorch_model.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:027350b5f1ace932bad004fb28dca97409bb5338f156e3c86b4553bb14dd8e85
3
  size 450603685
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fd3b534df82b7775eda4b53b986a8fd554b343abc9b2eaaad152522850645de1
3
  size 450603685
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,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "never_split": null,
16
+ "only_label_first_subword": true,
17
+ "pad_token": "[PAD]",
18
+ "pad_token_box": [
19
+ 0,
20
+ 0,
21
+ 0,
22
+ 0
23
+ ],
24
+ "pad_token_label": -100,
25
+ "processor_class": "LayoutLMv2Processor",
26
+ "sep_token": "[SEP]",
27
+ "sep_token_box": [
28
+ 1000,
29
+ 1000,
30
+ 1000,
31
+ 1000
32
+ ],
33
+ "special_tokens_map_file": null,
34
+ "strip_accents": null,
35
+ "tokenize_chinese_chars": true,
36
+ "tokenizer_class": "LayoutLMv2Tokenizer",
37
+ "unk_token": "[UNK]"
38
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff