Szczotar93 commited on
Commit
fe3447a
1 Parent(s): 79f2f69

End of training

Browse files
README.md ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ base_model: microsoft/layoutlm-base-uncased
4
+ tags:
5
+ - generated_from_trainer
6
+ datasets:
7
+ - layoutlmv3
8
+ model-index:
9
+ - name: Layoutlm_Inkaso_2
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_Inkaso_2
17
+
18
+ This model is a fine-tuned version of [microsoft/layoutlm-base-uncased](https://huggingface.co/microsoft/layoutlm-base-uncased) on the layoutlmv3 dataset.
19
+ It achieves the following results on the evaluation set:
20
+ - Loss: 0.1191
21
+ - Creditor address: {'precision': 0.9807692307692307, 'recall': 0.9622641509433962, 'f1': 0.9714285714285713, 'number': 53}
22
+ - Creditor name: {'precision': 0.9722222222222222, 'recall': 1.0, 'f1': 0.9859154929577464, 'number': 35}
23
+ - Creditor proxy: {'precision': 0.75, 'recall': 0.8823529411764706, 'f1': 0.8108108108108107, 'number': 34}
24
+ - Debtor address: {'precision': 0.9807692307692307, 'recall': 0.9807692307692307, 'f1': 0.9807692307692307, 'number': 52}
25
+ - Debtor name: {'precision': 0.926829268292683, 'recall': 0.95, 'f1': 0.9382716049382716, 'number': 40}
26
+ - Doc id: {'precision': 0.6875, 'recall': 0.6875, 'f1': 0.6875, 'number': 16}
27
+ - Title: {'precision': 0.9772727272727273, 'recall': 0.7678571428571429, 'f1': 0.86, 'number': 56}
28
+ - Overall Precision: 0.9217
29
+ - Overall Recall: 0.9056
30
+ - Overall F1: 0.9136
31
+ - Overall Accuracy: 0.9755
32
+
33
+ ## Model description
34
+
35
+ More information needed
36
+
37
+ ## Intended uses & limitations
38
+
39
+ More information needed
40
+
41
+ ## Training and evaluation data
42
+
43
+ More information needed
44
+
45
+ ## Training procedure
46
+
47
+ ### Training hyperparameters
48
+
49
+ The following hyperparameters were used during training:
50
+ - learning_rate: 3e-05
51
+ - train_batch_size: 16
52
+ - eval_batch_size: 8
53
+ - seed: 42
54
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
55
+ - lr_scheduler_type: linear
56
+ - lr_scheduler_warmup_steps: 10
57
+ - num_epochs: 50
58
+
59
+ ### Training results
60
+
61
+ | Training Loss | Epoch | Step | Validation Loss | Creditor address | Creditor name | Creditor proxy | Debtor address | Debtor name | Doc id | Title | Overall Precision | Overall Recall | Overall F1 | Overall Accuracy |
62
+ |:-------------:|:-------:|:----:|:---------------:|:-------------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------:|:-------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------------------------:|:-----------------:|:--------------:|:----------:|:----------------:|
63
+ | 1.2524 | 6.6667 | 20 | 0.6528 | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 53} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 35} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 34} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 52} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 40} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 16} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 56} | 0.0 | 0.0 | 0.0 | 0.8405 |
64
+ | 0.4371 | 13.3333 | 40 | 0.2820 | {'precision': 0.7457627118644068, 'recall': 0.8301886792452831, 'f1': 0.7857142857142858, 'number': 53} | {'precision': 0.868421052631579, 'recall': 0.9428571428571428, 'f1': 0.904109589041096, 'number': 35} | {'precision': 0.9166666666666666, 'recall': 0.3235294117647059, 'f1': 0.4782608695652174, 'number': 34} | {'precision': 0.6222222222222222, 'recall': 0.5384615384615384, 'f1': 0.577319587628866, 'number': 52} | {'precision': 0.9375, 'recall': 0.375, 'f1': 0.5357142857142857, 'number': 40} | {'precision': 0.8, 'recall': 0.5, 'f1': 0.6153846153846154, 'number': 16} | {'precision': 0.8235294117647058, 'recall': 0.75, 'f1': 0.7850467289719627, 'number': 56} | 0.7835 | 0.6329 | 0.7002 | 0.9320 |
65
+ | 0.1154 | 20.0 | 60 | 0.1217 | {'precision': 1.0, 'recall': 0.9433962264150944, 'f1': 0.970873786407767, 'number': 53} | {'precision': 0.9722222222222222, 'recall': 1.0, 'f1': 0.9859154929577464, 'number': 35} | {'precision': 0.7666666666666667, 'recall': 0.6764705882352942, 'f1': 0.71875, 'number': 34} | {'precision': 0.8947368421052632, 'recall': 0.9807692307692307, 'f1': 0.9357798165137614, 'number': 52} | {'precision': 0.9142857142857143, 'recall': 0.8, 'f1': 0.8533333333333333, 'number': 40} | {'precision': 0.6875, 'recall': 0.6875, 'f1': 0.6875, 'number': 16} | {'precision': 0.9565217391304348, 'recall': 0.7857142857142857, 'f1': 0.8627450980392156, 'number': 56} | 0.9111 | 0.8601 | 0.8849 | 0.9682 |
66
+ | 0.0263 | 26.6667 | 80 | 0.1306 | {'precision': 0.9803921568627451, 'recall': 0.9433962264150944, 'f1': 0.9615384615384616, 'number': 53} | {'precision': 0.9722222222222222, 'recall': 1.0, 'f1': 0.9859154929577464, 'number': 35} | {'precision': 0.7307692307692307, 'recall': 0.5588235294117647, 'f1': 0.6333333333333334, 'number': 34} | {'precision': 0.9807692307692307, 'recall': 0.9807692307692307, 'f1': 0.9807692307692307, 'number': 52} | {'precision': 0.926829268292683, 'recall': 0.95, 'f1': 0.9382716049382716, 'number': 40} | {'precision': 0.6875, 'recall': 0.6875, 'f1': 0.6875, 'number': 16} | {'precision': 1.0, 'recall': 0.7857142857142857, 'f1': 0.88, 'number': 56} | 0.9323 | 0.8671 | 0.8986 | 0.9704 |
67
+ | 0.0113 | 33.3333 | 100 | 0.1161 | {'precision': 0.9803921568627451, 'recall': 0.9433962264150944, 'f1': 0.9615384615384616, 'number': 53} | {'precision': 0.9722222222222222, 'recall': 1.0, 'f1': 0.9859154929577464, 'number': 35} | {'precision': 0.75, 'recall': 0.8823529411764706, 'f1': 0.8108108108108107, 'number': 34} | {'precision': 1.0, 'recall': 0.9807692307692307, 'f1': 0.9902912621359222, 'number': 52} | {'precision': 0.9285714285714286, 'recall': 0.975, 'f1': 0.951219512195122, 'number': 40} | {'precision': 0.6875, 'recall': 0.6875, 'f1': 0.6875, 'number': 16} | {'precision': 1.0, 'recall': 0.75, 'f1': 0.8571428571428571, 'number': 56} | 0.9281 | 0.9021 | 0.9149 | 0.9755 |
68
+ | 0.0079 | 40.0 | 120 | 0.1306 | {'precision': 0.9803921568627451, 'recall': 0.9433962264150944, 'f1': 0.9615384615384616, 'number': 53} | {'precision': 0.9722222222222222, 'recall': 1.0, 'f1': 0.9859154929577464, 'number': 35} | {'precision': 0.7272727272727273, 'recall': 0.7058823529411765, 'f1': 0.7164179104477613, 'number': 34} | {'precision': 1.0, 'recall': 0.9807692307692307, 'f1': 0.9902912621359222, 'number': 52} | {'precision': 0.926829268292683, 'recall': 0.95, 'f1': 0.9382716049382716, 'number': 40} | {'precision': 0.6875, 'recall': 0.6875, 'f1': 0.6875, 'number': 16} | {'precision': 1.0, 'recall': 0.7678571428571429, 'f1': 0.8686868686868687, 'number': 56} | 0.9299 | 0.8811 | 0.9048 | 0.9727 |
69
+ | 0.0064 | 46.6667 | 140 | 0.1191 | {'precision': 0.9807692307692307, 'recall': 0.9622641509433962, 'f1': 0.9714285714285713, 'number': 53} | {'precision': 0.9722222222222222, 'recall': 1.0, 'f1': 0.9859154929577464, 'number': 35} | {'precision': 0.75, 'recall': 0.8823529411764706, 'f1': 0.8108108108108107, 'number': 34} | {'precision': 0.9807692307692307, 'recall': 0.9807692307692307, 'f1': 0.9807692307692307, 'number': 52} | {'precision': 0.926829268292683, 'recall': 0.95, 'f1': 0.9382716049382716, 'number': 40} | {'precision': 0.6875, 'recall': 0.6875, 'f1': 0.6875, 'number': 16} | {'precision': 0.9772727272727273, 'recall': 0.7678571428571429, 'f1': 0.86, 'number': 56} | 0.9217 | 0.9056 | 0.9136 | 0.9755 |
70
+
71
+
72
+ ### Framework versions
73
+
74
+ - Transformers 4.40.1
75
+ - Pytorch 2.3.0+cu118
76
+ - Datasets 2.19.0
77
+ - Tokenizers 0.19.1
config.json ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "microsoft/layoutlm-base-uncased",
3
+ "architectures": [
4
+ "LayoutLMForTokenClassification"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "hidden_act": "gelu",
8
+ "hidden_dropout_prob": 0.1,
9
+ "hidden_size": 768,
10
+ "id2label": {
11
+ "0": "O",
12
+ "1": "title",
13
+ "2": "creditor name",
14
+ "3": "creditor address",
15
+ "4": "creditor proxy",
16
+ "5": "debtor name",
17
+ "6": "debtor address",
18
+ "7": "doc id"
19
+ },
20
+ "initializer_range": 0.02,
21
+ "intermediate_size": 3072,
22
+ "label2id": {
23
+ "O": 0,
24
+ "creditor address": 3,
25
+ "creditor name": 2,
26
+ "creditor proxy": 4,
27
+ "debtor address": 6,
28
+ "debtor name": 5,
29
+ "doc id": 7,
30
+ "title": 1
31
+ },
32
+ "layer_norm_eps": 1e-12,
33
+ "max_2d_position_embeddings": 1024,
34
+ "max_position_embeddings": 512,
35
+ "model_type": "layoutlm",
36
+ "num_attention_heads": 12,
37
+ "num_hidden_layers": 12,
38
+ "output_past": true,
39
+ "pad_token_id": 0,
40
+ "position_embedding_type": "absolute",
41
+ "torch_dtype": "float32",
42
+ "transformers_version": "4.40.1",
43
+ "type_vocab_size": 2,
44
+ "use_cache": true,
45
+ "vocab_size": 30522
46
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0efe1e553e6431521fc29804cf65a3cab57ee296980f4302684fc0598dfda4e1
3
+ size 450561288
preprocessor_config.json ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_valid_processor_keys": [
3
+ "images",
4
+ "do_resize",
5
+ "size",
6
+ "resample",
7
+ "apply_ocr",
8
+ "ocr_lang",
9
+ "tesseract_config",
10
+ "return_tensors",
11
+ "data_format",
12
+ "input_data_format"
13
+ ],
14
+ "apply_ocr": false,
15
+ "do_resize": true,
16
+ "image_processor_type": "LayoutLMv2ImageProcessor",
17
+ "ocr_lang": null,
18
+ "processor_class": "LayoutLMv2Processor",
19
+ "resample": 2,
20
+ "size": {
21
+ "height": 224,
22
+ "width": 224
23
+ },
24
+ "tesseract_config": ""
25
+ }
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
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c09e050a9491abd68291712394373da239f795834d1545c3a9517586b58866f1
3
+ size 4984
vocab.txt ADDED
The diff for this file is too large to render. See raw diff