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.7076
  • Answer: {'precision': 0.7112831858407079, 'recall': 0.7948084054388134, 'f1': 0.7507297139521306, 'number': 809}
  • Header: {'precision': 0.2932330827067669, 'recall': 0.3277310924369748, 'f1': 0.30952380952380953, 'number': 119}
  • Question: {'precision': 0.768303186907838, 'recall': 0.8375586854460094, 'f1': 0.8014375561545374, 'number': 1065}
  • Overall Precision: 0.7161
  • Overall Recall: 0.7898
  • Overall F1: 0.7511
  • Overall Accuracy: 0.8076

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.8402 1.0 10 1.5987 {'precision': 0.021546261089987327, 'recall': 0.021013597033374538, 'f1': 0.02127659574468085, 'number': 809} {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} {'precision': 0.18303571428571427, 'recall': 0.11549295774647887, 'f1': 0.14162348877374784, 'number': 1065} 0.0958 0.0702 0.0811 0.3696
1.4639 2.0 20 1.2465 {'precision': 0.11695906432748537, 'recall': 0.09888751545117429, 'f1': 0.10716677829872738, 'number': 809} {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} {'precision': 0.4292786421499293, 'recall': 0.5699530516431925, 'f1': 0.48971359419120614, 'number': 1065} 0.3275 0.3447 0.3359 0.5870
1.1099 3.0 30 0.9764 {'precision': 0.4803921568627451, 'recall': 0.5451174289245982, 'f1': 0.5107122177185871, 'number': 809} {'precision': 0.1282051282051282, 'recall': 0.04201680672268908, 'f1': 0.06329113924050632, 'number': 119} {'precision': 0.5776255707762558, 'recall': 0.7126760563380282, 'f1': 0.6380832282471627, 'number': 1065} 0.5306 0.6046 0.5652 0.7145
0.8446 4.0 40 0.7999 {'precision': 0.6241900647948164, 'recall': 0.7144622991347342, 'f1': 0.6662824207492796, 'number': 809} {'precision': 0.23880597014925373, 'recall': 0.13445378151260504, 'f1': 0.17204301075268816, 'number': 119} {'precision': 0.629976580796253, 'recall': 0.7577464788732394, 'f1': 0.6879795396419438, 'number': 1065} 0.6161 0.7030 0.6567 0.7649
0.6679 5.0 50 0.7382 {'precision': 0.6525515743756786, 'recall': 0.7428924598269468, 'f1': 0.6947976878612716, 'number': 809} {'precision': 0.2891566265060241, 'recall': 0.20168067226890757, 'f1': 0.23762376237623764, 'number': 119} {'precision': 0.6767441860465117, 'recall': 0.819718309859155, 'f1': 0.7414012738853504, 'number': 1065} 0.6530 0.7516 0.6989 0.7784
0.5711 6.0 60 0.7029 {'precision': 0.6705882352941176, 'recall': 0.7750309023485785, 'f1': 0.7190366972477065, 'number': 809} {'precision': 0.3150684931506849, 'recall': 0.19327731092436976, 'f1': 0.23958333333333334, 'number': 119} {'precision': 0.7184873949579832, 'recall': 0.8028169014084507, 'f1': 0.7583148558758316, 'number': 1065} 0.6847 0.7551 0.7182 0.7926
0.5019 7.0 70 0.6781 {'precision': 0.6785714285714286, 'recall': 0.7750309023485785, 'f1': 0.7236006924408541, 'number': 809} {'precision': 0.3263157894736842, 'recall': 0.2605042016806723, 'f1': 0.2897196261682243, 'number': 119} {'precision': 0.7317686504610227, 'recall': 0.819718309859155, 'f1': 0.7732506643046944, 'number': 1065} 0.6921 0.7682 0.7282 0.7984
0.4481 8.0 80 0.6777 {'precision': 0.678609062170706, 'recall': 0.796044499381953, 'f1': 0.732650739476678, 'number': 809} {'precision': 0.29523809523809524, 'recall': 0.2605042016806723, 'f1': 0.2767857142857143, 'number': 119} {'precision': 0.7263763352506163, 'recall': 0.8300469483568075, 'f1': 0.7747589833479404, 'number': 1065} 0.6865 0.7822 0.7312 0.8020
0.3933 9.0 90 0.6705 {'precision': 0.7040704070407041, 'recall': 0.7911001236093943, 'f1': 0.7450523864959255, 'number': 809} {'precision': 0.30275229357798167, 'recall': 0.2773109243697479, 'f1': 0.28947368421052627, 'number': 119} {'precision': 0.7557643040136636, 'recall': 0.8309859154929577, 'f1': 0.7915921288014313, 'number': 1065} 0.7117 0.7817 0.7451 0.8054
0.387 10.0 100 0.6786 {'precision': 0.6973969631236443, 'recall': 0.7948084054388134, 'f1': 0.7429231658001155, 'number': 809} {'precision': 0.26717557251908397, 'recall': 0.29411764705882354, 'f1': 0.28, 'number': 119} {'precision': 0.7676240208877284, 'recall': 0.828169014084507, 'f1': 0.7967479674796749, 'number': 1065} 0.7084 0.7827 0.7437 0.8098
0.3298 11.0 110 0.6932 {'precision': 0.6968716289104638, 'recall': 0.7985166872682324, 'f1': 0.7442396313364056, 'number': 809} {'precision': 0.2824427480916031, 'recall': 0.31092436974789917, 'f1': 0.29600000000000004, 'number': 119} {'precision': 0.7559121621621622, 'recall': 0.8403755868544601, 'f1': 0.7959092930191196, 'number': 1065} 0.7038 0.7918 0.7452 0.8026
0.3049 12.0 120 0.6984 {'precision': 0.7032115171650055, 'recall': 0.7849196538936959, 'f1': 0.7418224299065419, 'number': 809} {'precision': 0.30833333333333335, 'recall': 0.31092436974789917, 'f1': 0.3096234309623431, 'number': 119} {'precision': 0.7710320901994796, 'recall': 0.8347417840375587, 'f1': 0.8016230838593327, 'number': 1065} 0.7174 0.7832 0.7489 0.8083
0.293 13.0 130 0.7063 {'precision': 0.706140350877193, 'recall': 0.796044499381953, 'f1': 0.7484020918070889, 'number': 809} {'precision': 0.2932330827067669, 'recall': 0.3277310924369748, 'f1': 0.30952380952380953, 'number': 119} {'precision': 0.7664359861591695, 'recall': 0.831924882629108, 'f1': 0.7978388113462405, 'number': 1065} 0.7129 0.7873 0.7482 0.8041
0.2732 14.0 140 0.7057 {'precision': 0.7161862527716186, 'recall': 0.7985166872682324, 'f1': 0.7551139684395091, 'number': 809} {'precision': 0.2932330827067669, 'recall': 0.3277310924369748, 'f1': 0.30952380952380953, 'number': 119} {'precision': 0.7714285714285715, 'recall': 0.8366197183098592, 'f1': 0.8027027027027026, 'number': 1065} 0.7196 0.7908 0.7535 0.8080
0.2762 15.0 150 0.7076 {'precision': 0.7112831858407079, 'recall': 0.7948084054388134, 'f1': 0.7507297139521306, 'number': 809} {'precision': 0.2932330827067669, 'recall': 0.3277310924369748, 'f1': 0.30952380952380953, 'number': 119} {'precision': 0.768303186907838, 'recall': 0.8375586854460094, 'f1': 0.8014375561545374, 'number': 1065} 0.7161 0.7898 0.7511 0.8076

Framework versions

  • Transformers 4.44.2
  • Pytorch 2.4.0+cu121
  • Datasets 3.0.0
  • Tokenizers 0.19.1
Downloads last month
0
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 Brownie81/layoutlm-funsd

Finetuned
(135)
this model