adamadam111 commited on
Commit
f458082
·
verified ·
1 Parent(s): 75bdb8a

adamadam111/layoutlmv3b-finetuned-funsd-01

Browse files
README.md ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ license: cc-by-nc-sa-4.0
4
+ base_model: microsoft/layoutlmv3-base
5
+ tags:
6
+ - generated_from_trainer
7
+ datasets:
8
+ - funsd
9
+ metrics:
10
+ - precision
11
+ - recall
12
+ - f1
13
+ - accuracy
14
+ model-index:
15
+ - name: layoutlmv3-finetuned-funsd
16
+ results:
17
+ - task:
18
+ name: Token Classification
19
+ type: token-classification
20
+ dataset:
21
+ name: funsd
22
+ type: funsd
23
+ config: funsd
24
+ split: test
25
+ args: funsd
26
+ metrics:
27
+ - name: Precision
28
+ type: precision
29
+ value: 0.7822618488972314
30
+ - name: Recall
31
+ type: recall
32
+ value: 0.8281172379533035
33
+ - name: F1
34
+ type: f1
35
+ value: 0.8045366795366795
36
+ - name: Accuracy
37
+ type: accuracy
38
+ value: 0.8135029121597528
39
+ ---
40
+
41
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
42
+ should probably proofread and complete it, then remove this comment. -->
43
+
44
+ # layoutlmv3-finetuned-funsd
45
+
46
+ This model is a fine-tuned version of [microsoft/layoutlmv3-base](https://huggingface.co/microsoft/layoutlmv3-base) on the funsd dataset.
47
+ It achieves the following results on the evaluation set:
48
+ - Loss: 1.1059
49
+ - Precision: 0.7823
50
+ - Recall: 0.8281
51
+ - F1: 0.8045
52
+ - Accuracy: 0.8135
53
+
54
+ ## Model description
55
+
56
+ More information needed
57
+
58
+ ## Intended uses & limitations
59
+
60
+ More information needed
61
+
62
+ ## Training and evaluation data
63
+
64
+ More information needed
65
+
66
+ ## Training procedure
67
+
68
+ ### Training hyperparameters
69
+
70
+ The following hyperparameters were used during training:
71
+ - learning_rate: 1e-05
72
+ - train_batch_size: 16
73
+ - eval_batch_size: 16
74
+ - seed: 42
75
+ - optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
76
+ - lr_scheduler_type: linear
77
+ - training_steps: 1000
78
+
79
+ ### Training results
80
+
81
+ | Training Loss | Epoch | Step | Validation Loss | Precision | Recall | F1 | Accuracy |
82
+ |:-------------:|:-----:|:----:|:---------------:|:---------:|:------:|:------:|:--------:|
83
+ | No log | 10.0 | 100 | 0.7158 | 0.6964 | 0.7690 | 0.7309 | 0.7833 |
84
+ | No log | 20.0 | 200 | 0.7508 | 0.7420 | 0.8058 | 0.7726 | 0.8076 |
85
+ | No log | 30.0 | 300 | 0.8085 | 0.7678 | 0.8097 | 0.7882 | 0.8078 |
86
+ | No log | 40.0 | 400 | 0.9083 | 0.7689 | 0.8147 | 0.7911 | 0.8061 |
87
+ | 0.3419 | 50.0 | 500 | 0.9294 | 0.7840 | 0.8296 | 0.8062 | 0.8128 |
88
+ | 0.3419 | 60.0 | 600 | 1.0036 | 0.7807 | 0.8366 | 0.8077 | 0.8178 |
89
+ | 0.3419 | 70.0 | 700 | 1.0983 | 0.7727 | 0.8241 | 0.7976 | 0.8044 |
90
+ | 0.3419 | 80.0 | 800 | 1.1092 | 0.7921 | 0.8251 | 0.8083 | 0.8064 |
91
+ | 0.3419 | 90.0 | 900 | 1.1010 | 0.7780 | 0.8306 | 0.8035 | 0.8133 |
92
+ | 0.0261 | 100.0 | 1000 | 1.1059 | 0.7823 | 0.8281 | 0.8045 | 0.8135 |
93
+
94
+
95
+ ### Framework versions
96
+
97
+ - Transformers 4.51.3
98
+ - Pytorch 2.6.0+cu124
99
+ - Datasets 3.5.0
100
+ - Tokenizers 0.21.1
config.json ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "LayoutLMv3ForTokenClassification"
4
+ ],
5
+ "attention_probs_dropout_prob": 0.1,
6
+ "bos_token_id": 0,
7
+ "classifier_dropout": null,
8
+ "coordinate_size": 128,
9
+ "eos_token_id": 2,
10
+ "has_relative_attention_bias": true,
11
+ "has_spatial_attention_bias": true,
12
+ "hidden_act": "gelu",
13
+ "hidden_dropout_prob": 0.1,
14
+ "hidden_size": 768,
15
+ "id2label": {
16
+ "0": "O",
17
+ "1": "B-HEADER",
18
+ "2": "I-HEADER",
19
+ "3": "B-QUESTION",
20
+ "4": "I-QUESTION",
21
+ "5": "B-ANSWER",
22
+ "6": "I-ANSWER"
23
+ },
24
+ "initializer_range": 0.02,
25
+ "input_size": 224,
26
+ "intermediate_size": 3072,
27
+ "label2id": {
28
+ "B-ANSWER": 5,
29
+ "B-HEADER": 1,
30
+ "B-QUESTION": 3,
31
+ "I-ANSWER": 6,
32
+ "I-HEADER": 2,
33
+ "I-QUESTION": 4,
34
+ "O": 0
35
+ },
36
+ "layer_norm_eps": 1e-05,
37
+ "max_2d_position_embeddings": 1024,
38
+ "max_position_embeddings": 514,
39
+ "max_rel_2d_pos": 256,
40
+ "max_rel_pos": 128,
41
+ "model_type": "layoutlmv3",
42
+ "num_attention_heads": 12,
43
+ "num_channels": 3,
44
+ "num_hidden_layers": 12,
45
+ "pad_token_id": 1,
46
+ "patch_size": 16,
47
+ "rel_2d_pos_bins": 64,
48
+ "rel_pos_bins": 32,
49
+ "second_input_size": 112,
50
+ "shape_size": 128,
51
+ "text_embed": true,
52
+ "torch_dtype": "float32",
53
+ "transformers_version": "4.51.3",
54
+ "type_vocab_size": 1,
55
+ "visual_embed": true,
56
+ "vocab_size": 50265
57
+ }
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3829d4b08b87dd70e8d3ab3f0ce8e401a5b3ab3684c2d72669b70449d0eae698
3
+ size 501355532
preprocessor_config.json ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "apply_ocr": false,
3
+ "do_normalize": true,
4
+ "do_rescale": true,
5
+ "do_resize": true,
6
+ "image_mean": [
7
+ 0.5,
8
+ 0.5,
9
+ 0.5
10
+ ],
11
+ "image_processor_type": "LayoutLMv3ImageProcessor",
12
+ "image_std": [
13
+ 0.5,
14
+ 0.5,
15
+ 0.5
16
+ ],
17
+ "ocr_lang": null,
18
+ "processor_class": "LayoutLMv3Processor",
19
+ "resample": 2,
20
+ "rescale_factor": 0.00392156862745098,
21
+ "size": {
22
+ "height": 224,
23
+ "width": 224
24
+ },
25
+ "tesseract_config": ""
26
+ }
runs/Apr24_14-02-59_e72df302eee4/events.out.tfevents.1745503383.e72df302eee4.198.0 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:16ab30e17c5c90eb4153629aa4ea06638d5c38f759a056555844cd129203cd99
3
+ size 7497
runs/Apr24_14-20-44_e72df302eee4/events.out.tfevents.1745504445.e72df302eee4.198.1 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:923ab5b4310f1bbde118a90b1237b176d9c9356e4e68f39f183c334787d0c2f1
3
+ size 9594
runs/Apr24_14-43-34_e72df302eee4/events.out.tfevents.1745505815.e72df302eee4.198.2 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9f2d620fb1e932dccea54e8857054537b50dc70ec233857b3b896eba2d9c1431
3
+ size 11103
runs/Apr24_15-03-39_e72df302eee4/events.out.tfevents.1745507020.e72df302eee4.198.3 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6678e6b82845e4660a9cf383aaf386a4e1e01d0d3814d5a2f0cf25b5dfa77eb4
3
+ size 11105
special_tokens_map.json ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<s>",
4
+ "lstrip": false,
5
+ "normalized": true,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "cls_token": {
10
+ "content": "<s>",
11
+ "lstrip": false,
12
+ "normalized": true,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "eos_token": {
17
+ "content": "</s>",
18
+ "lstrip": false,
19
+ "normalized": true,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "mask_token": {
24
+ "content": "<mask>",
25
+ "lstrip": true,
26
+ "normalized": true,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ },
30
+ "pad_token": {
31
+ "content": "<pad>",
32
+ "lstrip": false,
33
+ "normalized": true,
34
+ "rstrip": false,
35
+ "single_word": false
36
+ },
37
+ "sep_token": {
38
+ "content": "</s>",
39
+ "lstrip": false,
40
+ "normalized": true,
41
+ "rstrip": false,
42
+ "single_word": false
43
+ },
44
+ "unk_token": {
45
+ "content": "<unk>",
46
+ "lstrip": false,
47
+ "normalized": true,
48
+ "rstrip": false,
49
+ "single_word": false
50
+ }
51
+ }
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
+ "add_prefix_space": true,
3
+ "added_tokens_decoder": {
4
+ "0": {
5
+ "content": "<s>",
6
+ "lstrip": false,
7
+ "normalized": true,
8
+ "rstrip": false,
9
+ "single_word": false,
10
+ "special": true
11
+ },
12
+ "1": {
13
+ "content": "<pad>",
14
+ "lstrip": false,
15
+ "normalized": true,
16
+ "rstrip": false,
17
+ "single_word": false,
18
+ "special": true
19
+ },
20
+ "2": {
21
+ "content": "</s>",
22
+ "lstrip": false,
23
+ "normalized": true,
24
+ "rstrip": false,
25
+ "single_word": false,
26
+ "special": true
27
+ },
28
+ "3": {
29
+ "content": "<unk>",
30
+ "lstrip": false,
31
+ "normalized": true,
32
+ "rstrip": false,
33
+ "single_word": false,
34
+ "special": true
35
+ },
36
+ "50264": {
37
+ "content": "<mask>",
38
+ "lstrip": true,
39
+ "normalized": true,
40
+ "rstrip": false,
41
+ "single_word": false,
42
+ "special": true
43
+ }
44
+ },
45
+ "apply_ocr": false,
46
+ "bos_token": "<s>",
47
+ "clean_up_tokenization_spaces": false,
48
+ "cls_token": "<s>",
49
+ "cls_token_box": [
50
+ 0,
51
+ 0,
52
+ 0,
53
+ 0
54
+ ],
55
+ "eos_token": "</s>",
56
+ "errors": "replace",
57
+ "extra_special_tokens": {},
58
+ "mask_token": "<mask>",
59
+ "model_max_length": 512,
60
+ "only_label_first_subword": true,
61
+ "pad_token": "<pad>",
62
+ "pad_token_box": [
63
+ 0,
64
+ 0,
65
+ 0,
66
+ 0
67
+ ],
68
+ "pad_token_label": -100,
69
+ "processor_class": "LayoutLMv3Processor",
70
+ "sep_token": "</s>",
71
+ "sep_token_box": [
72
+ 0,
73
+ 0,
74
+ 0,
75
+ 0
76
+ ],
77
+ "tokenizer_class": "LayoutLMv3Tokenizer",
78
+ "trim_offsets": true,
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:e61d8c0301d5f6d8aa9846c3b3b6b6d81cb76cd12681008ced4dd4d7e42a2b19
3
+ size 5368
vocab.json ADDED
The diff for this file is too large to render. See raw diff