mp-02 commited on
Commit
4711cb2
·
verified ·
1 Parent(s): 3bc3719

Training in progress, step 500

Browse files
README.md ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ base_model: layoutlmv3
4
+ tags:
5
+ - generated_from_trainer
6
+ datasets:
7
+ - mp-02/cord-sroie
8
+ metrics:
9
+ - precision
10
+ - recall
11
+ - f1
12
+ - accuracy
13
+ model-index:
14
+ - name: layoutlmv3-finetuned-cord-sroie
15
+ results:
16
+ - task:
17
+ name: Token Classification
18
+ type: token-classification
19
+ dataset:
20
+ name: mp-02/cord-sroie
21
+ type: mp-02/cord-sroie
22
+ metrics:
23
+ - name: Precision
24
+ type: precision
25
+ value: 0.9539473684210527
26
+ - name: Recall
27
+ type: recall
28
+ value: 0.9618573797678275
29
+ - name: F1
30
+ type: f1
31
+ value: 0.9578860445912468
32
+ - name: Accuracy
33
+ type: accuracy
34
+ value: 0.9852276288106003
35
+ ---
36
+
37
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
38
+ should probably proofread and complete it, then remove this comment. -->
39
+
40
+ # layoutlmv3-finetuned-cord-sroie
41
+
42
+ This model is a fine-tuned version of [layoutlmv3](https://huggingface.co/layoutlmv3) on the mp-02/cord-sroie dataset.
43
+ It achieves the following results on the evaluation set:
44
+ - Loss: 0.0744
45
+ - Precision: 0.9539
46
+ - Recall: 0.9619
47
+ - F1: 0.9579
48
+ - Accuracy: 0.9852
49
+
50
+ ## Model description
51
+
52
+ More information needed
53
+
54
+ ## Intended uses & limitations
55
+
56
+ More information needed
57
+
58
+ ## Training and evaluation data
59
+
60
+ More information needed
61
+
62
+ ## Training procedure
63
+
64
+ ### Training hyperparameters
65
+
66
+ The following hyperparameters were used during training:
67
+ - learning_rate: 1e-05
68
+ - train_batch_size: 10
69
+ - eval_batch_size: 10
70
+ - seed: 42
71
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
72
+ - lr_scheduler_type: linear
73
+ - training_steps: 2500
74
+
75
+ ### Training results
76
+
77
+ | Training Loss | Epoch | Step | Validation Loss | Precision | Recall | F1 | Accuracy |
78
+ |:-------------:|:-------:|:----:|:---------------:|:---------:|:------:|:------:|:--------:|
79
+ | No log | 1.7483 | 250 | 0.2724 | 0.7860 | 0.7768 | 0.7814 | 0.9414 |
80
+ | 0.7002 | 3.4965 | 500 | 0.1376 | 0.9001 | 0.9325 | 0.9160 | 0.9696 |
81
+ | 0.7002 | 5.2448 | 750 | 0.0983 | 0.9281 | 0.9417 | 0.9349 | 0.9781 |
82
+ | 0.176 | 6.9930 | 1000 | 0.0806 | 0.9411 | 0.9429 | 0.9420 | 0.9817 |
83
+ | 0.176 | 8.7413 | 1250 | 0.0779 | 0.9482 | 0.9462 | 0.9472 | 0.9824 |
84
+ | 0.0951 | 10.4895 | 1500 | 0.0740 | 0.9493 | 0.9581 | 0.9537 | 0.9844 |
85
+ | 0.0951 | 12.2378 | 1750 | 0.0744 | 0.9515 | 0.9614 | 0.9564 | 0.9848 |
86
+ | 0.0631 | 13.9860 | 2000 | 0.0740 | 0.9512 | 0.9607 | 0.9559 | 0.9846 |
87
+ | 0.0631 | 15.7343 | 2250 | 0.0756 | 0.9522 | 0.9588 | 0.9555 | 0.9846 |
88
+ | 0.0496 | 17.4825 | 2500 | 0.0744 | 0.9539 | 0.9619 | 0.9579 | 0.9852 |
89
+
90
+
91
+ ### Framework versions
92
+
93
+ - Transformers 4.44.2
94
+ - Pytorch 2.4.0+cu118
95
+ - Datasets 2.21.0
96
+ - Tokenizers 0.19.1
all_results.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "predict_accuracy": 0.9826576370458497,
3
+ "predict_f1": 0.9526000920386563,
4
+ "predict_loss": 0.08877082914113998,
5
+ "predict_precision": 0.9434822242479489,
6
+ "predict_recall": 0.9618959107806692,
7
+ "predict_runtime": 24.8279,
8
+ "predict_samples_per_second": 10.996,
9
+ "predict_steps_per_second": 1.128
10
+ }
config.json ADDED
@@ -0,0 +1,128 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "microsoft/layoutlmv3-base",
3
+ "architectures": [
4
+ "LayoutLMv3ForTokenClassification"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "bos_token_id": 0,
8
+ "classifier_dropout": null,
9
+ "coordinate_size": 128,
10
+ "eos_token_id": 2,
11
+ "has_relative_attention_bias": true,
12
+ "has_spatial_attention_bias": true,
13
+ "hidden_act": "gelu",
14
+ "hidden_dropout_prob": 0.1,
15
+ "hidden_size": 768,
16
+ "id2label": {
17
+ "0": "O",
18
+ "1": "B-MENU.CNT",
19
+ "2": "B-MENU.DISCOUNTPRICE",
20
+ "3": "B-MENU.NM",
21
+ "4": "B-MENU.NUM",
22
+ "5": "B-MENU.PRICE",
23
+ "6": "B-MENU.SUB.CNT",
24
+ "7": "B-MENU.SUB.NM",
25
+ "8": "B-MENU.SUB.PRICE",
26
+ "9": "B-MENU.UNITPRICE",
27
+ "10": "B-SUB_TOTAL.DISCOUNT_PRICE",
28
+ "11": "B-SUB_TOTAL.ETC",
29
+ "12": "B-SUB_TOTAL.SERVICE_PRICE",
30
+ "13": "B-SUB_TOTAL.SUBTOTAL_PRICE",
31
+ "14": "B-SUB_TOTAL.TAX_PRICE",
32
+ "15": "B-TOTAL.CASHPRICE",
33
+ "16": "B-TOTAL.CHANGEPRICE",
34
+ "17": "B-TOTAL.CREDITCARDPRICE",
35
+ "18": "B-TOTAL.MENUQTY_CNT",
36
+ "19": "B-TOTAL.TOTAL_PRICE",
37
+ "20": "I-MENU.CNT",
38
+ "21": "I-MENU.DISCOUNTPRICE",
39
+ "22": "I-MENU.NM",
40
+ "23": "I-MENU.NUM",
41
+ "24": "I-MENU.PRICE",
42
+ "25": "I-MENU.SUB.CNT",
43
+ "26": "I-MENU.SUB.NM",
44
+ "27": "I-MENU.SUB.PRICE",
45
+ "28": "I-MENU.UNITPRICE",
46
+ "29": "I-SUB_TOTAL.DISCOUNT_PRICE",
47
+ "30": "I-SUB_TOTAL.ETC",
48
+ "31": "I-SUB_TOTAL.SERVICE_PRICE",
49
+ "32": "I-SUB_TOTAL.SUBTOTAL_PRICE",
50
+ "33": "I-SUB_TOTAL.TAX_PRICE",
51
+ "34": "I-TOTAL.CASHPRICE",
52
+ "35": "I-TOTAL.CHANGEPRICE",
53
+ "36": "I-TOTAL.CREDITCARDPRICE",
54
+ "37": "I-TOTAL.MENUQTY_CNT",
55
+ "38": "I-TOTAL.TOTAL_PRICE",
56
+ "39": "S-COMPANY",
57
+ "40": "S-DATE",
58
+ "41": "S-ADDRESS"
59
+ },
60
+ "initializer_range": 0.02,
61
+ "input_size": 224,
62
+ "intermediate_size": 3072,
63
+ "label2id": {
64
+ "B-MENU.CNT": 1,
65
+ "B-MENU.DISCOUNTPRICE": 2,
66
+ "B-MENU.NM": 3,
67
+ "B-MENU.NUM": 4,
68
+ "B-MENU.PRICE": 5,
69
+ "B-MENU.SUB.CNT": 6,
70
+ "B-MENU.SUB.NM": 7,
71
+ "B-MENU.SUB.PRICE": 8,
72
+ "B-MENU.UNITPRICE": 9,
73
+ "B-SUB_TOTAL.DISCOUNT_PRICE": 10,
74
+ "B-SUB_TOTAL.ETC": 11,
75
+ "B-SUB_TOTAL.SERVICE_PRICE": 12,
76
+ "B-SUB_TOTAL.SUBTOTAL_PRICE": 13,
77
+ "B-SUB_TOTAL.TAX_PRICE": 14,
78
+ "B-TOTAL.CASHPRICE": 15,
79
+ "B-TOTAL.CHANGEPRICE": 16,
80
+ "B-TOTAL.CREDITCARDPRICE": 17,
81
+ "B-TOTAL.MENUQTY_CNT": 18,
82
+ "B-TOTAL.TOTAL_PRICE": 19,
83
+ "I-MENU.CNT": 20,
84
+ "I-MENU.DISCOUNTPRICE": 21,
85
+ "I-MENU.NM": 22,
86
+ "I-MENU.NUM": 23,
87
+ "I-MENU.PRICE": 24,
88
+ "I-MENU.SUB.CNT": 25,
89
+ "I-MENU.SUB.NM": 26,
90
+ "I-MENU.SUB.PRICE": 27,
91
+ "I-MENU.UNITPRICE": 28,
92
+ "I-SUB_TOTAL.DISCOUNT_PRICE": 29,
93
+ "I-SUB_TOTAL.ETC": 30,
94
+ "I-SUB_TOTAL.SERVICE_PRICE": 31,
95
+ "I-SUB_TOTAL.SUBTOTAL_PRICE": 32,
96
+ "I-SUB_TOTAL.TAX_PRICE": 33,
97
+ "I-TOTAL.CASHPRICE": 34,
98
+ "I-TOTAL.CHANGEPRICE": 35,
99
+ "I-TOTAL.CREDITCARDPRICE": 36,
100
+ "I-TOTAL.MENUQTY_CNT": 37,
101
+ "I-TOTAL.TOTAL_PRICE": 38,
102
+ "O": 0,
103
+ "S-ADDRESS": 41,
104
+ "S-COMPANY": 39,
105
+ "S-DATE": 40
106
+ },
107
+ "layer_norm_eps": 1e-05,
108
+ "max_2d_position_embeddings": 1024,
109
+ "max_position_embeddings": 514,
110
+ "max_rel_2d_pos": 256,
111
+ "max_rel_pos": 128,
112
+ "model_type": "layoutlmv3",
113
+ "num_attention_heads": 12,
114
+ "num_channels": 3,
115
+ "num_hidden_layers": 12,
116
+ "pad_token_id": 1,
117
+ "patch_size": 16,
118
+ "rel_2d_pos_bins": 64,
119
+ "rel_pos_bins": 32,
120
+ "second_input_size": 112,
121
+ "shape_size": 128,
122
+ "text_embed": true,
123
+ "torch_dtype": "float32",
124
+ "transformers_version": "4.44.2",
125
+ "type_vocab_size": 1,
126
+ "visual_embed": true,
127
+ "vocab_size": 50265
128
+ }
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:45b9b54c7c2cc1e334414a303555f50915ad4d9889bd3e3ab7b4cf0ef05071c3
3
+ size 503825792
predict_results.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "predict_accuracy": 0.9826576370458497,
3
+ "predict_f1": 0.9526000920386563,
4
+ "predict_loss": 0.08877082914113998,
5
+ "predict_precision": 0.9434822242479489,
6
+ "predict_recall": 0.9618959107806692,
7
+ "predict_runtime": 24.8279,
8
+ "predict_samples_per_second": 10.996,
9
+ "predict_steps_per_second": 1.128
10
+ }
predictions.txt ADDED
The diff for this file is too large to render. See raw diff
 
