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: 1.1695
  • Answer: {'precision': 0.35993485342019543, 'recall': 0.546353522867738, 'f1': 0.4339715267550319, 'number': 809}
  • Header: {'precision': 0.3488372093023256, 'recall': 0.25210084033613445, 'f1': 0.2926829268292683, 'number': 119}
  • Question: {'precision': 0.5217762596071733, 'recall': 0.5737089201877934, 'f1': 0.5465116279069767, 'number': 1065}
  • Overall Precision: 0.4358
  • Overall Recall: 0.5434
  • Overall F1: 0.4837
  • Overall Accuracy: 0.5907

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.7983 1.0 10 1.5799 {'precision': 0.02035830618892508, 'recall': 0.030902348578491966, 'f1': 0.024545900834560624, 'number': 809} {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} {'precision': 0.19827586206896552, 'recall': 0.1295774647887324, 'f1': 0.15672913117546847, 'number': 1065} 0.0847 0.0818 0.0832 0.3629
1.5573 2.0 20 1.4500 {'precision': 0.11375661375661375, 'recall': 0.2126081582200247, 'f1': 0.14821197759586383, 'number': 809} {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} {'precision': 0.21101928374655649, 'recall': 0.3596244131455399, 'f1': 0.2659722222222222, 'number': 1065} 0.1668 0.2785 0.2086 0.4045
1.3717 3.0 30 1.2959 {'precision': 0.16349108789182545, 'recall': 0.3288009888751545, 'f1': 0.21839080459770116, 'number': 809} {'precision': 0.061224489795918366, 'recall': 0.025210084033613446, 'f1': 0.03571428571428571, 'number': 119} {'precision': 0.2739408009286129, 'recall': 0.4431924882629108, 'f1': 0.3385939741750359, 'number': 1065} 0.2180 0.3718 0.2749 0.4466
1.2568 4.0 40 1.2032 {'precision': 0.20166898470097358, 'recall': 0.3584672435105068, 'f1': 0.258121940364931, 'number': 809} {'precision': 0.23809523809523808, 'recall': 0.16806722689075632, 'f1': 0.19704433497536947, 'number': 119} {'precision': 0.3354214123006834, 'recall': 0.5530516431924882, 'f1': 0.4175824175824176, 'number': 1065} 0.2743 0.4511 0.3411 0.4942
1.1591 5.0 50 1.1897 {'precision': 0.23584277148567623, 'recall': 0.43757725587144625, 'f1': 0.30649350649350654, 'number': 809} {'precision': 0.27848101265822783, 'recall': 0.18487394957983194, 'f1': 0.2222222222222222, 'number': 119} {'precision': 0.36172765446910615, 'recall': 0.5661971830985916, 'f1': 0.44143484626647145, 'number': 1065} 0.3015 0.4912 0.3737 0.5069
1.075 6.0 60 1.1092 {'precision': 0.2832044975404076, 'recall': 0.49814585908529047, 'f1': 0.36111111111111116, 'number': 809} {'precision': 0.34375, 'recall': 0.18487394957983194, 'f1': 0.24043715846994534, 'number': 119} {'precision': 0.4609571788413098, 'recall': 0.5154929577464789, 'f1': 0.48670212765957444, 'number': 1065} 0.3637 0.4887 0.4170 0.5650
1.0011 7.0 70 1.0638 {'precision': 0.30843373493975906, 'recall': 0.4746600741656366, 'f1': 0.3739045764362221, 'number': 809} {'precision': 0.3333333333333333, 'recall': 0.19327731092436976, 'f1': 0.24468085106382975, 'number': 119} {'precision': 0.47068021892103207, 'recall': 0.5652582159624413, 'f1': 0.5136518771331057, 'number': 1065} 0.3891 0.5063 0.4400 0.5852
0.9357 8.0 80 1.1937 {'precision': 0.3132867132867133, 'recall': 0.553770086526576, 'f1': 0.4001786511835641, 'number': 809} {'precision': 0.2987012987012987, 'recall': 0.19327731092436976, 'f1': 0.23469387755102045, 'number': 119} {'precision': 0.48117839607201307, 'recall': 0.5521126760563381, 'f1': 0.5142107564494972, 'number': 1065} 0.3881 0.5314 0.4485 0.5559
0.8751 9.0 90 1.0553 {'precision': 0.3413173652694611, 'recall': 0.4932014833127318, 'f1': 0.40343781597573314, 'number': 809} {'precision': 0.29577464788732394, 'recall': 0.17647058823529413, 'f1': 0.2210526315789474, 'number': 119} {'precision': 0.47987851176917234, 'recall': 0.5934272300469483, 'f1': 0.5306465155331653, 'number': 1065} 0.4114 0.5278 0.4624 0.5986
0.8585 10.0 100 1.1844 {'precision': 0.33745454545454545, 'recall': 0.5735475896168108, 'f1': 0.4249084249084249, 'number': 809} {'precision': 0.37333333333333335, 'recall': 0.23529411764705882, 'f1': 0.28865979381443296, 'number': 119} {'precision': 0.5013333333333333, 'recall': 0.5295774647887324, 'f1': 0.5150684931506849, 'number': 1065} 0.4101 0.5299 0.4623 0.5706
0.7894 11.0 110 1.1752 {'precision': 0.3395311236863379, 'recall': 0.519159456118665, 'f1': 0.41055718475073316, 'number': 809} {'precision': 0.4, 'recall': 0.23529411764705882, 'f1': 0.29629629629629634, 'number': 119} {'precision': 0.5020885547201337, 'recall': 0.564319248826291, 'f1': 0.5313881520778072, 'number': 1065} 0.4189 0.5263 0.4665 0.5781
0.7809 12.0 120 1.2025 {'precision': 0.34820031298904536, 'recall': 0.5500618046971569, 'f1': 0.4264494489698131, 'number': 809} {'precision': 0.37037037037037035, 'recall': 0.25210084033613445, 'f1': 0.3, 'number': 119} {'precision': 0.5093062605752962, 'recall': 0.5652582159624413, 'f1': 0.5358255451713396, 'number': 1065} 0.4238 0.5404 0.4751 0.5800
0.7452 13.0 130 1.1974 {'precision': 0.3550436854646545, 'recall': 0.5525339925834364, 'f1': 0.4323017408123791, 'number': 809} {'precision': 0.358974358974359, 'recall': 0.23529411764705882, 'f1': 0.28426395939086296, 'number': 119} {'precision': 0.5247787610619469, 'recall': 0.5568075117370892, 'f1': 0.5403189066059226, 'number': 1065} 0.4329 0.5359 0.4789 0.5830
0.7108 14.0 140 1.1267 {'precision': 0.373015873015873, 'recall': 0.522867737948084, 'f1': 0.43540916109109623, 'number': 809} {'precision': 0.3448275862068966, 'recall': 0.25210084033613445, 'f1': 0.2912621359223301, 'number': 119} {'precision': 0.5193548387096775, 'recall': 0.6046948356807512, 'f1': 0.5587852494577007, 'number': 1065} 0.4458 0.5504 0.4926 0.6044
0.702 15.0 150 1.1695 {'precision': 0.35993485342019543, 'recall': 0.546353522867738, 'f1': 0.4339715267550319, 'number': 809} {'precision': 0.3488372093023256, 'recall': 0.25210084033613445, 'f1': 0.2926829268292683, 'number': 119} {'precision': 0.5217762596071733, 'recall': 0.5737089201877934, 'f1': 0.5465116279069767, 'number': 1065} 0.4358 0.5434 0.4837 0.5907

Framework versions

  • Transformers 4.38.2
  • Pytorch 2.1.0+cu121
  • Datasets 2.18.0
  • Tokenizers 0.15.2
Downloads last month
4
Safetensors
Model size
113M params
Tensor type
F32
·
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 duyho/layoutlm-funsd

Finetuned
(136)
this model