End of training
Browse files- README.md +81 -0
- logs/events.out.tfevents.1702960215.1565981e5c7c.1077.0 +2 -2
- preprocessor_config.json +8 -1
- 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,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: mit
|
3 |
+
base_model: microsoft/layoutlm-base-uncased
|
4 |
+
tags:
|
5 |
+
- generated_from_trainer
|
6 |
+
datasets:
|
7 |
+
- funsd
|
8 |
+
model-index:
|
9 |
+
- name: layoutlm-funsd-c
|
10 |
+
results: []
|
11 |
+
---
|
12 |
+
|
13 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
14 |
+
should probably proofread and complete it, then remove this comment. -->
|
15 |
+
|
16 |
+
# layoutlm-funsd-c
|
17 |
+
|
18 |
+
This model is a fine-tuned version of [microsoft/layoutlm-base-uncased](https://huggingface.co/microsoft/layoutlm-base-uncased) on the funsd dataset.
|
19 |
+
It achieves the following results on the evaluation set:
|
20 |
+
- Loss: 0.7152
|
21 |
+
- Answer: {'precision': 0.7134894091415831, 'recall': 0.7911001236093943, 'f1': 0.7502930832356389, 'number': 809}
|
22 |
+
- Header: {'precision': 0.31007751937984496, 'recall': 0.33613445378151263, 'f1': 0.3225806451612903, 'number': 119}
|
23 |
+
- Question: {'precision': 0.7805309734513274, 'recall': 0.828169014084507, 'f1': 0.8036446469248291, 'number': 1065}
|
24 |
+
- Overall Precision: 0.7245
|
25 |
+
- Overall Recall: 0.7837
|
26 |
+
- Overall F1: 0.7530
|
27 |
+
- Overall Accuracy: 0.8069
|
28 |
+
|
29 |
+
## Model description
|
30 |
+
|
31 |
+
More information needed
|
32 |
+
|
33 |
+
## Intended uses & limitations
|
34 |
+
|
35 |
+
More information needed
|
36 |
+
|
37 |
+
## Training and evaluation data
|
38 |
+
|
39 |
+
More information needed
|
40 |
+
|
41 |
+
## Training procedure
|
42 |
+
|
43 |
+
### Training hyperparameters
|
44 |
+
|
45 |
+
The following hyperparameters were used during training:
|
46 |
+
- learning_rate: 3e-05
|
47 |
+
- train_batch_size: 16
|
48 |
+
- eval_batch_size: 8
|
49 |
+
- seed: 42
|
50 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
51 |
+
- lr_scheduler_type: linear
|
52 |
+
- num_epochs: 15
|
53 |
+
- mixed_precision_training: Native AMP
|
54 |
+
|
55 |
+
### Training results
|
56 |
+
|
57 |
+
| Training Loss | Epoch | Step | Validation Loss | Answer | Header | Question | Overall Precision | Overall Recall | Overall F1 | Overall Accuracy |
|
58 |
+
|:-------------:|:-----:|:----:|:---------------:|:-------------------------------------------------------------------------------------------------------------:|:--------------------------------------------------------------------------------------------------------------:|:------------------------------------------------------------------------------------------------------------:|:-----------------:|:--------------:|:----------:|:----------------:|
|
59 |
+
| 1.7835 | 1.0 | 10 | 1.5696 | {'precision': 0.02753303964757709, 'recall': 0.030902348578491966, 'f1': 0.029120559114735003, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.23644444444444446, 'recall': 0.24976525821596243, 'f1': 0.24292237442922376, 'number': 1065} | 0.1431 | 0.1460 | 0.1446 | 0.4162 |
|
60 |
+
| 1.4134 | 2.0 | 20 | 1.2167 | {'precision': 0.15942028985507245, 'recall': 0.13597033374536466, 'f1': 0.1467645096731154, 'number': 809} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 119} | {'precision': 0.42325227963525835, 'recall': 0.5230046948356808, 'f1': 0.4678706425871483, 'number': 1065} | 0.3322 | 0.3347 | 0.3334 | 0.5768 |
|
61 |
+
| 1.0829 | 3.0 | 30 | 0.9351 | {'precision': 0.4783599088838269, 'recall': 0.519159456118665, 'f1': 0.4979253112033195, 'number': 809} | {'precision': 0.034482758620689655, 'recall': 0.008403361344537815, 'f1': 0.013513513513513513, 'number': 119} | {'precision': 0.6103896103896104, 'recall': 0.6619718309859155, 'f1': 0.6351351351351351, 'number': 1065} | 0.5461 | 0.5650 | 0.5554 | 0.7105 |
|
62 |
+
| 0.8077 | 4.0 | 40 | 0.7702 | {'precision': 0.6122233930453108, 'recall': 0.7181705809641533, 'f1': 0.6609783845278726, 'number': 809} | {'precision': 0.2033898305084746, 'recall': 0.10084033613445378, 'f1': 0.13483146067415733, 'number': 119} | {'precision': 0.6381631037212985, 'recall': 0.7568075117370892, 'f1': 0.6924398625429553, 'number': 1065} | 0.6160 | 0.7020 | 0.6562 | 0.7659 |
|
63 |
+
| 0.6407 | 5.0 | 50 | 0.7146 | {'precision': 0.6491978609625668, 'recall': 0.7503090234857849, 'f1': 0.6961009174311926, 'number': 809} | {'precision': 0.2948717948717949, 'recall': 0.19327731092436976, 'f1': 0.233502538071066, 'number': 119} | {'precision': 0.6921221864951769, 'recall': 0.8084507042253521, 'f1': 0.7457773928107406, 'number': 1065} | 0.6606 | 0.7481 | 0.7016 | 0.7869 |
|
64 |
+
| 0.5585 | 6.0 | 60 | 0.6995 | {'precision': 0.673866090712743, 'recall': 0.7713226205191595, 'f1': 0.7193083573487031, 'number': 809} | {'precision': 0.3372093023255814, 'recall': 0.24369747899159663, 'f1': 0.2829268292682927, 'number': 119} | {'precision': 0.7374784110535406, 'recall': 0.8018779342723005, 'f1': 0.768331084120558, 'number': 1065} | 0.6945 | 0.7561 | 0.7240 | 0.7948 |
|
65 |
+
| 0.4934 | 7.0 | 70 | 0.6852 | {'precision': 0.6681222707423581, 'recall': 0.7564894932014833, 'f1': 0.7095652173913044, 'number': 809} | {'precision': 0.37777777777777777, 'recall': 0.2857142857142857, 'f1': 0.3253588516746411, 'number': 119} | {'precision': 0.7634408602150538, 'recall': 0.8, 'f1': 0.7812929848693261, 'number': 1065} | 0.7059 | 0.7516 | 0.7281 | 0.7979 |
|
66 |
+
| 0.4384 | 8.0 | 80 | 0.6731 | {'precision': 0.6920492721164614, 'recall': 0.7639060568603214, 'f1': 0.7262044653349001, 'number': 809} | {'precision': 0.3008130081300813, 'recall': 0.31092436974789917, 'f1': 0.3057851239669422, 'number': 119} | {'precision': 0.7508503401360545, 'recall': 0.8291079812206573, 'f1': 0.788041053101294, 'number': 1065} | 0.7016 | 0.7717 | 0.7350 | 0.8021 |
|
67 |
+
| 0.3737 | 9.0 | 90 | 0.6766 | {'precision': 0.6993392070484582, 'recall': 0.7849196538936959, 'f1': 0.7396622015142692, 'number': 809} | {'precision': 0.2992125984251969, 'recall': 0.31932773109243695, 'f1': 0.30894308943089427, 'number': 119} | {'precision': 0.7890974084003575, 'recall': 0.8291079812206573, 'f1': 0.8086080586080587, 'number': 1065} | 0.7224 | 0.7807 | 0.7504 | 0.8046 |
|
68 |
+
| 0.341 | 10.0 | 100 | 0.6950 | {'precision': 0.6888888888888889, 'recall': 0.7663782447466008, 'f1': 0.7255705090696314, 'number': 809} | {'precision': 0.3619047619047619, 'recall': 0.31932773109243695, 'f1': 0.33928571428571425, 'number': 119} | {'precision': 0.7859030837004405, 'recall': 0.8375586854460094, 'f1': 0.8109090909090909, 'number': 1065} | 0.7243 | 0.7777 | 0.7501 | 0.8088 |
|
69 |
+
| 0.3178 | 11.0 | 110 | 0.6979 | {'precision': 0.7157534246575342, 'recall': 0.7750309023485785, 'f1': 0.7442136498516321, 'number': 809} | {'precision': 0.375, 'recall': 0.35294117647058826, 'f1': 0.3636363636363636, 'number': 119} | {'precision': 0.7805092186128183, 'recall': 0.8347417840375587, 'f1': 0.8067150635208712, 'number': 1065} | 0.7325 | 0.7817 | 0.7563 | 0.8059 |
|
70 |
+
| 0.2998 | 12.0 | 120 | 0.7019 | {'precision': 0.7027624309392265, 'recall': 0.7861557478368356, 'f1': 0.7421236872812136, 'number': 809} | {'precision': 0.32061068702290074, 'recall': 0.35294117647058826, 'f1': 0.336, 'number': 119} | {'precision': 0.7885816235504014, 'recall': 0.8300469483568075, 'f1': 0.808783165599268, 'number': 1065} | 0.7242 | 0.7837 | 0.7528 | 0.8069 |
|
71 |
+
| 0.2809 | 13.0 | 130 | 0.7056 | {'precision': 0.7177777777777777, 'recall': 0.7985166872682324, 'f1': 0.7559976594499708, 'number': 809} | {'precision': 0.3565217391304348, 'recall': 0.3445378151260504, 'f1': 0.3504273504273504, 'number': 119} | {'precision': 0.7911504424778761, 'recall': 0.8394366197183099, 'f1': 0.8145785876993167, 'number': 1065} | 0.7371 | 0.7933 | 0.7641 | 0.8097 |
|
72 |
+
| 0.2656 | 14.0 | 140 | 0.7117 | {'precision': 0.718609865470852, 'recall': 0.792336217552534, 'f1': 0.7536743092298648, 'number': 809} | {'precision': 0.33884297520661155, 'recall': 0.3445378151260504, 'f1': 0.3416666666666667, 'number': 119} | {'precision': 0.7888198757763976, 'recall': 0.8347417840375587, 'f1': 0.8111313868613138, 'number': 1065} | 0.7341 | 0.7883 | 0.7602 | 0.8098 |
|
73 |
+
| 0.2669 | 15.0 | 150 | 0.7152 | {'precision': 0.7134894091415831, 'recall': 0.7911001236093943, 'f1': 0.7502930832356389, 'number': 809} | {'precision': 0.31007751937984496, 'recall': 0.33613445378151263, 'f1': 0.3225806451612903, 'number': 119} | {'precision': 0.7805309734513274, 'recall': 0.828169014084507, 'f1': 0.8036446469248291, 'number': 1065} | 0.7245 | 0.7837 | 0.7530 | 0.8069 |
|
74 |
+
|
75 |
+
|
76 |
+
### Framework versions
|
77 |
+
|
78 |
+
- Transformers 4.35.2
|
79 |
+
- Pytorch 2.1.0+cu121
|
80 |
+
- Datasets 2.15.0
|
81 |
+
- Tokenizers 0.15.0
|
logs/events.out.tfevents.1702960215.1565981e5c7c.1077.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:cba28483044600da9a7aa1642c83487724930f0dbfa4b78d6644f56d5b92fc95
|
3 |
+
size 14596
|
preprocessor_config.json
CHANGED
@@ -2,6 +2,13 @@
|
|
2 |
"apply_ocr": true,
|
3 |
"do_resize": true,
|
4 |
"feature_extractor_type": "LayoutLMv2FeatureExtractor",
|
|
|
|
|
|
|
5 |
"resample": 2,
|
6 |
-
"size":
|
|
|
|
|
|
|
|
|
7 |
}
|
|
|
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
|
|