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.6771
  • Answer: {'precision': 0.7053571428571429, 'recall': 0.7812113720642769, 'f1': 0.7413489736070381, 'number': 809}
  • Header: {'precision': 0.29770992366412213, 'recall': 0.3277310924369748, 'f1': 0.312, 'number': 119}
  • Question: {'precision': 0.763716814159292, 'recall': 0.8103286384976526, 'f1': 0.7863325740318907, 'number': 1065}
  • Overall Precision: 0.7112
  • Overall Recall: 0.7697
  • Overall F1: 0.7393
  • Overall Accuracy: 0.8036

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.7668 1.0 10 1.5655 {'precision': 0.01564945226917058, 'recall': 0.012360939431396786, 'f1': 0.013812154696132598, 'number': 809} {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} {'precision': 0.31925675675675674, 'recall': 0.17746478873239438, 'f1': 0.22812311406155703, 'number': 1065} 0.1617 0.0998 0.1234 0.3599
1.4335 2.0 20 1.2504 {'precision': 0.22972972972972974, 'recall': 0.2521631644004944, 'f1': 0.24042427813789036, 'number': 809} {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} {'precision': 0.391304347826087, 'recall': 0.5492957746478874, 'f1': 0.45703125, 'number': 1065} 0.3311 0.3959 0.3606 0.5926
1.1215 3.0 30 0.9771 {'precision': 0.4570273003033367, 'recall': 0.5587144622991347, 'f1': 0.5027808676307008, 'number': 809} {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} {'precision': 0.5460829493087558, 'recall': 0.6676056338028169, 'f1': 0.6007604562737643, 'number': 1065} 0.5022 0.5835 0.5398 0.6802
0.8632 4.0 40 0.7960 {'precision': 0.5714285714285714, 'recall': 0.7317676143386898, 'f1': 0.6417344173441735, 'number': 809} {'precision': 0.0379746835443038, 'recall': 0.025210084033613446, 'f1': 0.030303030303030304, 'number': 119} {'precision': 0.633201581027668, 'recall': 0.752112676056338, 'f1': 0.6875536480686696, 'number': 1065} 0.5866 0.7005 0.6385 0.7572
0.6913 5.0 50 0.7202 {'precision': 0.6335797254487856, 'recall': 0.7416563658838071, 'f1': 0.683371298405467, 'number': 809} {'precision': 0.10752688172043011, 'recall': 0.08403361344537816, 'f1': 0.09433962264150944, 'number': 119} {'precision': 0.6907216494845361, 'recall': 0.7549295774647887, 'f1': 0.721399730820996, 'number': 1065} 0.6416 0.7095 0.6738 0.7808
0.5758 6.0 60 0.6812 {'precision': 0.6677248677248677, 'recall': 0.7799752781211372, 'f1': 0.7194982896237172, 'number': 809} {'precision': 0.17857142857142858, 'recall': 0.16806722689075632, 'f1': 0.17316017316017318, 'number': 119} {'precision': 0.6919315403422983, 'recall': 0.7971830985915493, 'f1': 0.7408376963350787, 'number': 1065} 0.6567 0.7526 0.7014 0.7947
0.4993 7.0 70 0.6593 {'precision': 0.6597938144329897, 'recall': 0.7911001236093943, 'f1': 0.7195053400786959, 'number': 809} {'precision': 0.21875, 'recall': 0.17647058823529413, 'f1': 0.19534883720930232, 'number': 119} {'precision': 0.7158703071672355, 'recall': 0.787793427230047, 'f1': 0.7501117568171659, 'number': 1065} 0.6702 0.7526 0.7091 0.7951
0.4397 8.0 80 0.6633 {'precision': 0.6749192680301399, 'recall': 0.7750309023485785, 'f1': 0.721518987341772, 'number': 809} {'precision': 0.23943661971830985, 'recall': 0.2857142857142857, 'f1': 0.26053639846743293, 'number': 119} {'precision': 0.7274290627687017, 'recall': 0.7943661971830986, 'f1': 0.7594254937163376, 'number': 1065} 0.6746 0.7561 0.7130 0.7987
0.396 9.0 90 0.6605 {'precision': 0.6875699888017918, 'recall': 0.7589616810877626, 'f1': 0.7215041128084607, 'number': 809} {'precision': 0.25203252032520324, 'recall': 0.2605042016806723, 'f1': 0.25619834710743805, 'number': 119} {'precision': 0.7344013490725126, 'recall': 0.8178403755868544, 'f1': 0.7738782763216348, 'number': 1065} 0.6885 0.7607 0.7228 0.8026
0.3578 10.0 100 0.6624 {'precision': 0.6842105263157895, 'recall': 0.7873918417799752, 'f1': 0.7321839080459769, 'number': 809} {'precision': 0.2773109243697479, 'recall': 0.2773109243697479, 'f1': 0.2773109243697479, 'number': 119} {'precision': 0.7476231633535004, 'recall': 0.812206572769953, 'f1': 0.7785778577857785, 'number': 1065} 0.6955 0.7702 0.7310 0.8022
0.3249 11.0 110 0.6678 {'precision': 0.6865671641791045, 'recall': 0.796044499381953, 'f1': 0.7372638809387521, 'number': 809} {'precision': 0.273972602739726, 'recall': 0.33613445378151263, 'f1': 0.3018867924528302, 'number': 119} {'precision': 0.7584973166368515, 'recall': 0.7962441314553991, 'f1': 0.7769125057260651, 'number': 1065} 0.6957 0.7687 0.7304 0.8010
0.3021 12.0 120 0.6681 {'precision': 0.7120535714285714, 'recall': 0.788627935723115, 'f1': 0.7483870967741936, 'number': 809} {'precision': 0.2923076923076923, 'recall': 0.31932773109243695, 'f1': 0.3052208835341365, 'number': 119} {'precision': 0.7547826086956522, 'recall': 0.8150234741784037, 'f1': 0.7837471783295711, 'number': 1065} 0.7096 0.7747 0.7407 0.8045
0.2895 13.0 130 0.6755 {'precision': 0.7122060470324748, 'recall': 0.7861557478368356, 'f1': 0.7473560517038778, 'number': 809} {'precision': 0.2887323943661972, 'recall': 0.3445378151260504, 'f1': 0.31417624521072796, 'number': 119} {'precision': 0.7595048629531388, 'recall': 0.8065727699530516, 'f1': 0.7823315118397085, 'number': 1065} 0.7091 0.7707 0.7386 0.8026
0.2734 14.0 140 0.6768 {'precision': 0.7093541202672605, 'recall': 0.7873918417799752, 'f1': 0.7463386057410661, 'number': 809} {'precision': 0.28368794326241137, 'recall': 0.33613445378151263, 'f1': 0.3076923076923077, 'number': 119} {'precision': 0.7570175438596491, 'recall': 0.8103286384976526, 'f1': 0.7827664399092971, 'number': 1065} 0.7067 0.7727 0.7383 0.8026
0.2804 15.0 150 0.6771 {'precision': 0.7053571428571429, 'recall': 0.7812113720642769, 'f1': 0.7413489736070381, 'number': 809} {'precision': 0.29770992366412213, 'recall': 0.3277310924369748, 'f1': 0.312, 'number': 119} {'precision': 0.763716814159292, 'recall': 0.8103286384976526, 'f1': 0.7863325740318907, 'number': 1065} 0.7112 0.7697 0.7393 0.8036

Framework versions

  • Transformers 4.34.0
  • Pytorch 2.1.0+cpu
  • Datasets 2.14.5
  • Tokenizers 0.14.1
Downloads last month
17
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.

Model tree for smallonotation/layoutlm-funsd

Finetuned
(136)
this model