mykh-med commited on
Commit
af7bcce
1 Parent(s): 9e1a721

End of training

Browse files
README.md ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ license: cc-by-nc-sa-4.0
4
+ base_model: microsoft/layoutlmv3-base
5
+ tags:
6
+ - generated_from_trainer
7
+ datasets:
8
+ - layoutlmv3
9
+ metrics:
10
+ - precision
11
+ - recall
12
+ - f1
13
+ - accuracy
14
+ model-index:
15
+ - name: test
16
+ results:
17
+ - task:
18
+ name: Token Classification
19
+ type: token-classification
20
+ dataset:
21
+ name: layoutlmv3
22
+ type: layoutlmv3
23
+ config: InvoiceExtraction
24
+ split: test
25
+ args: InvoiceExtraction
26
+ metrics:
27
+ - name: Precision
28
+ type: precision
29
+ value: 0.8860759493670886
30
+ - name: Recall
31
+ type: recall
32
+ value: 0.9210526315789473
33
+ - name: F1
34
+ type: f1
35
+ value: 0.9032258064516129
36
+ - name: Accuracy
37
+ type: accuracy
38
+ value: 0.94375
39
+ ---
40
+
41
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
42
+ should probably proofread and complete it, then remove this comment. -->
43
+
44
+ # test
45
+
46
+ This model is a fine-tuned version of [microsoft/layoutlmv3-base](https://huggingface.co/microsoft/layoutlmv3-base) on the layoutlmv3 dataset.
47
+ It achieves the following results on the evaluation set:
48
+ - Loss: 0.3028
49
+ - Precision: 0.8861
50
+ - Recall: 0.9211
51
+ - F1: 0.9032
52
+ - Accuracy: 0.9437
53
+
54
+ ## Model description
55
+
56
+ More information needed
57
+
58
+ ## Intended uses & limitations
59
+
60
+ More information needed
61
+
62
+ ## Training and evaluation data
63
+
64
+ More information needed
65
+
66
+ ## Training procedure
67
+
68
+ ### Training hyperparameters
69
+
70
+ The following hyperparameters were used during training:
71
+ - learning_rate: 1e-05
72
+ - train_batch_size: 2
73
+ - eval_batch_size: 2
74
+ - seed: 42
75
+ - optimizer: Use adamw_torch with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
76
+ - lr_scheduler_type: linear
77
+ - training_steps: 1000
78
+
79
+ ### Training results
80
+
81
+ | Training Loss | Epoch | Step | Validation Loss | Precision | Recall | F1 | Accuracy |
82
+ |:-------------:|:-------:|:----:|:---------------:|:---------:|:------:|:------:|:--------:|
83
+ | No log | 4.3478 | 100 | 0.6867 | 0.6842 | 0.6842 | 0.6842 | 0.8063 |
84
+ | No log | 8.6957 | 200 | 0.2381 | 0.8625 | 0.9079 | 0.8846 | 0.9313 |
85
+ | No log | 13.0435 | 300 | 0.2598 | 0.8846 | 0.9079 | 0.8961 | 0.9313 |
86
+ | No log | 17.3913 | 400 | 0.2165 | 0.8625 | 0.9079 | 0.8846 | 0.9375 |
87
+ | 0.3281 | 21.7391 | 500 | 0.2037 | 0.8625 | 0.9079 | 0.8846 | 0.9375 |
88
+ | 0.3281 | 26.0870 | 600 | 0.2571 | 0.8861 | 0.9211 | 0.9032 | 0.9437 |
89
+ | 0.3281 | 30.4348 | 700 | 0.2735 | 0.8861 | 0.9211 | 0.9032 | 0.9437 |
90
+ | 0.3281 | 34.7826 | 800 | 0.2993 | 0.8861 | 0.9211 | 0.9032 | 0.9437 |
91
+ | 0.3281 | 39.1304 | 900 | 0.3044 | 0.8861 | 0.9211 | 0.9032 | 0.9437 |
92
+ | 0.012 | 43.4783 | 1000 | 0.3028 | 0.8861 | 0.9211 | 0.9032 | 0.9437 |
93
+
94
+
95
+ ### Framework versions
96
+
97
+ - Transformers 4.47.0.dev0
98
+ - Pytorch 2.5.0+cu121
99
+ - Datasets 3.1.0
100
+ - Tokenizers 0.20.3
config.json ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": "line_product_order",
18
+ "1": "invoice_number",
19
+ "2": "vendor_number",
20
+ "3": "invoice_date",
21
+ "4": "due_date",
22
+ "5": "total_amount",
23
+ "6": "line_product_configuration",
24
+ "7": "line_quantity",
25
+ "8": "line_price",
26
+ "9": "line_total_amount"
27
+ },
28
+ "initializer_range": 0.02,
29
+ "input_size": 224,
30
+ "intermediate_size": 3072,
31
+ "label2id": {
32
+ "due_date": 4,
33
+ "invoice_date": 3,
34
+ "invoice_number": 1,
35
+ "line_price": 8,
36
+ "line_product_configuration": 6,
37
+ "line_product_order": 0,
38
+ "line_quantity": 7,
39
+ "line_total_amount": 9,
40
+ "total_amount": 5,
41
+ "vendor_number": 2
42
+ },
43
+ "layer_norm_eps": 1e-05,
44
+ "max_2d_position_embeddings": 1024,
45
+ "max_position_embeddings": 514,
46
+ "max_rel_2d_pos": 256,
47
+ "max_rel_pos": 128,
48
+ "model_type": "layoutlmv3",
49
+ "num_attention_heads": 12,
50
+ "num_channels": 3,
51
+ "num_hidden_layers": 12,
52
+ "pad_token_id": 1,
53
+ "patch_size": 16,
54
+ "rel_2d_pos_bins": 64,
55
+ "rel_pos_bins": 32,
56
+ "second_input_size": 112,
57
+ "shape_size": 128,
58
+ "text_embed": true,
59
+ "torch_dtype": "float32",
60
+ "transformers_version": "4.47.0.dev0",
61
+ "type_vocab_size": 1,
62
+ "visual_embed": true,
63
+ "vocab_size": 50265
64
+ }
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:352e62fbedf08281fccd7e6f0f2f47964c2b9bfbb8b6351f1f96681a09bf94df
3
+ size 503727360
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
+ }
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": false,
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
+ "extra_special_tokens": {},
58
+ "mask_token": "<mask>",
59
+ "model_max_length": 512,
60
+ "only_label_first_subword": true,
61
+ "pad_token": "<pad>",
62
+ "pad_token_box": [
63
+ 0,
64
+ 0,
65
+ 0,
66
+ 0
67
+ ],
68
+ "pad_token_label": -100,
69
+ "processor_class": "LayoutLMv3Processor",
70
+ "sep_token": "</s>",
71
+ "sep_token_box": [
72
+ 0,
73
+ 0,
74
+ 0,
75
+ 0
76
+ ],
77
+ "tokenizer_class": "LayoutLMv3Tokenizer",
78
+ "trim_offsets": true,
79
+ "unk_token": "<unk>"
80
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0e3d9308785243089d2c6abd5e574d7af7989f889c57e13d4adf4d909b677593
3
+ size 5304
vocab.json ADDED
The diff for this file is too large to render. See raw diff