Szczotar93
commited on
Commit
•
10768db
1
Parent(s):
c670f1f
End of training
Browse files- README.md +77 -0
- config.json +46 -0
- model.safetensors +3 -0
- preprocessor_config.json +25 -0
- special_tokens_map.json +37 -0
- tokenizer.json +0 -0
- tokenizer_config.json +80 -0
- training_args.bin +3 -0
- vocab.txt +0 -0
README.md
ADDED
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: mit
|
3 |
+
base_model: microsoft/layoutlm-base-uncased
|
4 |
+
tags:
|
5 |
+
- generated_from_trainer
|
6 |
+
datasets:
|
7 |
+
- layoutlmv3
|
8 |
+
model-index:
|
9 |
+
- name: Inkaso_beta
|
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 |
+
# Inkaso_beta
|
17 |
+
|
18 |
+
This model is a fine-tuned version of [microsoft/layoutlm-base-uncased](https://huggingface.co/microsoft/layoutlm-base-uncased) on the layoutlmv3 dataset.
|
19 |
+
It achieves the following results on the evaluation set:
|
20 |
+
- Loss: 0.0801
|
21 |
+
- Creditor address: {'precision': 1.0, 'recall': 0.875, 'f1': 0.9333333333333333, 'number': 48}
|
22 |
+
- Creditor name: {'precision': 1.0, 'recall': 1.0, 'f1': 1.0, 'number': 34}
|
23 |
+
- Creditor proxy: {'precision': 0.8333333333333334, 'recall': 0.8108108108108109, 'f1': 0.8219178082191781, 'number': 37}
|
24 |
+
- Debtor address: {'precision': 0.9636363636363636, 'recall': 1.0, 'f1': 0.9814814814814815, 'number': 53}
|
25 |
+
- Debtor name: {'precision': 0.9428571428571428, 'recall': 1.0, 'f1': 0.9705882352941176, 'number': 33}
|
26 |
+
- Doc id: {'precision': 0.85, 'recall': 0.8947368421052632, 'f1': 0.8717948717948718, 'number': 19}
|
27 |
+
- Title: {'precision': 1.0, 'recall': 1.0, 'f1': 1.0, 'number': 34}
|
28 |
+
- Overall Precision: 0.9492
|
29 |
+
- Overall Recall: 0.9419
|
30 |
+
- Overall F1: 0.9455
|
31 |
+
- Overall Accuracy: 0.9831
|
32 |
+
|
33 |
+
## Model description
|
34 |
+
|
35 |
+
More information needed
|
36 |
+
|
37 |
+
## Intended uses & limitations
|
38 |
+
|
39 |
+
More information needed
|
40 |
+
|
41 |
+
## Training and evaluation data
|
42 |
+
|
43 |
+
More information needed
|
44 |
+
|
45 |
+
## Training procedure
|
46 |
+
|
47 |
+
### Training hyperparameters
|
48 |
+
|
49 |
+
The following hyperparameters were used during training:
|
50 |
+
- learning_rate: 3e-05
|
51 |
+
- train_batch_size: 16
|
52 |
+
- eval_batch_size: 8
|
53 |
+
- seed: 42
|
54 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
55 |
+
- lr_scheduler_type: linear
|
56 |
+
- lr_scheduler_warmup_steps: 10
|
57 |
+
- num_epochs: 50
|
58 |
+
|
59 |
+
### Training results
|
60 |
+
|
61 |
+
| Training Loss | Epoch | Step | Validation Loss | Creditor address | Creditor name | Creditor proxy | Debtor address | Debtor name | Doc id | Title | Overall Precision | Overall Recall | Overall F1 | Overall Accuracy |
|
62 |
+
|:-------------:|:-------:|:----:|:---------------:|:-------------------------------------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------------------------:|:--------------------------------------------------------------------------------------------------------:|:-----------------:|:--------------:|:----------:|:----------------:|
|
63 |
+
| 0.4642 | 6.6667 | 20 | 0.2502 | {'precision': 0.782608695652174, 'recall': 0.75, 'f1': 0.7659574468085107, 'number': 48} | {'precision': 0.9354838709677419, 'recall': 0.8529411764705882, 'f1': 0.8923076923076922, 'number': 34} | {'precision': 0.8, 'recall': 0.6486486486486487, 'f1': 0.7164179104477612, 'number': 37} | {'precision': 0.8205128205128205, 'recall': 0.6037735849056604, 'f1': 0.6956521739130435, 'number': 53} | {'precision': 0.95, 'recall': 0.5757575757575758, 'f1': 0.7169811320754716, 'number': 33} | {'precision': 1.0, 'recall': 0.2631578947368421, 'f1': 0.4166666666666667, 'number': 19} | {'precision': 0.8461538461538461, 'recall': 0.3235294117647059, 'f1': 0.46808510638297873, 'number': 34} | 0.8478 | 0.6047 | 0.7059 | 0.9330 |
|
64 |
+
| 0.1387 | 13.3333 | 40 | 0.0914 | {'precision': 1.0, 'recall': 0.9166666666666666, 'f1': 0.9565217391304348, 'number': 48} | {'precision': 0.9714285714285714, 'recall': 1.0, 'f1': 0.9855072463768115, 'number': 34} | {'precision': 0.7777777777777778, 'recall': 0.7567567567567568, 'f1': 0.7671232876712328, 'number': 37} | {'precision': 0.9444444444444444, 'recall': 0.9622641509433962, 'f1': 0.9532710280373832, 'number': 53} | {'precision': 0.8918918918918919, 'recall': 1.0, 'f1': 0.9428571428571428, 'number': 33} | {'precision': 0.8095238095238095, 'recall': 0.8947368421052632, 'f1': 0.8500000000000001, 'number': 19} | {'precision': 1.0, 'recall': 1.0, 'f1': 1.0, 'number': 34} | 0.9234 | 0.9341 | 0.9287 | 0.9795 |
|
65 |
+
| 0.0431 | 20.0 | 60 | 0.0774 | {'precision': 1.0, 'recall': 1.0, 'f1': 1.0, 'number': 48} | {'precision': 1.0, 'recall': 1.0, 'f1': 1.0, 'number': 34} | {'precision': 0.8181818181818182, 'recall': 0.7297297297297297, 'f1': 0.7714285714285715, 'number': 37} | {'precision': 0.9636363636363636, 'recall': 1.0, 'f1': 0.9814814814814815, 'number': 53} | {'precision': 0.9428571428571428, 'recall': 1.0, 'f1': 0.9705882352941176, 'number': 33} | {'precision': 0.7727272727272727, 'recall': 0.8947368421052632, 'f1': 0.8292682926829269, 'number': 19} | {'precision': 1.0, 'recall': 1.0, 'f1': 1.0, 'number': 34} | 0.9425 | 0.9535 | 0.9480 | 0.9837 |
|
66 |
+
| 0.0216 | 26.6667 | 80 | 0.0842 | {'precision': 1.0, 'recall': 1.0, 'f1': 1.0, 'number': 48} | {'precision': 1.0, 'recall': 1.0, 'f1': 1.0, 'number': 34} | {'precision': 0.7631578947368421, 'recall': 0.7837837837837838, 'f1': 0.7733333333333334, 'number': 37} | {'precision': 0.9454545454545454, 'recall': 0.9811320754716981, 'f1': 0.9629629629629629, 'number': 53} | {'precision': 0.9166666666666666, 'recall': 1.0, 'f1': 0.9565217391304348, 'number': 33} | {'precision': 0.8095238095238095, 'recall': 0.8947368421052632, 'f1': 0.8500000000000001, 'number': 19} | {'precision': 1.0, 'recall': 1.0, 'f1': 1.0, 'number': 34} | 0.9286 | 0.9574 | 0.9427 | 0.9825 |
|
67 |
+
| 0.0142 | 33.3333 | 100 | 0.0840 | {'precision': 1.0, 'recall': 0.875, 'f1': 0.9333333333333333, 'number': 48} | {'precision': 1.0, 'recall': 1.0, 'f1': 1.0, 'number': 34} | {'precision': 0.8333333333333334, 'recall': 0.8108108108108109, 'f1': 0.8219178082191781, 'number': 37} | {'precision': 0.9629629629629629, 'recall': 0.9811320754716981, 'f1': 0.9719626168224299, 'number': 53} | {'precision': 0.9166666666666666, 'recall': 1.0, 'f1': 0.9565217391304348, 'number': 33} | {'precision': 0.8095238095238095, 'recall': 0.8947368421052632, 'f1': 0.8500000000000001, 'number': 19} | {'precision': 1.0, 'recall': 1.0, 'f1': 1.0, 'number': 34} | 0.9416 | 0.9380 | 0.9398 | 0.9819 |
|
68 |
+
| 0.0105 | 40.0 | 120 | 0.0838 | {'precision': 0.9772727272727273, 'recall': 0.8958333333333334, 'f1': 0.9347826086956522, 'number': 48} | {'precision': 1.0, 'recall': 1.0, 'f1': 1.0, 'number': 34} | {'precision': 0.8333333333333334, 'recall': 0.8108108108108109, 'f1': 0.8219178082191781, 'number': 37} | {'precision': 0.9636363636363636, 'recall': 1.0, 'f1': 0.9814814814814815, 'number': 53} | {'precision': 0.9166666666666666, 'recall': 1.0, 'f1': 0.9565217391304348, 'number': 33} | {'precision': 0.8095238095238095, 'recall': 0.8947368421052632, 'f1': 0.8500000000000001, 'number': 19} | {'precision': 1.0, 'recall': 1.0, 'f1': 1.0, 'number': 34} | 0.9385 | 0.9457 | 0.9421 | 0.9819 |
|
69 |
+
| 0.0081 | 46.6667 | 140 | 0.0801 | {'precision': 1.0, 'recall': 0.875, 'f1': 0.9333333333333333, 'number': 48} | {'precision': 1.0, 'recall': 1.0, 'f1': 1.0, 'number': 34} | {'precision': 0.8333333333333334, 'recall': 0.8108108108108109, 'f1': 0.8219178082191781, 'number': 37} | {'precision': 0.9636363636363636, 'recall': 1.0, 'f1': 0.9814814814814815, 'number': 53} | {'precision': 0.9428571428571428, 'recall': 1.0, 'f1': 0.9705882352941176, 'number': 33} | {'precision': 0.85, 'recall': 0.8947368421052632, 'f1': 0.8717948717948718, 'number': 19} | {'precision': 1.0, 'recall': 1.0, 'f1': 1.0, 'number': 34} | 0.9492 | 0.9419 | 0.9455 | 0.9831 |
|
70 |
+
|
71 |
+
|
72 |
+
### Framework versions
|
73 |
+
|
74 |
+
- Transformers 4.40.1
|
75 |
+
- Pytorch 2.3.0+cu118
|
76 |
+
- Datasets 2.19.0
|
77 |
+
- Tokenizers 0.19.1
|
config.json
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "microsoft/layoutlm-base-uncased",
|
3 |
+
"architectures": [
|
4 |
+
"LayoutLMForTokenClassification"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"hidden_act": "gelu",
|
8 |
+
"hidden_dropout_prob": 0.1,
|
9 |
+
"hidden_size": 768,
|
10 |
+
"id2label": {
|
11 |
+
"0": "O",
|
12 |
+
"1": "title",
|
13 |
+
"2": "creditor name",
|
14 |
+
"3": "creditor address",
|
15 |
+
"4": "creditor proxy",
|
16 |
+
"5": "debtor name",
|
17 |
+
"6": "debtor address",
|
18 |
+
"7": "doc id"
|
19 |
+
},
|
20 |
+
"initializer_range": 0.02,
|
21 |
+
"intermediate_size": 3072,
|
22 |
+
"label2id": {
|
23 |
+
"O": 0,
|
24 |
+
"creditor address": 3,
|
25 |
+
"creditor name": 2,
|
26 |
+
"creditor proxy": 4,
|
27 |
+
"debtor address": 6,
|
28 |
+
"debtor name": 5,
|
29 |
+
"doc id": 7,
|
30 |
+
"title": 1
|
31 |
+
},
|
32 |
+
"layer_norm_eps": 1e-12,
|
33 |
+
"max_2d_position_embeddings": 1024,
|
34 |
+
"max_position_embeddings": 512,
|
35 |
+
"model_type": "layoutlm",
|
36 |
+
"num_attention_heads": 12,
|
37 |
+
"num_hidden_layers": 12,
|
38 |
+
"output_past": true,
|
39 |
+
"pad_token_id": 0,
|
40 |
+
"position_embedding_type": "absolute",
|
41 |
+
"torch_dtype": "float32",
|
42 |
+
"transformers_version": "4.40.1",
|
43 |
+
"type_vocab_size": 2,
|
44 |
+
"use_cache": true,
|
45 |
+
"vocab_size": 30522
|
46 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3cb115f3bcfc4c55c55e7ccfd4b046b5689c59450cf817a1ed3b29be013076a5
|
3 |
+
size 450561288
|
preprocessor_config.json
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_valid_processor_keys": [
|
3 |
+
"images",
|
4 |
+
"do_resize",
|
5 |
+
"size",
|
6 |
+
"resample",
|
7 |
+
"apply_ocr",
|
8 |
+
"ocr_lang",
|
9 |
+
"tesseract_config",
|
10 |
+
"return_tensors",
|
11 |
+
"data_format",
|
12 |
+
"input_data_format"
|
13 |
+
],
|
14 |
+
"apply_ocr": false,
|
15 |
+
"do_resize": true,
|
16 |
+
"image_processor_type": "LayoutLMv2ImageProcessor",
|
17 |
+
"ocr_lang": null,
|
18 |
+
"processor_class": "LayoutLMv2Processor",
|
19 |
+
"resample": 2,
|
20 |
+
"size": {
|
21 |
+
"height": 224,
|
22 |
+
"width": 224
|
23 |
+
},
|
24 |
+
"tesseract_config": ""
|
25 |
+
}
|
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 |
+
}
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6088b4ef604cc0239bc18108879f041424580d31aeaba2bd072ae705b563bc27
|
3 |
+
size 4984
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|