shaikhadil26
commited on
Commit
•
15328c8
1
Parent(s):
39931d7
End of training
Browse files- README.md +81 -0
- logs/events.out.tfevents.1731436984.33c6d5f39c94.178.0 +2 -2
- model.safetensors +1 -1
- preprocessor_config.json +13 -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,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
library_name: transformers
|
3 |
+
license: mit
|
4 |
+
base_model: microsoft/layoutlm-base-uncased
|
5 |
+
tags:
|
6 |
+
- generated_from_trainer
|
7 |
+
model-index:
|
8 |
+
- name: layoutlm-sroie
|
9 |
+
results: []
|
10 |
+
---
|
11 |
+
|
12 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
13 |
+
should probably proofread and complete it, then remove this comment. -->
|
14 |
+
|
15 |
+
# layoutlm-sroie
|
16 |
+
|
17 |
+
This model is a fine-tuned version of [microsoft/layoutlm-base-uncased](https://huggingface.co/microsoft/layoutlm-base-uncased) on the None dataset.
|
18 |
+
It achieves the following results on the evaluation set:
|
19 |
+
- Loss: 0.0732
|
20 |
+
- Address: {'precision': 0.9800577276305432, 'recall': 0.9813452443510247, 'f1': 0.9807010634107917, 'number': 3806}
|
21 |
+
- Company: {'precision': 0.9241157556270096, 'recall': 0.9862731640356898, 'f1': 0.9541832669322708, 'number': 1457}
|
22 |
+
- Date: {'precision': 0.9520383693045563, 'recall': 0.9706601466992665, 'f1': 0.9612590799031476, 'number': 409}
|
23 |
+
- Total: {'precision': 0.6638888888888889, 'recall': 0.6675977653631285, 'f1': 0.6657381615598885, 'number': 358}
|
24 |
+
- Overall Precision: 0.9455
|
25 |
+
- Overall Recall: 0.9632
|
26 |
+
- Overall F1: 0.9542
|
27 |
+
- Overall Accuracy: 0.9863
|
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: Use adamw_torch with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
|
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 | Address | Company | Date | Total | Overall Precision | Overall Recall | Overall F1 | Overall Accuracy |
|
58 |
+
|:-------------:|:-----:|:----:|:---------------:|:---------------------------------------------------------------------------------------------------------:|:---------------------------------------------------------------------------------------------------------:|:--------------------------------------------------------------------------------------------------------:|:---------------------------------------------------------------------------------------------------------:|:-----------------:|:--------------:|:----------:|:----------------:|
|
59 |
+
| 0.4342 | 1.0 | 40 | 0.0876 | {'precision': 0.974816369359916, 'recall': 0.976353126642144, 'f1': 0.9755841428196377, 'number': 3806} | {'precision': 0.8865598027127004, 'recall': 0.9869595058339052, 'f1': 0.9340695030854174, 'number': 1457} | {'precision': 0.8112449799196787, 'recall': 0.9877750611246944, 'f1': 0.8908489525909592, 'number': 409} | {'precision': 0.0, 'recall': 0.0, 'f1': 0.0, 'number': 358} | 0.9370 | 0.9217 | 0.9293 | 0.9794 |
|
60 |
+
| 0.0586 | 2.0 | 80 | 0.0591 | {'precision': 0.9761780104712042, 'recall': 0.9797687861271677, 'f1': 0.977970102281668, 'number': 3806} | {'precision': 0.9187301587301587, 'recall': 0.9931365820178449, 'f1': 0.954485488126649, 'number': 1457} | {'precision': 0.8975501113585747, 'recall': 0.9853300733496333, 'f1': 0.9393939393939394, 'number': 409} | {'precision': 0.7073170731707317, 'recall': 0.40502793296089384, 'f1': 0.5150976909413854, 'number': 358} | 0.9463 | 0.9493 | 0.9478 | 0.9844 |
|
61 |
+
| 0.039 | 3.0 | 120 | 0.0569 | {'precision': 0.975006508721687, 'recall': 0.9839726747241198, 'f1': 0.9794690728390218, 'number': 3806} | {'precision': 0.9282970550576184, 'recall': 0.9951956074124915, 'f1': 0.9605829744948658, 'number': 1457} | {'precision': 0.9232558139534883, 'recall': 0.9706601466992665, 'f1': 0.9463647199046483, 'number': 409} | {'precision': 0.6103542234332425, 'recall': 0.6256983240223464, 'f1': 0.6179310344827587, 'number': 358} | 0.9381 | 0.9645 | 0.9511 | 0.9852 |
|
62 |
+
| 0.0312 | 4.0 | 160 | 0.0546 | {'precision': 0.9765135699373695, 'recall': 0.9831844456121913, 'f1': 0.9798376538360828, 'number': 3806} | {'precision': 0.9276105060858424, 'recall': 0.9938229238160604, 'f1': 0.9595758780649436, 'number': 1457} | {'precision': 0.9473684210526315, 'recall': 0.9682151589242054, 'f1': 0.9576783555018137, 'number': 409} | {'precision': 0.6116504854368932, 'recall': 0.7039106145251397, 'f1': 0.6545454545454545, 'number': 358} | 0.9381 | 0.9682 | 0.9529 | 0.9858 |
|
63 |
+
| 0.0246 | 5.0 | 200 | 0.0555 | {'precision': 0.9772430028773215, 'recall': 0.9816079873883342, 'f1': 0.9794206317997116, 'number': 3806} | {'precision': 0.9298132646490663, 'recall': 0.9910775566231984, 'f1': 0.959468438538206, 'number': 1457} | {'precision': 0.9537712895377128, 'recall': 0.9584352078239609, 'f1': 0.9560975609756097, 'number': 409} | {'precision': 0.6434108527131783, 'recall': 0.6955307262569832, 'f1': 0.6684563758389261, 'number': 358} | 0.9428 | 0.9653 | 0.9539 | 0.9861 |
|
64 |
+
| 0.0206 | 6.0 | 240 | 0.0531 | {'precision': 0.9782893015956056, 'recall': 0.9826589595375722, 'f1': 0.9804692620264778, 'number': 3806} | {'precision': 0.9414088215931534, 'recall': 0.9814687714481812, 'f1': 0.9610215053763441, 'number': 1457} | {'precision': 0.9628712871287128, 'recall': 0.9511002444987775, 'f1': 0.956949569495695, 'number': 409} | {'precision': 0.6811594202898551, 'recall': 0.6564245810055865, 'f1': 0.6685633001422475, 'number': 358} | 0.9512 | 0.9609 | 0.9560 | 0.9868 |
|
65 |
+
| 0.0166 | 7.0 | 280 | 0.0579 | {'precision': 0.9767987486965589, 'recall': 0.9844981607987389, 'f1': 0.9806333420570532, 'number': 3806} | {'precision': 0.9272844272844273, 'recall': 0.9890185312285518, 'f1': 0.9571570906675522, 'number': 1457} | {'precision': 0.9562043795620438, 'recall': 0.960880195599022, 'f1': 0.9585365853658536, 'number': 409} | {'precision': 0.6685236768802229, 'recall': 0.6703910614525139, 'f1': 0.6694560669456067, 'number': 358} | 0.9450 | 0.9653 | 0.9550 | 0.9865 |
|
66 |
+
| 0.014 | 8.0 | 320 | 0.0614 | {'precision': 0.9785396493064643, 'recall': 0.9823962165002628, 'f1': 0.9804641405532976, 'number': 3806} | {'precision': 0.9277885235332044, 'recall': 0.9876458476321208, 'f1': 0.9567819148936171, 'number': 1457} | {'precision': 0.9585365853658536, 'recall': 0.960880195599022, 'f1': 0.9597069597069597, 'number': 409} | {'precision': 0.6553524804177546, 'recall': 0.7011173184357542, 'f1': 0.6774628879892037, 'number': 358} | 0.9444 | 0.9655 | 0.9548 | 0.9865 |
|
67 |
+
| 0.0115 | 9.0 | 360 | 0.0642 | {'precision': 0.9800524934383202, 'recall': 0.9810825013137152, 'f1': 0.9805672268907565, 'number': 3806} | {'precision': 0.9342875731945348, 'recall': 0.9855868222374743, 'f1': 0.9592518370073482, 'number': 1457} | {'precision': 0.9527186761229315, 'recall': 0.9853300733496333, 'f1': 0.9687500000000001, 'number': 409} | {'precision': 0.6483516483516484, 'recall': 0.659217877094972, 'f1': 0.6537396121883657, 'number': 358} | 0.9470 | 0.9633 | 0.9551 | 0.9865 |
|
68 |
+
| 0.0103 | 10.0 | 400 | 0.0684 | {'precision': 0.9808197582764057, 'recall': 0.9808197582764057, 'f1': 0.9808197582764057, 'number': 3806} | {'precision': 0.9224358974358975, 'recall': 0.9876458476321208, 'f1': 0.9539277427908518, 'number': 1457} | {'precision': 0.9519230769230769, 'recall': 0.9682151589242054, 'f1': 0.96, 'number': 409} | {'precision': 0.6473684210526316, 'recall': 0.6871508379888268, 'f1': 0.6666666666666667, 'number': 358} | 0.9435 | 0.9642 | 0.9537 | 0.9861 |
|
69 |
+
| 0.0084 | 11.0 | 440 | 0.0704 | {'precision': 0.981325618095739, 'recall': 0.9802942722017867, 'f1': 0.9808096740273397, 'number': 3806} | {'precision': 0.9265463917525774, 'recall': 0.9869595058339052, 'f1': 0.9557992688600864, 'number': 1457} | {'precision': 0.9519230769230769, 'recall': 0.9682151589242054, 'f1': 0.96, 'number': 409} | {'precision': 0.6497326203208557, 'recall': 0.6787709497206704, 'f1': 0.6639344262295083, 'number': 358} | 0.9453 | 0.9632 | 0.9542 | 0.9863 |
|
70 |
+
| 0.0077 | 12.0 | 480 | 0.0704 | {'precision': 0.9805672268907563, 'recall': 0.9810825013137152, 'f1': 0.9808247964276333, 'number': 3806} | {'precision': 0.931950745301361, 'recall': 0.9869595058339052, 'f1': 0.9586666666666667, 'number': 1457} | {'precision': 0.9544364508393285, 'recall': 0.9731051344743277, 'f1': 0.963680387409201, 'number': 409} | {'precision': 0.6764705882352942, 'recall': 0.6424581005586593, 'f1': 0.6590257879656161, 'number': 358} | 0.9496 | 0.9619 | 0.9557 | 0.9867 |
|
71 |
+
| 0.0075 | 13.0 | 520 | 0.0728 | {'precision': 0.9792976939203354, 'recall': 0.9818707304256438, 'f1': 0.9805825242718447, 'number': 3806} | {'precision': 0.9258542875564152, 'recall': 0.9855868222374743, 'f1': 0.9547872340425532, 'number': 1457} | {'precision': 0.9538834951456311, 'recall': 0.960880195599022, 'f1': 0.9573690621193666, 'number': 409} | {'precision': 0.6502732240437158, 'recall': 0.664804469273743, 'f1': 0.6574585635359116, 'number': 358} | 0.9445 | 0.9625 | 0.9534 | 0.9861 |
|
72 |
+
| 0.0068 | 14.0 | 560 | 0.0732 | {'precision': 0.9805723286951956, 'recall': 0.9813452443510247, 'f1': 0.9809586342744582, 'number': 3806} | {'precision': 0.9229287090558767, 'recall': 0.9862731640356898, 'f1': 0.953550099535501, 'number': 1457} | {'precision': 0.9520383693045563, 'recall': 0.9706601466992665, 'f1': 0.9612590799031476, 'number': 409} | {'precision': 0.667590027700831, 'recall': 0.6731843575418994, 'f1': 0.6703755215577191, 'number': 358} | 0.9456 | 0.9635 | 0.9545 | 0.9864 |
|
73 |
+
| 0.0066 | 15.0 | 600 | 0.0732 | {'precision': 0.9800577276305432, 'recall': 0.9813452443510247, 'f1': 0.9807010634107917, 'number': 3806} | {'precision': 0.9241157556270096, 'recall': 0.9862731640356898, 'f1': 0.9541832669322708, 'number': 1457} | {'precision': 0.9520383693045563, 'recall': 0.9706601466992665, 'f1': 0.9612590799031476, 'number': 409} | {'precision': 0.6638888888888889, 'recall': 0.6675977653631285, 'f1': 0.6657381615598885, 'number': 358} | 0.9455 | 0.9632 | 0.9542 | 0.9863 |
|
74 |
+
|
75 |
+
|
76 |
+
### Framework versions
|
77 |
+
|
78 |
+
- Transformers 4.46.2
|
79 |
+
- Pytorch 2.5.0+cu121
|
80 |
+
- Datasets 3.1.0
|
81 |
+
- Tokenizers 0.20.3
|
logs/events.out.tfevents.1731436984.33c6d5f39c94.178.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:9db9aa79d2c1885fd9758f940f792f76a8dc052e10cf2ba8164fd82cce5ff90e
|
3 |
+
size 16248
|
model.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 450552060
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0f995c852adeb69b96f68436c20f51bda989612c57a9a89ce3fce86b28ddd1a9
|
3 |
size 450552060
|
preprocessor_config.json
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"apply_ocr": true,
|
3 |
+
"do_resize": true,
|
4 |
+
"image_processor_type": "LayoutLMv2ImageProcessor",
|
5 |
+
"ocr_lang": null,
|
6 |
+
"processor_class": "LayoutLMv2Processor",
|
7 |
+
"resample": 2,
|
8 |
+
"size": {
|
9 |
+
"height": 224,
|
10 |
+
"width": 224
|
11 |
+
},
|
12 |
+
"tesseract_config": ""
|
13 |
+
}
|
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": false,
|
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
|
|