Sailesh9999 commited on
Commit
78d1fc9
1 Parent(s): 2a2d52d

Training in progress, epoch 1

Browse files
README.md CHANGED
@@ -1,3 +1,80 @@
1
  ---
2
  license: mit
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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: 1.0844
21
+ - Answer: {'precision': 0.3143100511073254, 'recall': 0.4561186650185414, 'f1': 0.3721633888048412, 'number': 809}
22
+ - Header: {'precision': 0.275, 'recall': 0.18487394957983194, 'f1': 0.22110552763819097, 'number': 119}
23
+ - Question: {'precision': 0.44804716285924834, 'recall': 0.5708920187793427, 'f1': 0.5020644095788603, 'number': 1065}
24
+ - Overall Precision: 0.3826
25
+ - Overall Recall: 0.5013
26
+ - Overall F1: 0.4340
27
+ - Overall Accuracy: 0.5793
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: 32
48
+ - eval_batch_size: 16
49
+ - seed: 42
50
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
51
+ - lr_scheduler_type: linear
52
+ - num_epochs: 15
53
+
54
+ ### Training results
55
+
56
+ | Training Loss | Epoch | Step | Validation Loss | Answer | Header | Question | Overall Precision | Overall Recall | Overall F1 | Overall Accuracy |
57
+ |:-------------:|:-----:|:----:|:---------------:|:--------------------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------------:|:------------------------------------------------------------------------------------------------------------:|:-----------------:|:--------------:|:----------:|:----------------:|
58
+ | 1.7974 | 1.0 | 5 | 1.6082 | {'precision': 0.015957446808510637, 'recall': 0.003708281829419036, 'f1': 0.006018054162487462, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.13218390804597702, 'recall': 0.0215962441314554, 'f1': 0.037126715092816794, 'number': 1065} | 0.0718 | 0.0130 | 0.0221 | 0.2950 |
59
+ | 1.6031 | 2.0 | 10 | 1.4809 | {'precision': 0.09702549575070822, 'recall': 0.16934487021013597, 'f1': 0.12336785231877535, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.2448499117127722, 'recall': 0.39061032863849765, 'f1': 0.301013024602026, 'number': 1065} | 0.1778 | 0.2775 | 0.2167 | 0.3926 |
60
+ | 1.4415 | 3.0 | 15 | 1.3965 | {'precision': 0.15503875968992248, 'recall': 0.32138442521631644, 'f1': 0.20917135961383748, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.25329341317365267, 'recall': 0.3971830985915493, 'f1': 0.3093235831809872, 'number': 1065} | 0.2041 | 0.3427 | 0.2558 | 0.4162 |
61
+ | 1.3417 | 4.0 | 20 | 1.2882 | {'precision': 0.1925233644859813, 'recall': 0.3819530284301607, 'f1': 0.25600662800331403, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.2921832884097035, 'recall': 0.5089201877934272, 'f1': 0.3712328767123288, 'number': 1065} | 0.2457 | 0.4270 | 0.3120 | 0.4305 |
62
+ | 1.2673 | 5.0 | 25 | 1.2461 | {'precision': 0.2402555910543131, 'recall': 0.4647713226205192, 'f1': 0.3167649536647009, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.3362183754993342, 'recall': 0.47417840375586856, 'f1': 0.39345539540319435, 'number': 1065} | 0.2828 | 0.4420 | 0.3449 | 0.4621 |
63
+ | 1.1953 | 6.0 | 30 | 1.1667 | {'precision': 0.2396469789545146, 'recall': 0.4363411619283066, 'f1': 0.30937773882559155, 'number': 809} | {'precision': 0.1038961038961039, 'recall': 0.06722689075630252, 'f1': 0.08163265306122448, 'number': 119} | {'precision': 0.34711246200607904, 'recall': 0.536150234741784, 'f1': 0.42140221402214023, 'number': 1065} | 0.2917 | 0.4676 | 0.3593 | 0.5048 |
64
+ | 1.1257 | 7.0 | 35 | 1.1238 | {'precision': 0.271211022480058, 'recall': 0.4622991347342398, 'f1': 0.34186471663619744, 'number': 809} | {'precision': 0.17708333333333334, 'recall': 0.14285714285714285, 'f1': 0.15813953488372096, 'number': 119} | {'precision': 0.38812154696132595, 'recall': 0.5276995305164319, 'f1': 0.4472741742936729, 'number': 1065} | 0.3260 | 0.4782 | 0.3877 | 0.5539 |
65
+ | 1.0703 | 8.0 | 40 | 1.0882 | {'precision': 0.2758340113913751, 'recall': 0.41903584672435107, 'f1': 0.33267909715407257, 'number': 809} | {'precision': 0.1919191919191919, 'recall': 0.15966386554621848, 'f1': 0.17431192660550457, 'number': 119} | {'precision': 0.4045307443365696, 'recall': 0.5868544600938967, 'f1': 0.47892720306513414, 'number': 1065} | 0.3422 | 0.4932 | 0.4040 | 0.5809 |
66
+ | 1.0172 | 9.0 | 45 | 1.0768 | {'precision': 0.277602523659306, 'recall': 0.43510506798516685, 'f1': 0.3389504092441021, 'number': 809} | {'precision': 0.24096385542168675, 'recall': 0.16806722689075632, 'f1': 0.19801980198019803, 'number': 119} | {'precision': 0.40967092008059103, 'recall': 0.5727699530516432, 'f1': 0.4776820673453407, 'number': 1065} | 0.3458 | 0.4927 | 0.4064 | 0.5803 |
67
+ | 0.9713 | 10.0 | 50 | 1.0884 | {'precision': 0.3041700735895339, 'recall': 0.45982694684796044, 'f1': 0.3661417322834645, 'number': 809} | {'precision': 0.2631578947368421, 'recall': 0.16806722689075632, 'f1': 0.20512820512820512, 'number': 119} | {'precision': 0.4506024096385542, 'recall': 0.5267605633802817, 'f1': 0.4857142857142857, 'number': 1065} | 0.3746 | 0.4782 | 0.4201 | 0.5781 |
68
+ | 0.9434 | 11.0 | 55 | 1.1220 | {'precision': 0.29082426127527217, 'recall': 0.4622991347342398, 'f1': 0.35704057279236273, 'number': 809} | {'precision': 0.2727272727272727, 'recall': 0.17647058823529413, 'f1': 0.21428571428571427, 'number': 119} | {'precision': 0.4404934687953556, 'recall': 0.5699530516431925, 'f1': 0.4969300040933278, 'number': 1065} | 0.3656 | 0.5028 | 0.4233 | 0.5669 |
69
+ | 0.9288 | 12.0 | 60 | 1.0876 | {'precision': 0.298372513562387, 'recall': 0.4079110012360939, 'f1': 0.34464751958224543, 'number': 809} | {'precision': 0.23958333333333334, 'recall': 0.19327731092436976, 'f1': 0.21395348837209302, 'number': 119} | {'precision': 0.4299933642999336, 'recall': 0.6084507042253521, 'f1': 0.5038880248833593, 'number': 1065} | 0.3695 | 0.5023 | 0.4258 | 0.5784 |
70
+ | 0.9043 | 13.0 | 65 | 1.1185 | {'precision': 0.31703204047217537, 'recall': 0.4647713226205192, 'f1': 0.3769423558897243, 'number': 809} | {'precision': 0.2894736842105263, 'recall': 0.18487394957983194, 'f1': 0.22564102564102564, 'number': 119} | {'precision': 0.4605263157894737, 'recall': 0.5258215962441315, 'f1': 0.49101271372205174, 'number': 1065} | 0.3866 | 0.4807 | 0.4285 | 0.5679 |
71
+ | 0.8884 | 14.0 | 70 | 1.1097 | {'precision': 0.31260364842454397, 'recall': 0.46600741656365885, 'f1': 0.37419354838709684, 'number': 809} | {'precision': 0.29333333333333333, 'recall': 0.18487394957983194, 'f1': 0.2268041237113402, 'number': 119} | {'precision': 0.4597791798107255, 'recall': 0.5474178403755868, 'f1': 0.4997856836690956, 'number': 1065} | 0.3852 | 0.4927 | 0.4324 | 0.5710 |
72
+ | 0.8759 | 15.0 | 75 | 1.0844 | {'precision': 0.3143100511073254, 'recall': 0.4561186650185414, 'f1': 0.3721633888048412, 'number': 809} | {'precision': 0.275, 'recall': 0.18487394957983194, 'f1': 0.22110552763819097, 'number': 119} | {'precision': 0.44804716285924834, 'recall': 0.5708920187793427, 'f1': 0.5020644095788603, 'number': 1065} | 0.3826 | 0.5013 | 0.4340 | 0.5793 |
73
+
74
+
75
+ ### Framework versions
76
+
77
+ - Transformers 4.33.0
78
+ - Pytorch 2.0.1+cu118
79
+ - Datasets 2.14.5
80
+ - Tokenizers 0.13.3
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.33.0",
41
+ "type_vocab_size": 2,
42
+ "use_cache": true,
43
+ "vocab_size": 30522
44
+ }
preprocessor_config.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "apply_ocr": true,
3
+ "do_resize": true,
4
+ "feature_extractor_type": "LayoutLMv2FeatureExtractor",
5
+ "image_processor_type": "LayoutLMv2ImageProcessor",
6
+ "ocr_lang": null,
7
+ "processor_class": "LayoutLMv2Processor",
8
+ "resample": 2,
9
+ "size": {
10
+ "height": 224,
11
+ "width": 224
12
+ },
13
+ "tesseract_config": ""
14
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c1e900a711707a090d4d8ed042a8c9002f840b888eb7aa3ee4b8e6ad2135ebe3
3
+ size 450603969
special_tokens_map.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "cls_token": "[CLS]",
3
+ "mask_token": "[MASK]",
4
+ "pad_token": "[PAD]",
5
+ "sep_token": "[SEP]",
6
+ "unk_token": "[UNK]"
7
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": null,
3
+ "apply_ocr": false,
4
+ "clean_up_tokenization_spaces": true,
5
+ "cls_token": "[CLS]",
6
+ "cls_token_box": [
7
+ 0,
8
+ 0,
9
+ 0,
10
+ 0
11
+ ],
12
+ "do_basic_tokenize": true,
13
+ "do_lower_case": true,
14
+ "mask_token": "[MASK]",
15
+ "model_max_length": 512,
16
+ "never_split": null,
17
+ "only_label_first_subword": true,
18
+ "pad_token": "[PAD]",
19
+ "pad_token_box": [
20
+ 0,
21
+ 0,
22
+ 0,
23
+ 0
24
+ ],
25
+ "pad_token_label": -100,
26
+ "processor_class": "LayoutLMv2Processor",
27
+ "sep_token": "[SEP]",
28
+ "sep_token_box": [
29
+ 1000,
30
+ 1000,
31
+ 1000,
32
+ 1000
33
+ ],
34
+ "strip_accents": null,
35
+ "tokenize_chinese_chars": true,
36
+ "tokenizer_class": "LayoutLMv2Tokenizer",
37
+ "unk_token": "[UNK]"
38
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c171eb48151a6f712517bf002dd7d43be136c8408d649c4ae7c8a23f1af5d84c
3
+ size 4091
vocab.txt ADDED
The diff for this file is too large to render. See raw diff