End of training
Browse files- README.md +31 -30
- config.json +8 -14
- logs/events.out.tfevents.1740560490.f94f8b22d15e.422.0 +3 -0
- model.safetensors +2 -2
- tokenizer.json +2 -16
- tokenizer_config.json +8 -0
- training_args.bin +2 -2
README.md
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
---
|
|
|
|
| 2 |
license: mit
|
| 3 |
base_model: microsoft/layoutlm-base-uncased
|
| 4 |
tags:
|
|
@@ -17,14 +18,14 @@ should probably proofread and complete it, then remove this comment. -->
|
|
| 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:
|
| 21 |
-
-
|
| 22 |
-
-
|
| 23 |
-
-
|
| 24 |
-
- Overall Precision: 0.
|
| 25 |
-
- Overall Recall: 0.
|
| 26 |
-
- Overall F1: 0.
|
| 27 |
-
- Overall Accuracy: 0.
|
| 28 |
|
| 29 |
## Model description
|
| 30 |
|
|
@@ -47,35 +48,35 @@ The following hyperparameters were used during training:
|
|
| 47 |
- train_batch_size: 16
|
| 48 |
- eval_batch_size: 8
|
| 49 |
- seed: 42
|
| 50 |
-
- optimizer:
|
| 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 |
|
| 58 |
-
|
| 59 |
-
| 1.
|
| 60 |
-
| 1.
|
| 61 |
-
| 1.
|
| 62 |
-
|
|
| 63 |
-
|
|
| 64 |
-
|
|
| 65 |
-
| 0.
|
| 66 |
-
| 0.
|
| 67 |
-
| 0.
|
| 68 |
-
| 0.
|
| 69 |
-
| 0.
|
| 70 |
-
| 0.
|
| 71 |
-
| 0.
|
| 72 |
-
| 0.
|
| 73 |
-
| 0.
|
| 74 |
|
| 75 |
|
| 76 |
### Framework versions
|
| 77 |
|
| 78 |
-
- Transformers 4.
|
| 79 |
-
- Pytorch 2.
|
| 80 |
-
- Datasets
|
| 81 |
-
- Tokenizers 0.
|
|
|
|
| 1 |
---
|
| 2 |
+
library_name: transformers
|
| 3 |
license: mit
|
| 4 |
base_model: microsoft/layoutlm-base-uncased
|
| 5 |
tags:
|
|
|
|
| 18 |
|
| 19 |
This model is a fine-tuned version of [microsoft/layoutlm-base-uncased](https://huggingface.co/microsoft/layoutlm-base-uncased) on the funsd dataset.
|
| 20 |
It achieves the following results on the evaluation set:
|
| 21 |
+
- Loss: 0.7010
|
| 22 |
+
- Eader: {'precision': 0.20833333333333334, 'recall': 0.10416666666666667, 'f1': 0.1388888888888889, 'number': 96}
|
| 23 |
+
- Nswer: {'precision': 0.3401360544217687, 'recall': 0.5514705882352942, 'f1': 0.420757363253857, 'number': 272}
|
| 24 |
+
- Uestion: {'precision': 0.3463414634146341, 'recall': 0.46557377049180326, 'f1': 0.39720279720279716, 'number': 305}
|
| 25 |
+
- Overall Precision: 0.3359
|
| 26 |
+
- Overall Recall: 0.4487
|
| 27 |
+
- Overall F1: 0.3842
|
| 28 |
+
- Overall Accuracy: 0.7593
|
| 29 |
|
| 30 |
## Model description
|
| 31 |
|
|
|
|
| 48 |
- train_batch_size: 16
|
| 49 |
- eval_batch_size: 8
|
| 50 |
- seed: 42
|
| 51 |
+
- optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
|
| 52 |
- lr_scheduler_type: linear
|
| 53 |
- num_epochs: 15
|
| 54 |
- mixed_precision_training: Native AMP
|
| 55 |
|
| 56 |
### Training results
|
| 57 |
|
| 58 |
+
| Training Loss | Epoch | Step | Validation Loss | Eader | Nswer | Uestion | Overall Precision | Overall Recall | Overall F1 | Overall Accuracy |
|
| 59 |
+
|:-------------:|:-----:|:----:|:---------------:|:------------------------------------------------------------------------------------------------------------:|:------------------------------------------------------------------------------------------------------------:|:------------------------------------------------------------------------------------------------------------:|:-----------------:|:--------------:|:----------:|:----------------:|
|
| 60 |
+
| 1.3693 | 1.0 | 4 | 1.2778 | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 96} | {'precision': 0.010467980295566502, 'recall': 0.0625, 'f1': 0.017932489451476793, 'number': 272} | {'precision': 0.010113780025284451, 'recall': 0.05245901639344262, 'f1': 0.01695813460519343, 'number': 305} | 0.0102 | 0.0490 | 0.0168 | 0.4230 |
|
| 61 |
+
| 1.2081 | 2.0 | 8 | 1.1974 | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 96} | {'precision': 0.047841306884480746, 'recall': 0.15073529411764705, 'f1': 0.07263064658990256, 'number': 272} | {'precision': 0.05380116959064327, 'recall': 0.15081967213114755, 'f1': 0.0793103448275862, 'number': 305} | 0.0508 | 0.1293 | 0.0730 | 0.4805 |
|
| 62 |
+
| 1.0716 | 3.0 | 12 | 1.0999 | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 96} | {'precision': 0.08643457382953182, 'recall': 0.2647058823529412, 'f1': 0.13031674208144797, 'number': 272} | {'precision': 0.10704960835509138, 'recall': 0.26885245901639343, 'f1': 0.1531279178338002, 'number': 305} | 0.0963 | 0.2288 | 0.1356 | 0.5225 |
|
| 63 |
+
| 0.855 | 4.0 | 16 | 0.9899 | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 96} | {'precision': 0.11137440758293839, 'recall': 0.34558823529411764, 'f1': 0.16845878136200718, 'number': 272} | {'precision': 0.13172043010752688, 'recall': 0.32131147540983607, 'f1': 0.18684461391801713, 'number': 305} | 0.1209 | 0.2853 | 0.1698 | 0.5886 |
|
| 64 |
+
| 0.753 | 5.0 | 20 | 0.9095 | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 96} | {'precision': 0.1562043795620438, 'recall': 0.39338235294117646, 'f1': 0.22361546499477536, 'number': 272} | {'precision': 0.15538461538461537, 'recall': 0.33114754098360655, 'f1': 0.21151832460732983, 'number': 305} | 0.1558 | 0.3091 | 0.2072 | 0.6306 |
|
| 65 |
+
| 0.6212 | 6.0 | 24 | 0.8551 | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 96} | {'precision': 0.19864176570458403, 'recall': 0.43014705882352944, 'f1': 0.27177700348432055, 'number': 272} | {'precision': 0.19141323792486584, 'recall': 0.35081967213114756, 'f1': 0.2476851851851852, 'number': 305} | 0.1951 | 0.3328 | 0.2460 | 0.6520 |
|
| 66 |
+
| 0.637 | 7.0 | 28 | 0.7987 | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 96} | {'precision': 0.2270363951473137, 'recall': 0.48161764705882354, 'f1': 0.30859835100117783, 'number': 272} | {'precision': 0.22201492537313433, 'recall': 0.3901639344262295, 'f1': 0.28299643281807374, 'number': 305} | 0.2244 | 0.3715 | 0.2798 | 0.6884 |
|
| 67 |
+
| 0.5212 | 8.0 | 32 | 0.7621 | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 96} | {'precision': 0.260707635009311, 'recall': 0.5147058823529411, 'f1': 0.34610630407911, 'number': 272} | {'precision': 0.23529411764705882, 'recall': 0.380327868852459, 'f1': 0.2907268170426065, 'number': 305} | 0.2471 | 0.3804 | 0.2996 | 0.7189 |
|
| 68 |
+
| 0.4969 | 9.0 | 36 | 0.7494 | {'precision': 0.06666666666666667, 'recall': 0.010416666666666666, 'f1': 0.018018018018018014, 'number': 96} | {'precision': 0.283203125, 'recall': 0.5330882352941176, 'f1': 0.36989795918367346, 'number': 272} | {'precision': 0.2857142857142857, 'recall': 0.4131147540983607, 'f1': 0.3378016085790885, 'number': 305} | 0.2810 | 0.4042 | 0.3315 | 0.7331 |
|
| 69 |
+
| 0.4764 | 10.0 | 40 | 0.7321 | {'precision': 0.21428571428571427, 'recall': 0.0625, 'f1': 0.09677419354838708, 'number': 96} | {'precision': 0.302713987473904, 'recall': 0.5330882352941176, 'f1': 0.38615179760319573, 'number': 272} | {'precision': 0.3036529680365297, 'recall': 0.4360655737704918, 'f1': 0.3580080753701211, 'number': 305} | 0.3005 | 0.4220 | 0.3511 | 0.7443 |
|
| 70 |
+
| 0.3805 | 11.0 | 44 | 0.7123 | {'precision': 0.22857142857142856, 'recall': 0.08333333333333333, 'f1': 0.12213740458015265, 'number': 96} | {'precision': 0.3008474576271186, 'recall': 0.5220588235294118, 'f1': 0.3817204301075269, 'number': 272} | {'precision': 0.3120728929384966, 'recall': 0.4491803278688525, 'f1': 0.3682795698924731, 'number': 305} | 0.3034 | 0.4264 | 0.3545 | 0.7504 |
|
| 71 |
+
| 0.3651 | 12.0 | 48 | 0.7054 | {'precision': 0.2, 'recall': 0.08333333333333333, 'f1': 0.11764705882352941, 'number': 96} | {'precision': 0.31947483588621445, 'recall': 0.5367647058823529, 'f1': 0.40054869684499317, 'number': 272} | {'precision': 0.3194444444444444, 'recall': 0.4524590163934426, 'f1': 0.37449118046132973, 'number': 305} | 0.3143 | 0.4339 | 0.3645 | 0.7532 |
|
| 72 |
+
| 0.3562 | 13.0 | 52 | 0.7085 | {'precision': 0.22727272727272727, 'recall': 0.10416666666666667, 'f1': 0.14285714285714288, 'number': 96} | {'precision': 0.3400900900900901, 'recall': 0.5551470588235294, 'f1': 0.42178770949720673, 'number': 272} | {'precision': 0.33816425120772947, 'recall': 0.45901639344262296, 'f1': 0.3894297635605007, 'number': 305} | 0.3337 | 0.4473 | 0.3822 | 0.7555 |
|
| 73 |
+
| 0.3191 | 14.0 | 56 | 0.7046 | {'precision': 0.1836734693877551, 'recall': 0.09375, 'f1': 0.12413793103448278, 'number': 96} | {'precision': 0.3393665158371041, 'recall': 0.5514705882352942, 'f1': 0.42016806722689076, 'number': 272} | {'precision': 0.34057971014492755, 'recall': 0.46229508196721314, 'f1': 0.39221140472879, 'number': 305} | 0.3315 | 0.4458 | 0.3802 | 0.7579 |
|
| 74 |
+
| 0.3347 | 15.0 | 60 | 0.7010 | {'precision': 0.20833333333333334, 'recall': 0.10416666666666667, 'f1': 0.1388888888888889, 'number': 96} | {'precision': 0.3401360544217687, 'recall': 0.5514705882352942, 'f1': 0.420757363253857, 'number': 272} | {'precision': 0.3463414634146341, 'recall': 0.46557377049180326, 'f1': 0.39720279720279716, 'number': 305} | 0.3359 | 0.4487 | 0.3842 | 0.7593 |
|
| 75 |
|
| 76 |
|
| 77 |
### Framework versions
|
| 78 |
|
| 79 |
+
- Transformers 4.48.3
|
| 80 |
+
- Pytorch 2.5.1+cu124
|
| 81 |
+
- Datasets 3.3.2
|
| 82 |
+
- Tokenizers 0.21.0
|
config.json
CHANGED
|
@@ -9,23 +9,17 @@
|
|
| 9 |
"hidden_size": 768,
|
| 10 |
"id2label": {
|
| 11 |
"0": "O",
|
| 12 |
-
"1": "
|
| 13 |
-
"2": "
|
| 14 |
-
"3": "
|
| 15 |
-
"4": "I-QUESTION",
|
| 16 |
-
"5": "B-ANSWER",
|
| 17 |
-
"6": "I-ANSWER"
|
| 18 |
},
|
| 19 |
"initializer_range": 0.02,
|
| 20 |
"intermediate_size": 3072,
|
| 21 |
"label2id": {
|
| 22 |
-
"
|
| 23 |
-
"
|
| 24 |
-
"
|
| 25 |
-
"
|
| 26 |
-
"I-HEADER": 2,
|
| 27 |
-
"I-QUESTION": 4,
|
| 28 |
-
"O": 0
|
| 29 |
},
|
| 30 |
"layer_norm_eps": 1e-12,
|
| 31 |
"max_2d_position_embeddings": 1024,
|
|
@@ -37,7 +31,7 @@
|
|
| 37 |
"pad_token_id": 0,
|
| 38 |
"position_embedding_type": "absolute",
|
| 39 |
"torch_dtype": "float32",
|
| 40 |
-
"transformers_version": "4.
|
| 41 |
"type_vocab_size": 2,
|
| 42 |
"use_cache": true,
|
| 43 |
"vocab_size": 30522
|
|
|
|
| 9 |
"hidden_size": 768,
|
| 10 |
"id2label": {
|
| 11 |
"0": "O",
|
| 12 |
+
"1": "Header",
|
| 13 |
+
"2": "Question",
|
| 14 |
+
"3": "Answer"
|
|
|
|
|
|
|
|
|
|
| 15 |
},
|
| 16 |
"initializer_range": 0.02,
|
| 17 |
"intermediate_size": 3072,
|
| 18 |
"label2id": {
|
| 19 |
+
"Answer": 3,
|
| 20 |
+
"Header": 1,
|
| 21 |
+
"O": 0,
|
| 22 |
+
"Question": 2
|
|
|
|
|
|
|
|
|
|
| 23 |
},
|
| 24 |
"layer_norm_eps": 1e-12,
|
| 25 |
"max_2d_position_embeddings": 1024,
|
|
|
|
| 31 |
"pad_token_id": 0,
|
| 32 |
"position_embedding_type": "absolute",
|
| 33 |
"torch_dtype": "float32",
|
| 34 |
+
"transformers_version": "4.48.3",
|
| 35 |
"type_vocab_size": 2,
|
| 36 |
"use_cache": true,
|
| 37 |
"vocab_size": 30522
|
logs/events.out.tfevents.1740560490.f94f8b22d15e.422.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:266d45e8ce9470c059ed5ec368ed1cd4a013509b2234ff50a3d993c7623ca6fb
|
| 3 |
+
size 16038
|
model.safetensors
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:19dbbf8295e45af239466e469b1835fd45914dcd4fdb7941c40c3143350b8585
|
| 3 |
+
size 450548984
|
tokenizer.json
CHANGED
|
@@ -1,21 +1,7 @@
|
|
| 1 |
{
|
| 2 |
"version": "1.0",
|
| 3 |
-
"truncation":
|
| 4 |
-
|
| 5 |
-
"max_length": 512,
|
| 6 |
-
"strategy": "LongestFirst",
|
| 7 |
-
"stride": 0
|
| 8 |
-
},
|
| 9 |
-
"padding": {
|
| 10 |
-
"strategy": {
|
| 11 |
-
"Fixed": 512
|
| 12 |
-
},
|
| 13 |
-
"direction": "Right",
|
| 14 |
-
"pad_to_multiple_of": null,
|
| 15 |
-
"pad_id": 0,
|
| 16 |
-
"pad_type_id": 0,
|
| 17 |
-
"pad_token": "[PAD]"
|
| 18 |
-
},
|
| 19 |
"added_tokens": [
|
| 20 |
{
|
| 21 |
"id": 0,
|
|
|
|
| 1 |
{
|
| 2 |
"version": "1.0",
|
| 3 |
+
"truncation": null,
|
| 4 |
+
"padding": null,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
"added_tokens": [
|
| 6 |
{
|
| 7 |
"id": 0,
|
tokenizer_config.json
CHANGED
|
@@ -53,10 +53,13 @@
|
|
| 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,
|
|
@@ -65,6 +68,8 @@
|
|
| 65 |
0
|
| 66 |
],
|
| 67 |
"pad_token_label": -100,
|
|
|
|
|
|
|
| 68 |
"processor_class": "LayoutLMv2Processor",
|
| 69 |
"sep_token": "[SEP]",
|
| 70 |
"sep_token_box": [
|
|
@@ -73,8 +78,11 @@
|
|
| 73 |
1000,
|
| 74 |
1000
|
| 75 |
],
|
|
|
|
| 76 |
"strip_accents": null,
|
| 77 |
"tokenize_chinese_chars": true,
|
| 78 |
"tokenizer_class": "LayoutLMv2Tokenizer",
|
|
|
|
|
|
|
| 79 |
"unk_token": "[UNK]"
|
| 80 |
}
|
|
|
|
| 53 |
],
|
| 54 |
"do_basic_tokenize": true,
|
| 55 |
"do_lower_case": true,
|
| 56 |
+
"extra_special_tokens": {},
|
| 57 |
"mask_token": "[MASK]",
|
| 58 |
+
"max_length": 512,
|
| 59 |
"model_max_length": 512,
|
| 60 |
"never_split": null,
|
| 61 |
"only_label_first_subword": true,
|
| 62 |
+
"pad_to_multiple_of": null,
|
| 63 |
"pad_token": "[PAD]",
|
| 64 |
"pad_token_box": [
|
| 65 |
0,
|
|
|
|
| 68 |
0
|
| 69 |
],
|
| 70 |
"pad_token_label": -100,
|
| 71 |
+
"pad_token_type_id": 0,
|
| 72 |
+
"padding_side": "right",
|
| 73 |
"processor_class": "LayoutLMv2Processor",
|
| 74 |
"sep_token": "[SEP]",
|
| 75 |
"sep_token_box": [
|
|
|
|
| 78 |
1000,
|
| 79 |
1000
|
| 80 |
],
|
| 81 |
+
"stride": 0,
|
| 82 |
"strip_accents": null,
|
| 83 |
"tokenize_chinese_chars": true,
|
| 84 |
"tokenizer_class": "LayoutLMv2Tokenizer",
|
| 85 |
+
"truncation_side": "right",
|
| 86 |
+
"truncation_strategy": "longest_first",
|
| 87 |
"unk_token": "[UNK]"
|
| 88 |
}
|
training_args.bin
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:3c00c0f5902e932f68ed59f4344946ae084f5f48fc7ee5691be99a6515b4cbc9
|
| 3 |
+
size 5304
|