--- license: mit base_model: microsoft/layoutlm-base-uncased tags: - generated_from_trainer datasets: - funsd model-index: - name: layoutlm-funsd results: [] --- # layoutlm-funsd This model is a fine-tuned version of [microsoft/layoutlm-base-uncased](https://huggingface.co/microsoft/layoutlm-base-uncased) on the funsd dataset. It achieves the following results on the evaluation set: - Loss: 1.1246 - Answer: {'precision': 0.3804878048780488, 'recall': 0.4820766378244747, 'f1': 0.425299890948746, 'number': 809} - Header: {'precision': 0.34408602150537637, 'recall': 0.2689075630252101, 'f1': 0.3018867924528302, 'number': 119} - Question: {'precision': 0.4845360824742268, 'recall': 0.6178403755868545, 'f1': 0.5431283532810565, 'number': 1065} - Overall Precision: 0.4362 - Overall Recall: 0.5419 - Overall F1: 0.4833 - Overall Accuracy: 0.6171 ## 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.7202 | 1.0 | 10 | 1.4980 | {'precision': 0.05310734463276836, 'recall': 0.0580964153275649, 'f1': 0.05548996458087367, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.26246719160104987, 'recall': 0.28169014084507044, 'f1': 0.27173913043478265, 'number': 1065} | 0.1711 | 0.1741 | 0.1726 | 0.3625 | | 1.4151 | 2.0 | 20 | 1.3029 | {'precision': 0.19834183673469388, 'recall': 0.38442521631644005, 'f1': 0.26167437946992006, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.266388557806913, 'recall': 0.4197183098591549, 'f1': 0.32592052497265767, 'number': 1065} | 0.2325 | 0.3803 | 0.2886 | 0.4280 | | 1.259 | 3.0 | 30 | 1.1884 | {'precision': 0.2627235213204952, 'recall': 0.4721878862793572, 'f1': 0.3376049491825011, 'number': 809} | {'precision': 0.06349206349206349, 'recall': 0.03361344537815126, 'f1': 0.04395604395604396, 'number': 119} | {'precision': 0.3270588235294118, 'recall': 0.5220657276995305, 'f1': 0.4021699819168174, 'number': 1065} | 0.2928 | 0.4727 | 0.3616 | 0.4939 | | 1.1328 | 4.0 | 40 | 1.0951 | {'precision': 0.30996309963099633, 'recall': 0.519159456118665, 'f1': 0.3881700554528651, 'number': 809} | {'precision': 0.2857142857142857, 'recall': 0.18487394957983194, 'f1': 0.22448979591836735, 'number': 119} | {'precision': 0.4103139013452915, 'recall': 0.5154929577464789, 'f1': 0.4569288389513109, 'number': 1065} | 0.3578 | 0.4972 | 0.4161 | 0.5748 | | 1.0223 | 5.0 | 50 | 1.0810 | {'precision': 0.28736581337737405, 'recall': 0.43016069221260816, 'f1': 0.3445544554455445, 'number': 809} | {'precision': 0.37142857142857144, 'recall': 0.2184873949579832, 'f1': 0.2751322751322751, 'number': 119} | {'precision': 0.38396624472573837, 'recall': 0.5981220657276995, 'f1': 0.4676945668135095, 'number': 1065} | 0.3439 | 0.5073 | 0.4099 | 0.5856 | | 0.9408 | 6.0 | 60 | 1.0602 | {'precision': 0.3160667251975417, 'recall': 0.44499381953028433, 'f1': 0.3696098562628337, 'number': 809} | {'precision': 0.345679012345679, 'recall': 0.23529411764705882, 'f1': 0.27999999999999997, 'number': 119} | {'precision': 0.4154838709677419, 'recall': 0.6046948356807512, 'f1': 0.49254302103250486, 'number': 1065} | 0.3726 | 0.5178 | 0.4333 | 0.5983 | | 0.8629 | 7.0 | 70 | 1.0853 | {'precision': 0.3160220994475138, 'recall': 0.3535228677379481, 'f1': 0.33372228704784135, 'number': 809} | {'precision': 0.375, 'recall': 0.2773109243697479, 'f1': 0.31884057971014496, 'number': 119} | {'precision': 0.42748091603053434, 'recall': 0.6309859154929578, 'f1': 0.50967007963595, 'number': 1065} | 0.3864 | 0.4972 | 0.4348 | 0.5961 | | 0.8089 | 8.0 | 80 | 1.0864 | {'precision': 0.35083114610673666, 'recall': 0.4956736711990111, 'f1': 0.4108606557377049, 'number': 809} | {'precision': 0.36904761904761907, 'recall': 0.2605042016806723, 'f1': 0.30541871921182273, 'number': 119} | {'precision': 0.4398051496172582, 'recall': 0.5934272300469483, 'f1': 0.5051958433253397, 'number': 1065} | 0.3994 | 0.5339 | 0.4569 | 0.6110 | | 0.7662 | 9.0 | 90 | 1.0967 | {'precision': 0.36006974716652135, 'recall': 0.5105067985166872, 'f1': 0.42229038854805717, 'number': 809} | {'precision': 0.4266666666666667, 'recall': 0.2689075630252101, 'f1': 0.32989690721649484, 'number': 119} | {'precision': 0.4724770642201835, 'recall': 0.5802816901408451, 'f1': 0.5208596713021492, 'number': 1065} | 0.4202 | 0.5334 | 0.4700 | 0.6115 | | 0.7718 | 10.0 | 100 | 1.1450 | {'precision': 0.375, 'recall': 0.5414091470951793, 'f1': 0.44309559939301973, 'number': 809} | {'precision': 0.4050632911392405, 'recall': 0.2689075630252101, 'f1': 0.3232323232323232, 'number': 119} | {'precision': 0.5078125, 'recall': 0.5492957746478874, 'f1': 0.5277401894451962, 'number': 1065} | 0.4398 | 0.5294 | 0.4804 | 0.6057 | | 0.6988 | 11.0 | 110 | 1.1180 | {'precision': 0.36609829488465395, 'recall': 0.4511742892459827, 'f1': 0.4042081949058693, 'number': 809} | {'precision': 0.3333333333333333, 'recall': 0.2689075630252101, 'f1': 0.29767441860465116, 'number': 119} | {'precision': 0.4661602209944751, 'recall': 0.6338028169014085, 'f1': 0.5372065260644648, 'number': 1065} | 0.4219 | 0.5379 | 0.4729 | 0.6089 | | 0.6905 | 12.0 | 120 | 1.1064 | {'precision': 0.36837029893924783, 'recall': 0.4721878862793572, 'f1': 0.41386782231852653, 'number': 809} | {'precision': 0.3793103448275862, 'recall': 0.2773109243697479, 'f1': 0.32038834951456313, 'number': 119} | {'precision': 0.47112676056338026, 'recall': 0.6281690140845071, 'f1': 0.5384305835010061, 'number': 1065} | 0.4261 | 0.5439 | 0.4778 | 0.6149 | | 0.666 | 13.0 | 130 | 1.1045 | {'precision': 0.36981132075471695, 'recall': 0.484548825710754, 'f1': 0.4194756554307116, 'number': 809} | {'precision': 0.3516483516483517, 'recall': 0.2689075630252101, 'f1': 0.3047619047619048, 'number': 119} | {'precision': 0.48205128205128206, 'recall': 0.6178403755868545, 'f1': 0.5415637860082304, 'number': 1065} | 0.4300 | 0.5429 | 0.4799 | 0.6174 | | 0.6335 | 14.0 | 140 | 1.1195 | {'precision': 0.3810463968410661, 'recall': 0.47713226205191595, 'f1': 0.42371020856201974, 'number': 809} | {'precision': 0.34831460674157305, 'recall': 0.2605042016806723, 'f1': 0.2980769230769231, 'number': 119} | {'precision': 0.4817204301075269, 'recall': 0.6309859154929578, 'f1': 0.5463414634146342, 'number': 1065} | 0.4361 | 0.5464 | 0.4851 | 0.6187 | | 0.6277 | 15.0 | 150 | 1.1246 | {'precision': 0.3804878048780488, 'recall': 0.4820766378244747, 'f1': 0.425299890948746, 'number': 809} | {'precision': 0.34408602150537637, 'recall': 0.2689075630252101, 'f1': 0.3018867924528302, 'number': 119} | {'precision': 0.4845360824742268, 'recall': 0.6178403755868545, 'f1': 0.5431283532810565, 'number': 1065} | 0.4362 | 0.5419 | 0.4833 | 0.6171 | ### Framework versions - Transformers 4.38.2 - Pytorch 2.2.1+cu121 - Datasets 2.18.0 - Tokenizers 0.15.2