Sagar0934 commited on
Commit
a93b81a
1 Parent(s): a4e9b6f

End of training

Browse files
README.md ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: microsoft/layoutlm-base-uncased
3
+ tags:
4
+ - generated_from_trainer
5
+ datasets:
6
+ - funsd
7
+ model-index:
8
+ - name: layoutlm-funsd
9
+ results: []
10
+ ---
11
+
12
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
13
+ should probably proofread and complete it, then remove this comment. -->
14
+
15
+ # layoutlm-funsd
16
+
17
+ This model is a fine-tuned version of [microsoft/layoutlm-base-uncased](https://huggingface.co/microsoft/layoutlm-base-uncased) on the funsd dataset.
18
+ It achieves the following results on the evaluation set:
19
+ - Loss: 0.6608
20
+ - Answer: {'precision': 0.7201783723522854, 'recall': 0.7985166872682324, 'f1': 0.7573270808909731, 'number': 809}
21
+ - Header: {'precision': 0.31932773109243695, 'recall': 0.31932773109243695, 'f1': 0.31932773109243695, 'number': 119}
22
+ - Question: {'precision': 0.7643478260869565, 'recall': 0.8253521126760563, 'f1': 0.7936794582392775, 'number': 1065}
23
+ - Overall Precision: 0.7216
24
+ - Overall Recall: 0.7842
25
+ - Overall F1: 0.7516
26
+ - Overall Accuracy: 0.8167
27
+
28
+ ## Model description
29
+
30
+ More information needed
31
+
32
+ ## Intended uses & limitations
33
+
34
+ More information needed
35
+
36
+ ## Training and evaluation data
37
+
38
+ More information needed
39
+
40
+ ## Training procedure
41
+
42
+ ### Training hyperparameters
43
+
44
+ The following hyperparameters were used during training:
45
+ - learning_rate: 3e-05
46
+ - train_batch_size: 16
47
+ - eval_batch_size: 8
48
+ - seed: 42
49
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
50
+ - lr_scheduler_type: linear
51
+ - num_epochs: 15
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.8317 | 1.0 | 10 | 1.6104 | {'precision': 0.027842227378190254, 'recall': 0.029666254635352288, 'f1': 0.02872531418312388, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.2206047032474804, 'recall': 0.18497652582159624, 'f1': 0.20122574055158324, 'number': 1065} | 0.1259 | 0.1109 | 0.1179 | 0.3482 |
58
+ | 1.4526 | 2.0 | 20 | 1.2629 | {'precision': 0.2147165259348613, 'recall': 0.2200247218788628, 'f1': 0.21733821733821734, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.45054095826893353, 'recall': 0.5474178403755868, 'f1': 0.4942772361169987, 'number': 1065} | 0.3585 | 0.3818 | 0.3698 | 0.5749 |
59
+ | 1.0991 | 3.0 | 30 | 0.9508 | {'precision': 0.4650856389986825, 'recall': 0.4363411619283066, 'f1': 0.45025510204081637, 'number': 809} | {'precision': 0.05128205128205128, 'recall': 0.01680672268907563, 'f1': 0.025316455696202535, 'number': 119} | {'precision': 0.6182287188306105, 'recall': 0.6751173708920187, 'f1': 0.6454219030520646, 'number': 1065} | 0.5477 | 0.5389 | 0.5432 | 0.7030 |
60
+ | 0.8223 | 4.0 | 40 | 0.7675 | {'precision': 0.5823863636363636, 'recall': 0.7601977750309024, 'f1': 0.6595174262734583, 'number': 809} | {'precision': 0.1774193548387097, 'recall': 0.09243697478991597, 'f1': 0.12154696132596685, 'number': 119} | {'precision': 0.6633249791144528, 'recall': 0.7455399061032864, 'f1': 0.7020335985853228, 'number': 1065} | 0.6134 | 0.7125 | 0.6592 | 0.7615 |
61
+ | 0.6605 | 5.0 | 50 | 0.6992 | {'precision': 0.6135662898252826, 'recall': 0.7379480840543882, 'f1': 0.6700336700336701, 'number': 809} | {'precision': 0.273972602739726, 'recall': 0.16806722689075632, 'f1': 0.20833333333333331, 'number': 119} | {'precision': 0.7077865266841645, 'recall': 0.7596244131455399, 'f1': 0.7327898550724637, 'number': 1065} | 0.6514 | 0.7155 | 0.6820 | 0.7834 |
62
+ | 0.5625 | 6.0 | 60 | 0.6647 | {'precision': 0.6484784889821616, 'recall': 0.7639060568603214, 'f1': 0.7014755959137344, 'number': 809} | {'precision': 0.25, 'recall': 0.24369747899159663, 'f1': 0.24680851063829787, 'number': 119} | {'precision': 0.7197032151690025, 'recall': 0.819718309859155, 'f1': 0.7664618086040387, 'number': 1065} | 0.6661 | 0.7627 | 0.7111 | 0.7955 |
63
+ | 0.4838 | 7.0 | 70 | 0.6497 | {'precision': 0.6606189967982924, 'recall': 0.765142150803461, 'f1': 0.7090492554410079, 'number': 809} | {'precision': 0.29896907216494845, 'recall': 0.24369747899159663, 'f1': 0.2685185185185185, 'number': 119} | {'precision': 0.7332775919732442, 'recall': 0.8234741784037559, 'f1': 0.7757629367536488, 'number': 1065} | 0.6839 | 0.7652 | 0.7222 | 0.8043 |
64
+ | 0.4394 | 8.0 | 80 | 0.6342 | {'precision': 0.6813778256189451, 'recall': 0.7824474660074165, 'f1': 0.7284234752589184, 'number': 809} | {'precision': 0.30701754385964913, 'recall': 0.29411764705882354, 'f1': 0.30042918454935624, 'number': 119} | {'precision': 0.7540425531914894, 'recall': 0.831924882629108, 'f1': 0.7910714285714286, 'number': 1065} | 0.7006 | 0.7797 | 0.7381 | 0.8090 |
65
+ | 0.3871 | 9.0 | 90 | 0.6447 | {'precision': 0.7117516629711752, 'recall': 0.7935723114956736, 'f1': 0.750438340151958, 'number': 809} | {'precision': 0.35, 'recall': 0.29411764705882354, 'f1': 0.31963470319634707, 'number': 119} | {'precision': 0.7660510114335972, 'recall': 0.8178403755868544, 'f1': 0.7910990009082652, 'number': 1065} | 0.7237 | 0.7767 | 0.7493 | 0.8132 |
66
+ | 0.3503 | 10.0 | 100 | 0.6390 | {'precision': 0.7056892778993435, 'recall': 0.7972805933250927, 'f1': 0.7486941381311665, 'number': 809} | {'precision': 0.3431372549019608, 'recall': 0.29411764705882354, 'f1': 0.31674208144796384, 'number': 119} | {'precision': 0.7638888888888888, 'recall': 0.8262910798122066, 'f1': 0.7938655841226885, 'number': 1065} | 0.7196 | 0.7827 | 0.7498 | 0.8160 |
67
+ | 0.3196 | 11.0 | 110 | 0.6503 | {'precision': 0.7168338907469343, 'recall': 0.7948084054388134, 'f1': 0.753810082063306, 'number': 809} | {'precision': 0.29464285714285715, 'recall': 0.2773109243697479, 'f1': 0.28571428571428575, 'number': 119} | {'precision': 0.7765862377122431, 'recall': 0.815962441314554, 'f1': 0.7957875457875458, 'number': 1065} | 0.7260 | 0.7752 | 0.7498 | 0.8155 |
68
+ | 0.3023 | 12.0 | 120 | 0.6432 | {'precision': 0.7020810514786419, 'recall': 0.792336217552534, 'f1': 0.7444831591173056, 'number': 809} | {'precision': 0.3181818181818182, 'recall': 0.29411764705882354, 'f1': 0.3056768558951965, 'number': 119} | {'precision': 0.7600341588385995, 'recall': 0.8356807511737089, 'f1': 0.7960644007155636, 'number': 1065} | 0.7138 | 0.7858 | 0.7480 | 0.8181 |
69
+ | 0.289 | 13.0 | 130 | 0.6666 | {'precision': 0.7231638418079096, 'recall': 0.7911001236093943, 'f1': 0.755608028335301, 'number': 809} | {'precision': 0.29838709677419356, 'recall': 0.31092436974789917, 'f1': 0.3045267489711935, 'number': 119} | {'precision': 0.7837837837837838, 'recall': 0.8169014084507042, 'f1': 0.8, 'number': 1065} | 0.7301 | 0.7762 | 0.7524 | 0.8184 |
70
+ | 0.27 | 14.0 | 140 | 0.6599 | {'precision': 0.7224080267558528, 'recall': 0.8009888751545118, 'f1': 0.7596717467760844, 'number': 809} | {'precision': 0.32456140350877194, 'recall': 0.31092436974789917, 'f1': 0.31759656652360513, 'number': 119} | {'precision': 0.763840830449827, 'recall': 0.8291079812206573, 'f1': 0.7951373255290409, 'number': 1065} | 0.7236 | 0.7868 | 0.7538 | 0.8159 |
71
+ | 0.2686 | 15.0 | 150 | 0.6608 | {'precision': 0.7201783723522854, 'recall': 0.7985166872682324, 'f1': 0.7573270808909731, 'number': 809} | {'precision': 0.31932773109243695, 'recall': 0.31932773109243695, 'f1': 0.31932773109243695, 'number': 119} | {'precision': 0.7643478260869565, 'recall': 0.8253521126760563, 'f1': 0.7936794582392775, 'number': 1065} | 0.7216 | 0.7842 | 0.7516 | 0.8167 |
72
+
73
+
74
+ ### Framework versions
75
+
76
+ - Transformers 4.34.0
77
+ - Pytorch 2.0.1+cu118
78
+ - Datasets 2.14.5
79
+ - Tokenizers 0.14.1
added_tokens.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "[CLS]": 101,
3
+ "[MASK]": 103,
4
+ "[PAD]": 0,
5
+ "[SEP]": 102,
6
+ "[UNK]": 100
7
+ }
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:438e7028dbf0a6d0df555b973d9f119aa4b59f152ebb788ba67ab8171e0971e3
3
  size 450603969
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8defa5a31e4c8a441d08eef31fe6883b1ae6f0a8a6effc20069684001eb7df39
3
  size 450603969
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,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "[PAD]",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "100": {
12
+ "content": "[UNK]",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "101": {
20
+ "content": "[CLS]",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "102": {
28
+ "content": "[SEP]",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "103": {
36
+ "content": "[MASK]",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ }
43
+ },
44
+ "additional_special_tokens": [],
45
+ "apply_ocr": false,
46
+ "clean_up_tokenization_spaces": true,
47
+ "cls_token": "[CLS]",
48
+ "cls_token_box": [
49
+ 0,
50
+ 0,
51
+ 0,
52
+ 0
53
+ ],
54
+ "do_basic_tokenize": true,
55
+ "do_lower_case": true,
56
+ "mask_token": "[MASK]",
57
+ "model_max_length": 512,
58
+ "never_split": null,
59
+ "only_label_first_subword": true,
60
+ "pad_token": "[PAD]",
61
+ "pad_token_box": [
62
+ 0,
63
+ 0,
64
+ 0,
65
+ 0
66
+ ],
67
+ "pad_token_label": -100,
68
+ "processor_class": "LayoutLMv2Processor",
69
+ "sep_token": "[SEP]",
70
+ "sep_token_box": [
71
+ 1000,
72
+ 1000,
73
+ 1000,
74
+ 1000
75
+ ],
76
+ "strip_accents": null,
77
+ "tokenize_chinese_chars": true,
78
+ "tokenizer_class": "LayoutLMv2Tokenizer",
79
+ "unk_token": "[UNK]"
80
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff