ManelR commited on
Commit
75e07b5
1 Parent(s): 4c2863e

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: 0.6633
19
+ - Answer: {'precision': 0.7068004459308808, 'recall': 0.7836835599505563, 'f1': 0.7432590855803048, 'number': 809}
20
+ - Header: {'precision': 0.3025210084033613, 'recall': 0.3025210084033613, 'f1': 0.3025210084033613, 'number': 119}
21
+ - Question: {'precision': 0.757679180887372, 'recall': 0.8338028169014085, 'f1': 0.7939204291461779, 'number': 1065}
22
+ - Overall Precision: 0.7121
23
+ - Overall Recall: 0.7817
24
+ - Overall F1: 0.7453
25
+ - Overall Accuracy: 0.8174
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
+ | 1.8218 | 1.0 | 10 | 1.6340 | {'precision': 0.012857142857142857, 'recall': 0.011124845488257108, 'f1': 0.011928429423459244, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.22849807445442877, 'recall': 0.1671361502347418, 'f1': 0.19305856832971802, 'number': 1065} | 0.1264 | 0.0938 | 0.1077 | 0.3314 |
58
+ | 1.4842 | 2.0 | 20 | 1.2777 | {'precision': 0.18856447688564476, 'recall': 0.1915945611866502, 'f1': 0.19006744328632738, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.44694533762057875, 'recall': 0.5220657276995305, 'f1': 0.48159376353399735, 'number': 1065} | 0.3441 | 0.3567 | 0.3503 | 0.5691 |
59
+ | 1.1045 | 3.0 | 30 | 0.9751 | {'precision': 0.44747612551159616, 'recall': 0.4054388133498146, 'f1': 0.42542153047989617, 'number': 809} | {'precision': 0.05555555555555555, 'recall': 0.01680672268907563, 'f1': 0.025806451612903226, 'number': 119} | {'precision': 0.6208445642407907, 'recall': 0.6488262910798122, 'f1': 0.6345270890725436, 'number': 1065} | 0.5425 | 0.5123 | 0.5270 | 0.6860 |
60
+ | 0.833 | 4.0 | 40 | 0.7763 | {'precision': 0.6252609603340292, 'recall': 0.7404202719406675, 'f1': 0.677985285795133, 'number': 809} | {'precision': 0.1935483870967742, 'recall': 0.10084033613445378, 'f1': 0.13259668508287292, 'number': 119} | {'precision': 0.6614583333333334, 'recall': 0.7154929577464789, 'f1': 0.6874154262516915, 'number': 1065} | 0.6321 | 0.6889 | 0.6593 | 0.7559 |
61
+ | 0.6773 | 5.0 | 50 | 0.7051 | {'precision': 0.6295918367346939, 'recall': 0.7626699629171817, 'f1': 0.6897708216880939, 'number': 809} | {'precision': 0.29069767441860467, 'recall': 0.21008403361344538, 'f1': 0.24390243902439027, 'number': 119} | {'precision': 0.6980802792321117, 'recall': 0.7511737089201878, 'f1': 0.7236544549977386, 'number': 1065} | 0.6519 | 0.7235 | 0.6859 | 0.7788 |
62
+ | 0.5627 | 6.0 | 60 | 0.6598 | {'precision': 0.6423432682425488, 'recall': 0.7725587144622992, 'f1': 0.7014590347923682, 'number': 809} | {'precision': 0.32098765432098764, 'recall': 0.2184873949579832, 'f1': 0.26, 'number': 119} | {'precision': 0.7032878909382518, 'recall': 0.8234741784037559, 'f1': 0.7586505190311419, 'number': 1065} | 0.6641 | 0.7667 | 0.7117 | 0.7947 |
63
+ | 0.4959 | 7.0 | 70 | 0.6625 | {'precision': 0.6652267818574514, 'recall': 0.761433868974042, 'f1': 0.7100864553314121, 'number': 809} | {'precision': 0.2761904761904762, 'recall': 0.24369747899159663, 'f1': 0.2589285714285714, 'number': 119} | {'precision': 0.7452504317789291, 'recall': 0.8103286384976526, 'f1': 0.7764282501124606, 'number': 1065} | 0.6889 | 0.7566 | 0.7212 | 0.7945 |
64
+ | 0.4473 | 8.0 | 80 | 0.6402 | {'precision': 0.6684491978609626, 'recall': 0.7725587144622992, 'f1': 0.7167431192660552, 'number': 809} | {'precision': 0.25961538461538464, 'recall': 0.226890756302521, 'f1': 0.242152466367713, 'number': 119} | {'precision': 0.7415540540540541, 'recall': 0.8244131455399061, 'f1': 0.7807914628723877, 'number': 1065} | 0.6883 | 0.7677 | 0.7258 | 0.8046 |
65
+ | 0.3997 | 9.0 | 90 | 0.6381 | {'precision': 0.6879120879120879, 'recall': 0.7737948084054388, 'f1': 0.7283304246655031, 'number': 809} | {'precision': 0.27350427350427353, 'recall': 0.2689075630252101, 'f1': 0.2711864406779661, 'number': 119} | {'precision': 0.7418817651956703, 'recall': 0.8366197183098592, 'f1': 0.7864077669902912, 'number': 1065} | 0.6952 | 0.7772 | 0.7339 | 0.8095 |
66
+ | 0.3597 | 10.0 | 100 | 0.6481 | {'precision': 0.6959910913140311, 'recall': 0.7725587144622992, 'f1': 0.7322788517867603, 'number': 809} | {'precision': 0.25984251968503935, 'recall': 0.2773109243697479, 'f1': 0.2682926829268293, 'number': 119} | {'precision': 0.7495769881556683, 'recall': 0.831924882629108, 'f1': 0.7886070315976857, 'number': 1065} | 0.6996 | 0.7747 | 0.7352 | 0.8094 |
67
+ | 0.3241 | 11.0 | 110 | 0.6649 | {'precision': 0.6960893854748603, 'recall': 0.7700865265760197, 'f1': 0.7312206572769954, 'number': 809} | {'precision': 0.32075471698113206, 'recall': 0.2857142857142857, 'f1': 0.30222222222222217, 'number': 119} | {'precision': 0.7689625108979947, 'recall': 0.828169014084507, 'f1': 0.7974683544303798, 'number': 1065} | 0.7165 | 0.7722 | 0.7433 | 0.8115 |
68
+ | 0.3111 | 12.0 | 120 | 0.6584 | {'precision': 0.7083333333333334, 'recall': 0.7985166872682324, 'f1': 0.7507263219058687, 'number': 809} | {'precision': 0.29310344827586204, 'recall': 0.2857142857142857, 'f1': 0.2893617021276596, 'number': 119} | {'precision': 0.7658833768494343, 'recall': 0.8262910798122066, 'f1': 0.7949412827461607, 'number': 1065} | 0.7166 | 0.7827 | 0.7482 | 0.8134 |
69
+ | 0.2896 | 13.0 | 130 | 0.6736 | {'precision': 0.7007963594994312, 'recall': 0.761433868974042, 'f1': 0.7298578199052134, 'number': 809} | {'precision': 0.2536231884057971, 'recall': 0.29411764705882354, 'f1': 0.2723735408560311, 'number': 119} | {'precision': 0.7527993109388458, 'recall': 0.8206572769953052, 'f1': 0.7852650494159928, 'number': 1065} | 0.7002 | 0.7652 | 0.7312 | 0.8091 |
70
+ | 0.278 | 14.0 | 140 | 0.6619 | {'precision': 0.7066666666666667, 'recall': 0.7861557478368356, 'f1': 0.7442949093036864, 'number': 809} | {'precision': 0.30973451327433627, 'recall': 0.29411764705882354, 'f1': 0.3017241379310345, 'number': 119} | {'precision': 0.7631806395851339, 'recall': 0.8291079812206573, 'f1': 0.7947794779477948, 'number': 1065} | 0.7161 | 0.7797 | 0.7466 | 0.8172 |
71
+ | 0.2785 | 15.0 | 150 | 0.6633 | {'precision': 0.7068004459308808, 'recall': 0.7836835599505563, 'f1': 0.7432590855803048, 'number': 809} | {'precision': 0.3025210084033613, 'recall': 0.3025210084033613, 'f1': 0.3025210084033613, 'number': 119} | {'precision': 0.757679180887372, 'recall': 0.8338028169014085, 'f1': 0.7939204291461779, 'number': 1065} | 0.7121 | 0.7817 | 0.7453 | 0.8174 |
72
+
73
+
74
+ ### Framework versions
75
+
76
+ - Transformers 4.27.4
77
+ - Pytorch 2.0.0+cu118
78
+ - Datasets 2.11.0
79
+ - Tokenizers 0.13.3
logs/events.out.tfevents.1681315117.7d6fd38e622b.2024.0 CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:4b1b036a8e9115afce07982c9993b35d2cb12e6f68158dd42d1592db30c3c62f
3
- size 13989
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ff11f120e3589bad9b6da9b3ef854e8494f180de9181b161643a6221105a8e1a
3
+ size 14343
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:dc194ac4db6a12f584eafaf36753109a0102f6c7047a59df7a82da6217f7f6c6
3
  size 450608389
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:26f26462d872f02b142e9c7382270383a3b2c55f88ac213313573e8a9ed8d281
3
  size 450608389
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