clementWizard commited on
Commit
7677a6d
1 Parent(s): 19728fa

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: layout-lm
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
+ # layout-lm
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: 0.6696
21
+ - Answer: {'precision': 0.7092896174863388, 'recall': 0.8022249690976514, 'f1': 0.7529002320185615, 'number': 809}
22
+ - Header: {'precision': 0.26618705035971224, 'recall': 0.31092436974789917, 'f1': 0.2868217054263566, 'number': 119}
23
+ - Question: {'precision': 0.7788632326820604, 'recall': 0.8234741784037559, 'f1': 0.8005476951163851, 'number': 1065}
24
+ - Overall Precision: 0.7170
25
+ - Overall Recall: 0.7842
26
+ - Overall F1: 0.7491
27
+ - Overall Accuracy: 0.8090
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.7756 | 1.0 | 10 | 1.5443 | {'precision': 0.022977022977022976, 'recall': 0.02843016069221261, 'f1': 0.025414364640883976, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.18486486486486486, 'recall': 0.16056338028169015, 'f1': 0.17185929648241205, 'number': 1065} | 0.1007 | 0.0973 | 0.0990 | 0.3934 |
60
+ | 1.4156 | 2.0 | 20 | 1.2218 | {'precision': 0.2844311377245509, 'recall': 0.3522867737948084, 'f1': 0.3147432357813363, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.4658151765589782, 'recall': 0.5821596244131455, 'f1': 0.5175292153589315, 'number': 1065} | 0.3879 | 0.4541 | 0.4184 | 0.5974 |
61
+ | 1.0947 | 3.0 | 30 | 0.9351 | {'precision': 0.45348837209302323, 'recall': 0.5784919653893696, 'f1': 0.5084193373166758, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.5731800766283525, 'recall': 0.7023474178403756, 'f1': 0.6312236286919831, 'number': 1065} | 0.5155 | 0.6101 | 0.5588 | 0.7042 |
62
+ | 0.8401 | 4.0 | 40 | 0.8011 | {'precision': 0.5671361502347417, 'recall': 0.7466007416563659, 'f1': 0.6446104589114193, 'number': 809} | {'precision': 0.03636363636363636, 'recall': 0.01680672268907563, 'f1': 0.022988505747126436, 'number': 119} | {'precision': 0.6641285956006768, 'recall': 0.7370892018779343, 'f1': 0.6987093902981754, 'number': 1065} | 0.6043 | 0.6979 | 0.6477 | 0.7447 |
63
+ | 0.6784 | 5.0 | 50 | 0.7088 | {'precision': 0.6298568507157464, 'recall': 0.761433868974042, 'f1': 0.689423614997202, 'number': 809} | {'precision': 0.13333333333333333, 'recall': 0.08403361344537816, 'f1': 0.10309278350515463, 'number': 119} | {'precision': 0.6869009584664537, 'recall': 0.8075117370892019, 'f1': 0.7423392317652138, 'number': 1065} | 0.6447 | 0.7456 | 0.6915 | 0.7832 |
64
+ | 0.5803 | 6.0 | 60 | 0.6837 | {'precision': 0.632512315270936, 'recall': 0.7935723114956736, 'f1': 0.7039473684210525, 'number': 809} | {'precision': 0.17, 'recall': 0.14285714285714285, 'f1': 0.15525114155251143, 'number': 119} | {'precision': 0.7255244755244755, 'recall': 0.7793427230046949, 'f1': 0.7514712539610684, 'number': 1065} | 0.6591 | 0.7471 | 0.7004 | 0.7899 |
65
+ | 0.5058 | 7.0 | 70 | 0.6616 | {'precision': 0.6632337796086509, 'recall': 0.796044499381953, 'f1': 0.7235955056179776, 'number': 809} | {'precision': 0.22935779816513763, 'recall': 0.21008403361344538, 'f1': 0.2192982456140351, 'number': 119} | {'precision': 0.7556917688266199, 'recall': 0.8103286384976526, 'f1': 0.7820570910738559, 'number': 1065} | 0.6895 | 0.7687 | 0.7269 | 0.8049 |
66
+ | 0.4504 | 8.0 | 80 | 0.6497 | {'precision': 0.6694045174537988, 'recall': 0.8059332509270705, 'f1': 0.7313516545148627, 'number': 809} | {'precision': 0.24778761061946902, 'recall': 0.23529411764705882, 'f1': 0.2413793103448276, 'number': 119} | {'precision': 0.7757255936675461, 'recall': 0.828169014084507, 'f1': 0.8010899182561309, 'number': 1065} | 0.7023 | 0.7837 | 0.7408 | 0.8126 |
67
+ | 0.4046 | 9.0 | 90 | 0.6455 | {'precision': 0.6864406779661016, 'recall': 0.8009888751545118, 'f1': 0.7393040501996578, 'number': 809} | {'precision': 0.25396825396825395, 'recall': 0.2689075630252101, 'f1': 0.2612244897959184, 'number': 119} | {'precision': 0.7812223206377326, 'recall': 0.828169014084507, 'f1': 0.8040109389243391, 'number': 1065} | 0.7103 | 0.7837 | 0.7452 | 0.8152 |
68
+ | 0.3936 | 10.0 | 100 | 0.6659 | {'precision': 0.6867088607594937, 'recall': 0.8046971569839307, 'f1': 0.7410358565737052, 'number': 809} | {'precision': 0.24193548387096775, 'recall': 0.25210084033613445, 'f1': 0.2469135802469136, 'number': 119} | {'precision': 0.7786811201445348, 'recall': 0.8093896713615023, 'f1': 0.7937384898710865, 'number': 1065} | 0.7081 | 0.7742 | 0.7397 | 0.8078 |
69
+ | 0.3364 | 11.0 | 110 | 0.6591 | {'precision': 0.6890308839190629, 'recall': 0.799752781211372, 'f1': 0.7402745995423341, 'number': 809} | {'precision': 0.2824427480916031, 'recall': 0.31092436974789917, 'f1': 0.29600000000000004, 'number': 119} | {'precision': 0.7735682819383259, 'recall': 0.8244131455399061, 'f1': 0.7981818181818181, 'number': 1065} | 0.7084 | 0.7837 | 0.7442 | 0.8115 |
70
+ | 0.3265 | 12.0 | 120 | 0.6682 | {'precision': 0.6912393162393162, 'recall': 0.799752781211372, 'f1': 0.7415472779369628, 'number': 809} | {'precision': 0.26666666666666666, 'recall': 0.3025210084033613, 'f1': 0.28346456692913385, 'number': 119} | {'precision': 0.7784697508896797, 'recall': 0.8215962441314554, 'f1': 0.7994518044769301, 'number': 1065} | 0.7098 | 0.7817 | 0.7440 | 0.8077 |
71
+ | 0.3079 | 13.0 | 130 | 0.6711 | {'precision': 0.7035830618892508, 'recall': 0.8009888751545118, 'f1': 0.7491329479768787, 'number': 809} | {'precision': 0.26717557251908397, 'recall': 0.29411764705882354, 'f1': 0.28, 'number': 119} | {'precision': 0.7762114537444934, 'recall': 0.8272300469483568, 'f1': 0.8009090909090909, 'number': 1065} | 0.7151 | 0.7847 | 0.7483 | 0.8090 |
72
+ | 0.2868 | 14.0 | 140 | 0.6677 | {'precision': 0.704225352112676, 'recall': 0.8034610630407911, 'f1': 0.7505773672055426, 'number': 809} | {'precision': 0.2835820895522388, 'recall': 0.31932773109243695, 'f1': 0.30039525691699603, 'number': 119} | {'precision': 0.7804444444444445, 'recall': 0.8244131455399061, 'f1': 0.8018264840182647, 'number': 1065} | 0.7177 | 0.7858 | 0.7502 | 0.8111 |
73
+ | 0.2863 | 15.0 | 150 | 0.6696 | {'precision': 0.7092896174863388, 'recall': 0.8022249690976514, 'f1': 0.7529002320185615, 'number': 809} | {'precision': 0.26618705035971224, 'recall': 0.31092436974789917, 'f1': 0.2868217054263566, 'number': 119} | {'precision': 0.7788632326820604, 'recall': 0.8234741784037559, 'f1': 0.8005476951163851, 'number': 1065} | 0.7170 | 0.7842 | 0.7491 | 0.8090 |
74
+
75
+
76
+ ### Framework versions
77
+
78
+ - Transformers 4.43.2
79
+ - Pytorch 2.3.1+cu121
80
+ - Datasets 2.20.0
81
+ - Tokenizers 0.19.1
logs/events.out.tfevents.1721891769.josh-desktop.30569.0 CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:230a5e77198128940f2acc49d29c49870873883ac6c8c7ad11099a9346966958
3
- size 14991
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:84955c4382e2893fcdfac7b0d510a91872d50e810557e62b8e8d0cf0ceae4560
3
+ size 16060
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:95bafc583a5f68b16ee739ca15c889c1600cef36c236e45d4ce761e4b6585647
3
  size 450558212
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0d7f3946c1b6e3ef809a0cf3ceb751a84d1f144149ab5140ae913cb9f8458b77
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