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.7047
- Answer: {'precision': 0.7122222222222222, 'recall': 0.792336217552534, 'f1': 0.7501462843768285, 'number': 809}
- Header: {'precision': 0.325, 'recall': 0.3277310924369748, 'f1': 0.3263598326359833, 'number': 119}
- Question: {'precision': 0.7794508414526129, 'recall': 0.8262910798122066, 'f1': 0.8021877848678213, 'number': 1065}
- Overall Precision: 0.7259
- Overall Recall: 0.7827
- Overall F1: 0.7533
- Overall Accuracy: 0.8068
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.8367 | 1.0 | 10 | 1.6199 | {'precision': 0.017991004497751123, 'recall': 0.014833127317676144, 'f1': 0.016260162601626018, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.21987951807228914, 'recall': 0.13708920187793427, 'f1': 0.16888374783111626, 'number': 1065} | 0.1187 | 0.0793 | 0.0951 | 0.3426 |
1.4807 | 2.0 | 20 | 1.2596 | {'precision': 0.18181818181818182, 'recall': 0.20519159456118666, 'f1': 0.1927990708478513, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.46142208774583965, 'recall': 0.5727699530516432, 'f1': 0.5111018014243821, 'number': 1065} | 0.3472 | 0.3894 | 0.3671 | 0.5904 |
1.1183 | 3.0 | 30 | 0.9406 | {'precision': 0.4608967674661105, 'recall': 0.546353522867738, 'f1': 0.5, 'number': 809} | {'precision': 0.03225806451612903, 'recall': 0.008403361344537815, 'f1': 0.013333333333333332, 'number': 119} | {'precision': 0.56973293768546, 'recall': 0.7211267605633803, 'f1': 0.6365520099461252, 'number': 1065} | 0.5180 | 0.6076 | 0.5592 | 0.7099 |
0.8592 | 4.0 | 40 | 0.7881 | {'precision': 0.5798237022526934, 'recall': 0.7317676143386898, 'f1': 0.6469945355191257, 'number': 809} | {'precision': 0.10714285714285714, 'recall': 0.05042016806722689, 'f1': 0.06857142857142856, 'number': 119} | {'precision': 0.6663865546218487, 'recall': 0.7446009389671362, 'f1': 0.7033259423503326, 'number': 1065} | 0.6136 | 0.6979 | 0.6531 | 0.7604 |
0.6864 | 5.0 | 50 | 0.7305 | {'precision': 0.6115261472785486, 'recall': 0.7082818294190358, 'f1': 0.6563573883161512, 'number': 809} | {'precision': 0.23529411764705882, 'recall': 0.16806722689075632, 'f1': 0.19607843137254902, 'number': 119} | {'precision': 0.6808510638297872, 'recall': 0.8112676056338028, 'f1': 0.7403598971722366, 'number': 1065} | 0.6360 | 0.7311 | 0.6802 | 0.7749 |
0.584 | 6.0 | 60 | 0.6955 | {'precision': 0.6358024691358025, 'recall': 0.7639060568603214, 'f1': 0.6939921392476137, 'number': 809} | {'precision': 0.28205128205128205, 'recall': 0.18487394957983194, 'f1': 0.2233502538071066, 'number': 119} | {'precision': 0.7248495270851246, 'recall': 0.7915492957746478, 'f1': 0.7567324955116697, 'number': 1065} | 0.6701 | 0.7441 | 0.7052 | 0.7810 |
0.5083 | 7.0 | 70 | 0.6726 | {'precision': 0.6795698924731183, 'recall': 0.7812113720642769, 'f1': 0.7268545140885566, 'number': 809} | {'precision': 0.27, 'recall': 0.226890756302521, 'f1': 0.24657534246575347, 'number': 119} | {'precision': 0.7439236111111112, 'recall': 0.8046948356807512, 'f1': 0.7731168245376635, 'number': 1065} | 0.6948 | 0.7607 | 0.7262 | 0.7933 |
0.4552 | 8.0 | 80 | 0.6811 | {'precision': 0.6750788643533123, 'recall': 0.7935723114956736, 'f1': 0.7295454545454545, 'number': 809} | {'precision': 0.23214285714285715, 'recall': 0.2184873949579832, 'f1': 0.22510822510822512, 'number': 119} | {'precision': 0.7482817869415808, 'recall': 0.8178403755868544, 'f1': 0.781516375056079, 'number': 1065} | 0.6911 | 0.7722 | 0.7294 | 0.7959 |
0.4053 | 9.0 | 90 | 0.6773 | {'precision': 0.7058177826564215, 'recall': 0.7948084054388134, 'f1': 0.7476744186046511, 'number': 809} | {'precision': 0.27450980392156865, 'recall': 0.23529411764705882, 'f1': 0.2533936651583711, 'number': 119} | {'precision': 0.7614840989399293, 'recall': 0.8093896713615023, 'f1': 0.7847064178425124, 'number': 1065} | 0.7147 | 0.7692 | 0.7409 | 0.7999 |
0.3938 | 10.0 | 100 | 0.6783 | {'precision': 0.6976998904709748, 'recall': 0.7873918417799752, 'f1': 0.7398373983739838, 'number': 809} | {'precision': 0.2894736842105263, 'recall': 0.2773109243697479, 'f1': 0.2832618025751073, 'number': 119} | {'precision': 0.7643979057591623, 'recall': 0.8225352112676056, 'f1': 0.7924016282225238, 'number': 1065} | 0.7115 | 0.7757 | 0.7422 | 0.8007 |
0.3377 | 11.0 | 110 | 0.6881 | {'precision': 0.7136465324384788, 'recall': 0.788627935723115, 'f1': 0.7492660011743981, 'number': 809} | {'precision': 0.3103448275862069, 'recall': 0.3025210084033613, 'f1': 0.30638297872340425, 'number': 119} | {'precision': 0.7664359861591695, 'recall': 0.831924882629108, 'f1': 0.7978388113462405, 'number': 1065} | 0.7202 | 0.7827 | 0.7502 | 0.8033 |
0.3211 | 12.0 | 120 | 0.6958 | {'precision': 0.7075575027382256, 'recall': 0.7985166872682324, 'f1': 0.7502903600464577, 'number': 809} | {'precision': 0.31092436974789917, 'recall': 0.31092436974789917, 'f1': 0.31092436974789917, 'number': 119} | {'precision': 0.7762923351158645, 'recall': 0.8178403755868544, 'f1': 0.79652491998171, 'number': 1065} | 0.7214 | 0.7797 | 0.7495 | 0.8048 |
0.3036 | 13.0 | 130 | 0.7008 | {'precision': 0.7138121546961326, 'recall': 0.7985166872682324, 'f1': 0.7537922987164527, 'number': 809} | {'precision': 0.32727272727272727, 'recall': 0.3025210084033613, 'f1': 0.314410480349345, 'number': 119} | {'precision': 0.7775800711743772, 'recall': 0.8206572769953052, 'f1': 0.7985381452718137, 'number': 1065} | 0.7274 | 0.7807 | 0.7531 | 0.8049 |
0.2798 | 14.0 | 140 | 0.7025 | {'precision': 0.7131696428571429, 'recall': 0.7898640296662547, 'f1': 0.7495601173020529, 'number': 809} | {'precision': 0.3274336283185841, 'recall': 0.31092436974789917, 'f1': 0.3189655172413793, 'number': 119} | {'precision': 0.7727272727272727, 'recall': 0.8300469483568075, 'f1': 0.8003621548211861, 'number': 1065} | 0.7246 | 0.7827 | 0.7525 | 0.8066 |
0.279 | 15.0 | 150 | 0.7047 | {'precision': 0.7122222222222222, 'recall': 0.792336217552534, 'f1': 0.7501462843768285, 'number': 809} | {'precision': 0.325, 'recall': 0.3277310924369748, 'f1': 0.3263598326359833, 'number': 119} | {'precision': 0.7794508414526129, 'recall': 0.8262910798122066, 'f1': 0.8021877848678213, 'number': 1065} | 0.7259 | 0.7827 | 0.7533 | 0.8068 |
Framework versions
- Transformers 4.44.2
- Pytorch 2.5.0+cu121
- Datasets 3.1.0
- Tokenizers 0.19.1
- Downloads last month
- 20
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.
Model tree for Azzz786/layoutlm-funsd
Base model
microsoft/layoutlm-base-uncased