layoutlm-funsd
This model is a fine-tuned version of microsoft/layoutlm-base-uncased on the funsd dataset. It achieves the following results on the evaluation set:
- Loss: 0.6657
- Answer: {'precision': 0.7226519337016575, 'recall': 0.8084054388133498, 'f1': 0.763127187864644, 'number': 809}
- Header: {'precision': 0.29545454545454547, 'recall': 0.3277310924369748, 'f1': 0.3107569721115538, 'number': 119}
- Question: {'precision': 0.7931960608773501, 'recall': 0.831924882629108, 'f1': 0.8120989917506873, 'number': 1065}
- Overall Precision: 0.7331
- Overall Recall: 0.7923
- Overall F1: 0.7615
- Overall Accuracy: 0.8136
Model description
More information needed
Intended uses & limitations
More information needed
Training and evaluation data
More information needed
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 3e-05
- train_batch_size: 16
- eval_batch_size: 8
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- num_epochs: 15
- mixed_precision_training: Native AMP
Training results
Training Loss | Epoch | Step | Validation Loss | Answer | Header | Question | Overall Precision | Overall Recall | Overall F1 | Overall Accuracy |
---|---|---|---|---|---|---|---|---|---|---|
1.7892 | 1.0 | 10 | 1.6086 | {'precision': 0.020948180815876516, 'recall': 0.023485784919653894, 'f1': 0.022144522144522148, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.20356472795497185, 'recall': 0.20375586854460093, 'f1': 0.20366025340215863, 'number': 1065} | 0.1196 | 0.1184 | 0.1190 | 0.3742 |
1.4438 | 2.0 | 20 | 1.2175 | {'precision': 0.22015915119363394, 'recall': 0.20519159456118666, 'f1': 0.2124120281509917, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.4544037412314887, 'recall': 0.5474178403755868, 'f1': 0.4965928449744464, 'number': 1065} | 0.3677 | 0.3758 | 0.3717 | 0.5883 |
1.0512 | 3.0 | 30 | 0.9159 | {'precision': 0.5192519251925193, 'recall': 0.5834363411619283, 'f1': 0.5494761350407451, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.6103327495621717, 'recall': 0.6544600938967137, 'f1': 0.6316266425011329, 'number': 1065} | 0.5615 | 0.5866 | 0.5737 | 0.7102 |
0.8045 | 4.0 | 40 | 0.7549 | {'precision': 0.6132264529058116, 'recall': 0.7564894932014833, 'f1': 0.6773657996679578, 'number': 809} | {'precision': 0.22, 'recall': 0.09243697478991597, 'f1': 0.13017751479289943, 'number': 119} | {'precision': 0.6795580110497238, 'recall': 0.6929577464788732, 'f1': 0.6861924686192468, 'number': 1065} | 0.6378 | 0.6829 | 0.6596 | 0.7538 |
0.6559 | 5.0 | 50 | 0.6887 | {'precision': 0.6546227417640808, 'recall': 0.761433868974042, 'f1': 0.704, 'number': 809} | {'precision': 0.25, 'recall': 0.16806722689075632, 'f1': 0.20100502512562815, 'number': 119} | {'precision': 0.6964285714285714, 'recall': 0.7323943661971831, 'f1': 0.7139588100686498, 'number': 1065} | 0.6614 | 0.7105 | 0.6851 | 0.7764 |
0.547 | 6.0 | 60 | 0.6515 | {'precision': 0.6659793814432989, 'recall': 0.7985166872682324, 'f1': 0.7262507026419337, 'number': 809} | {'precision': 0.2891566265060241, 'recall': 0.20168067226890757, 'f1': 0.23762376237623764, 'number': 119} | {'precision': 0.7140439932318104, 'recall': 0.7924882629107981, 'f1': 0.7512238540275923, 'number': 1065} | 0.6774 | 0.7597 | 0.7162 | 0.7928 |
0.4923 | 7.0 | 70 | 0.6337 | {'precision': 0.6784188034188035, 'recall': 0.7849196538936959, 'f1': 0.7277936962750717, 'number': 809} | {'precision': 0.2761904761904762, 'recall': 0.24369747899159663, 'f1': 0.2589285714285714, 'number': 119} | {'precision': 0.7371575342465754, 'recall': 0.8084507042253521, 'f1': 0.7711598746081505, 'number': 1065} | 0.6904 | 0.7652 | 0.7258 | 0.8052 |
0.4463 | 8.0 | 80 | 0.6478 | {'precision': 0.7045454545454546, 'recall': 0.7663782447466008, 'f1': 0.7341622261693309, 'number': 809} | {'precision': 0.2831858407079646, 'recall': 0.2689075630252101, 'f1': 0.27586206896551724, 'number': 119} | {'precision': 0.751937984496124, 'recall': 0.819718309859155, 'f1': 0.7843665768194069, 'number': 1065} | 0.7080 | 0.7652 | 0.7355 | 0.8048 |
0.3974 | 9.0 | 90 | 0.6389 | {'precision': 0.7029379760609358, 'recall': 0.7985166872682324, 'f1': 0.7476851851851851, 'number': 809} | {'precision': 0.2748091603053435, 'recall': 0.3025210084033613, 'f1': 0.288, 'number': 119} | {'precision': 0.7609254498714653, 'recall': 0.8338028169014085, 'f1': 0.7956989247311828, 'number': 1065} | 0.7082 | 0.7878 | 0.7458 | 0.8060 |
0.3599 | 10.0 | 100 | 0.6429 | {'precision': 0.7177777777777777, 'recall': 0.7985166872682324, 'f1': 0.7559976594499708, 'number': 809} | {'precision': 0.2966101694915254, 'recall': 0.29411764705882354, 'f1': 0.2953586497890296, 'number': 119} | {'precision': 0.7795275590551181, 'recall': 0.8366197183098592, 'f1': 0.8070652173913043, 'number': 1065} | 0.7274 | 0.7888 | 0.7569 | 0.8139 |
0.3227 | 11.0 | 110 | 0.6510 | {'precision': 0.710239651416122, 'recall': 0.8059332509270705, 'f1': 0.755066589461494, 'number': 809} | {'precision': 0.28205128205128205, 'recall': 0.2773109243697479, 'f1': 0.2796610169491525, 'number': 119} | {'precision': 0.7882037533512064, 'recall': 0.828169014084507, 'f1': 0.8076923076923077, 'number': 1065} | 0.7275 | 0.7863 | 0.7557 | 0.8111 |
0.3156 | 12.0 | 120 | 0.6579 | {'precision': 0.7245575221238938, 'recall': 0.8096415327564895, 'f1': 0.7647402218330415, 'number': 809} | {'precision': 0.2920353982300885, 'recall': 0.2773109243697479, 'f1': 0.28448275862068967, 'number': 119} | {'precision': 0.7926391382405745, 'recall': 0.8291079812206573, 'f1': 0.8104635153740247, 'number': 1065} | 0.7372 | 0.7883 | 0.7619 | 0.8123 |
0.2935 | 13.0 | 130 | 0.6596 | {'precision': 0.7119386637458927, 'recall': 0.8034610630407911, 'f1': 0.7549361207897795, 'number': 809} | {'precision': 0.2846715328467153, 'recall': 0.3277310924369748, 'f1': 0.3046875, 'number': 119} | {'precision': 0.7852112676056338, 'recall': 0.8375586854460094, 'f1': 0.8105406633348478, 'number': 1065} | 0.7232 | 0.7933 | 0.7566 | 0.8131 |
0.2814 | 14.0 | 140 | 0.6629 | {'precision': 0.7189901207464325, 'recall': 0.8096415327564895, 'f1': 0.7616279069767442, 'number': 809} | {'precision': 0.2923076923076923, 'recall': 0.31932773109243695, 'f1': 0.3052208835341365, 'number': 119} | {'precision': 0.7924528301886793, 'recall': 0.828169014084507, 'f1': 0.8099173553719008, 'number': 1065} | 0.7312 | 0.7903 | 0.7596 | 0.8132 |
0.2762 | 15.0 | 150 | 0.6657 | {'precision': 0.7226519337016575, 'recall': 0.8084054388133498, 'f1': 0.763127187864644, 'number': 809} | {'precision': 0.29545454545454547, 'recall': 0.3277310924369748, 'f1': 0.3107569721115538, 'number': 119} | {'precision': 0.7931960608773501, 'recall': 0.831924882629108, 'f1': 0.8120989917506873, 'number': 1065} | 0.7331 | 0.7923 | 0.7615 | 0.8136 |
Framework versions
- Transformers 4.29.2
- Pytorch 2.0.1+cu118
- Datasets 2.12.0
- Tokenizers 0.13.3
- Downloads last month
- 1
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social
visibility and check back later, or deploy to Inference Endpoints (dedicated)
instead.