philschmid HF staff commited on
Commit
dedebc3
1 Parent(s): d1fbfdc

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: 1.0045
19
+ - Answer: {'precision': 0.7348314606741573, 'recall': 0.8084054388133498, 'f1': 0.7698646262507357, 'number': 809}
20
+ - Header: {'precision': 0.44285714285714284, 'recall': 0.5210084033613446, 'f1': 0.47876447876447875, 'number': 119}
21
+ - Question: {'precision': 0.8211009174311926, 'recall': 0.8403755868544601, 'f1': 0.8306264501160092, 'number': 1065}
22
+ - Overall Precision: 0.7599
23
+ - Overall Recall: 0.8083
24
+ - Overall F1: 0.7834
25
+ - Overall Accuracy: 0.8106
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
+ | 0.1724 | 1.0 | 10 | 0.7657 | {'precision': 0.7097826086956521, 'recall': 0.8071693448702101, 'f1': 0.7553499132446501, 'number': 809} | {'precision': 0.3893129770992366, 'recall': 0.42857142857142855, 'f1': 0.40800000000000003, 'number': 119} | {'precision': 0.7941176470588235, 'recall': 0.8366197183098592, 'f1': 0.8148148148148148, 'number': 1065} | 0.7340 | 0.8003 | 0.7657 | 0.8134 |
58
+ | 0.1451 | 2.0 | 20 | 0.8099 | {'precision': 0.7136659436008677, 'recall': 0.8133498145859085, 'f1': 0.7602541883304449, 'number': 809} | {'precision': 0.4215686274509804, 'recall': 0.36134453781512604, 'f1': 0.3891402714932127, 'number': 119} | {'precision': 0.809437386569873, 'recall': 0.8375586854460094, 'f1': 0.823257960313798, 'number': 1065} | 0.7493 | 0.7993 | 0.7735 | 0.8125 |
59
+ | 0.1179 | 3.0 | 30 | 0.8622 | {'precision': 0.7099892588614393, 'recall': 0.8170580964153276, 'f1': 0.7597701149425288, 'number': 809} | {'precision': 0.4074074074074074, 'recall': 0.46218487394957986, 'f1': 0.4330708661417323, 'number': 119} | {'precision': 0.8123300090661831, 'recall': 0.8413145539906103, 'f1': 0.8265682656826567, 'number': 1065} | 0.7432 | 0.8088 | 0.7746 | 0.8074 |
60
+ | 0.0988 | 4.0 | 40 | 0.8587 | {'precision': 0.7141327623126338, 'recall': 0.8244746600741656, 'f1': 0.7653471026965003, 'number': 809} | {'precision': 0.4166666666666667, 'recall': 0.5042016806722689, 'f1': 0.4562737642585551, 'number': 119} | {'precision': 0.8370998116760828, 'recall': 0.8347417840375587, 'f1': 0.8359191349318289, 'number': 1065} | 0.7551 | 0.8108 | 0.7820 | 0.8157 |
61
+ | 0.0848 | 5.0 | 50 | 0.8933 | {'precision': 0.7255813953488373, 'recall': 0.7713226205191595, 'f1': 0.7477531455961653, 'number': 809} | {'precision': 0.4024390243902439, 'recall': 0.5546218487394958, 'f1': 0.46643109540636046, 'number': 119} | {'precision': 0.8201834862385321, 'recall': 0.8394366197183099, 'f1': 0.8296983758700696, 'number': 1065} | 0.7493 | 0.7948 | 0.7714 | 0.8056 |
62
+ | 0.073 | 6.0 | 60 | 0.9009 | {'precision': 0.7344444444444445, 'recall': 0.8170580964153276, 'f1': 0.7735517846693973, 'number': 809} | {'precision': 0.41721854304635764, 'recall': 0.5294117647058824, 'f1': 0.4666666666666667, 'number': 119} | {'precision': 0.8107370336669699, 'recall': 0.8366197183098592, 'f1': 0.8234750462107209, 'number': 1065} | 0.7512 | 0.8103 | 0.7796 | 0.8123 |
63
+ | 0.0655 | 7.0 | 70 | 0.9117 | {'precision': 0.7367231638418079, 'recall': 0.8059332509270705, 'f1': 0.769775678866588, 'number': 809} | {'precision': 0.4357142857142857, 'recall': 0.5126050420168067, 'f1': 0.47104247104247104, 'number': 119} | {'precision': 0.8170955882352942, 'recall': 0.8347417840375587, 'f1': 0.8258244310264746, 'number': 1065} | 0.7582 | 0.8038 | 0.7803 | 0.8088 |
64
+ | 0.0599 | 8.0 | 80 | 0.9414 | {'precision': 0.7298474945533769, 'recall': 0.8281829419035847, 'f1': 0.7759119861030689, 'number': 809} | {'precision': 0.41496598639455784, 'recall': 0.5126050420168067, 'f1': 0.4586466165413534, 'number': 119} | {'precision': 0.8100810081008101, 'recall': 0.8450704225352113, 'f1': 0.8272058823529411, 'number': 1065} | 0.7495 | 0.8184 | 0.7824 | 0.8089 |
65
+ | 0.0551 | 9.0 | 90 | 0.9548 | {'precision': 0.746031746031746, 'recall': 0.8133498145859085, 'f1': 0.7782377291543465, 'number': 809} | {'precision': 0.42953020134228187, 'recall': 0.5378151260504201, 'f1': 0.47761194029850745, 'number': 119} | {'precision': 0.823963133640553, 'recall': 0.8394366197183099, 'f1': 0.8316279069767442, 'number': 1065} | 0.7637 | 0.8108 | 0.7866 | 0.8111 |
66
+ | 0.0483 | 10.0 | 100 | 0.9684 | {'precision': 0.7390326209223848, 'recall': 0.8121137206427689, 'f1': 0.773851590106007, 'number': 809} | {'precision': 0.42, 'recall': 0.5294117647058824, 'f1': 0.46840148698884754, 'number': 119} | {'precision': 0.8232044198895028, 'recall': 0.8394366197183099, 'f1': 0.8312412831241283, 'number': 1065} | 0.7595 | 0.8098 | 0.7839 | 0.8091 |
67
+ | 0.0424 | 11.0 | 110 | 0.9858 | {'precision': 0.7392290249433107, 'recall': 0.8059332509270705, 'f1': 0.7711413364872857, 'number': 809} | {'precision': 0.4258064516129032, 'recall': 0.5546218487394958, 'f1': 0.48175182481751827, 'number': 119} | {'precision': 0.8252788104089219, 'recall': 0.8338028169014085, 'f1': 0.8295189163942083, 'number': 1065} | 0.7601 | 0.8058 | 0.7823 | 0.8094 |
68
+ | 0.0402 | 12.0 | 120 | 0.9920 | {'precision': 0.7315436241610739, 'recall': 0.8084054388133498, 'f1': 0.7680563711098063, 'number': 809} | {'precision': 0.4460431654676259, 'recall': 0.5210084033613446, 'f1': 0.48062015503875966, 'number': 119} | {'precision': 0.8205128205128205, 'recall': 0.8413145539906103, 'f1': 0.8307834955957348, 'number': 1065} | 0.7586 | 0.8088 | 0.7829 | 0.8111 |
69
+ | 0.0392 | 13.0 | 130 | 1.0027 | {'precision': 0.7463193657984145, 'recall': 0.8145859085290482, 'f1': 0.7789598108747045, 'number': 809} | {'precision': 0.4397163120567376, 'recall': 0.5210084033613446, 'f1': 0.47692307692307695, 'number': 119} | {'precision': 0.8216911764705882, 'recall': 0.8394366197183099, 'f1': 0.8304691128657686, 'number': 1065} | 0.7647 | 0.8103 | 0.7868 | 0.8104 |
70
+ | 0.0361 | 14.0 | 140 | 1.0027 | {'precision': 0.7421171171171171, 'recall': 0.8145859085290482, 'f1': 0.7766647024160284, 'number': 809} | {'precision': 0.43884892086330934, 'recall': 0.5126050420168067, 'f1': 0.4728682170542636, 'number': 119} | {'precision': 0.8205128205128205, 'recall': 0.8413145539906103, 'f1': 0.8307834955957348, 'number': 1065} | 0.7626 | 0.8108 | 0.7860 | 0.8115 |
71
+ | 0.0349 | 15.0 | 150 | 1.0045 | {'precision': 0.7348314606741573, 'recall': 0.8084054388133498, 'f1': 0.7698646262507357, 'number': 809} | {'precision': 0.44285714285714284, 'recall': 0.5210084033613446, 'f1': 0.47876447876447875, 'number': 119} | {'precision': 0.8211009174311926, 'recall': 0.8403755868544601, 'f1': 0.8306264501160092, 'number': 1065} | 0.7599 | 0.8083 | 0.7834 | 0.8106 |
72
+
73
+
74
+ ### Framework versions
75
+
76
+ - Transformers 4.21.2
77
+ - Pytorch 1.11.0+cu113
78
+ - Datasets 2.5.1
79
+ - Tokenizers 0.12.1
logs/events.out.tfevents.1664886497.ip-172-31-95-43.2313.2 CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:c9c0d931336792400e4c7b7afeeaf27863e570edaedb205f7433062fd98fc484
3
- size 11815
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c94fadb7dd809e8e4a67b36a9b049d80407315a2246ddec3ff40b73ad6838235
3
+ size 14152
preprocessor_config.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "apply_ocr": false,
3
+ "do_resize": true,
4
+ "feature_extractor_type": "LayoutLMv2FeatureExtractor",
5
+ "ocr_lang": null,
6
+ "processor_class": "LayoutLMv2Processor",
7
+ "resample": 2,
8
+ "size": 224
9
+ }
pytorch_model.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:e08891dbfb96588d2b40ff233fe6157f5f6386fb5b61c3518df870f4c994bb65
3
  size 450606565
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4f31380262cd4f276be211189196f190c0268e9cece977d500886a4e4c16fc07
3
  size 450606565
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