awahiro commited on
Commit
b23c987
1 Parent(s): 79b6305

End of training

Browse files
README.md ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ base_model: microsoft/layoutlm-base-uncased
4
+ tags:
5
+ - generated_from_trainer
6
+ datasets:
7
+ - funsd
8
+ model-index:
9
+ - name: layoutlm-funsd
10
+ results: []
11
+ ---
12
+
13
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
14
+ should probably proofread and complete it, then remove this comment. -->
15
+
16
+ # layoutlm-funsd
17
+
18
+ This model is a fine-tuned version of [microsoft/layoutlm-base-uncased](https://huggingface.co/microsoft/layoutlm-base-uncased) on the funsd dataset.
19
+ It achieves the following results on the evaluation set:
20
+ - Loss: 1.0307
21
+ - Answer: {'precision': 0.3855302279484638, 'recall': 0.48084054388133496, 'f1': 0.4279427942794279, 'number': 809}
22
+ - Header: {'precision': 0.34782608695652173, 'recall': 0.2689075630252101, 'f1': 0.3033175355450237, 'number': 119}
23
+ - Question: {'precision': 0.48268238761974946, 'recall': 0.6150234741784038, 'f1': 0.5408753096614369, 'number': 1065}
24
+ - Overall Precision: 0.4378
25
+ - Overall Recall: 0.5399
26
+ - Overall F1: 0.4835
27
+ - Overall Accuracy: 0.6393
28
+
29
+ ## Model description
30
+
31
+ More information needed
32
+
33
+ ## Intended uses & limitations
34
+
35
+ More information needed
36
+
37
+ ## Training and evaluation data
38
+
39
+ More information needed
40
+
41
+ ## Training procedure
42
+
43
+ ### Training hyperparameters
44
+
45
+ The following hyperparameters were used during training:
46
+ - learning_rate: 3e-05
47
+ - train_batch_size: 16
48
+ - eval_batch_size: 8
49
+ - seed: 42
50
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
51
+ - lr_scheduler_type: linear
52
+ - num_epochs: 15
53
+ - mixed_precision_training: Native AMP
54
+
55
+ ### Training results
56
+
57
+ | Training Loss | Epoch | Step | Validation Loss | Answer | Header | Question | Overall Precision | Overall Recall | Overall F1 | Overall Accuracy |
58
+ |:-------------:|:-----:|:----:|:---------------:|:-----------------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------------:|:------------------------------------------------------------------------------------------------------------:|:-----------------:|:--------------:|:----------:|:----------------:|
59
+ | 1.7508 | 1.0 | 10 | 1.5163 | {'precision': 0.07105263157894737, 'recall': 0.10012360939431397, 'f1': 0.08311954848640328, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.2490566037735849, 'recall': 0.18591549295774648, 'f1': 0.2129032258064516, 'number': 1065} | 0.1442 | 0.1400 | 0.1421 | 0.3638 |
60
+ | 1.4483 | 2.0 | 20 | 1.3842 | {'precision': 0.19585898153329603, 'recall': 0.4326328800988875, 'f1': 0.2696456086286595, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.27010309278350514, 'recall': 0.36901408450704226, 'f1': 0.3119047619047619, 'number': 1065} | 0.2286 | 0.3728 | 0.2834 | 0.4135 |
61
+ | 1.3068 | 3.0 | 30 | 1.2439 | {'precision': 0.2390092879256966, 'recall': 0.47713226205191595, 'f1': 0.3184818481848185, 'number': 809} | {'precision': 0.03125, 'recall': 0.01680672268907563, 'f1': 0.02185792349726776, 'number': 119} | {'precision': 0.32887189292543023, 'recall': 0.48450704225352115, 'f1': 0.39179954441913445, 'number': 1065} | 0.2783 | 0.4536 | 0.3450 | 0.4631 |
62
+ | 1.1868 | 4.0 | 40 | 1.1443 | {'precision': 0.25613802256138024, 'recall': 0.47713226205191595, 'f1': 0.33333333333333337, 'number': 809} | {'precision': 0.1797752808988764, 'recall': 0.13445378151260504, 'f1': 0.15384615384615385, 'number': 119} | {'precision': 0.3619233268356075, 'recall': 0.5230046948356808, 'f1': 0.42780337941628266, 'number': 1065} | 0.3059 | 0.4812 | 0.3740 | 0.5267 |
63
+ | 1.0837 | 5.0 | 50 | 1.1479 | {'precision': 0.27571728481455565, 'recall': 0.48702101359703337, 'f1': 0.3521000893655049, 'number': 809} | {'precision': 0.2696629213483146, 'recall': 0.20168067226890757, 'f1': 0.23076923076923078, 'number': 119} | {'precision': 0.3705616526791478, 'recall': 0.5389671361502347, 'f1': 0.4391736801836266, 'number': 1065} | 0.3234 | 0.4977 | 0.3921 | 0.5252 |
64
+ | 1.0102 | 6.0 | 60 | 1.1154 | {'precision': 0.29912810194500333, 'recall': 0.5512978986402967, 'f1': 0.3878260869565217, 'number': 809} | {'precision': 0.2604166666666667, 'recall': 0.21008403361344538, 'f1': 0.23255813953488375, 'number': 119} | {'precision': 0.44872918492550395, 'recall': 0.4807511737089202, 'f1': 0.4641885766092475, 'number': 1065} | 0.3603 | 0.4932 | 0.4164 | 0.5831 |
65
+ | 0.9349 | 7.0 | 70 | 1.0180 | {'precision': 0.3333333333333333, 'recall': 0.4289245982694685, 'f1': 0.37513513513513513, 'number': 809} | {'precision': 0.32558139534883723, 'recall': 0.23529411764705882, 'f1': 0.2731707317073171, 'number': 119} | {'precision': 0.42487046632124353, 'recall': 0.615962441314554, 'f1': 0.5028746646224608, 'number': 1065} | 0.3860 | 0.5173 | 0.4421 | 0.6121 |
66
+ | 0.8786 | 8.0 | 80 | 1.0198 | {'precision': 0.3177723177723178, 'recall': 0.4796044499381953, 'f1': 0.3822660098522168, 'number': 809} | {'precision': 0.2815533980582524, 'recall': 0.24369747899159663, 'f1': 0.26126126126126126, 'number': 119} | {'precision': 0.4321808510638298, 'recall': 0.6103286384976526, 'f1': 0.5060334760607241, 'number': 1065} | 0.3773 | 0.5354 | 0.4426 | 0.6088 |
67
+ | 0.8204 | 9.0 | 90 | 1.0123 | {'precision': 0.3665987780040733, 'recall': 0.44499381953028433, 'f1': 0.40201005025125625, 'number': 809} | {'precision': 0.2903225806451613, 'recall': 0.226890756302521, 'f1': 0.25471698113207547, 'number': 119} | {'precision': 0.45675482487491065, 'recall': 0.6, 'f1': 0.5186688311688312, 'number': 1065} | 0.4147 | 0.5148 | 0.4594 | 0.6320 |
68
+ | 0.8126 | 10.0 | 100 | 1.0461 | {'precision': 0.37877312560856863, 'recall': 0.48084054388133496, 'f1': 0.42374727668845313, 'number': 809} | {'precision': 0.3, 'recall': 0.226890756302521, 'f1': 0.25837320574162675, 'number': 119} | {'precision': 0.4764521193092622, 'recall': 0.5699530516431925, 'f1': 0.5190252244548953, 'number': 1065} | 0.4279 | 0.5133 | 0.4667 | 0.6288 |
69
+ | 0.7357 | 11.0 | 110 | 1.0160 | {'precision': 0.3771839671120247, 'recall': 0.453646477132262, 'f1': 0.4118967452300786, 'number': 809} | {'precision': 0.29357798165137616, 'recall': 0.2689075630252101, 'f1': 0.28070175438596495, 'number': 119} | {'precision': 0.4672639558924879, 'recall': 0.6366197183098592, 'f1': 0.5389507154213037, 'number': 1065} | 0.4252 | 0.5404 | 0.4759 | 0.6369 |
70
+ | 0.7249 | 12.0 | 120 | 1.0246 | {'precision': 0.38046795523906407, 'recall': 0.4622991347342398, 'f1': 0.4174107142857143, 'number': 809} | {'precision': 0.29411764705882354, 'recall': 0.25210084033613445, 'f1': 0.27149321266968324, 'number': 119} | {'precision': 0.4727403156384505, 'recall': 0.6187793427230047, 'f1': 0.5359902399349329, 'number': 1065} | 0.4288 | 0.5334 | 0.4754 | 0.6387 |
71
+ | 0.7015 | 13.0 | 130 | 1.0335 | {'precision': 0.36654135338345867, 'recall': 0.4820766378244747, 'f1': 0.416444207154298, 'number': 809} | {'precision': 0.31521739130434784, 'recall': 0.24369747899159663, 'f1': 0.27488151658767773, 'number': 119} | {'precision': 0.4788104089219331, 'recall': 0.6046948356807512, 'f1': 0.5344398340248964, 'number': 1065} | 0.4250 | 0.5334 | 0.4731 | 0.6326 |
72
+ | 0.6696 | 14.0 | 140 | 1.0364 | {'precision': 0.3841121495327103, 'recall': 0.5080346106304079, 'f1': 0.43746673762639704, 'number': 809} | {'precision': 0.32941176470588235, 'recall': 0.23529411764705882, 'f1': 0.2745098039215686, 'number': 119} | {'precision': 0.48804934464148036, 'recall': 0.5943661971830986, 'f1': 0.5359864521591872, 'number': 1065} | 0.4372 | 0.5379 | 0.4823 | 0.6394 |
73
+ | 0.6661 | 15.0 | 150 | 1.0307 | {'precision': 0.3855302279484638, 'recall': 0.48084054388133496, 'f1': 0.4279427942794279, 'number': 809} | {'precision': 0.34782608695652173, 'recall': 0.2689075630252101, 'f1': 0.3033175355450237, 'number': 119} | {'precision': 0.48268238761974946, 'recall': 0.6150234741784038, 'f1': 0.5408753096614369, 'number': 1065} | 0.4378 | 0.5399 | 0.4835 | 0.6393 |
74
+
75
+
76
+ ### Framework versions
77
+
78
+ - Transformers 4.38.2
79
+ - Pytorch 2.2.1+cu121
80
+ - Datasets 2.18.0
81
+ - Tokenizers 0.15.2
logs/events.out.tfevents.1709878071.533af087a84b.2561.0 CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:f8cc196479dca308a07e0fa8ee862b337f72a53900d06a7b62b4270a3486dd0f
3
- size 13239
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b9bfc2fd326bbe9fc60afb6187f1af33688a37992e5d6ffc04c40f19ae622677
3
+ size 15738
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:22d81c7525e0bf9c55d9424832617d870d82efb5f4e4cae4dab7724b450fe411
3
  size 450558212
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d4c38129dbe1a57b25d75b07348663920dc556d3963a2f842b3e6d7cf0b69771
3
  size 450558212
preprocessor_config.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "apply_ocr": true,
3
+ "do_resize": true,
4
+ "image_processor_type": "LayoutLMv2ImageProcessor",
5
+ "ocr_lang": null,
6
+ "processor_class": "LayoutLMv2Processor",
7
+ "resample": 2,
8
+ "size": {
9
+ "height": 224,
10
+ "width": 224
11
+ },
12
+ "tesseract_config": ""
13
+ }
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