Neha-CanWill commited on
Commit
915bfe1
·
verified ·
1 Parent(s): 8f8bef0

End of training

Browse files
README.md ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.0686
21
+ - Answer: {'precision': 0.36396724294813465, 'recall': 0.49443757725587145, 'f1': 0.41928721174004197, 'number': 809}
22
+ - Header: {'precision': 0.27835051546391754, 'recall': 0.226890756302521, 'f1': 0.25, 'number': 119}
23
+ - Question: {'precision': 0.5165991902834008, 'recall': 0.5990610328638498, 'f1': 0.5547826086956522, 'number': 1065}
24
+ - Overall Precision: 0.4381
25
+ - Overall Recall: 0.5344
26
+ - Overall F1: 0.4815
27
+ - Overall Accuracy: 0.6250
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: 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.6981 | 1.0 | 10 | 1.5076 | {'precision': 0.03027027027027027, 'recall': 0.034610630407911, 'f1': 0.032295271049596314, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.2620056497175141, 'recall': 0.3483568075117371, 'f1': 0.29907295445384924, 'number': 1065} | 0.1704 | 0.2002 | 0.1841 | 0.3875 |
59
+ | 1.414 | 2.0 | 20 | 1.3021 | {'precision': 0.21108179419525067, 'recall': 0.39555006180469715, 'f1': 0.2752688172043011, 'number': 809} | {'precision': 0.23076923076923078, 'recall': 0.12605042016806722, 'f1': 0.16304347826086957, 'number': 119} | {'precision': 0.29304029304029305, 'recall': 0.4507042253521127, 'f1': 0.35516093229744733, 'number': 1065} | 0.2532 | 0.4089 | 0.3127 | 0.4499 |
60
+ | 1.2456 | 3.0 | 30 | 1.1694 | {'precision': 0.23877245508982037, 'recall': 0.3943139678615575, 'f1': 0.29743589743589743, 'number': 809} | {'precision': 0.3333333333333333, 'recall': 0.17647058823529413, 'f1': 0.23076923076923078, 'number': 119} | {'precision': 0.35604395604395606, 'recall': 0.6084507042253521, 'f1': 0.4492201039861352, 'number': 1065} | 0.3069 | 0.4957 | 0.3791 | 0.5226 |
61
+ | 1.1356 | 4.0 | 40 | 1.0684 | {'precision': 0.2732606873428332, 'recall': 0.40296662546353523, 'f1': 0.3256743256743257, 'number': 809} | {'precision': 0.3333333333333333, 'recall': 0.23529411764705882, 'f1': 0.27586206896551724, 'number': 119} | {'precision': 0.4185733512786003, 'recall': 0.584037558685446, 'f1': 0.48765190121520974, 'number': 1065} | 0.3532 | 0.4897 | 0.4104 | 0.5856 |
62
+ | 1.0269 | 5.0 | 50 | 1.0533 | {'precision': 0.29270462633451955, 'recall': 0.40667490729295425, 'f1': 0.3404035178479048, 'number': 809} | {'precision': 0.2857142857142857, 'recall': 0.2184873949579832, 'f1': 0.24761904761904763, 'number': 119} | {'precision': 0.4263959390862944, 'recall': 0.6309859154929578, 'f1': 0.5088981446421811, 'number': 1065} | 0.3680 | 0.5153 | 0.4293 | 0.5925 |
63
+ | 0.9574 | 6.0 | 60 | 1.0417 | {'precision': 0.31875, 'recall': 0.5043263288009888, 'f1': 0.3906175203446625, 'number': 809} | {'precision': 0.2839506172839506, 'recall': 0.19327731092436976, 'f1': 0.22999999999999998, 'number': 119} | {'precision': 0.5027173913043478, 'recall': 0.5211267605633803, 'f1': 0.5117565698478561, 'number': 1065} | 0.4 | 0.4947 | 0.4424 | 0.6055 |
64
+ | 0.8746 | 7.0 | 70 | 1.0403 | {'precision': 0.33510167992926615, 'recall': 0.4684796044499382, 'f1': 0.39072164948453614, 'number': 809} | {'precision': 0.3023255813953488, 'recall': 0.2184873949579832, 'f1': 0.25365853658536586, 'number': 119} | {'precision': 0.5072340425531915, 'recall': 0.5596244131455399, 'f1': 0.532142857142857, 'number': 1065} | 0.4185 | 0.5023 | 0.4566 | 0.6148 |
65
+ | 0.8197 | 8.0 | 80 | 1.0323 | {'precision': 0.3490304709141274, 'recall': 0.4672435105067985, 'f1': 0.3995771670190275, 'number': 809} | {'precision': 0.25742574257425743, 'recall': 0.2184873949579832, 'f1': 0.23636363636363636, 'number': 119} | {'precision': 0.49101796407185627, 'recall': 0.615962441314554, 'f1': 0.546438983756768, 'number': 1065} | 0.4206 | 0.5319 | 0.4698 | 0.6212 |
66
+ | 0.7517 | 9.0 | 90 | 1.0418 | {'precision': 0.3580705009276438, 'recall': 0.47713226205191595, 'f1': 0.4091149973502915, 'number': 809} | {'precision': 0.27472527472527475, 'recall': 0.21008403361344538, 'f1': 0.2380952380952381, 'number': 119} | {'precision': 0.5266323024054983, 'recall': 0.5755868544600939, 'f1': 0.5500224315836698, 'number': 1065} | 0.4389 | 0.5138 | 0.4734 | 0.6237 |
67
+ | 0.7561 | 10.0 | 100 | 1.0652 | {'precision': 0.3465587044534413, 'recall': 0.5290482076637825, 'f1': 0.4187866927592955, 'number': 809} | {'precision': 0.29545454545454547, 'recall': 0.2184873949579832, 'f1': 0.251207729468599, 'number': 119} | {'precision': 0.536697247706422, 'recall': 0.5492957746478874, 'f1': 0.5429234338747101, 'number': 1065} | 0.4306 | 0.5213 | 0.4716 | 0.6226 |
68
+ | 0.6786 | 11.0 | 110 | 1.0498 | {'precision': 0.3706896551724138, 'recall': 0.4783683559950556, 'f1': 0.4177010253642741, 'number': 809} | {'precision': 0.3068181818181818, 'recall': 0.226890756302521, 'f1': 0.2608695652173913, 'number': 119} | {'precision': 0.5236593059936908, 'recall': 0.6234741784037559, 'f1': 0.5692241748821258, 'number': 1065} | 0.4492 | 0.5409 | 0.4908 | 0.6369 |
69
+ | 0.6839 | 12.0 | 120 | 1.1004 | {'precision': 0.35621198957428324, 'recall': 0.5067985166872683, 'f1': 0.41836734693877553, 'number': 809} | {'precision': 0.30851063829787234, 'recall': 0.24369747899159663, 'f1': 0.27230046948356806, 'number': 119} | {'precision': 0.5135350318471338, 'recall': 0.6056338028169014, 'f1': 0.5557949159844894, 'number': 1065} | 0.4334 | 0.5439 | 0.4824 | 0.6115 |
70
+ | 0.6505 | 13.0 | 130 | 1.0685 | {'precision': 0.3501303214596003, 'recall': 0.49814585908529047, 'f1': 0.41122448979591836, 'number': 809} | {'precision': 0.26804123711340205, 'recall': 0.2184873949579832, 'f1': 0.24074074074074076, 'number': 119} | {'precision': 0.5467756584922797, 'recall': 0.5652582159624413, 'f1': 0.5558633425669437, 'number': 1065} | 0.4389 | 0.5173 | 0.4749 | 0.6324 |
71
+ | 0.6221 | 14.0 | 140 | 1.0541 | {'precision': 0.3643192488262911, 'recall': 0.4796044499381953, 'f1': 0.4140875133404482, 'number': 809} | {'precision': 0.2857142857142857, 'recall': 0.23529411764705882, 'f1': 0.2580645161290323, 'number': 119} | {'precision': 0.5176747839748626, 'recall': 0.6187793427230047, 'f1': 0.5637296834901625, 'number': 1065} | 0.4413 | 0.5394 | 0.4854 | 0.6316 |
72
+ | 0.6015 | 15.0 | 150 | 1.0686 | {'precision': 0.36396724294813465, 'recall': 0.49443757725587145, 'f1': 0.41928721174004197, 'number': 809} | {'precision': 0.27835051546391754, 'recall': 0.226890756302521, 'f1': 0.25, 'number': 119} | {'precision': 0.5165991902834008, 'recall': 0.5990610328638498, 'f1': 0.5547826086956522, 'number': 1065} | 0.4381 | 0.5344 | 0.4815 | 0.6250 |
73
+
74
+
75
+ ### Framework versions
76
+
77
+ - Transformers 4.38.2
78
+ - Pytorch 2.1.0+cu121
79
+ - Datasets 2.18.0
80
+ - Tokenizers 0.15.2
logs/events.out.tfevents.1709894034.0c59864ff64b.3471.0 CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:aea82cdf7ebe73a76966eceb15ca49f9a33b42881753ae7869d61115bcbc6b29
3
- size 15385
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:14236f68cc16e8115504145c784860248f71db9bd28e1041b92de61d800edce6
3
+ size 15739
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:2d29e3d5bc8a62bed8a5e1c153e5af9c70ba433f98676f439cd394c4d49cbe16
3
  size 450558212
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c25189f363d3bbc8b7d1d4b7f04f44024d19086d6d42b52aad0296d1d8ef4007
3
  size 450558212
preprocessor_config.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "apply_ocr": true,
3
+ "do_resize": true,
4
+ "image_processor_type": "LayoutLMv2ImageProcessor",
5
+ "ocr_lang": null,
6
+ "processor_class": "LayoutLMv2Processor",
7
+ "resample": 2,
8
+ "size": {
9
+ "height": 224,
10
+ "width": 224
11
+ },
12
+ "tesseract_config": ""
13
+ }
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