chingoduc commited on
Commit
bdea7b0
1 Parent(s): 3888bfb

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.7037
19
+ - Answer: {'precision': 0.7206703910614525, 'recall': 0.7972805933250927, 'f1': 0.7570422535211268, 'number': 809}
20
+ - Header: {'precision': 0.3006993006993007, 'recall': 0.36134453781512604, 'f1': 0.3282442748091603, 'number': 119}
21
+ - Question: {'precision': 0.7585004359197908, 'recall': 0.8169014084507042, 'f1': 0.7866184448462928, 'number': 1065}
22
+ - Overall Precision: 0.7130
23
+ - Overall Recall: 0.7817
24
+ - Overall F1: 0.7458
25
+ - Overall Accuracy: 0.7989
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.7815 | 1.0 | 10 | 1.5703 | {'precision': 0.022222222222222223, 'recall': 0.022249690976514216, 'f1': 0.022235948116121063, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.21046643913538113, 'recall': 0.17370892018779344, 'f1': 0.19032921810699588, 'number': 1065} | 0.1202 | 0.1019 | 0.1103 | 0.3789 |
57
+ | 1.4352 | 2.0 | 20 | 1.2331 | {'precision': 0.12166172106824925, 'recall': 0.10135970333745364, 'f1': 0.11058664868509778, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.4863247863247863, 'recall': 0.5342723004694836, 'f1': 0.50917225950783, 'number': 1065} | 0.3530 | 0.3266 | 0.3393 | 0.5662 |
58
+ | 1.0804 | 3.0 | 30 | 0.9725 | {'precision': 0.4528985507246377, 'recall': 0.4635352286773795, 'f1': 0.4581551618814906, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.6272806255430061, 'recall': 0.6779342723004694, 'f1': 0.6516245487364621, 'number': 1065} | 0.5447 | 0.5504 | 0.5475 | 0.6845 |
59
+ | 0.8495 | 4.0 | 40 | 0.7990 | {'precision': 0.5910973084886129, 'recall': 0.7058096415327565, 'f1': 0.6433802816901407, 'number': 809} | {'precision': 0.05970149253731343, 'recall': 0.03361344537815126, 'f1': 0.04301075268817204, 'number': 119} | {'precision': 0.6702222222222223, 'recall': 0.707981220657277, 'f1': 0.6885844748858447, 'number': 1065} | 0.6158 | 0.6668 | 0.6403 | 0.7510 |
60
+ | 0.6866 | 5.0 | 50 | 0.7357 | {'precision': 0.6541436464088398, 'recall': 0.7317676143386898, 'f1': 0.6907817969661612, 'number': 809} | {'precision': 0.2235294117647059, 'recall': 0.15966386554621848, 'f1': 0.18627450980392157, 'number': 119} | {'precision': 0.7028619528619529, 'recall': 0.784037558685446, 'f1': 0.7412339103417664, 'number': 1065} | 0.6639 | 0.7255 | 0.6934 | 0.7698 |
61
+ | 0.5626 | 6.0 | 60 | 0.6982 | {'precision': 0.6594871794871795, 'recall': 0.7948084054388134, 'f1': 0.7208520179372198, 'number': 809} | {'precision': 0.28378378378378377, 'recall': 0.17647058823529413, 'f1': 0.21761658031088082, 'number': 119} | {'precision': 0.6939417781274587, 'recall': 0.828169014084507, 'f1': 0.7551369863013697, 'number': 1065} | 0.6664 | 0.7757 | 0.7169 | 0.7872 |
62
+ | 0.4875 | 7.0 | 70 | 0.6710 | {'precision': 0.6905286343612335, 'recall': 0.7750309023485785, 'f1': 0.7303436225975539, 'number': 809} | {'precision': 0.2336448598130841, 'recall': 0.21008403361344538, 'f1': 0.22123893805309733, 'number': 119} | {'precision': 0.7287145242070117, 'recall': 0.819718309859155, 'f1': 0.7715422006186478, 'number': 1065} | 0.6891 | 0.7652 | 0.7252 | 0.7924 |
63
+ | 0.4499 | 8.0 | 80 | 0.6635 | {'precision': 0.6888412017167382, 'recall': 0.7935723114956736, 'f1': 0.7375071797817346, 'number': 809} | {'precision': 0.25210084033613445, 'recall': 0.25210084033613445, 'f1': 0.25210084033613445, 'number': 119} | {'precision': 0.7314814814814815, 'recall': 0.815962441314554, 'f1': 0.771415889924545, 'number': 1065} | 0.6883 | 0.7732 | 0.7283 | 0.7977 |
64
+ | 0.3939 | 9.0 | 90 | 0.6686 | {'precision': 0.709070796460177, 'recall': 0.792336217552534, 'f1': 0.7483946293053124, 'number': 809} | {'precision': 0.24817518248175183, 'recall': 0.2857142857142857, 'f1': 0.265625, 'number': 119} | {'precision': 0.7311557788944724, 'recall': 0.819718309859155, 'f1': 0.7729083665338645, 'number': 1065} | 0.6926 | 0.7767 | 0.7323 | 0.7970 |
65
+ | 0.3522 | 10.0 | 100 | 0.6728 | {'precision': 0.7094668117519043, 'recall': 0.8059332509270705, 'f1': 0.7546296296296295, 'number': 809} | {'precision': 0.3135593220338983, 'recall': 0.31092436974789917, 'f1': 0.31223628691983124, 'number': 119} | {'precision': 0.7573149741824441, 'recall': 0.8262910798122066, 'f1': 0.7903008531656939, 'number': 1065} | 0.7135 | 0.7873 | 0.7486 | 0.8034 |
66
+ | 0.3124 | 11.0 | 110 | 0.6859 | {'precision': 0.7041800643086816, 'recall': 0.8121137206427689, 'f1': 0.7543053960964409, 'number': 809} | {'precision': 0.3076923076923077, 'recall': 0.3025210084033613, 'f1': 0.30508474576271183, 'number': 119} | {'precision': 0.7731316725978647, 'recall': 0.815962441314554, 'f1': 0.793969849246231, 'number': 1065} | 0.7185 | 0.7837 | 0.7497 | 0.8006 |
67
+ | 0.306 | 12.0 | 120 | 0.6947 | {'precision': 0.720489977728285, 'recall': 0.799752781211372, 'f1': 0.7580550673696543, 'number': 809} | {'precision': 0.2773722627737226, 'recall': 0.31932773109243695, 'f1': 0.296875, 'number': 119} | {'precision': 0.7567332754126846, 'recall': 0.8178403755868544, 'f1': 0.7861010830324908, 'number': 1065} | 0.7118 | 0.7807 | 0.7447 | 0.7987 |
68
+ | 0.283 | 13.0 | 130 | 0.6948 | {'precision': 0.7201783723522854, 'recall': 0.7985166872682324, 'f1': 0.7573270808909731, 'number': 809} | {'precision': 0.30597014925373134, 'recall': 0.3445378151260504, 'f1': 0.3241106719367589, 'number': 119} | {'precision': 0.7585004359197908, 'recall': 0.8169014084507042, 'f1': 0.7866184448462928, 'number': 1065} | 0.7149 | 0.7812 | 0.7466 | 0.8000 |
69
+ | 0.2726 | 14.0 | 140 | 0.7002 | {'precision': 0.7119205298013245, 'recall': 0.7972805933250927, 'f1': 0.7521865889212828, 'number': 809} | {'precision': 0.3049645390070922, 'recall': 0.36134453781512604, 'f1': 0.3307692307692308, 'number': 119} | {'precision': 0.762532981530343, 'recall': 0.8140845070422535, 'f1': 0.787465940054496, 'number': 1065} | 0.7120 | 0.7802 | 0.7446 | 0.8001 |
70
+ | 0.264 | 15.0 | 150 | 0.7037 | {'precision': 0.7206703910614525, 'recall': 0.7972805933250927, 'f1': 0.7570422535211268, 'number': 809} | {'precision': 0.3006993006993007, 'recall': 0.36134453781512604, 'f1': 0.3282442748091603, 'number': 119} | {'precision': 0.7585004359197908, 'recall': 0.8169014084507042, 'f1': 0.7866184448462928, 'number': 1065} | 0.7130 | 0.7817 | 0.7458 | 0.7989 |
71
+
72
+
73
+ ### Framework versions
74
+
75
+ - Transformers 4.26.0
76
+ - Pytorch 1.13.1+cu116
77
+ - Datasets 2.9.0
78
+ - Tokenizers 0.13.2
logs/events.out.tfevents.1675584794.9f093e0d0b32.10874.0 CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:068dc9bab5f283b1751e90e2539b43ad5e3de0ce944b3722c72ab98300dba3c9
3
- size 13864
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b8d4ea7991e45847909c16128a891574eeb9076bbda1e1454fc1e3c6dd4c4bc9
3
+ size 14218
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:1aa8fb28260f5ad4a709ad164e65bf2043420714823bbe124483a1f01eb91408
3
  size 450605509
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c78a0ce7b1b79190adc3e5d88bb8b678f7c7d1cc773ec147219080b0b6cec026
3
  size 450605509
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