layout-lm / README.md
clementWizard's picture
End of training
7677a6d verified
|
raw
history blame
9.38 kB
metadata
license: mit
base_model: microsoft/layoutlm-base-uncased
tags:
  - generated_from_trainer
datasets:
  - funsd
model-index:
  - name: layout-lm
    results: []

layout-lm

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.6696
  • Answer: {'precision': 0.7092896174863388, 'recall': 0.8022249690976514, 'f1': 0.7529002320185615, 'number': 809}
  • Header: {'precision': 0.26618705035971224, 'recall': 0.31092436974789917, 'f1': 0.2868217054263566, 'number': 119}
  • Question: {'precision': 0.7788632326820604, 'recall': 0.8234741784037559, 'f1': 0.8005476951163851, 'number': 1065}
  • Overall Precision: 0.7170
  • Overall Recall: 0.7842
  • Overall F1: 0.7491
  • Overall Accuracy: 0.8090

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.7756 1.0 10 1.5443 {'precision': 0.022977022977022976, 'recall': 0.02843016069221261, 'f1': 0.025414364640883976, 'number': 809} {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} {'precision': 0.18486486486486486, 'recall': 0.16056338028169015, 'f1': 0.17185929648241205, 'number': 1065} 0.1007 0.0973 0.0990 0.3934
1.4156 2.0 20 1.2218 {'precision': 0.2844311377245509, 'recall': 0.3522867737948084, 'f1': 0.3147432357813363, 'number': 809} {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} {'precision': 0.4658151765589782, 'recall': 0.5821596244131455, 'f1': 0.5175292153589315, 'number': 1065} 0.3879 0.4541 0.4184 0.5974
1.0947 3.0 30 0.9351 {'precision': 0.45348837209302323, 'recall': 0.5784919653893696, 'f1': 0.5084193373166758, 'number': 809} {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} {'precision': 0.5731800766283525, 'recall': 0.7023474178403756, 'f1': 0.6312236286919831, 'number': 1065} 0.5155 0.6101 0.5588 0.7042
0.8401 4.0 40 0.8011 {'precision': 0.5671361502347417, 'recall': 0.7466007416563659, 'f1': 0.6446104589114193, 'number': 809} {'precision': 0.03636363636363636, 'recall': 0.01680672268907563, 'f1': 0.022988505747126436, 'number': 119} {'precision': 0.6641285956006768, 'recall': 0.7370892018779343, 'f1': 0.6987093902981754, 'number': 1065} 0.6043 0.6979 0.6477 0.7447
0.6784 5.0 50 0.7088 {'precision': 0.6298568507157464, 'recall': 0.761433868974042, 'f1': 0.689423614997202, 'number': 809} {'precision': 0.13333333333333333, 'recall': 0.08403361344537816, 'f1': 0.10309278350515463, 'number': 119} {'precision': 0.6869009584664537, 'recall': 0.8075117370892019, 'f1': 0.7423392317652138, 'number': 1065} 0.6447 0.7456 0.6915 0.7832
0.5803 6.0 60 0.6837 {'precision': 0.632512315270936, 'recall': 0.7935723114956736, 'f1': 0.7039473684210525, 'number': 809} {'precision': 0.17, 'recall': 0.14285714285714285, 'f1': 0.15525114155251143, 'number': 119} {'precision': 0.7255244755244755, 'recall': 0.7793427230046949, 'f1': 0.7514712539610684, 'number': 1065} 0.6591 0.7471 0.7004 0.7899
0.5058 7.0 70 0.6616 {'precision': 0.6632337796086509, 'recall': 0.796044499381953, 'f1': 0.7235955056179776, 'number': 809} {'precision': 0.22935779816513763, 'recall': 0.21008403361344538, 'f1': 0.2192982456140351, 'number': 119} {'precision': 0.7556917688266199, 'recall': 0.8103286384976526, 'f1': 0.7820570910738559, 'number': 1065} 0.6895 0.7687 0.7269 0.8049
0.4504 8.0 80 0.6497 {'precision': 0.6694045174537988, 'recall': 0.8059332509270705, 'f1': 0.7313516545148627, 'number': 809} {'precision': 0.24778761061946902, 'recall': 0.23529411764705882, 'f1': 0.2413793103448276, 'number': 119} {'precision': 0.7757255936675461, 'recall': 0.828169014084507, 'f1': 0.8010899182561309, 'number': 1065} 0.7023 0.7837 0.7408 0.8126
0.4046 9.0 90 0.6455 {'precision': 0.6864406779661016, 'recall': 0.8009888751545118, 'f1': 0.7393040501996578, 'number': 809} {'precision': 0.25396825396825395, 'recall': 0.2689075630252101, 'f1': 0.2612244897959184, 'number': 119} {'precision': 0.7812223206377326, 'recall': 0.828169014084507, 'f1': 0.8040109389243391, 'number': 1065} 0.7103 0.7837 0.7452 0.8152
0.3936 10.0 100 0.6659 {'precision': 0.6867088607594937, 'recall': 0.8046971569839307, 'f1': 0.7410358565737052, 'number': 809} {'precision': 0.24193548387096775, 'recall': 0.25210084033613445, 'f1': 0.2469135802469136, 'number': 119} {'precision': 0.7786811201445348, 'recall': 0.8093896713615023, 'f1': 0.7937384898710865, 'number': 1065} 0.7081 0.7742 0.7397 0.8078
0.3364 11.0 110 0.6591 {'precision': 0.6890308839190629, 'recall': 0.799752781211372, 'f1': 0.7402745995423341, 'number': 809} {'precision': 0.2824427480916031, 'recall': 0.31092436974789917, 'f1': 0.29600000000000004, 'number': 119} {'precision': 0.7735682819383259, 'recall': 0.8244131455399061, 'f1': 0.7981818181818181, 'number': 1065} 0.7084 0.7837 0.7442 0.8115
0.3265 12.0 120 0.6682 {'precision': 0.6912393162393162, 'recall': 0.799752781211372, 'f1': 0.7415472779369628, 'number': 809} {'precision': 0.26666666666666666, 'recall': 0.3025210084033613, 'f1': 0.28346456692913385, 'number': 119} {'precision': 0.7784697508896797, 'recall': 0.8215962441314554, 'f1': 0.7994518044769301, 'number': 1065} 0.7098 0.7817 0.7440 0.8077
0.3079 13.0 130 0.6711 {'precision': 0.7035830618892508, 'recall': 0.8009888751545118, 'f1': 0.7491329479768787, 'number': 809} {'precision': 0.26717557251908397, 'recall': 0.29411764705882354, 'f1': 0.28, 'number': 119} {'precision': 0.7762114537444934, 'recall': 0.8272300469483568, 'f1': 0.8009090909090909, 'number': 1065} 0.7151 0.7847 0.7483 0.8090
0.2868 14.0 140 0.6677 {'precision': 0.704225352112676, 'recall': 0.8034610630407911, 'f1': 0.7505773672055426, 'number': 809} {'precision': 0.2835820895522388, 'recall': 0.31932773109243695, 'f1': 0.30039525691699603, 'number': 119} {'precision': 0.7804444444444445, 'recall': 0.8244131455399061, 'f1': 0.8018264840182647, 'number': 1065} 0.7177 0.7858 0.7502 0.8111
0.2863 15.0 150 0.6696 {'precision': 0.7092896174863388, 'recall': 0.8022249690976514, 'f1': 0.7529002320185615, 'number': 809} {'precision': 0.26618705035971224, 'recall': 0.31092436974789917, 'f1': 0.2868217054263566, 'number': 119} {'precision': 0.7788632326820604, 'recall': 0.8234741784037559, 'f1': 0.8005476951163851, 'number': 1065} 0.7170 0.7842 0.7491 0.8090

Framework versions

  • Transformers 4.43.2
  • Pytorch 2.3.1+cu121
  • Datasets 2.20.0
  • Tokenizers 0.19.1