Edit model card

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.6932
  • Answer: {'precision': 0.6896186440677966, 'recall': 0.8046971569839307, 'f1': 0.7427267541357673, 'number': 809}
  • Header: {'precision': 0.3305785123966942, 'recall': 0.33613445378151263, 'f1': 0.33333333333333337, 'number': 119}
  • Question: {'precision': 0.766107678729038, 'recall': 0.8150234741784037, 'f1': 0.7898089171974523, 'number': 1065}
  • Overall Precision: 0.7093
  • Overall Recall: 0.7822
  • Overall F1: 0.7440
  • Overall Accuracy: 0.8018

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.8301 1.0 10 1.5866 {'precision': 0.006765899864682003, 'recall': 0.006180469715698393, 'f1': 0.006459948320413437, 'number': 809} {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} {'precision': 0.2246153846153846, 'recall': 0.13708920187793427, 'f1': 0.17026239067055393, 'number': 1065} 0.1087 0.0758 0.0893 0.3526
1.4768 2.0 20 1.2757 {'precision': 0.280557834290402, 'recall': 0.4227441285537701, 'f1': 0.3372781065088757, 'number': 809} {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} {'precision': 0.3888491779842745, 'recall': 0.5107981220657277, 'f1': 0.44155844155844154, 'number': 1065} 0.3380 0.4446 0.3840 0.6011
1.1406 3.0 30 0.9524 {'precision': 0.46350710900473935, 'recall': 0.6044499381953028, 'f1': 0.5246781115879828, 'number': 809} {'precision': 0.06382978723404255, 'recall': 0.025210084033613446, 'f1': 0.03614457831325301, 'number': 119} {'precision': 0.53671875, 'recall': 0.6450704225352113, 'f1': 0.5859275053304905, 'number': 1065} 0.4950 0.5916 0.5390 0.6937
0.8606 4.0 40 0.7865 {'precision': 0.5620437956204379, 'recall': 0.761433868974042, 'f1': 0.6467191601049869, 'number': 809} {'precision': 0.16666666666666666, 'recall': 0.10084033613445378, 'f1': 0.1256544502617801, 'number': 119} {'precision': 0.6464285714285715, 'recall': 0.67981220657277, 'f1': 0.662700228832952, 'number': 1065} 0.5909 0.6784 0.6316 0.7552
0.6873 5.0 50 0.7157 {'precision': 0.6341719077568134, 'recall': 0.7478368355995055, 'f1': 0.6863301191151445, 'number': 809} {'precision': 0.375, 'recall': 0.25210084033613445, 'f1': 0.3015075376884422, 'number': 119} {'precision': 0.6704730831973899, 'recall': 0.7718309859154929, 'f1': 0.7175905718027062, 'number': 1065} 0.6447 0.7311 0.6852 0.7767
0.5888 6.0 60 0.6909 {'precision': 0.6243949661181026, 'recall': 0.7972805933250927, 'f1': 0.7003257328990228, 'number': 809} {'precision': 0.35064935064935066, 'recall': 0.226890756302521, 'f1': 0.2755102040816326, 'number': 119} {'precision': 0.7193923145665773, 'recall': 0.755868544600939, 'f1': 0.7371794871794871, 'number': 1065} 0.6626 0.7411 0.6997 0.7806
0.5097 7.0 70 0.6576 {'precision': 0.6656050955414012, 'recall': 0.7750309023485785, 'f1': 0.7161621930325527, 'number': 809} {'precision': 0.32323232323232326, 'recall': 0.2689075630252101, 'f1': 0.29357798165137616, 'number': 119} {'precision': 0.7382198952879581, 'recall': 0.7943661971830986, 'f1': 0.7652645861601085, 'number': 1065} 0.6882 0.7551 0.7201 0.7963
0.4507 8.0 80 0.6668 {'precision': 0.6615698267074414, 'recall': 0.8022249690976514, 'f1': 0.7251396648044692, 'number': 809} {'precision': 0.28205128205128205, 'recall': 0.2773109243697479, 'f1': 0.2796610169491525, 'number': 119} {'precision': 0.7389380530973452, 'recall': 0.784037558685446, 'f1': 0.7608200455580865, 'number': 1065} 0.6809 0.7612 0.7188 0.7909
0.3998 9.0 90 0.6639 {'precision': 0.6715481171548117, 'recall': 0.7935723114956736, 'f1': 0.7274787535410764, 'number': 809} {'precision': 0.3130434782608696, 'recall': 0.3025210084033613, 'f1': 0.3076923076923077, 'number': 119} {'precision': 0.7542448614834674, 'recall': 0.7924882629107981, 'f1': 0.7728937728937729, 'number': 1065} 0.6950 0.7637 0.7277 0.7942
0.3899 10.0 100 0.6686 {'precision': 0.6840981856990395, 'recall': 0.792336217552534, 'f1': 0.734249713631157, 'number': 809} {'precision': 0.31092436974789917, 'recall': 0.31092436974789917, 'f1': 0.31092436974789917, 'number': 119} {'precision': 0.752828546562228, 'recall': 0.812206572769953, 'f1': 0.7813911472448057, 'number': 1065} 0.6998 0.7742 0.7351 0.7987
0.3345 11.0 110 0.6688 {'precision': 0.6878980891719745, 'recall': 0.8009888751545118, 'f1': 0.7401484865790977, 'number': 809} {'precision': 0.31451612903225806, 'recall': 0.3277310924369748, 'f1': 0.32098765432098764, 'number': 119} {'precision': 0.7567332754126846, 'recall': 0.8178403755868544, 'f1': 0.7861010830324908, 'number': 1065} 0.7028 0.7817 0.7401 0.8019
0.3227 12.0 120 0.6747 {'precision': 0.6944444444444444, 'recall': 0.8034610630407911, 'f1': 0.7449856733524356, 'number': 809} {'precision': 0.35714285714285715, 'recall': 0.33613445378151263, 'f1': 0.34632034632034636, 'number': 119} {'precision': 0.7703306523681859, 'recall': 0.8093896713615023, 'f1': 0.7893772893772893, 'number': 1065} 0.7162 0.7787 0.7462 0.8047
0.3068 13.0 130 0.6875 {'precision': 0.6957470010905126, 'recall': 0.788627935723115, 'f1': 0.7392815758980301, 'number': 809} {'precision': 0.3253968253968254, 'recall': 0.3445378151260504, 'f1': 0.33469387755102037, 'number': 119} {'precision': 0.7596899224806202, 'recall': 0.828169014084507, 'f1': 0.7924528301886793, 'number': 1065} 0.7083 0.7832 0.7439 0.8024
0.2826 14.0 140 0.6897 {'precision': 0.6963519313304721, 'recall': 0.8022249690976514, 'f1': 0.7455485353245261, 'number': 809} {'precision': 0.3252032520325203, 'recall': 0.33613445378151263, 'f1': 0.3305785123966942, 'number': 119} {'precision': 0.7651183172655566, 'recall': 0.819718309859155, 'f1': 0.7914777878513146, 'number': 1065} 0.7113 0.7837 0.7458 0.8007
0.2785 15.0 150 0.6932 {'precision': 0.6896186440677966, 'recall': 0.8046971569839307, 'f1': 0.7427267541357673, 'number': 809} {'precision': 0.3305785123966942, 'recall': 0.33613445378151263, 'f1': 0.33333333333333337, 'number': 119} {'precision': 0.766107678729038, 'recall': 0.8150234741784037, 'f1': 0.7898089171974523, 'number': 1065} 0.7093 0.7822 0.7440 0.8018

Framework versions

  • Transformers 4.44.0
  • Pytorch 2.4.0+cu121
  • Datasets 2.21.0
  • Tokenizers 0.19.1
Downloads last month
2
Safetensors
Model size
113M params
Tensor type
F32
·
Inference API
Unable to determine this model's library. Check the docs .

Model tree for KushalBanda/layoutlm-funsd

Finetuned
(134)
this model