vaibhav1411
commited on
Commit
•
2afe21b
1
Parent(s):
4865330
End of training
Browse files- README.md +72 -0
- config.json +172 -0
- model.safetensors +3 -0
- training_args.bin +3 -0
README.md
ADDED
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: cc-by-nc-sa-4.0
|
3 |
+
base_model: microsoft/layoutlmv2-large-uncased
|
4 |
+
tags:
|
5 |
+
- generated_from_trainer
|
6 |
+
metrics:
|
7 |
+
- precision
|
8 |
+
- recall
|
9 |
+
- f1
|
10 |
+
- accuracy
|
11 |
+
model-index:
|
12 |
+
- name: layoutlmv2-finetuned-cord
|
13 |
+
results: []
|
14 |
+
---
|
15 |
+
|
16 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
17 |
+
should probably proofread and complete it, then remove this comment. -->
|
18 |
+
|
19 |
+
# layoutlmv2-finetuned-cord
|
20 |
+
|
21 |
+
This model is a fine-tuned version of [microsoft/layoutlmv2-large-uncased](https://huggingface.co/microsoft/layoutlmv2-large-uncased) on the None dataset.
|
22 |
+
It achieves the following results on the evaluation set:
|
23 |
+
- Loss: 0.4287
|
24 |
+
- Precision: 0.5421
|
25 |
+
- Recall: 0.4754
|
26 |
+
- F1: 0.5066
|
27 |
+
- Accuracy: 0.9272
|
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: 5e-05
|
47 |
+
- train_batch_size: 2
|
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 |
+
- lr_scheduler_warmup_ratio: 0.1
|
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 |
+
| No log | 1.0 | 135 | 0.3706 | 0.4855 | 0.4816 | 0.4835 | 0.9190 |
|
61 |
+
| No log | 2.0 | 270 | 0.3198 | 0.5887 | 0.5102 | 0.5467 | 0.9308 |
|
62 |
+
| No log | 3.0 | 405 | 0.3602 | 0.5237 | 0.4529 | 0.4857 | 0.9238 |
|
63 |
+
| 0.323 | 4.0 | 540 | 0.3866 | 0.5251 | 0.4508 | 0.4851 | 0.9250 |
|
64 |
+
| 0.323 | 5.0 | 675 | 0.4287 | 0.5421 | 0.4754 | 0.5066 | 0.9272 |
|
65 |
+
|
66 |
+
|
67 |
+
### Framework versions
|
68 |
+
|
69 |
+
- Transformers 4.42.3
|
70 |
+
- Pytorch 2.3.0+cu121
|
71 |
+
- Datasets 2.20.0
|
72 |
+
- Tokenizers 0.19.1
|
config.json
ADDED
@@ -0,0 +1,172 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "microsoft/layoutlmv2-large-uncased",
|
3 |
+
"architectures": [
|
4 |
+
"LayoutLMv2ForTokenClassification"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"convert_sync_batchnorm": true,
|
8 |
+
"coordinate_size": 171,
|
9 |
+
"detectron2_config_args": {
|
10 |
+
"MODEL.ANCHOR_GENERATOR.SIZES": [
|
11 |
+
[
|
12 |
+
32
|
13 |
+
],
|
14 |
+
[
|
15 |
+
64
|
16 |
+
],
|
17 |
+
[
|
18 |
+
128
|
19 |
+
],
|
20 |
+
[
|
21 |
+
256
|
22 |
+
],
|
23 |
+
[
|
24 |
+
512
|
25 |
+
]
|
26 |
+
],
|
27 |
+
"MODEL.BACKBONE.NAME": "build_resnet_fpn_backbone",
|
28 |
+
"MODEL.FPN.IN_FEATURES": [
|
29 |
+
"res2",
|
30 |
+
"res3",
|
31 |
+
"res4",
|
32 |
+
"res5"
|
33 |
+
],
|
34 |
+
"MODEL.MASK_ON": true,
|
35 |
+
"MODEL.PIXEL_STD": [
|
36 |
+
57.375,
|
37 |
+
57.12,
|
38 |
+
58.395
|
39 |
+
],
|
40 |
+
"MODEL.POST_NMS_TOPK_TEST": 1000,
|
41 |
+
"MODEL.RESNETS.ASPECT_RATIOS": [
|
42 |
+
[
|
43 |
+
0.5,
|
44 |
+
1.0,
|
45 |
+
2.0
|
46 |
+
]
|
47 |
+
],
|
48 |
+
"MODEL.RESNETS.DEPTH": 101,
|
49 |
+
"MODEL.RESNETS.NUM_GROUPS": 32,
|
50 |
+
"MODEL.RESNETS.OUT_FEATURES": [
|
51 |
+
"res2",
|
52 |
+
"res3",
|
53 |
+
"res4",
|
54 |
+
"res5"
|
55 |
+
],
|
56 |
+
"MODEL.RESNETS.SIZES": [
|
57 |
+
[
|
58 |
+
32
|
59 |
+
],
|
60 |
+
[
|
61 |
+
64
|
62 |
+
],
|
63 |
+
[
|
64 |
+
128
|
65 |
+
],
|
66 |
+
[
|
67 |
+
256
|
68 |
+
],
|
69 |
+
[
|
70 |
+
512
|
71 |
+
]
|
72 |
+
],
|
73 |
+
"MODEL.RESNETS.STRIDE_IN_1X1": false,
|
74 |
+
"MODEL.RESNETS.WIDTH_PER_GROUP": 8,
|
75 |
+
"MODEL.ROI_BOX_HEAD.NAME": "FastRCNNConvFCHead",
|
76 |
+
"MODEL.ROI_BOX_HEAD.NUM_FC": 2,
|
77 |
+
"MODEL.ROI_BOX_HEAD.POOLER_RESOLUTION": 14,
|
78 |
+
"MODEL.ROI_HEADS.IN_FEATURES": [
|
79 |
+
"p2",
|
80 |
+
"p3",
|
81 |
+
"p4",
|
82 |
+
"p5"
|
83 |
+
],
|
84 |
+
"MODEL.ROI_HEADS.NAME": "StandardROIHeads",
|
85 |
+
"MODEL.ROI_HEADS.NUM_CLASSES": 5,
|
86 |
+
"MODEL.ROI_MASK_HEAD.NAME": "MaskRCNNConvUpsampleHead",
|
87 |
+
"MODEL.ROI_MASK_HEAD.NUM_CONV": 4,
|
88 |
+
"MODEL.ROI_MASK_HEAD.POOLER_RESOLUTION": 7,
|
89 |
+
"MODEL.RPN.IN_FEATURES": [
|
90 |
+
"p2",
|
91 |
+
"p3",
|
92 |
+
"p4",
|
93 |
+
"p5",
|
94 |
+
"p6"
|
95 |
+
],
|
96 |
+
"MODEL.RPN.POST_NMS_TOPK_TRAIN": 1000,
|
97 |
+
"MODEL.RPN.PRE_NMS_TOPK_TEST": 1000,
|
98 |
+
"MODEL.RPN.PRE_NMS_TOPK_TRAIN": 2000
|
99 |
+
},
|
100 |
+
"fast_qkv": false,
|
101 |
+
"gradient_checkpointing": false,
|
102 |
+
"has_relative_attention_bias": true,
|
103 |
+
"has_spatial_attention_bias": true,
|
104 |
+
"has_visual_segment_embedding": false,
|
105 |
+
"hidden_act": "gelu",
|
106 |
+
"hidden_dropout_prob": 0.1,
|
107 |
+
"hidden_size": 1024,
|
108 |
+
"id2label": {
|
109 |
+
"0": "I-others",
|
110 |
+
"1": "I-password",
|
111 |
+
"2": "I-mobile number",
|
112 |
+
"3": "I-name",
|
113 |
+
"4": "I-email id",
|
114 |
+
"5": "I-address",
|
115 |
+
"6": "I-date",
|
116 |
+
"7": "I-user id",
|
117 |
+
"8": "I-username",
|
118 |
+
"9": "I-zipcode",
|
119 |
+
"10": "I-amount",
|
120 |
+
"11": "I-gps coordinates",
|
121 |
+
"12": "I-OTP",
|
122 |
+
"13": "I-pin",
|
123 |
+
"14": "I-account number",
|
124 |
+
"15": "I-social security number",
|
125 |
+
"16": "I-transaction id",
|
126 |
+
"17": "I-time"
|
127 |
+
},
|
128 |
+
"image_feature_pool_shape": [
|
129 |
+
7,
|
130 |
+
7,
|
131 |
+
256
|
132 |
+
],
|
133 |
+
"initializer_range": 0.02,
|
134 |
+
"intermediate_size": 4096,
|
135 |
+
"label2id": {
|
136 |
+
"I-OTP": 12,
|
137 |
+
"I-account number": 14,
|
138 |
+
"I-address": 5,
|
139 |
+
"I-amount": 10,
|
140 |
+
"I-date": 6,
|
141 |
+
"I-email id": 4,
|
142 |
+
"I-gps coordinates": 11,
|
143 |
+
"I-mobile number": 2,
|
144 |
+
"I-name": 3,
|
145 |
+
"I-others": 0,
|
146 |
+
"I-password": 1,
|
147 |
+
"I-pin": 13,
|
148 |
+
"I-social security number": 15,
|
149 |
+
"I-time": 17,
|
150 |
+
"I-transaction id": 16,
|
151 |
+
"I-user id": 7,
|
152 |
+
"I-username": 8,
|
153 |
+
"I-zipcode": 9
|
154 |
+
},
|
155 |
+
"layer_norm_eps": 1e-12,
|
156 |
+
"max_2d_position_embeddings": 1024,
|
157 |
+
"max_position_embeddings": 512,
|
158 |
+
"max_rel_2d_pos": 256,
|
159 |
+
"max_rel_pos": 128,
|
160 |
+
"model_type": "layoutlmv2",
|
161 |
+
"num_attention_heads": 16,
|
162 |
+
"num_hidden_layers": 24,
|
163 |
+
"output_past": true,
|
164 |
+
"pad_token_id": 0,
|
165 |
+
"rel_2d_pos_bins": 64,
|
166 |
+
"rel_pos_bins": 32,
|
167 |
+
"shape_size": 170,
|
168 |
+
"torch_dtype": "float32",
|
169 |
+
"transformers_version": "4.42.3",
|
170 |
+
"type_vocab_size": 2,
|
171 |
+
"vocab_size": 30522
|
172 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5ce45760ae8f7a25a7657c80843b60f73a1de1e0dd532c6398b41b86ee2aeb9e
|
3 |
+
size 1705787904
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7ff300729ab60f1c044b55a5f5ead4f0976fb38b0f13ed790bb14d8897bfe6cf
|
3 |
+
size 5112
|