File size: 7,106 Bytes
00f4a0d
 
 
 
 
 
113fc20
00f4a0d
 
 
 
 
 
 
 
 
 
113fc20
00f4a0d
62cbb70
 
 
 
 
113fc20
62cbb70
 
00f4a0d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bea9526
00f4a0d
 
 
 
62cbb70
 
 
 
 
 
 
 
 
 
 
 
00f4a0d
 
 
 
 
 
 
 
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
---
license: mit
base_model: microsoft/layoutlm-base-uncased
tags:
- generated_from_trainer
datasets:
- funsd
model-index:
- name: layoutlm-funsd1
  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-funsd1

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: 0.6576
- Answer: {'precision': 0.6760869565217391, 'recall': 0.7688504326328801, 'f1': 0.719491035280509, 'number': 809}
- Header: {'precision': 0.29473684210526313, 'recall': 0.23529411764705882, 'f1': 0.2616822429906542, 'number': 119}
- Question: {'precision': 0.7385398981324278, 'recall': 0.8169014084507042, 'f1': 0.7757467677218011, 'number': 1065}
- Overall Precision: 0.6931
- Overall Recall: 0.7627
- Overall F1: 0.7262
- Overall Accuracy: 0.7966

## 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: 10
- 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.8473        | 1.0   | 10   | 1.5928          | {'precision': 0.018163471241170535, 'recall': 0.022249690976514216, 'f1': 0.020000000000000004, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119}                                                   | {'precision': 0.22706209453197404, 'recall': 0.2300469483568075, 'f1': 0.228544776119403, 'number': 1065} | 0.1271            | 0.1320         | 0.1295     | 0.3941           |
| 1.4704        | 2.0   | 20   | 1.2787          | {'precision': 0.11602870813397129, 'recall': 0.11990111248454882, 'f1': 0.11793313069908813, 'number': 809}    | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119}                                                   | {'precision': 0.4026946107784431, 'recall': 0.5051643192488263, 'f1': 0.4481466055810079, 'number': 1065} | 0.2924            | 0.3186         | 0.3049     | 0.5625           |
| 1.1341        | 3.0   | 30   | 1.0026          | {'precision': 0.3333333333333333, 'recall': 0.33127317676143386, 'f1': 0.33230006199628026, 'number': 809}     | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119}                                                   | {'precision': 0.5989804587935429, 'recall': 0.6619718309859155, 'f1': 0.6289027653880465, 'number': 1065} | 0.4831            | 0.4882         | 0.4857     | 0.6604           |
| 0.8967        | 4.0   | 40   | 0.8387          | {'precision': 0.571563981042654, 'recall': 0.7453646477132262, 'f1': 0.6469957081545066, 'number': 809}        | {'precision': 0.06976744186046512, 'recall': 0.025210084033613446, 'f1': 0.037037037037037035, 'number': 119} | {'precision': 0.6548748921484038, 'recall': 0.7126760563380282, 'f1': 0.6825539568345323, 'number': 1065} | 0.6048            | 0.6849         | 0.6424     | 0.7382           |
| 0.723         | 5.0   | 50   | 0.7520          | {'precision': 0.5984174085064293, 'recall': 0.7478368355995055, 'f1': 0.6648351648351648, 'number': 809}       | {'precision': 0.1935483870967742, 'recall': 0.10084033613445378, 'f1': 0.13259668508287292, 'number': 119}    | {'precision': 0.6901041666666666, 'recall': 0.7464788732394366, 'f1': 0.7171853856562922, 'number': 1065} | 0.6346            | 0.7085         | 0.6695     | 0.7621           |
| 0.6196        | 6.0   | 60   | 0.7171          | {'precision': 0.6231003039513677, 'recall': 0.7601977750309024, 'f1': 0.6848552338530067, 'number': 809}       | {'precision': 0.2125, 'recall': 0.14285714285714285, 'f1': 0.1708542713567839, 'number': 119}                 | {'precision': 0.7221238938053097, 'recall': 0.7661971830985915, 'f1': 0.743507972665148, 'number': 1065}  | 0.6591            | 0.7265         | 0.6912     | 0.7734           |
| 0.5747        | 7.0   | 70   | 0.6993          | {'precision': 0.6506410256410257, 'recall': 0.7527812113720643, 'f1': 0.6979942693409743, 'number': 809}       | {'precision': 0.2558139534883721, 'recall': 0.18487394957983194, 'f1': 0.21463414634146344, 'number': 119}    | {'precision': 0.6894060995184591, 'recall': 0.8065727699530516, 'f1': 0.7434011250540891, 'number': 1065} | 0.6570            | 0.7476         | 0.6994     | 0.7841           |
| 0.5292        | 8.0   | 80   | 0.6785          | {'precision': 0.6484536082474227, 'recall': 0.7775030902348579, 'f1': 0.7071388420460932, 'number': 809}       | {'precision': 0.29069767441860467, 'recall': 0.21008403361344538, 'f1': 0.24390243902439027, 'number': 119}   | {'precision': 0.7459893048128342, 'recall': 0.7859154929577464, 'f1': 0.7654320987654322, 'number': 1065} | 0.6846            | 0.7481         | 0.7149     | 0.7893           |
| 0.4862        | 9.0   | 90   | 0.6637          | {'precision': 0.658008658008658, 'recall': 0.7515451174289246, 'f1': 0.7016733987305251, 'number': 809}        | {'precision': 0.28125, 'recall': 0.226890756302521, 'f1': 0.2511627906976744, 'number': 119}                  | {'precision': 0.7287853577371048, 'recall': 0.8225352112676056, 'f1': 0.7728275253639171, 'number': 1065} | 0.6800            | 0.7582         | 0.7170     | 0.7931           |
| 0.4795        | 10.0  | 100  | 0.6576          | {'precision': 0.6760869565217391, 'recall': 0.7688504326328801, 'f1': 0.719491035280509, 'number': 809}        | {'precision': 0.29473684210526313, 'recall': 0.23529411764705882, 'f1': 0.2616822429906542, 'number': 119}    | {'precision': 0.7385398981324278, 'recall': 0.8169014084507042, 'f1': 0.7757467677218011, 'number': 1065} | 0.6931            | 0.7627         | 0.7262     | 0.7966           |


### Framework versions

- Transformers 4.41.2
- Pytorch 2.3.1+cu121
- Datasets 2.19.2
- Tokenizers 0.19.1