navakanth-reddy commited on
Commit
5e5cff5
1 Parent(s): e3217bc

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.7080
20
+ - Answer: {'precision': 0.7122381477398015, 'recall': 0.7985166872682324, 'f1': 0.752913752913753, 'number': 809}
21
+ - Header: {'precision': 0.3359375, 'recall': 0.36134453781512604, 'f1': 0.3481781376518218, 'number': 119}
22
+ - Question: {'precision': 0.7817531305903399, 'recall': 0.8206572769953052, 'f1': 0.8007329363261567, 'number': 1065}
23
+ - Overall Precision: 0.7260
24
+ - Overall Recall: 0.7842
25
+ - Overall F1: 0.7540
26
+ - Overall Accuracy: 0.8073
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.4164 | 1.0 | 10 | 1.1867 | {'precision': 0.21566110397946084, 'recall': 0.207663782447466, 'f1': 0.21158690176322417, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.48124557678697805, 'recall': 0.6384976525821596, 'f1': 0.5488297013720743, 'number': 1065} | 0.3869 | 0.4255 | 0.4053 | 0.6139 |
58
+ | 1.0235 | 2.0 | 20 | 0.8815 | {'precision': 0.578494623655914, 'recall': 0.6650185414091471, 'f1': 0.6187464059804485, 'number': 809} | {'precision': 0.05555555555555555, 'recall': 0.008403361344537815, 'f1': 0.014598540145985401, 'number': 119} | {'precision': 0.6398687448728466, 'recall': 0.7323943661971831, 'f1': 0.6830122591943958, 'number': 1065} | 0.6087 | 0.6618 | 0.6341 | 0.7403 |
59
+ | 0.7822 | 3.0 | 30 | 0.7564 | {'precision': 0.6335403726708074, 'recall': 0.7564894932014833, 'f1': 0.6895774647887324, 'number': 809} | {'precision': 0.13559322033898305, 'recall': 0.06722689075630252, 'f1': 0.0898876404494382, 'number': 119} | {'precision': 0.6905158069883528, 'recall': 0.7793427230046949, 'f1': 0.7322452580502868, 'number': 1065} | 0.6511 | 0.7275 | 0.6872 | 0.7697 |
60
+ | 0.6495 | 4.0 | 40 | 0.6955 | {'precision': 0.6533333333333333, 'recall': 0.7873918417799752, 'f1': 0.7141255605381165, 'number': 809} | {'precision': 0.19480519480519481, 'recall': 0.12605042016806722, 'f1': 0.15306122448979592, 'number': 119} | {'precision': 0.7162276975361087, 'recall': 0.7915492957746478, 'f1': 0.752007136485281, 'number': 1065} | 0.6707 | 0.7501 | 0.7082 | 0.7915 |
61
+ | 0.5641 | 5.0 | 50 | 0.6796 | {'precision': 0.6843267108167771, 'recall': 0.7663782447466008, 'f1': 0.7230320699708457, 'number': 809} | {'precision': 0.275, 'recall': 0.18487394957983194, 'f1': 0.22110552763819097, 'number': 119} | {'precision': 0.7565217391304347, 'recall': 0.8169014084507042, 'f1': 0.7855530474040633, 'number': 1065} | 0.7079 | 0.7587 | 0.7324 | 0.7899 |
62
+ | 0.4862 | 6.0 | 60 | 0.6563 | {'precision': 0.6844978165938864, 'recall': 0.7750309023485785, 'f1': 0.7269565217391305, 'number': 809} | {'precision': 0.28, 'recall': 0.23529411764705882, 'f1': 0.2557077625570776, 'number': 119} | {'precision': 0.7420168067226891, 'recall': 0.8291079812206573, 'f1': 0.7831485587583149, 'number': 1065} | 0.6972 | 0.7717 | 0.7326 | 0.8007 |
63
+ | 0.4389 | 7.0 | 70 | 0.6444 | {'precision': 0.6868365180467091, 'recall': 0.799752781211372, 'f1': 0.7390062821245003, 'number': 809} | {'precision': 0.28703703703703703, 'recall': 0.2605042016806723, 'f1': 0.27312775330396477, 'number': 119} | {'precision': 0.7411167512690355, 'recall': 0.8225352112676056, 'f1': 0.7797062750333779, 'number': 1065} | 0.6962 | 0.7797 | 0.7356 | 0.8040 |
64
+ | 0.3912 | 8.0 | 80 | 0.6505 | {'precision': 0.7074527252502781, 'recall': 0.7861557478368356, 'f1': 0.7447306791569087, 'number': 809} | {'precision': 0.3392857142857143, 'recall': 0.31932773109243695, 'f1': 0.32900432900432897, 'number': 119} | {'precision': 0.7689594356261023, 'recall': 0.8187793427230047, 'f1': 0.793087767166894, 'number': 1065} | 0.7207 | 0.7757 | 0.7472 | 0.8073 |
65
+ | 0.3511 | 9.0 | 90 | 0.6696 | {'precision': 0.7147577092511013, 'recall': 0.8022249690976514, 'f1': 0.7559697146185206, 'number': 809} | {'precision': 0.296, 'recall': 0.31092436974789917, 'f1': 0.30327868852459017, 'number': 119} | {'precision': 0.7589833479404031, 'recall': 0.8131455399061033, 'f1': 0.7851314596554851, 'number': 1065} | 0.7139 | 0.7787 | 0.7449 | 0.8042 |
66
+ | 0.3166 | 10.0 | 100 | 0.6746 | {'precision': 0.7190265486725663, 'recall': 0.8034610630407911, 'f1': 0.7589025102159953, 'number': 809} | {'precision': 0.35398230088495575, 'recall': 0.33613445378151263, 'f1': 0.3448275862068966, 'number': 119} | {'precision': 0.7753108348134992, 'recall': 0.819718309859155, 'f1': 0.7968963943404839, 'number': 1065} | 0.7294 | 0.7842 | 0.7558 | 0.8081 |
67
+ | 0.2925 | 11.0 | 110 | 0.6839 | {'precision': 0.7160356347438753, 'recall': 0.7948084054388134, 'f1': 0.753368482718219, 'number': 809} | {'precision': 0.3208955223880597, 'recall': 0.36134453781512604, 'f1': 0.33992094861660077, 'number': 119} | {'precision': 0.7803780378037803, 'recall': 0.8140845070422535, 'f1': 0.796875, 'number': 1065} | 0.7247 | 0.7792 | 0.7510 | 0.8087 |
68
+ | 0.2837 | 12.0 | 120 | 0.6853 | {'precision': 0.7161862527716186, 'recall': 0.7985166872682324, 'f1': 0.7551139684395091, 'number': 809} | {'precision': 0.3333333333333333, 'recall': 0.3445378151260504, 'f1': 0.33884297520661155, 'number': 119} | {'precision': 0.7751322751322751, 'recall': 0.8253521126760563, 'f1': 0.7994542974079127, 'number': 1065} | 0.7253 | 0.7858 | 0.7543 | 0.8064 |
69
+ | 0.265 | 13.0 | 130 | 0.7016 | {'precision': 0.7069154774972558, 'recall': 0.796044499381953, 'f1': 0.7488372093023256, 'number': 809} | {'precision': 0.31654676258992803, 'recall': 0.3697478991596639, 'f1': 0.3410852713178294, 'number': 119} | {'precision': 0.7867513611615246, 'recall': 0.8140845070422535, 'f1': 0.8001845869866173, 'number': 1065} | 0.7226 | 0.7802 | 0.7503 | 0.8076 |
70
+ | 0.2475 | 14.0 | 140 | 0.7055 | {'precision': 0.7084708470847084, 'recall': 0.796044499381953, 'f1': 0.749708963911525, 'number': 809} | {'precision': 0.32575757575757575, 'recall': 0.36134453781512604, 'f1': 0.3426294820717131, 'number': 119} | {'precision': 0.771806167400881, 'recall': 0.8225352112676056, 'f1': 0.7963636363636363, 'number': 1065} | 0.7183 | 0.7842 | 0.7498 | 0.8054 |
71
+ | 0.2423 | 15.0 | 150 | 0.7080 | {'precision': 0.7122381477398015, 'recall': 0.7985166872682324, 'f1': 0.752913752913753, 'number': 809} | {'precision': 0.3359375, 'recall': 0.36134453781512604, 'f1': 0.3481781376518218, 'number': 119} | {'precision': 0.7817531305903399, 'recall': 0.8206572769953052, 'f1': 0.8007329363261567, 'number': 1065} | 0.7260 | 0.7842 | 0.7540 | 0.8073 |
72
+
73
+
74
+ ### Framework versions
75
+
76
+ - Transformers 4.34.1
77
+ - Pytorch 2.1.0+cu118
78
+ - Datasets 2.14.6
79
+ - Tokenizers 0.14.1
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:4663fe5b140a097699ac7e52e5a71814038e3905c45b0fb0e564abc5f25dc6de
3
  size 450604414
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fb511165d82e51218ca1d884dbb3daa5db074d330b5f337e44dfd44176fd2519
3
  size 450604414
special_tokens_map.json ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cls_token": {
3
+ "content": "[CLS]",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "mask_token": {
10
+ "content": "[MASK]",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": {
17
+ "content": "[PAD]",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "sep_token": {
24
+ "content": "[SEP]",
25
+ "lstrip": false,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ },
30
+ "unk_token": {
31
+ "content": "[UNK]",
32
+ "lstrip": false,
33
+ "normalized": false,
34
+ "rstrip": false,
35
+ "single_word": false
36
+ }
37
+ }
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