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.7011
  • Answer: {'precision': 0.7142857142857143, 'recall': 0.8096415327564895, 'f1': 0.7589803012746235, 'number': 809}
  • Header: {'precision': 0.2962962962962963, 'recall': 0.33613445378151263, 'f1': 0.31496062992125984, 'number': 119}
  • Question: {'precision': 0.7859712230215827, 'recall': 0.8206572769953052, 'f1': 0.8029398254478639, 'number': 1065}
  • Overall Precision: 0.7250
  • Overall Recall: 0.7873
  • Overall F1: 0.7549
  • Overall Accuracy: 0.8102

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.7566 1.0 10 1.5349 {'precision': 0.03646308113035551, 'recall': 0.049443757725587144, 'f1': 0.04197271773347323, 'number': 809} {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} {'precision': 0.16700819672131148, 'recall': 0.15305164319248826, 'f1': 0.15972562469377757, 'number': 1065} 0.0979 0.1019 0.0999 0.4336
1.4057 2.0 20 1.1865 {'precision': 0.17656500802568217, 'recall': 0.13597033374536466, 'f1': 0.15363128491620115, 'number': 809} {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} {'precision': 0.471847739888977, 'recall': 0.5586854460093896, 'f1': 0.5116079105760963, 'number': 1065} 0.3742 0.3537 0.3637 0.6016
1.0729 3.0 30 0.9241 {'precision': 0.49693251533742333, 'recall': 0.5006180469715699, 'f1': 0.4987684729064039, 'number': 809} {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} {'precision': 0.6378708551483421, 'recall': 0.6863849765258216, 'f1': 0.6612392582541836, 'number': 1065} 0.5691 0.5700 0.5696 0.7181
0.8134 4.0 40 0.7831 {'precision': 0.6211640211640211, 'recall': 0.7255871446229913, 'f1': 0.669327251995439, 'number': 809} {'precision': 0.09375, 'recall': 0.05042016806722689, 'f1': 0.0655737704918033, 'number': 119} {'precision': 0.6889081455805892, 'recall': 0.7464788732394366, 'f1': 0.7165389815232085, 'number': 1065} 0.6417 0.6964 0.6679 0.7640
0.6582 5.0 50 0.7298 {'precision': 0.6422018348623854, 'recall': 0.7787391841779975, 'f1': 0.7039106145251396, 'number': 809} {'precision': 0.2361111111111111, 'recall': 0.14285714285714285, 'f1': 0.17801047120418848, 'number': 119} {'precision': 0.7311233885819521, 'recall': 0.7455399061032864, 'f1': 0.7382612738261274, 'number': 1065} 0.6737 0.7230 0.6975 0.7761
0.553 6.0 60 0.6763 {'precision': 0.6673532440782698, 'recall': 0.8009888751545118, 'f1': 0.7280898876404494, 'number': 809} {'precision': 0.25806451612903225, 'recall': 0.20168067226890757, 'f1': 0.22641509433962265, 'number': 119} {'precision': 0.735445205479452, 'recall': 0.8065727699530516, 'f1': 0.7693685624720108, 'number': 1065} 0.6859 0.7682 0.7247 0.7962
0.4805 7.0 70 0.6797 {'precision': 0.6904255319148936, 'recall': 0.8022249690976514, 'f1': 0.7421383647798742, 'number': 809} {'precision': 0.25925925925925924, 'recall': 0.23529411764705882, 'f1': 0.24669603524229072, 'number': 119} {'precision': 0.7363945578231292, 'recall': 0.8131455399061033, 'f1': 0.7728692547969657, 'number': 1065} 0.6938 0.7742 0.7318 0.7970
0.4259 8.0 80 0.6726 {'precision': 0.689401888772298, 'recall': 0.8121137206427689, 'f1': 0.7457434733257663, 'number': 809} {'precision': 0.24786324786324787, 'recall': 0.24369747899159663, 'f1': 0.24576271186440676, 'number': 119} {'precision': 0.7463581833761782, 'recall': 0.8178403755868544, 'f1': 0.7804659498207885, 'number': 1065} 0.6960 0.7812 0.7362 0.8020
0.3787 9.0 90 0.6784 {'precision': 0.7043956043956044, 'recall': 0.792336217552534, 'f1': 0.7457824316463061, 'number': 809} {'precision': 0.26229508196721313, 'recall': 0.2689075630252101, 'f1': 0.26556016597510373, 'number': 119} {'precision': 0.779707495429616, 'recall': 0.8009389671361502, 'f1': 0.7901806391848076, 'number': 1065} 0.7178 0.7657 0.7410 0.8026
0.3411 10.0 100 0.6821 {'precision': 0.7015086206896551, 'recall': 0.8046971569839307, 'f1': 0.7495682210708117, 'number': 809} {'precision': 0.2708333333333333, 'recall': 0.3277310924369748, 'f1': 0.2965779467680608, 'number': 119} {'precision': 0.775200713648528, 'recall': 0.815962441314554, 'f1': 0.7950594693504116, 'number': 1065} 0.7109 0.7822 0.7449 0.8047
0.313 11.0 110 0.7129 {'precision': 0.7111111111111111, 'recall': 0.7911001236093943, 'f1': 0.7489760093622002, 'number': 809} {'precision': 0.2835820895522388, 'recall': 0.31932773109243695, 'f1': 0.30039525691699603, 'number': 119} {'precision': 0.7816711590296496, 'recall': 0.8169014084507042, 'f1': 0.7988980716253444, 'number': 1065} 0.7210 0.7767 0.7478 0.7994
0.297 12.0 120 0.6955 {'precision': 0.708779443254818, 'recall': 0.8182941903584673, 'f1': 0.759609868043603, 'number': 809} {'precision': 0.291044776119403, 'recall': 0.3277310924369748, 'f1': 0.308300395256917, 'number': 119} {'precision': 0.783978397839784, 'recall': 0.8178403755868544, 'f1': 0.8005514705882352, 'number': 1065} 0.7214 0.7888 0.7536 0.8103
0.2907 13.0 130 0.7098 {'precision': 0.7092511013215859, 'recall': 0.796044499381953, 'f1': 0.7501456027955737, 'number': 809} {'precision': 0.3142857142857143, 'recall': 0.3697478991596639, 'f1': 0.33976833976833976, 'number': 119} {'precision': 0.7896678966789668, 'recall': 0.8037558685446009, 'f1': 0.796649604467194, 'number': 1065} 0.7242 0.7747 0.7486 0.8052
0.2701 14.0 140 0.7006 {'precision': 0.7133479212253829, 'recall': 0.8059332509270705, 'f1': 0.7568195008705745, 'number': 809} {'precision': 0.3037037037037037, 'recall': 0.3445378151260504, 'f1': 0.3228346456692913, 'number': 119} {'precision': 0.7894736842105263, 'recall': 0.8169014084507042, 'f1': 0.8029533917858791, 'number': 1065} 0.7266 0.7842 0.7543 0.8091
0.2649 15.0 150 0.7011 {'precision': 0.7142857142857143, 'recall': 0.8096415327564895, 'f1': 0.7589803012746235, 'number': 809} {'precision': 0.2962962962962963, 'recall': 0.33613445378151263, 'f1': 0.31496062992125984, 'number': 119} {'precision': 0.7859712230215827, 'recall': 0.8206572769953052, 'f1': 0.8029398254478639, 'number': 1065} 0.7250 0.7873 0.7549 0.8102

Framework versions

  • Transformers 4.32.0
  • Pytorch 2.0.1+cu118
  • Datasets 2.14.4
  • Tokenizers 0.13.3
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.

Model tree for mouadhamri/layoutlm-funsd

Finetuned
(135)
this model