preprocessor_config.json ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "apply_ocr": false,
3
+ "do_normalize": true,
4
+ "do_rescale": true,
5
+ "do_resize": true,
6
+ "image_mean": [
7
+ 0.5,
8
+ 0.5,
9
+ 0.5
10
+ ],
11
+ "image_processor_type": "LayoutLMv3ImageProcessor",
12
+ "image_std": [
13
+ 0.5,
14
+ 0.5,
15
+ 0.5
16
+ ],
17
+ "ocr_lang": null,
18
+ "processor_class": "LayoutLMv3Processor",
19
+ "resample": 2,
20
+ "rescale_factor": 0.00392156862745098,
21
+ "size": {
22
+ "height": 224,
23
+ "width": 224
24
+ },
25
+ "tesseract_config": ""
26
+ }
runs/Nov17_18-57-06_bernini/events.out.tfevents.1731866228.bernini.21141.0 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a4888dbc9e635acbf0f9493d71b02c0778a24ab36ed5dec946bb1425fba06edd
3
+ size 7807
runs/Nov17_18-58-09_bernini/events.out.tfevents.1731866291.bernini.22995.0 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cc4b3a51ea6e2b40cf9faf9ad2f5d41849d627b2d0b2dc8208de57c041b93792
3
+ size 12718
runs/Sep20_23-08-51_bernini/events.out.tfevents.1726866549.bernini.10715.0 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:91886cdb602beeefe93f585b93b6ff8bb2a7500df99e6e77dcdee012384edaa1
3
+ size 13947
runs/Sep20_23-08-51_bernini/events.out.tfevents.1726869911.bernini.10715.1 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:12fd7ce0958e882aee31abb3ebb2f8cfe18623270c96b745d059d9f1d7ec4f31
3
+ size 560
runs/Sep21_00-07-55_bernini/events.out.tfevents.1726870077.bernini.10171.0 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:97e22c9c499ece4904a72a330eaa95069cf557bea303459fa13ce1bd626010a4
3
+ size 13947
runs/Sep21_00-07-55_bernini/events.out.tfevents.1726873320.bernini.10171.1 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5ad1328920bb4f058ca88e5204ba43aee4083ed658e537a45345b33cceeeae3a
3
+ size 560
special_tokens_map.json ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<s>",
4
+ "lstrip": false,
5
+ "normalized": true,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "cls_token": {
10
+ "content": "<s>",
11
+ "lstrip": false,
12
+ "normalized": true,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "eos_token": {
17
+ "content": "</s>",
18
+ "lstrip": false,
19
+ "normalized": true,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "mask_token": {
24
+ "content": "<mask>",
25
+ "lstrip": true,
26
+ "normalized": true,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ },
30
+ "pad_token": {
31
+ "content": "<pad>",
32
+ "lstrip": false,
33
+ "normalized": true,
34
+ "rstrip": false,
35
+ "single_word": false
36
+ },
37
+ "sep_token": {
38
+ "content": "</s>",
39
+ "lstrip": false,
40
+ "normalized": true,
41
+ "rstrip": false,
42
+ "single_word": false
43
+ },
44
+ "unk_token": {
45
+ "content": "<unk>",
46
+ "lstrip": false,
47
+ "normalized": true,
48
+ "rstrip": false,
49
+ "single_word": false
50
+ }
51
+ }
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
+ "add_prefix_space": true,
3
+ "added_tokens_decoder": {
4
+ "0": {
5
+ "content": "<s>",
6
+ "lstrip": false,
7
+ "normalized": true,
8
+ "rstrip": false,
9
+ "single_word": false,
10
+ "special": true
11
+ },
12
+ "1": {
13
+ "content": "<pad>",
14
+ "lstrip": false,
15
+ "normalized": true,
16
+ "rstrip": false,
17
+ "single_word": false,
18
+ "special": true
19
+ },
20
+ "2": {
21
+ "content": "</s>",
22
+ "lstrip": false,
23
+ "normalized": true,
24
+ "rstrip": false,
25
+ "single_word": false,
26
+ "special": true
27
+ },
28
+ "3": {
29
+ "content": "<unk>",
30
+ "lstrip": false,
31
+ "normalized": true,
32
+ "rstrip": false,
33
+ "single_word": false,
34
+ "special": true
35
+ },
36
+ "50264": {
37
+ "content": "<mask>",
38
+ "lstrip": true,
39
+ "normalized": true,
40
+ "rstrip": false,
41
+ "single_word": false,
42
+ "special": true
43
+ }
44
+ },
45
+ "apply_ocr": false,
46
+ "bos_token": "<s>",
47
+ "clean_up_tokenization_spaces": true,
48
+ "cls_token": "<s>",
49
+ "cls_token_box": [
50
+ 0,
51
+ 0,
52
+ 0,
53
+ 0
54
+ ],
55
+ "eos_token": "</s>",
56
+ "errors": "replace",
57
+ "mask_token": "<mask>",
58
+ "model_max_length": 512,
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": "LayoutLMv3Processor",
69
+ "sep_token": "</s>",
70
+ "sep_token_box": [
71
+ 0,
72
+ 0,
73
+ 0,
74
+ 0
75
+ ],
76
+ "tokenizer_class": "LayoutLMv3Tokenizer",
77
+ "trim_offsets": true,
78
+ "unk_token": "<unk>",
79
+ "use_fast": true
80
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:281b10d894475a76b2dc747eab731b176485d893acb492065a3ad657496dc1fc
3
+ size 5304
vocab.json ADDED
The diff for this file is too large to render. See raw diff