<!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. -->
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.6608
- Answer: {'precision': 0.7201783723522854, 'recall': 0.7985166872682324, 'f1': 0.7573270808909731, 'number': 809}
- Header: {'precision': 0.31932773109243695, 'recall': 0.31932773109243695, 'f1': 0.31932773109243695, 'number': 119}
- Question: {'precision': 0.7643478260869565, 'recall': 0.8253521126760563, 'f1': 0.7936794582392775, 'number': 1065}
- Overall Precision: 0.7216
- Overall Recall: 0.7842
- Overall F1: 0.7516
- Overall Accuracy: 0.8167
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
Training results
Training Loss | Epoch | Step | Validation Loss | Answer | Header | Question | Overall Precision | Overall Recall | Overall F1 | Overall Accuracy |
---|---|---|---|---|---|---|---|---|---|---|
1.8317 | 1.0 | 10 | 1.6104 | {'precision': 0.027842227378190254, 'recall': 0.029666254635352288, 'f1': 0.02872531418312388, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.2206047032474804, 'recall': 0.18497652582159624, 'f1': 0.20122574055158324, 'number': 1065} | 0.1259 | 0.1109 | 0.1179 | 0.3482 |
1.4526 | 2.0 | 20 | 1.2629 | {'precision': 0.2147165259348613, 'recall': 0.2200247218788628, 'f1': 0.21733821733821734, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.45054095826893353, 'recall': 0.5474178403755868, 'f1': 0.4942772361169987, 'number': 1065} | 0.3585 | 0.3818 | 0.3698 | 0.5749 |
1.0991 | 3.0 | 30 | 0.9508 | {'precision': 0.4650856389986825, 'recall': 0.4363411619283066, 'f1': 0.45025510204081637, 'number': 809} | {'precision': 0.05128205128205128, 'recall': 0.01680672268907563, 'f1': 0.025316455696202535, 'number': 119} | {'precision': 0.6182287188306105, 'recall': 0.6751173708920187, 'f1': 0.6454219030520646, 'number': 1065} | 0.5477 | 0.5389 | 0.5432 | 0.7030 |
0.8223 | 4.0 | 40 | 0.7675 | {'precision': 0.5823863636363636, 'recall': 0.7601977750309024, 'f1': 0.6595174262734583, 'number': 809} | {'precision': 0.1774193548387097, 'recall': 0.09243697478991597, 'f1': 0.12154696132596685, 'number': 119} | {'precision': 0.6633249791144528, 'recall': 0.7455399061032864, 'f1': 0.7020335985853228, 'number': 1065} | 0.6134 | 0.7125 | 0.6592 | 0.7615 |
0.6605 | 5.0 | 50 | 0.6992 | {'precision': 0.6135662898252826, 'recall': 0.7379480840543882, 'f1': 0.6700336700336701, 'number': 809} | {'precision': 0.273972602739726, 'recall': 0.16806722689075632, 'f1': 0.20833333333333331, 'number': 119} | {'precision': 0.7077865266841645, 'recall': 0.7596244131455399, 'f1': 0.7327898550724637, 'number': 1065} | 0.6514 | 0.7155 | 0.6820 | 0.7834 |
0.5625 | 6.0 | 60 | 0.6647 | {'precision': 0.6484784889821616, 'recall': 0.7639060568603214, 'f1': 0.7014755959137344, 'number': 809} | {'precision': 0.25, 'recall': 0.24369747899159663, 'f1': 0.24680851063829787, 'number': 119} | {'precision': 0.7197032151690025, 'recall': 0.819718309859155, 'f1': 0.7664618086040387, 'number': 1065} | 0.6661 | 0.7627 | 0.7111 | 0.7955 |
0.4838 | 7.0 | 70 | 0.6497 | {'precision': 0.6606189967982924, 'recall': 0.765142150803461, 'f1': 0.7090492554410079, 'number': 809} | {'precision': 0.29896907216494845, 'recall': 0.24369747899159663, 'f1': 0.2685185185185185, 'number': 119} | {'precision': 0.7332775919732442, 'recall': 0.8234741784037559, 'f1': 0.7757629367536488, 'number': 1065} | 0.6839 | 0.7652 | 0.7222 | 0.8043 |
0.4394 | 8.0 | 80 | 0.6342 | {'precision': 0.6813778256189451, 'recall': 0.7824474660074165, 'f1': 0.7284234752589184, 'number': 809} | {'precision': 0.30701754385964913, 'recall': 0.29411764705882354, 'f1': 0.30042918454935624, 'number': 119} | {'precision': 0.7540425531914894, 'recall': 0.831924882629108, 'f1': 0.7910714285714286, 'number': 1065} | 0.7006 | 0.7797 | 0.7381 | 0.8090 |
0.3871 | 9.0 | 90 | 0.6447 | {'precision': 0.7117516629711752, 'recall': 0.7935723114956736, 'f1': 0.750438340151958, 'number': 809} | {'precision': 0.35, 'recall': 0.29411764705882354, 'f1': 0.31963470319634707, 'number': 119} | {'precision': 0.7660510114335972, 'recall': 0.8178403755868544, 'f1': 0.7910990009082652, 'number': 1065} | 0.7237 | 0.7767 | 0.7493 | 0.8132 |
0.3503 | 10.0 | 100 | 0.6390 | {'precision': 0.7056892778993435, 'recall': 0.7972805933250927, 'f1': 0.7486941381311665, 'number': 809} | {'precision': 0.3431372549019608, 'recall': 0.29411764705882354, 'f1': 0.31674208144796384, 'number': 119} | {'precision': 0.7638888888888888, 'recall': 0.8262910798122066, 'f1': 0.7938655841226885, 'number': 1065} | 0.7196 | 0.7827 | 0.7498 | 0.8160 |
0.3196 | 11.0 | 110 | 0.6503 | {'precision': 0.7168338907469343, 'recall': 0.7948084054388134, 'f1': 0.753810082063306, 'number': 809} | {'precision': 0.29464285714285715, 'recall': 0.2773109243697479, 'f1': 0.28571428571428575, 'number': 119} | {'precision': 0.7765862377122431, 'recall': 0.815962441314554, 'f1': 0.7957875457875458, 'number': 1065} | 0.7260 | 0.7752 | 0.7498 | 0.8155 |
0.3023 | 12.0 | 120 | 0.6432 | {'precision': 0.7020810514786419, 'recall': 0.792336217552534, 'f1': 0.7444831591173056, 'number': 809} | {'precision': 0.3181818181818182, 'recall': 0.29411764705882354, 'f1': 0.3056768558951965, 'number': 119} | {'precision': 0.7600341588385995, 'recall': 0.8356807511737089, 'f1': 0.7960644007155636, 'number': 1065} | 0.7138 | 0.7858 | 0.7480 | 0.8181 |
0.289 | 13.0 | 130 | 0.6666 | {'precision': 0.7231638418079096, 'recall': 0.7911001236093943, 'f1': 0.755608028335301, 'number': 809} | {'precision': 0.29838709677419356, 'recall': 0.31092436974789917, 'f1': 0.3045267489711935, 'number': 119} | {'precision': 0.7837837837837838, 'recall': 0.8169014084507042, 'f1': 0.8, 'number': 1065} | 0.7301 | 0.7762 | 0.7524 | 0.8184 |
0.27 | 14.0 | 140 | 0.6599 | {'precision': 0.7224080267558528, 'recall': 0.8009888751545118, 'f1': 0.7596717467760844, 'number': 809} | {'precision': 0.32456140350877194, 'recall': 0.31092436974789917, 'f1': 0.31759656652360513, 'number': 119} | {'precision': 0.763840830449827, 'recall': 0.8291079812206573, 'f1': 0.7951373255290409, 'number': 1065} | 0.7236 | 0.7868 | 0.7538 | 0.8159 |
0.2686 | 15.0 | 150 | 0.6608 | {'precision': 0.7201783723522854, 'recall': 0.7985166872682324, 'f1': 0.7573270808909731, 'number': 809} | {'precision': 0.31932773109243695, 'recall': 0.31932773109243695, 'f1': 0.31932773109243695, 'number': 119} | {'precision': 0.7643478260869565, 'recall': 0.8253521126760563, 'f1': 0.7936794582392775, 'number': 1065} | 0.7216 | 0.7842 | 0.7516 | 0.8167 |
Framework versions
- Transformers 4.34.0
- Pytorch 2.0.1+cu118
- Datasets 2.14.5
- Tokenizers 0.14.1