diah commited on
Commit
eac4776
·
verified ·
1 Parent(s): 4af9586

End of training

Browse files
README.md ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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: layoutlm-funsd
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-funsd
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.7043
21
+ - Answer: {'precision': 0.7119021134593994, 'recall': 0.7911001236093943, 'f1': 0.7494145199063232, 'number': 809}
22
+ - Header: {'precision': 0.37209302325581395, 'recall': 0.40336134453781514, 'f1': 0.3870967741935484, 'number': 119}
23
+ - Question: {'precision': 0.7965796579657966, 'recall': 0.8309859154929577, 'f1': 0.8134191176470588, 'number': 1065}
24
+ - Overall Precision: 0.7354
25
+ - Overall Recall: 0.7893
26
+ - Overall F1: 0.7614
27
+ - Overall Accuracy: 0.8036
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: 4
48
+ - eval_batch_size: 4
49
+ - seed: 42
50
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
51
+ - lr_scheduler_type: linear
52
+ - num_epochs: 10
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.5459 | 1.0 | 38 | 1.0013 | {'precision': 0.4444444444444444, 'recall': 0.5735475896168108, 'f1': 0.500809498111171, 'number': 809} | {'precision': 0.05263157894736842, 'recall': 0.008403361344537815, 'f1': 0.014492753623188406, 'number': 119} | {'precision': 0.5643024162120032, 'recall': 0.67981220657277, 'f1': 0.616695059625213, 'number': 1065} | 0.5068 | 0.5966 | 0.5481 | 0.6648 |
60
+ | 0.8508 | 2.0 | 76 | 0.7119 | {'precision': 0.6081081081081081, 'recall': 0.7787391841779975, 'f1': 0.6829268292682927, 'number': 809} | {'precision': 0.16455696202531644, 'recall': 0.1092436974789916, 'f1': 0.1313131313131313, 'number': 119} | {'precision': 0.6774703557312253, 'recall': 0.8046948356807512, 'f1': 0.7356223175965665, 'number': 1065} | 0.6303 | 0.7526 | 0.6860 | 0.7691 |
61
+ | 0.6131 | 3.0 | 114 | 0.6432 | {'precision': 0.6631689401888772, 'recall': 0.7812113720642769, 'f1': 0.717366628830874, 'number': 809} | {'precision': 0.248, 'recall': 0.2605042016806723, 'f1': 0.2540983606557377, 'number': 119} | {'precision': 0.7474048442906575, 'recall': 0.8112676056338028, 'f1': 0.7780279153534444, 'number': 1065} | 0.6835 | 0.7662 | 0.7225 | 0.7837 |
62
+ | 0.4734 | 4.0 | 152 | 0.6196 | {'precision': 0.6882845188284519, 'recall': 0.8133498145859085, 'f1': 0.7456090651558074, 'number': 809} | {'precision': 0.2569444444444444, 'recall': 0.31092436974789917, 'f1': 0.28136882129277563, 'number': 119} | {'precision': 0.763716814159292, 'recall': 0.8103286384976526, 'f1': 0.7863325740318907, 'number': 1065} | 0.6987 | 0.7817 | 0.7379 | 0.8005 |
63
+ | 0.3721 | 5.0 | 190 | 0.6197 | {'precision': 0.6894343649946638, 'recall': 0.7985166872682324, 'f1': 0.7399770904925544, 'number': 809} | {'precision': 0.31007751937984496, 'recall': 0.33613445378151263, 'f1': 0.3225806451612903, 'number': 119} | {'precision': 0.7683566433566433, 'recall': 0.8253521126760563, 'f1': 0.7958352195563604, 'number': 1065} | 0.7081 | 0.7852 | 0.7447 | 0.8005 |
64
+ | 0.2989 | 6.0 | 228 | 0.6483 | {'precision': 0.6992316136114161, 'recall': 0.7873918417799752, 'f1': 0.7406976744186047, 'number': 809} | {'precision': 0.35766423357664234, 'recall': 0.4117647058823529, 'f1': 0.3828125, 'number': 119} | {'precision': 0.7854578096947935, 'recall': 0.8215962441314554, 'f1': 0.8031206975676914, 'number': 1065} | 0.7220 | 0.7832 | 0.7514 | 0.7987 |
65
+ | 0.2437 | 7.0 | 266 | 0.6707 | {'precision': 0.7067415730337079, 'recall': 0.7775030902348579, 'f1': 0.7404355503237198, 'number': 809} | {'precision': 0.34057971014492755, 'recall': 0.3949579831932773, 'f1': 0.36575875486381326, 'number': 119} | {'precision': 0.7804232804232805, 'recall': 0.8309859154929577, 'f1': 0.8049113233287858, 'number': 1065} | 0.7220 | 0.7832 | 0.7514 | 0.7993 |
66
+ | 0.2008 | 8.0 | 304 | 0.6904 | {'precision': 0.7038251366120218, 'recall': 0.796044499381953, 'f1': 0.7470997679814385, 'number': 809} | {'precision': 0.3356643356643357, 'recall': 0.40336134453781514, 'f1': 0.366412213740458, 'number': 119} | {'precision': 0.7885304659498208, 'recall': 0.8262910798122066, 'f1': 0.8069692801467218, 'number': 1065} | 0.7231 | 0.7888 | 0.7545 | 0.7990 |
67
+ | 0.1802 | 9.0 | 342 | 0.7072 | {'precision': 0.7161862527716186, 'recall': 0.7985166872682324, 'f1': 0.7551139684395091, 'number': 809} | {'precision': 0.34459459459459457, 'recall': 0.42857142857142855, 'f1': 0.38202247191011235, 'number': 119} | {'precision': 0.7896174863387978, 'recall': 0.8140845070422535, 'f1': 0.8016643550624134, 'number': 1065} | 0.7281 | 0.7847 | 0.7554 | 0.7989 |
68
+ | 0.1681 | 10.0 | 380 | 0.7043 | {'precision': 0.7119021134593994, 'recall': 0.7911001236093943, 'f1': 0.7494145199063232, 'number': 809} | {'precision': 0.37209302325581395, 'recall': 0.40336134453781514, 'f1': 0.3870967741935484, 'number': 119} | {'precision': 0.7965796579657966, 'recall': 0.8309859154929577, 'f1': 0.8134191176470588, 'number': 1065} | 0.7354 | 0.7893 | 0.7614 | 0.8036 |
69
+
70
+
71
+ ### Framework versions
72
+
73
+ - Transformers 4.40.2
74
+ - Pytorch 2.3.0+cu121
75
+ - Datasets 2.19.1
76
+ - Tokenizers 0.19.1
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": true,
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
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff