elvinaqa commited on
Commit
b017e56
·
1 Parent(s): 9a03139

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.7158
19
+ - Answer: {'precision': 0.7149220489977728, 'recall': 0.7935723114956736, 'f1': 0.7521968365553603, 'number': 809}
20
+ - Header: {'precision': 0.3063063063063063, 'recall': 0.2857142857142857, 'f1': 0.2956521739130435, 'number': 119}
21
+ - Question: {'precision': 0.7892857142857143, 'recall': 0.8300469483568075, 'f1': 0.8091533180778031, 'number': 1065}
22
+ - Overall Precision: 0.7327
23
+ - Overall Recall: 0.7827
24
+ - Overall F1: 0.7569
25
+ - Overall Accuracy: 0.8108
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.8132 | 1.0 | 10 | 1.6191 | {'precision': 0.015122873345935728, 'recall': 0.019777503090234856, 'f1': 0.01713979646491698, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.1685508735868448, 'recall': 0.1539906103286385, 'f1': 0.16094210009813542, 'number': 1065} | 0.0886 | 0.0903 | 0.0895 | 0.3534 |
58
+ | 1.4783 | 2.0 | 20 | 1.2483 | {'precision': 0.12857142857142856, 'recall': 0.12237330037082818, 'f1': 0.1253958201393287, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.4541955350269438, 'recall': 0.5539906103286385, 'f1': 0.4991539763113368, 'number': 1065} | 0.3330 | 0.3457 | 0.3392 | 0.5682 |
59
+ | 1.1072 | 3.0 | 30 | 0.9718 | {'precision': 0.42777155655095184, 'recall': 0.4721878862793572, 'f1': 0.4488836662749706, 'number': 809} | {'precision': 0.04, 'recall': 0.008403361344537815, 'f1': 0.01388888888888889, 'number': 119} | {'precision': 0.6266205704407951, 'recall': 0.6807511737089202, 'f1': 0.6525652565256526, 'number': 1065} | 0.5340 | 0.5559 | 0.5447 | 0.7070 |
60
+ | 0.8444 | 4.0 | 40 | 0.7957 | {'precision': 0.6296296296296297, 'recall': 0.7354758961681088, 'f1': 0.6784492588369442, 'number': 809} | {'precision': 0.19230769230769232, 'recall': 0.08403361344537816, 'f1': 0.11695906432748539, 'number': 119} | {'precision': 0.6831168831168831, 'recall': 0.7408450704225352, 'f1': 0.7108108108108109, 'number': 1065} | 0.6478 | 0.6994 | 0.6726 | 0.7651 |
61
+ | 0.6845 | 5.0 | 50 | 0.7443 | {'precision': 0.6530612244897959, 'recall': 0.7515451174289246, 'f1': 0.6988505747126437, 'number': 809} | {'precision': 0.23684210526315788, 'recall': 0.15126050420168066, 'f1': 0.1846153846153846, 'number': 119} | {'precision': 0.7318181818181818, 'recall': 0.755868544600939, 'f1': 0.74364896073903, 'number': 1065} | 0.6792 | 0.7180 | 0.6980 | 0.7736 |
62
+ | 0.5597 | 6.0 | 60 | 0.6918 | {'precision': 0.6673706441393875, 'recall': 0.7812113720642769, 'f1': 0.7198177676537586, 'number': 809} | {'precision': 0.2857142857142857, 'recall': 0.15126050420168066, 'f1': 0.1978021978021978, 'number': 119} | {'precision': 0.7344150298889838, 'recall': 0.8075117370892019, 'f1': 0.7692307692307693, 'number': 1065} | 0.6923 | 0.7577 | 0.7235 | 0.7933 |
63
+ | 0.4929 | 7.0 | 70 | 0.6803 | {'precision': 0.6694825765575502, 'recall': 0.7836835599505563, 'f1': 0.7220956719817767, 'number': 809} | {'precision': 0.21818181818181817, 'recall': 0.20168067226890757, 'f1': 0.2096069868995633, 'number': 119} | {'precision': 0.7467134092900964, 'recall': 0.8, 'f1': 0.772438803263826, 'number': 1065} | 0.6870 | 0.7577 | 0.7206 | 0.7945 |
64
+ | 0.4447 | 8.0 | 80 | 0.6814 | {'precision': 0.6866158868335147, 'recall': 0.7799752781211372, 'f1': 0.7303240740740741, 'number': 809} | {'precision': 0.26506024096385544, 'recall': 0.18487394957983194, 'f1': 0.21782178217821785, 'number': 119} | {'precision': 0.7810283687943262, 'recall': 0.8272300469483568, 'f1': 0.8034655722754217, 'number': 1065} | 0.7202 | 0.7697 | 0.7441 | 0.8024 |
65
+ | 0.3953 | 9.0 | 90 | 0.6739 | {'precision': 0.7015765765765766, 'recall': 0.7700865265760197, 'f1': 0.7342368886269888, 'number': 809} | {'precision': 0.2920353982300885, 'recall': 0.2773109243697479, 'f1': 0.28448275862068967, 'number': 119} | {'precision': 0.7753496503496503, 'recall': 0.8328638497652582, 'f1': 0.8030783159800814, 'number': 1065} | 0.7193 | 0.7742 | 0.7458 | 0.8115 |
66
+ | 0.3538 | 10.0 | 100 | 0.6853 | {'precision': 0.7081497797356828, 'recall': 0.7948084054388134, 'f1': 0.7489807804309844, 'number': 809} | {'precision': 0.32673267326732675, 'recall': 0.2773109243697479, 'f1': 0.30000000000000004, 'number': 119} | {'precision': 0.7804878048780488, 'recall': 0.8413145539906103, 'f1': 0.8097605061003164, 'number': 1065} | 0.7288 | 0.7888 | 0.7576 | 0.8152 |
67
+ | 0.3262 | 11.0 | 110 | 0.6948 | {'precision': 0.7058177826564215, 'recall': 0.7948084054388134, 'f1': 0.7476744186046511, 'number': 809} | {'precision': 0.35051546391752575, 'recall': 0.2857142857142857, 'f1': 0.3148148148148148, 'number': 119} | {'precision': 0.8032638259292838, 'recall': 0.831924882629108, 'f1': 0.8173431734317343, 'number': 1065} | 0.7404 | 0.7842 | 0.7617 | 0.8129 |
68
+ | 0.3094 | 12.0 | 120 | 0.6989 | {'precision': 0.7128603104212861, 'recall': 0.7948084054388134, 'f1': 0.7516072472238456, 'number': 809} | {'precision': 0.3333333333333333, 'recall': 0.29411764705882354, 'f1': 0.3125, 'number': 119} | {'precision': 0.7987364620938628, 'recall': 0.8309859154929577, 'f1': 0.8145421076852278, 'number': 1065} | 0.7390 | 0.7842 | 0.7610 | 0.8138 |
69
+ | 0.2941 | 13.0 | 130 | 0.7134 | {'precision': 0.7239819004524887, 'recall': 0.7911001236093943, 'f1': 0.7560543414057885, 'number': 809} | {'precision': 0.32710280373831774, 'recall': 0.29411764705882354, 'f1': 0.3097345132743363, 'number': 119} | {'precision': 0.7998204667863554, 'recall': 0.8366197183098592, 'f1': 0.8178063331803579, 'number': 1065} | 0.7439 | 0.7858 | 0.7643 | 0.8115 |
70
+ | 0.2813 | 14.0 | 140 | 0.7138 | {'precision': 0.7106710671067107, 'recall': 0.7985166872682324, 'f1': 0.7520372526193247, 'number': 809} | {'precision': 0.3119266055045872, 'recall': 0.2857142857142857, 'f1': 0.2982456140350877, 'number': 119} | {'precision': 0.7935656836461126, 'recall': 0.8338028169014085, 'f1': 0.8131868131868133, 'number': 1065} | 0.7337 | 0.7868 | 0.7593 | 0.8109 |
71
+ | 0.2812 | 15.0 | 150 | 0.7158 | {'precision': 0.7149220489977728, 'recall': 0.7935723114956736, 'f1': 0.7521968365553603, 'number': 809} | {'precision': 0.3063063063063063, 'recall': 0.2857142857142857, 'f1': 0.2956521739130435, 'number': 119} | {'precision': 0.7892857142857143, 'recall': 0.8300469483568075, 'f1': 0.8091533180778031, 'number': 1065} | 0.7327 | 0.7827 | 0.7569 | 0.8108 |
72
+
73
+
74
+ ### Framework versions
75
+
76
+ - Transformers 4.24.0
77
+ - Pytorch 1.12.1+cu113
78
+ - Datasets 2.6.1
79
+ - Tokenizers 0.13.1
logs/events.out.tfevents.1667593569.244c8c74672f.78.0 CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:ae625afa68002d49b13fa9b4b822c34d3102c32f9030d48d327dcb35c307921e
3
- size 4634
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c50aa91fc5928f514a97fffcfb655f07dc9b473314db5277219080f32550228f
3
+ size 14110
preprocessor_config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "apply_ocr": true,
3
+ "do_resize": true,
4
+ "feature_extractor_type": "LayoutLMv2FeatureExtractor",
5
+ "ocr_lang": null,
6
+ "processor_class": "LayoutLMv2Processor",
7
+ "resample": 2,
8
+ "size": 224,
9
+ "tesseract_config": ""
10
+ }
pytorch_model.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:fe64cecbcf4abc717a8c57f32b7f76b131684daf9309f5f44f41c4bc015d962f
3
  size 450606565
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:59f010d99b4da02a40f96c2b43da2de3830dc9023f8387faddca778c6e72481f
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