File size: 9,386 Bytes
6b0009a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
---
license: mit
base_model: microsoft/layoutlm-base-uncased
tags:
- generated_from_trainer
model-index:
- name: layoutlm-funsd
  results: []
---

<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->

# layoutlm-funsd

This model is a fine-tuned version of [microsoft/layoutlm-base-uncased](https://huggingface.co/microsoft/layoutlm-base-uncased) on an unknown dataset.
It achieves the following results on the evaluation set:
- Loss: 0.7180
- Answer: {'precision': 0.7269700332963374, 'recall': 0.8096415327564895, 'f1': 0.7660818713450291, 'number': 809}
- Header: {'precision': 0.2992125984251969, 'recall': 0.31932773109243695, 'f1': 0.30894308943089427, 'number': 119}
- Question: {'precision': 0.7881205673758865, 'recall': 0.8347417840375587, 'f1': 0.8107615139078888, 'number': 1065}
- Overall Precision: 0.7338
- Overall Recall: 0.7938
- Overall F1: 0.7626
- Overall Accuracy: 0.8036

## 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.7814        | 1.0   | 10   | 1.5919          | {'precision': 0.015602836879432624, 'recall': 0.013597033374536464, 'f1': 0.01453104359313078, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119}                                                    | {'precision': 0.14666666666666667, 'recall': 0.09295774647887324, 'f1': 0.11379310344827587, 'number': 1065} | 0.0797            | 0.0552         | 0.0652     | 0.3502           |
| 1.446         | 2.0   | 20   | 1.2482          | {'precision': 0.15749235474006115, 'recall': 0.1273176761433869, 'f1': 0.14080656185919346, 'number': 809}    | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119}                                                    | {'precision': 0.45069393718042366, 'recall': 0.5793427230046948, 'f1': 0.5069843878389482, 'number': 1065}   | 0.3559            | 0.3613         | 0.3586     | 0.5919           |
| 1.0955        | 3.0   | 30   | 0.9653          | {'precision': 0.44740024183796856, 'recall': 0.4573547589616811, 'f1': 0.45232273838630804, 'number': 809}    | {'precision': 0.030303030303030304, 'recall': 0.008403361344537815, 'f1': 0.013157894736842105, 'number': 119} | {'precision': 0.5621703089675961, 'recall': 0.7004694835680751, 'f1': 0.6237458193979933, 'number': 1065}    | 0.5107            | 0.5605         | 0.5344     | 0.7004           |
| 0.8413        | 4.0   | 40   | 0.8063          | {'precision': 0.6070686070686071, 'recall': 0.7218788627935723, 'f1': 0.6595143986448335, 'number': 809}      | {'precision': 0.1111111111111111, 'recall': 0.05042016806722689, 'f1': 0.06936416184971099, 'number': 119}     | {'precision': 0.6669527896995708, 'recall': 0.7295774647887324, 'f1': 0.6968609865470853, 'number': 1065}    | 0.6268            | 0.6859         | 0.6550     | 0.7495           |
| 0.6708        | 5.0   | 50   | 0.7123          | {'precision': 0.6703539823008849, 'recall': 0.7490729295426453, 'f1': 0.7075306479859895, 'number': 809}      | {'precision': 0.11458333333333333, 'recall': 0.09243697478991597, 'f1': 0.10232558139534885, 'number': 119}    | {'precision': 0.6787401574803149, 'recall': 0.8093896713615023, 'f1': 0.7383297644539615, 'number': 1065}    | 0.6515            | 0.7421         | 0.6939     | 0.7841           |
| 0.566         | 6.0   | 60   | 0.7005          | {'precision': 0.6466466466466466, 'recall': 0.7985166872682324, 'f1': 0.7146017699115044, 'number': 809}      | {'precision': 0.13725490196078433, 'recall': 0.11764705882352941, 'f1': 0.12669683257918554, 'number': 119}    | {'precision': 0.7279151943462897, 'recall': 0.7737089201877935, 'f1': 0.7501137915339099, 'number': 1065}    | 0.6646            | 0.7446         | 0.7023     | 0.7826           |
| 0.4969        | 7.0   | 70   | 0.6764          | {'precision': 0.6817691477885652, 'recall': 0.7812113720642769, 'f1': 0.7281105990783411, 'number': 809}      | {'precision': 0.21666666666666667, 'recall': 0.2184873949579832, 'f1': 0.21757322175732216, 'number': 119}     | {'precision': 0.7367521367521368, 'recall': 0.8093896713615023, 'f1': 0.7713646532438478, 'number': 1065}    | 0.6856            | 0.7627         | 0.7221     | 0.7950           |
| 0.4295        | 8.0   | 80   | 0.6735          | {'precision': 0.7071823204419889, 'recall': 0.7911001236093943, 'f1': 0.7467911318553092, 'number': 809}      | {'precision': 0.21311475409836064, 'recall': 0.2184873949579832, 'f1': 0.21576763485477177, 'number': 119}     | {'precision': 0.7489397794741306, 'recall': 0.8291079812206573, 'f1': 0.78698752228164, 'number': 1065}      | 0.7022            | 0.7772         | 0.7378     | 0.7992           |
| 0.3774        | 9.0   | 90   | 0.6814          | {'precision': 0.7023809523809523, 'recall': 0.8022249690976514, 'f1': 0.7489901904212348, 'number': 809}      | {'precision': 0.2773109243697479, 'recall': 0.2773109243697479, 'f1': 0.2773109243697479, 'number': 119}       | {'precision': 0.7639372822299652, 'recall': 0.8234741784037559, 'f1': 0.7925892453682785, 'number': 1065}    | 0.7115            | 0.7822         | 0.7452     | 0.8047           |
| 0.3678        | 10.0  | 100  | 0.6885          | {'precision': 0.7193370165745856, 'recall': 0.8046971569839307, 'f1': 0.7596266044340723, 'number': 809}      | {'precision': 0.264, 'recall': 0.2773109243697479, 'f1': 0.27049180327868855, 'number': 119}                   | {'precision': 0.7690972222222222, 'recall': 0.831924882629108, 'f1': 0.799278304014434, 'number': 1065}      | 0.7195            | 0.7878         | 0.7521     | 0.8050           |
| 0.3137        | 11.0  | 110  | 0.6976          | {'precision': 0.7161572052401747, 'recall': 0.8108776266996292, 'f1': 0.7605797101449275, 'number': 809}      | {'precision': 0.27007299270072993, 'recall': 0.31092436974789917, 'f1': 0.2890625, 'number': 119}              | {'precision': 0.7719756309834639, 'recall': 0.8328638497652582, 'f1': 0.8012646793134598, 'number': 1065}    | 0.7175            | 0.7928         | 0.7533     | 0.8018           |
| 0.2983        | 12.0  | 120  | 0.6996          | {'precision': 0.7108433734939759, 'recall': 0.8022249690976514, 'f1': 0.7537746806039489, 'number': 809}      | {'precision': 0.304, 'recall': 0.31932773109243695, 'f1': 0.31147540983606553, 'number': 119}                  | {'precision': 0.7810283687943262, 'recall': 0.8272300469483568, 'f1': 0.8034655722754217, 'number': 1065}    | 0.7239            | 0.7868         | 0.7540     | 0.8029           |
| 0.2786        | 13.0  | 130  | 0.7114          | {'precision': 0.7172949002217295, 'recall': 0.799752781211372, 'f1': 0.7562828755113968, 'number': 809}       | {'precision': 0.29838709677419356, 'recall': 0.31092436974789917, 'f1': 0.3045267489711935, 'number': 119}     | {'precision': 0.7814977973568282, 'recall': 0.8328638497652582, 'f1': 0.8063636363636365, 'number': 1065}    | 0.7270            | 0.7883         | 0.7564     | 0.8019           |
| 0.2632        | 14.0  | 140  | 0.7151          | {'precision': 0.7256438969764838, 'recall': 0.8009888751545118, 'f1': 0.7614571092831962, 'number': 809}      | {'precision': 0.3064516129032258, 'recall': 0.31932773109243695, 'f1': 0.31275720164609055, 'number': 119}     | {'precision': 0.7858407079646018, 'recall': 0.8338028169014085, 'f1': 0.8091116173120729, 'number': 1065}    | 0.7331            | 0.7898         | 0.7604     | 0.8033           |
| 0.2668        | 15.0  | 150  | 0.7180          | {'precision': 0.7269700332963374, 'recall': 0.8096415327564895, 'f1': 0.7660818713450291, 'number': 809}      | {'precision': 0.2992125984251969, 'recall': 0.31932773109243695, 'f1': 0.30894308943089427, 'number': 119}     | {'precision': 0.7881205673758865, 'recall': 0.8347417840375587, 'f1': 0.8107615139078888, 'number': 1065}    | 0.7338            | 0.7938         | 0.7626     | 0.8036           |


### Framework versions

- Transformers 4.41.2
- Pytorch 2.3.1+cu121
- Tokenizers 0.19.1