nnul commited on
Commit
98f1d24
·
verified ·
1 Parent(s): a6f15ff

nnul/layoutlmv3-xfund-finetuned

Browse files
README.md ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ metrics:
8
+ - precision
9
+ - recall
10
+ - f1
11
+ - accuracy
12
+ model-index:
13
+ - name: layoutlmv3-xfund
14
+ results: []
15
+ ---
16
+
17
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
18
+ should probably proofread and complete it, then remove this comment. -->
19
+
20
+ # layoutlmv3-xfund
21
+
22
+ This model is a fine-tuned version of [microsoft/layoutlmv3-base](https://huggingface.co/microsoft/layoutlmv3-base) on an unknown dataset.
23
+ It achieves the following results on the evaluation set:
24
+ - Loss: 0.6625
25
+ - Precision: 0.7711
26
+ - Recall: 0.8476
27
+ - F1: 0.8075
28
+ - Accuracy: 0.8030
29
+
30
+ ## Model description
31
+
32
+ More information needed
33
+
34
+ ## Intended uses & limitations
35
+
36
+ More information needed
37
+
38
+ ## Training and evaluation data
39
+
40
+ More information needed
41
+
42
+ ## Training procedure
43
+
44
+ ### Training hyperparameters
45
+
46
+ The following hyperparameters were used during training:
47
+ - learning_rate: 3e-05
48
+ - train_batch_size: 2
49
+ - eval_batch_size: 2
50
+ - seed: 42
51
+ - optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
52
+ - lr_scheduler_type: linear
53
+ - num_epochs: 5
54
+ - mixed_precision_training: Native AMP
55
+
56
+ ### Training results
57
+
58
+ | Training Loss | Epoch | Step | Validation Loss | Precision | Recall | F1 | Accuracy |
59
+ |:-------------:|:-----:|:----:|:---------------:|:---------:|:------:|:------:|:--------:|
60
+ | 0.7142 | 1.0 | 522 | 0.7296 | 0.6225 | 0.7066 | 0.6619 | 0.7212 |
61
+ | 0.5881 | 2.0 | 1044 | 0.6032 | 0.6841 | 0.8100 | 0.7417 | 0.7688 |
62
+ | 0.4179 | 3.0 | 1566 | 0.5904 | 0.7204 | 0.8222 | 0.7679 | 0.7858 |
63
+ | 0.3507 | 4.0 | 2088 | 0.6088 | 0.7600 | 0.8458 | 0.8006 | 0.7979 |
64
+ | 0.2618 | 5.0 | 2610 | 0.6625 | 0.7711 | 0.8476 | 0.8075 | 0.8030 |
65
+
66
+
67
+ ### Framework versions
68
+
69
+ - Transformers 4.52.4
70
+ - Pytorch 2.6.0+cu124
71
+ - Datasets 3.6.0
72
+ - 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-QUESTION",
18
+ "2": "I-QUESTION",
19
+ "3": "B-ANSWER",
20
+ "4": "I-ANSWER",
21
+ "5": "B-HEADER",
22
+ "6": "I-HEADER"
23
+ },
24
+ "initializer_range": 0.02,
25
+ "input_size": 224,
26
+ "intermediate_size": 3072,
27
+ "label2id": {
28
+ "B-ANSWER": 3,
29
+ "B-HEADER": 5,
30
+ "B-QUESTION": 1,
31
+ "I-ANSWER": 4,
32
+ "I-HEADER": 6,
33
+ "I-QUESTION": 2,
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.52.4",
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:7c10b6a9a3e70e38bb152c9fe1c60a26316ba8088c5e3315f309e4fadf1500db
3
+ size 501355532
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,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "sep_token": "</s>",
70
+ "sep_token_box": [
71
+ 0,
72
+ 0,
73
+ 0,
74
+ 0
75
+ ],
76
+ "tokenizer_class": "LayoutLMv3Tokenizer",
77
+ "trim_offsets": true,
78
+ "unk_token": "<unk>"
79
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3b06d3157498635142fc89bd550959f329b17f87f6c16b25d9f7c48d1defeefb
3
+ size 5240
vocab.json ADDED
The diff for this file is too large to render. See raw diff