jwpark84 commited on
Commit
743feee
1 Parent(s): 0253f83

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-funsd1
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-funsd1
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.6653
21
+ - Answer: {'precision': 0.6705756929637526, 'recall': 0.7775030902348579, 'f1': 0.7200915855752718, 'number': 809}
22
+ - Header: {'precision': 0.30275229357798167, 'recall': 0.2773109243697479, 'f1': 0.28947368421052627, 'number': 119}
23
+ - Question: {'precision': 0.7173732335827099, 'recall': 0.8103286384976526, 'f1': 0.7610229276895942, 'number': 1065}
24
+ - Overall Precision: 0.6778
25
+ - Overall Recall: 0.7652
26
+ - Overall F1: 0.7188
27
+ - Overall Accuracy: 0.7992
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: 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.8388 | 1.0 | 10 | 1.6345 | {'precision': 0.010158013544018058, 'recall': 0.011124845488257108, 'f1': 0.010619469026548672, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.12983770287141075, 'recall': 0.09765258215962441, 'f1': 0.11146838156484459, 'number': 1065} | 0.0670 | 0.0567 | 0.0614 | 0.3424 |
60
+ | 1.5101 | 2.0 | 20 | 1.3279 | {'precision': 0.10227272727272728, 'recall': 0.08899876390605686, 'f1': 0.09517514871116987, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.3082191780821918, 'recall': 0.4225352112676056, 'f1': 0.3564356435643564, 'number': 1065} | 0.2412 | 0.2619 | 0.2511 | 0.5546 |
61
+ | 1.196 | 3.0 | 30 | 1.0812 | {'precision': 0.33375, 'recall': 0.3300370828182942, 'f1': 0.3318831572405221, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.4708233413269384, 'recall': 0.5530516431924882, 'f1': 0.5086355785837651, 'number': 1065} | 0.4153 | 0.4295 | 0.4223 | 0.6283 |
62
+ | 0.957 | 4.0 | 40 | 0.8960 | {'precision': 0.5760082730093071, 'recall': 0.688504326328801, 'f1': 0.6272522522522522, 'number': 809} | {'precision': 0.027777777777777776, 'recall': 0.008403361344537815, 'f1': 0.012903225806451613, 'number': 119} | {'precision': 0.6268939393939394, 'recall': 0.6215962441314554, 'f1': 0.6242338519566243, 'number': 1065} | 0.5925 | 0.6121 | 0.6022 | 0.7315 |
63
+ | 0.7609 | 5.0 | 50 | 0.7756 | {'precision': 0.608955223880597, 'recall': 0.7564894932014833, 'f1': 0.6747519294377067, 'number': 809} | {'precision': 0.11428571428571428, 'recall': 0.06722689075630252, 'f1': 0.08465608465608465, 'number': 119} | {'precision': 0.6362098138747885, 'recall': 0.7061032863849765, 'f1': 0.669336893635959, 'number': 1065} | 0.6079 | 0.6884 | 0.6456 | 0.7649 |
64
+ | 0.634 | 6.0 | 60 | 0.7261 | {'precision': 0.6207951070336392, 'recall': 0.7527812113720643, 'f1': 0.6804469273743018, 'number': 809} | {'precision': 0.24, 'recall': 0.15126050420168066, 'f1': 0.18556701030927833, 'number': 119} | {'precision': 0.6666666666666666, 'recall': 0.7380281690140845, 'f1': 0.7005347593582888, 'number': 1065} | 0.6322 | 0.7090 | 0.6684 | 0.7783 |
65
+ | 0.5815 | 7.0 | 70 | 0.6992 | {'precision': 0.6612377850162866, 'recall': 0.7527812113720643, 'f1': 0.7040462427745664, 'number': 809} | {'precision': 0.27586206896551724, 'recall': 0.20168067226890757, 'f1': 0.23300970873786409, 'number': 119} | {'precision': 0.6899841017488076, 'recall': 0.8150234741784037, 'f1': 0.7473095135600517, 'number': 1065} | 0.6624 | 0.7531 | 0.7049 | 0.7906 |
66
+ | 0.5279 | 8.0 | 80 | 0.6827 | {'precision': 0.6687631027253669, 'recall': 0.788627935723115, 'f1': 0.7237663074305162, 'number': 809} | {'precision': 0.3010752688172043, 'recall': 0.23529411764705882, 'f1': 0.2641509433962264, 'number': 119} | {'precision': 0.7285464098073555, 'recall': 0.7812206572769953, 'f1': 0.7539646579066607, 'number': 1065} | 0.6843 | 0.7516 | 0.7164 | 0.7973 |
67
+ | 0.4907 | 9.0 | 90 | 0.6732 | {'precision': 0.6609442060085837, 'recall': 0.761433868974042, 'f1': 0.707639287765652, 'number': 809} | {'precision': 0.3148148148148148, 'recall': 0.2857142857142857, 'f1': 0.29955947136563876, 'number': 119} | {'precision': 0.7145214521452146, 'recall': 0.8131455399061033, 'f1': 0.7606499780412823, 'number': 1065} | 0.6732 | 0.7607 | 0.7143 | 0.7971 |
68
+ | 0.4734 | 10.0 | 100 | 0.6653 | {'precision': 0.6705756929637526, 'recall': 0.7775030902348579, 'f1': 0.7200915855752718, 'number': 809} | {'precision': 0.30275229357798167, 'recall': 0.2773109243697479, 'f1': 0.28947368421052627, 'number': 119} | {'precision': 0.7173732335827099, 'recall': 0.8103286384976526, 'f1': 0.7610229276895942, 'number': 1065} | 0.6778 | 0.7652 | 0.7188 | 0.7992 |
69
+
70
+
71
+ ### Framework versions
72
+
73
+ - Transformers 4.41.2
74
+ - Pytorch 2.3.1+cu121
75
+ - Datasets 2.19.2
76
+ - Tokenizers 0.19.1
config.json ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": "B-HEADER",
13
+ "2": "I-HEADER",
14
+ "3": "B-QUESTION",
15
+ "4": "I-QUESTION",
16
+ "5": "B-ANSWER",
17
+ "6": "I-ANSWER"
18
+ },
19
+ "initializer_range": 0.02,
20
+ "intermediate_size": 3072,
21
+ "label2id": {
22
+ "B-ANSWER": 5,
23
+ "B-HEADER": 1,
24
+ "B-QUESTION": 3,
25
+ "I-ANSWER": 6,
26
+ "I-HEADER": 2,
27
+ "I-QUESTION": 4,
28
+ "O": 0
29
+ },
30
+ "layer_norm_eps": 1e-12,
31
+ "max_2d_position_embeddings": 1024,
32
+ "max_position_embeddings": 512,
33
+ "model_type": "layoutlm",
34
+ "num_attention_heads": 12,
35
+ "num_hidden_layers": 12,
36
+ "output_past": true,
37
+ "pad_token_id": 0,
38
+ "position_embedding_type": "absolute",
39
+ "torch_dtype": "float32",
40
+ "transformers_version": "4.41.2",
41
+ "type_vocab_size": 2,
42
+ "use_cache": true,
43
+ "vocab_size": 30522
44
+ }
logs/events.out.tfevents.1719878418.HCIDC-SV-DMZ-ORC-NODE02.112661.0 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:90c2b30d8ddd571fa0c17e93415e328912639291b8af43b9d9e75e4122847acc
3
+ size 12433
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:98be7aba2d0eed1237e612221f981096f0e927dc04804da8ab073c15fed02fa6
3
+ size 450558212
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
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a17366817ec98e3dacd597ee2acf5e27b690e6e83871b69e3eaa7be463a3b1a0
3
+ size 5112
vocab.txt ADDED
The diff for this file is too large to render. See raw diff