End of training
Browse files- README.md +79 -0
- logs/events.out.tfevents.1703685730.dlmachine2.183757.0 +2 -2
- model.safetensors +1 -1
- preprocessor_config.json +14 -0
- special_tokens_map.json +37 -0
- tokenizer.json +0 -0
- tokenizer_config.json +80 -0
- vocab.txt +0 -0
README.md
ADDED
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: mit
|
3 |
+
base_model: microsoft/layoutlm-base-uncased
|
4 |
+
tags:
|
5 |
+
- generated_from_trainer
|
6 |
+
model-index:
|
7 |
+
- name: layoutlm-funsd
|
8 |
+
results: []
|
9 |
+
---
|
10 |
+
|
11 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
12 |
+
should probably proofread and complete it, then remove this comment. -->
|
13 |
+
|
14 |
+
# layoutlm-funsd
|
15 |
+
|
16 |
+
This model is a fine-tuned version of [microsoft/layoutlm-base-uncased](https://huggingface.co/microsoft/layoutlm-base-uncased) on an unknown dataset.
|
17 |
+
It achieves the following results on the evaluation set:
|
18 |
+
- Loss: 0.6794
|
19 |
+
- Answer: {'precision': 0.7050592034445641, 'recall': 0.8096415327564895, 'f1': 0.7537399309551209, 'number': 809}
|
20 |
+
- Header: {'precision': 0.2971014492753623, 'recall': 0.3445378151260504, 'f1': 0.31906614785992216, 'number': 119}
|
21 |
+
- Question: {'precision': 0.7856502242152467, 'recall': 0.8225352112676056, 'f1': 0.8036697247706422, 'number': 1065}
|
22 |
+
- Overall Precision: 0.7204
|
23 |
+
- Overall Recall: 0.7888
|
24 |
+
- Overall F1: 0.7531
|
25 |
+
- Overall Accuracy: 0.8043
|
26 |
+
|
27 |
+
## Model description
|
28 |
+
|
29 |
+
More information needed
|
30 |
+
|
31 |
+
## Intended uses & limitations
|
32 |
+
|
33 |
+
More information needed
|
34 |
+
|
35 |
+
## Training and evaluation data
|
36 |
+
|
37 |
+
More information needed
|
38 |
+
|
39 |
+
## Training procedure
|
40 |
+
|
41 |
+
### Training hyperparameters
|
42 |
+
|
43 |
+
The following hyperparameters were used during training:
|
44 |
+
- learning_rate: 3e-05
|
45 |
+
- train_batch_size: 16
|
46 |
+
- eval_batch_size: 8
|
47 |
+
- seed: 42
|
48 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
49 |
+
- lr_scheduler_type: linear
|
50 |
+
- num_epochs: 15
|
51 |
+
- mixed_precision_training: Native AMP
|
52 |
+
|
53 |
+
### Training results
|
54 |
+
|
55 |
+
| Training Loss | Epoch | Step | Validation Loss | Answer | Header | Question | Overall Precision | Overall Recall | Overall F1 | Overall Accuracy |
|
56 |
+
|:-------------:|:-----:|:----:|:---------------:|:-------------------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------------:|:----------------------------------------------------------------------------------------------------------:|:-----------------:|:--------------:|:----------:|:----------------:|
|
57 |
+
| 1.7235 | 1.0 | 10 | 1.5460 | {'precision': 0.024602026049204053, 'recall': 0.021013597033374538, 'f1': 0.02266666666666667, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.4123076923076923, 'recall': 0.2516431924882629, 'f1': 0.31253644314868806, 'number': 1065} | 0.2125 | 0.1430 | 0.1710 | 0.3788 |
|
58 |
+
| 1.407 | 2.0 | 20 | 1.2205 | {'precision': 0.15948777648428406, 'recall': 0.16934487021013597, 'f1': 0.1642685851318945, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.4168994413407821, 'recall': 0.5605633802816902, 'f1': 0.4781738085702843, 'number': 1065} | 0.3197 | 0.3683 | 0.3423 | 0.5851 |
|
59 |
+
| 1.0795 | 3.0 | 30 | 0.9267 | {'precision': 0.510934393638171, 'recall': 0.6353522867737948, 'f1': 0.5663911845730027, 'number': 809} | {'precision': 0.1111111111111111, 'recall': 0.04201680672268908, 'f1': 0.06097560975609755, 'number': 119} | {'precision': 0.5874476987447699, 'recall': 0.6591549295774648, 'f1': 0.6212389380530974, 'number': 1065} | 0.5436 | 0.6126 | 0.5761 | 0.7163 |
|
60 |
+
| 0.8244 | 4.0 | 40 | 0.7676 | {'precision': 0.6219758064516129, 'recall': 0.7626699629171817, 'f1': 0.6851749028317601, 'number': 809} | {'precision': 0.2191780821917808, 'recall': 0.13445378151260504, 'f1': 0.16666666666666669, 'number': 119} | {'precision': 0.6691666666666667, 'recall': 0.7539906103286385, 'f1': 0.7090507726269316, 'number': 1065} | 0.6340 | 0.7205 | 0.6745 | 0.7652 |
|
61 |
+
| 0.6702 | 5.0 | 50 | 0.7059 | {'precision': 0.6361848574237955, 'recall': 0.799752781211372, 'f1': 0.7086527929901425, 'number': 809} | {'precision': 0.25773195876288657, 'recall': 0.21008403361344538, 'f1': 0.23148148148148145, 'number': 119} | {'precision': 0.7138018628281118, 'recall': 0.7915492957746478, 'f1': 0.7506678539626003, 'number': 1065} | 0.6601 | 0.7602 | 0.7066 | 0.7714 |
|
62 |
+
| 0.5695 | 6.0 | 60 | 0.6803 | {'precision': 0.6496424923391215, 'recall': 0.7861557478368356, 'f1': 0.7114093959731544, 'number': 809} | {'precision': 0.25, 'recall': 0.2184873949579832, 'f1': 0.23318385650224216, 'number': 119} | {'precision': 0.7203098106712564, 'recall': 0.7859154929577464, 'f1': 0.7516838796587336, 'number': 1065} | 0.6677 | 0.7521 | 0.7074 | 0.7823 |
|
63 |
+
| 0.5039 | 7.0 | 70 | 0.6660 | {'precision': 0.6928034371643395, 'recall': 0.7972805933250927, 'f1': 0.7413793103448275, 'number': 809} | {'precision': 0.2222222222222222, 'recall': 0.2689075630252101, 'f1': 0.24334600760456274, 'number': 119} | {'precision': 0.7471466198419666, 'recall': 0.7990610328638498, 'f1': 0.7722323049001815, 'number': 1065} | 0.6902 | 0.7667 | 0.7264 | 0.7893 |
|
64 |
+
| 0.4396 | 8.0 | 80 | 0.6420 | {'precision': 0.6763485477178424, 'recall': 0.8059332509270705, 'f1': 0.7354765933446138, 'number': 809} | {'precision': 0.23484848484848486, 'recall': 0.2605042016806723, 'f1': 0.24701195219123506, 'number': 119} | {'precision': 0.7559523809523809, 'recall': 0.8347417840375587, 'f1': 0.7933958054439983, 'number': 1065} | 0.6919 | 0.7888 | 0.7372 | 0.7965 |
|
65 |
+
| 0.3747 | 9.0 | 90 | 0.6437 | {'precision': 0.6881606765327696, 'recall': 0.8046971569839307, 'f1': 0.7418803418803418, 'number': 809} | {'precision': 0.22535211267605634, 'recall': 0.2689075630252101, 'f1': 0.24521072796934865, 'number': 119} | {'precision': 0.7732506643046945, 'recall': 0.819718309859155, 'f1': 0.7958067456700091, 'number': 1065} | 0.7018 | 0.7807 | 0.7392 | 0.7979 |
|
66 |
+
| 0.3415 | 10.0 | 100 | 0.6580 | {'precision': 0.69989281886388, 'recall': 0.8071693448702101, 'f1': 0.7497129735935705, 'number': 809} | {'precision': 0.23076923076923078, 'recall': 0.25210084033613445, 'f1': 0.24096385542168675, 'number': 119} | {'precision': 0.7621527777777778, 'recall': 0.8244131455399061, 'f1': 0.7920613441587732, 'number': 1065} | 0.7047 | 0.7832 | 0.7419 | 0.8022 |
|
67 |
+
| 0.3206 | 11.0 | 110 | 0.6671 | {'precision': 0.7009544008483564, 'recall': 0.8170580964153276, 'f1': 0.754566210045662, 'number': 809} | {'precision': 0.2624113475177305, 'recall': 0.31092436974789917, 'f1': 0.2846153846153846, 'number': 119} | {'precision': 0.7675628794449263, 'recall': 0.8309859154929577, 'f1': 0.7980162308385933, 'number': 1065} | 0.7076 | 0.7943 | 0.7485 | 0.7997 |
|
68 |
+
| 0.2974 | 12.0 | 120 | 0.6651 | {'precision': 0.7023809523809523, 'recall': 0.8022249690976514, 'f1': 0.7489901904212348, 'number': 809} | {'precision': 0.3, 'recall': 0.35294117647058826, 'f1': 0.3243243243243243, 'number': 119} | {'precision': 0.7784697508896797, 'recall': 0.8215962441314554, 'f1': 0.7994518044769301, 'number': 1065} | 0.7157 | 0.7858 | 0.7491 | 0.8040 |
|
69 |
+
| 0.2809 | 13.0 | 130 | 0.6796 | {'precision': 0.7013669821240799, 'recall': 0.8244746600741656, 'f1': 0.7579545454545454, 'number': 809} | {'precision': 0.273972602739726, 'recall': 0.33613445378151263, 'f1': 0.3018867924528302, 'number': 119} | {'precision': 0.770999115826702, 'recall': 0.8187793427230047, 'f1': 0.7941712204007287, 'number': 1065} | 0.7087 | 0.7923 | 0.7482 | 0.8014 |
|
70 |
+
| 0.2664 | 14.0 | 140 | 0.6777 | {'precision': 0.6993534482758621, 'recall': 0.8022249690976514, 'f1': 0.7472654001151412, 'number': 809} | {'precision': 0.2826086956521739, 'recall': 0.3277310924369748, 'f1': 0.3035019455252918, 'number': 119} | {'precision': 0.785204991087344, 'recall': 0.8272300469483568, 'f1': 0.8056698673982624, 'number': 1065} | 0.7171 | 0.7873 | 0.7505 | 0.8025 |
|
71 |
+
| 0.2685 | 15.0 | 150 | 0.6794 | {'precision': 0.7050592034445641, 'recall': 0.8096415327564895, 'f1': 0.7537399309551209, 'number': 809} | {'precision': 0.2971014492753623, 'recall': 0.3445378151260504, 'f1': 0.31906614785992216, 'number': 119} | {'precision': 0.7856502242152467, 'recall': 0.8225352112676056, 'f1': 0.8036697247706422, 'number': 1065} | 0.7204 | 0.7888 | 0.7531 | 0.8043 |
|
72 |
+
|
73 |
+
|
74 |
+
### Framework versions
|
75 |
+
|
76 |
+
- Transformers 4.36.2
|
77 |
+
- Pytorch 2.1.0+cu121
|
78 |
+
- Datasets 2.16.0
|
79 |
+
- Tokenizers 0.15.0
|
logs/events.out.tfevents.1703685730.dlmachine2.183757.0
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:cce80a601618b7a204954487d59ff7aa45c54c1b1227a42ac24464961de02683
|
3 |
+
size 14681
|
model.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 450558212
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5f6e5237ce11ff1a3c9e4bccd6c3a1d01d81fdb731abb4af2275859d03e22f6d
|
3 |
size 450558212
|
preprocessor_config.json
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"apply_ocr": true,
|
3 |
+
"do_resize": true,
|
4 |
+
"feature_extractor_type": "LayoutLMv2FeatureExtractor",
|
5 |
+
"image_processor_type": "LayoutLMv2ImageProcessor",
|
6 |
+
"ocr_lang": null,
|
7 |
+
"processor_class": "LayoutLMv2Processor",
|
8 |
+
"resample": 2,
|
9 |
+
"size": {
|
10 |
+
"height": 224,
|
11 |
+
"width": 224
|
12 |
+
},
|
13 |
+
"tesseract_config": ""
|
14 |
+
}
|
special_tokens_map.json
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"cls_token": {
|
3 |
+
"content": "[CLS]",
|
4 |
+
"lstrip": false,
|
5 |
+
"normalized": false,
|
6 |
+
"rstrip": false,
|
7 |
+
"single_word": false
|
8 |
+
},
|
9 |
+
"mask_token": {
|
10 |
+
"content": "[MASK]",
|
11 |
+
"lstrip": false,
|
12 |
+
"normalized": false,
|
13 |
+
"rstrip": false,
|
14 |
+
"single_word": false
|
15 |
+
},
|
16 |
+
"pad_token": {
|
17 |
+
"content": "[PAD]",
|
18 |
+
"lstrip": false,
|
19 |
+
"normalized": false,
|
20 |
+
"rstrip": false,
|
21 |
+
"single_word": false
|
22 |
+
},
|
23 |
+
"sep_token": {
|
24 |
+
"content": "[SEP]",
|
25 |
+
"lstrip": false,
|
26 |
+
"normalized": false,
|
27 |
+
"rstrip": false,
|
28 |
+
"single_word": false
|
29 |
+
},
|
30 |
+
"unk_token": {
|
31 |
+
"content": "[UNK]",
|
32 |
+
"lstrip": false,
|
33 |
+
"normalized": false,
|
34 |
+
"rstrip": false,
|
35 |
+
"single_word": false
|
36 |
+
}
|
37 |
+
}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"added_tokens_decoder": {
|
3 |
+
"0": {
|
4 |
+
"content": "[PAD]",
|
5 |
+
"lstrip": false,
|
6 |
+
"normalized": false,
|
7 |
+
"rstrip": false,
|
8 |
+
"single_word": false,
|
9 |
+
"special": true
|
10 |
+
},
|
11 |
+
"100": {
|
12 |
+
"content": "[UNK]",
|
13 |
+
"lstrip": false,
|
14 |
+
"normalized": false,
|
15 |
+
"rstrip": false,
|
16 |
+
"single_word": false,
|
17 |
+
"special": true
|
18 |
+
},
|
19 |
+
"101": {
|
20 |
+
"content": "[CLS]",
|
21 |
+
"lstrip": false,
|
22 |
+
"normalized": false,
|
23 |
+
"rstrip": false,
|
24 |
+
"single_word": false,
|
25 |
+
"special": true
|
26 |
+
},
|
27 |
+
"102": {
|
28 |
+
"content": "[SEP]",
|
29 |
+
"lstrip": false,
|
30 |
+
"normalized": false,
|
31 |
+
"rstrip": false,
|
32 |
+
"single_word": false,
|
33 |
+
"special": true
|
34 |
+
},
|
35 |
+
"103": {
|
36 |
+
"content": "[MASK]",
|
37 |
+
"lstrip": false,
|
38 |
+
"normalized": false,
|
39 |
+
"rstrip": false,
|
40 |
+
"single_word": false,
|
41 |
+
"special": true
|
42 |
+
}
|
43 |
+
},
|
44 |
+
"additional_special_tokens": [],
|
45 |
+
"apply_ocr": false,
|
46 |
+
"clean_up_tokenization_spaces": true,
|
47 |
+
"cls_token": "[CLS]",
|
48 |
+
"cls_token_box": [
|
49 |
+
0,
|
50 |
+
0,
|
51 |
+
0,
|
52 |
+
0
|
53 |
+
],
|
54 |
+
"do_basic_tokenize": true,
|
55 |
+
"do_lower_case": true,
|
56 |
+
"mask_token": "[MASK]",
|
57 |
+
"model_max_length": 512,
|
58 |
+
"never_split": null,
|
59 |
+
"only_label_first_subword": true,
|
60 |
+
"pad_token": "[PAD]",
|
61 |
+
"pad_token_box": [
|
62 |
+
0,
|
63 |
+
0,
|
64 |
+
0,
|
65 |
+
0
|
66 |
+
],
|
67 |
+
"pad_token_label": -100,
|
68 |
+
"processor_class": "LayoutLMv2Processor",
|
69 |
+
"sep_token": "[SEP]",
|
70 |
+
"sep_token_box": [
|
71 |
+
1000,
|
72 |
+
1000,
|
73 |
+
1000,
|
74 |
+
1000
|
75 |
+
],
|
76 |
+
"strip_accents": null,
|
77 |
+
"tokenize_chinese_chars": true,
|
78 |
+
"tokenizer_class": "LayoutLMv2Tokenizer",
|
79 |
+
"unk_token": "[UNK]"
|
80 |
+
}
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|