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.6724
  • Answer: {'precision': 0.7072368421052632, 'recall': 0.7972805933250927, 'f1': 0.7495642068564788, 'number': 809}
  • Header: {'precision': 0.3333333333333333, 'recall': 0.3697478991596639, 'f1': 0.350597609561753, 'number': 119}
  • Question: {'precision': 0.7901785714285714, 'recall': 0.8309859154929577, 'f1': 0.8100686498855836, 'number': 1065}
  • Overall Precision: 0.7274
  • Overall Recall: 0.7898
  • Overall F1: 0.7573
  • Overall Accuracy: 0.8170

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.7705 1.0 10 1.5739 {'precision': 0.010057471264367816, 'recall': 0.00865265760197775, 'f1': 0.00930232558139535, 'number': 809} {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} {'precision': 0.26591760299625467, 'recall': 0.13333333333333333, 'f1': 0.17761100687929957, 'number': 1065} 0.1211 0.0748 0.0925 0.3598
1.4468 2.0 20 1.2327 {'precision': 0.25151148730350664, 'recall': 0.25710754017305315, 'f1': 0.2542787286063569, 'number': 809} {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} {'precision': 0.4251316779533484, 'recall': 0.5305164319248826, 'f1': 0.4720133667502089, 'number': 1065} 0.3585 0.3879 0.3726 0.5921
1.1103 3.0 30 0.9608 {'precision': 0.4880694143167028, 'recall': 0.5562422744128553, 'f1': 0.5199306759098786, 'number': 809} {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} {'precision': 0.5613598673300166, 'recall': 0.6356807511737089, 'f1': 0.5962131219726994, 'number': 1065} 0.5257 0.5655 0.5448 0.7058
0.8476 4.0 40 0.7875 {'precision': 0.5821325648414986, 'recall': 0.7490729295426453, 'f1': 0.6551351351351351, 'number': 809} {'precision': 0.1702127659574468, 'recall': 0.06722689075630252, 'f1': 0.09638554216867469, 'number': 119} {'precision': 0.6254071661237784, 'recall': 0.7211267605633803, 'f1': 0.6698648059310947, 'number': 1065} 0.5967 0.6934 0.6414 0.7538
0.6698 5.0 50 0.6948 {'precision': 0.6421923474663909, 'recall': 0.7676143386897404, 'f1': 0.6993243243243243, 'number': 809} {'precision': 0.3424657534246575, 'recall': 0.21008403361344538, 'f1': 0.2604166666666667, 'number': 119} {'precision': 0.6873977086743044, 'recall': 0.7887323943661971, 'f1': 0.7345867949278532, 'number': 1065} 0.6569 0.7456 0.6985 0.7860
0.554 6.0 60 0.6717 {'precision': 0.6506410256410257, 'recall': 0.7527812113720643, 'f1': 0.6979942693409743, 'number': 809} {'precision': 0.3448275862068966, 'recall': 0.25210084033613445, 'f1': 0.2912621359223301, 'number': 119} {'precision': 0.716821639898563, 'recall': 0.7962441314553991, 'f1': 0.7544483985765124, 'number': 1065} 0.6741 0.7461 0.7083 0.7920
0.4787 7.0 70 0.6462 {'precision': 0.6666666666666666, 'recall': 0.7935723114956736, 'f1': 0.7246049661399547, 'number': 809} {'precision': 0.3017241379310345, 'recall': 0.29411764705882354, 'f1': 0.29787234042553185, 'number': 119} {'precision': 0.7368421052631579, 'recall': 0.8018779342723005, 'f1': 0.7679856115107914, 'number': 1065} 0.6841 0.7682 0.7237 0.8038
0.4182 8.0 80 0.6516 {'precision': 0.6790890269151139, 'recall': 0.8108776266996292, 'f1': 0.7391549295774646, 'number': 809} {'precision': 0.3063063063063063, 'recall': 0.2857142857142857, 'f1': 0.2956521739130435, 'number': 119} {'precision': 0.7450643776824034, 'recall': 0.8150234741784037, 'f1': 0.77847533632287, 'number': 1065} 0.6949 0.7817 0.7358 0.8025
0.3877 9.0 90 0.6652 {'precision': 0.6976744186046512, 'recall': 0.7787391841779975, 'f1': 0.7359813084112149, 'number': 809} {'precision': 0.3194444444444444, 'recall': 0.3865546218487395, 'f1': 0.34980988593155893, 'number': 119} {'precision': 0.7573913043478261, 'recall': 0.8178403755868544, 'f1': 0.7864559819413092, 'number': 1065} 0.7041 0.7762 0.7384 0.8094
0.3483 10.0 100 0.6568 {'precision': 0.6876332622601279, 'recall': 0.7972805933250927, 'f1': 0.7384087006296507, 'number': 809} {'precision': 0.3225806451612903, 'recall': 0.33613445378151263, 'f1': 0.3292181069958848, 'number': 119} {'precision': 0.7650602409638554, 'recall': 0.8347417840375587, 'f1': 0.7983834755276155, 'number': 1065} 0.7077 0.7898 0.7465 0.8151
0.3136 11.0 110 0.6698 {'precision': 0.7006507592190889, 'recall': 0.7985166872682324, 'f1': 0.7463893703061815, 'number': 809} {'precision': 0.3247863247863248, 'recall': 0.31932773109243695, 'f1': 0.3220338983050848, 'number': 119} {'precision': 0.7803365810451727, 'recall': 0.8272300469483568, 'f1': 0.8030993618960802, 'number': 1065} 0.7219 0.7852 0.7522 0.8084
0.3044 12.0 120 0.6667 {'precision': 0.7058177826564215, 'recall': 0.7948084054388134, 'f1': 0.7476744186046511, 'number': 809} {'precision': 0.34328358208955223, 'recall': 0.3865546218487395, 'f1': 0.36363636363636365, 'number': 119} {'precision': 0.785204991087344, 'recall': 0.8272300469483568, 'f1': 0.8056698673982624, 'number': 1065} 0.7245 0.7878 0.7548 0.8138
0.2853 13.0 130 0.6699 {'precision': 0.702819956616052, 'recall': 0.8009888751545118, 'f1': 0.7487001733102253, 'number': 809} {'precision': 0.3442622950819672, 'recall': 0.35294117647058826, 'f1': 0.3485477178423237, 'number': 119} {'precision': 0.7857769973661106, 'recall': 0.8403755868544601, 'f1': 0.8121597096188747, 'number': 1065} 0.7261 0.7953 0.7591 0.8136
0.278 14.0 140 0.6716 {'precision': 0.7009750812567714, 'recall': 0.799752781211372, 'f1': 0.7471131639722863, 'number': 809} {'precision': 0.3233082706766917, 'recall': 0.36134453781512604, 'f1': 0.3412698412698413, 'number': 119} {'precision': 0.7873665480427047, 'recall': 0.8309859154929577, 'f1': 0.808588396528095, 'number': 1065} 0.7225 0.7903 0.7549 0.8154
0.2672 15.0 150 0.6724 {'precision': 0.7072368421052632, 'recall': 0.7972805933250927, 'f1': 0.7495642068564788, 'number': 809} {'precision': 0.3333333333333333, 'recall': 0.3697478991596639, 'f1': 0.350597609561753, 'number': 119} {'precision': 0.7901785714285714, 'recall': 0.8309859154929577, 'f1': 0.8100686498855836, 'number': 1065} 0.7274 0.7898 0.7573 0.8170

Framework versions

  • Transformers 4.25.1
  • Pytorch 1.9.0
  • Datasets 2.8.0
  • Tokenizers 0.13.2
Downloads last month
5
Inference Examples
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.