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.7960
  • Answer: {'precision': 0.7169603524229075, 'recall': 0.8046971569839307, 'f1': 0.7582993593476993, 'number': 809}
  • Header: {'precision': 0.36619718309859156, 'recall': 0.4369747899159664, 'f1': 0.39846743295019166, 'number': 119}
  • Question: {'precision': 0.7883408071748879, 'recall': 0.8253521126760563, 'f1': 0.8064220183486238, 'number': 1065}
  • Overall Precision: 0.7307
  • Overall Recall: 0.7938
  • Overall F1: 0.7609
  • Overall Accuracy: 0.8081

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: 6
  • eval_batch_size: 4
  • 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.6386 1.0 25 1.2949 {'precision': 0.08352668213457076, 'recall': 0.08899876390605686, 'f1': 0.08617594254937162, 'number': 809} {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} {'precision': 0.36874571624400276, 'recall': 0.5051643192488263, 'f1': 0.42630744849445323, 'number': 1065} 0.2628 0.3061 0.2828 0.5116
1.0433 2.0 50 0.8005 {'precision': 0.5965447154471545, 'recall': 0.7255871446229913, 'f1': 0.6547685443390964, 'number': 809} {'precision': 0.1111111111111111, 'recall': 0.058823529411764705, 'f1': 0.07692307692307691, 'number': 119} {'precision': 0.6574487065120428, 'recall': 0.692018779342723, 'f1': 0.6742909423604757, 'number': 1065} 0.6139 0.6678 0.6398 0.7293
0.6891 3.0 75 0.6695 {'precision': 0.6335650446871897, 'recall': 0.788627935723115, 'f1': 0.7026431718061674, 'number': 809} {'precision': 0.3246753246753247, 'recall': 0.21008403361344538, 'f1': 0.25510204081632654, 'number': 119} {'precision': 0.7085862966175195, 'recall': 0.7671361502347418, 'f1': 0.7366997294860236, 'number': 1065} 0.6616 0.7426 0.6998 0.7752
0.532 4.0 100 0.6270 {'precision': 0.6573787409700722, 'recall': 0.7873918417799752, 'f1': 0.7165354330708661, 'number': 809} {'precision': 0.2361111111111111, 'recall': 0.2857142857142857, 'f1': 0.25855513307984795, 'number': 119} {'precision': 0.7153284671532847, 'recall': 0.828169014084507, 'f1': 0.7676240208877285, 'number': 1065} 0.6620 0.7792 0.7158 0.7961
0.4184 5.0 125 0.6174 {'precision': 0.6837160751565762, 'recall': 0.8096415327564895, 'f1': 0.7413695529145445, 'number': 809} {'precision': 0.3063063063063063, 'recall': 0.2857142857142857, 'f1': 0.2956521739130435, 'number': 119} {'precision': 0.7734657039711191, 'recall': 0.8046948356807512, 'f1': 0.7887712839392544, 'number': 1065} 0.7102 0.7757 0.7415 0.8025
0.3264 6.0 150 0.6493 {'precision': 0.6905537459283387, 'recall': 0.7861557478368356, 'f1': 0.7352601156069365, 'number': 809} {'precision': 0.310126582278481, 'recall': 0.4117647058823529, 'f1': 0.35379061371841153, 'number': 119} {'precision': 0.7713523131672598, 'recall': 0.8140845070422535, 'f1': 0.7921425308359983, 'number': 1065} 0.7045 0.7787 0.7398 0.8008
0.2661 7.0 175 0.6587 {'precision': 0.6857440166493236, 'recall': 0.8145859085290482, 'f1': 0.7446327683615819, 'number': 809} {'precision': 0.32575757575757575, 'recall': 0.36134453781512604, 'f1': 0.3426294820717131, 'number': 119} {'precision': 0.7720970537261699, 'recall': 0.8366197183098592, 'f1': 0.8030644434429923, 'number': 1065} 0.7089 0.7993 0.7514 0.8038
0.2246 8.0 200 0.7115 {'precision': 0.7111356119073869, 'recall': 0.7972805933250927, 'f1': 0.7517482517482517, 'number': 809} {'precision': 0.2983425414364641, 'recall': 0.453781512605042, 'f1': 0.36, 'number': 119} {'precision': 0.7891402714932126, 'recall': 0.8187793427230047, 'f1': 0.8036866359447005, 'number': 1065} 0.7164 0.7883 0.7506 0.8074
0.1928 9.0 225 0.7130 {'precision': 0.7094668117519043, 'recall': 0.8059332509270705, 'f1': 0.7546296296296295, 'number': 809} {'precision': 0.3178294573643411, 'recall': 0.3445378151260504, 'f1': 0.33064516129032256, 'number': 119} {'precision': 0.7908025247971145, 'recall': 0.8234741784037559, 'f1': 0.8068077276908925, 'number': 1065} 0.7279 0.7878 0.7566 0.8042
0.1598 10.0 250 0.7375 {'precision': 0.7242937853107345, 'recall': 0.792336217552534, 'f1': 0.756788665879575, 'number': 809} {'precision': 0.375, 'recall': 0.42857142857142855, 'f1': 0.39999999999999997, 'number': 119} {'precision': 0.788858939802336, 'recall': 0.8244131455399061, 'f1': 0.8062442607897153, 'number': 1065} 0.7357 0.7878 0.7608 0.8099
0.1444 11.0 275 0.7719 {'precision': 0.7027896995708155, 'recall': 0.8096415327564895, 'f1': 0.7524411257897761, 'number': 809} {'precision': 0.34814814814814815, 'recall': 0.3949579831932773, 'f1': 0.3700787401574803, 'number': 119} {'precision': 0.7825311942959001, 'recall': 0.8244131455399061, 'f1': 0.8029263831732967, 'number': 1065} 0.7218 0.7928 0.7556 0.8008
0.1251 12.0 300 0.7758 {'precision': 0.7133479212253829, 'recall': 0.8059332509270705, 'f1': 0.7568195008705745, 'number': 809} {'precision': 0.38095238095238093, 'recall': 0.40336134453781514, 'f1': 0.39183673469387753, 'number': 119} {'precision': 0.7880434782608695, 'recall': 0.8169014084507042, 'f1': 0.8022130013831259, 'number': 1065} 0.7323 0.7878 0.7590 0.8077
0.1124 13.0 325 0.7878 {'precision': 0.7150776053215078, 'recall': 0.7972805933250927, 'f1': 0.7539450613676213, 'number': 809} {'precision': 0.38848920863309355, 'recall': 0.453781512605042, 'f1': 0.4186046511627907, 'number': 119} {'precision': 0.7922312556458898, 'recall': 0.8234741784037559, 'f1': 0.8075506445672191, 'number': 1065} 0.7337 0.7908 0.7612 0.8094
0.1077 14.0 350 0.7945 {'precision': 0.7136612021857923, 'recall': 0.8071693448702101, 'f1': 0.7575406032482598, 'number': 809} {'precision': 0.36619718309859156, 'recall': 0.4369747899159664, 'f1': 0.39846743295019166, 'number': 119} {'precision': 0.7887197851387645, 'recall': 0.8272300469483568, 'f1': 0.8075160403299725, 'number': 1065} 0.7295 0.7958 0.7612 0.8098
0.1001 15.0 375 0.7960 {'precision': 0.7169603524229075, 'recall': 0.8046971569839307, 'f1': 0.7582993593476993, 'number': 809} {'precision': 0.36619718309859156, 'recall': 0.4369747899159664, 'f1': 0.39846743295019166, 'number': 119} {'precision': 0.7883408071748879, 'recall': 0.8253521126760563, 'f1': 0.8064220183486238, 'number': 1065} 0.7307 0.7938 0.7609 0.8081

Framework versions

  • Transformers 4.28.1
  • Pytorch 2.0.0+cu117
  • Datasets 2.11.0
  • Tokenizers 0.13.3
Downloads last month
13
Safetensors
Model size
113M params
Tensor type
I64
·
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 alexneakameni/layoutlm-funsd

Finetuned
(135)
this model