End of training
Browse files- .gitattributes +1 -0
- README.md +109 -0
- config.json +48 -0
- model.safetensors +3 -0
- special_tokens_map.json +15 -0
- tokenizer.json +3 -0
- tokenizer_config.json +55 -0
- training_args.bin +3 -0
.gitattributes
CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
+
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: mit
|
3 |
+
base_model: nielsr/lilt-xlm-roberta-base
|
4 |
+
tags:
|
5 |
+
- generated_from_trainer
|
6 |
+
datasets:
|
7 |
+
- xfun
|
8 |
+
metrics:
|
9 |
+
- precision
|
10 |
+
- recall
|
11 |
+
- f1
|
12 |
+
- accuracy
|
13 |
+
model-index:
|
14 |
+
- name: LiLT-SER-ZH
|
15 |
+
results:
|
16 |
+
- task:
|
17 |
+
name: Token Classification
|
18 |
+
type: token-classification
|
19 |
+
dataset:
|
20 |
+
name: xfun
|
21 |
+
type: xfun
|
22 |
+
config: xfun.zh
|
23 |
+
split: validation
|
24 |
+
args: xfun.zh
|
25 |
+
metrics:
|
26 |
+
- name: Precision
|
27 |
+
type: precision
|
28 |
+
value: 0.8408488063660478
|
29 |
+
- name: Recall
|
30 |
+
type: recall
|
31 |
+
value: 0.9347968545216252
|
32 |
+
- name: F1
|
33 |
+
type: f1
|
34 |
+
value: 0.8853374709076804
|
35 |
+
- name: Accuracy
|
36 |
+
type: accuracy
|
37 |
+
value: 0.8116519985331867
|
38 |
+
---
|
39 |
+
|
40 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
41 |
+
should probably proofread and complete it, then remove this comment. -->
|
42 |
+
|
43 |
+
# LiLT-SER-ZH
|
44 |
+
|
45 |
+
This model is a fine-tuned version of [nielsr/lilt-xlm-roberta-base](https://huggingface.co/nielsr/lilt-xlm-roberta-base) on the xfun dataset.
|
46 |
+
It achieves the following results on the evaluation set:
|
47 |
+
- Loss: 1.8792
|
48 |
+
- Precision: 0.8408
|
49 |
+
- Recall: 0.9348
|
50 |
+
- F1: 0.8853
|
51 |
+
- Accuracy: 0.8117
|
52 |
+
|
53 |
+
## Model description
|
54 |
+
|
55 |
+
More information needed
|
56 |
+
|
57 |
+
## Intended uses & limitations
|
58 |
+
|
59 |
+
More information needed
|
60 |
+
|
61 |
+
## Training and evaluation data
|
62 |
+
|
63 |
+
More information needed
|
64 |
+
|
65 |
+
## Training procedure
|
66 |
+
|
67 |
+
### Training hyperparameters
|
68 |
+
|
69 |
+
The following hyperparameters were used during training:
|
70 |
+
- learning_rate: 5e-05
|
71 |
+
- train_batch_size: 8
|
72 |
+
- eval_batch_size: 2
|
73 |
+
- seed: 42
|
74 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
75 |
+
- lr_scheduler_type: linear
|
76 |
+
- training_steps: 10000
|
77 |
+
|
78 |
+
### Training results
|
79 |
+
|
80 |
+
| Training Loss | Epoch | Step | Accuracy | F1 | Validation Loss | Precision | Recall |
|
81 |
+
|:-------------:|:------:|:-----:|:--------:|:------:|:---------------:|:---------:|:------:|
|
82 |
+
| 0.2166 | 10.64 | 500 | 0.7724 | 0.8544 | 1.1239 | 0.7932 | 0.9260 |
|
83 |
+
| 0.0238 | 21.28 | 1000 | 0.8201 | 0.8624 | 1.0535 | 0.8572 | 0.8676 |
|
84 |
+
| 0.0034 | 31.91 | 1500 | 0.8057 | 0.8599 | 1.4675 | 0.8088 | 0.9178 |
|
85 |
+
| 0.0163 | 42.55 | 2000 | 0.8232 | 0.8729 | 1.2837 | 0.8572 | 0.8893 |
|
86 |
+
| 0.0037 | 53.19 | 2500 | 0.8114 | 0.8627 | 1.5315 | 0.8142 | 0.9174 |
|
87 |
+
| 0.0003 | 63.83 | 3000 | 0.8137 | 0.8652 | 1.4604 | 0.8471 | 0.8840 |
|
88 |
+
| 0.0005 | 74.47 | 3500 | 0.8115 | 0.8767 | 1.5980 | 0.8409 | 0.9158 |
|
89 |
+
| 0.0005 | 85.11 | 4000 | 0.8129 | 0.8634 | 1.5108 | 0.8261 | 0.9043 |
|
90 |
+
| 0.0004 | 95.74 | 4500 | 0.8161 | 0.8817 | 1.7719 | 0.8397 | 0.9282 |
|
91 |
+
| 0.0001 | 106.38 | 5000 | 0.8203 | 0.8813 | 1.4313 | 0.8600 | 0.9037 |
|
92 |
+
| 0.0001 | 117.02 | 5500 | 0.8181 | 0.8832 | 1.5232 | 0.8509 | 0.9181 |
|
93 |
+
| 0.0 | 127.66 | 6000 | 0.8069 | 0.8808 | 1.6845 | 0.8532 | 0.9102 |
|
94 |
+
| 0.0179 | 138.3 | 6500 | 0.8192 | 0.8793 | 1.6293 | 0.8398 | 0.9227 |
|
95 |
+
| 0.0 | 148.94 | 7000 | 0.8081 | 0.8815 | 1.8209 | 0.8381 | 0.9296 |
|
96 |
+
| 0.0 | 159.57 | 7500 | 1.8224 | 0.8443 | 0.9184 | 0.8798 | 0.8070 |
|
97 |
+
| 0.0 | 170.21 | 8000 | 1.7810 | 0.8450 | 0.9305 | 0.8857 | 0.8127 |
|
98 |
+
| 0.0 | 180.85 | 8500 | 1.7531 | 0.8454 | 0.9230 | 0.8825 | 0.8088 |
|
99 |
+
| 0.0 | 191.49 | 9000 | 1.8757 | 0.8394 | 0.9302 | 0.8825 | 0.8070 |
|
100 |
+
| 0.0 | 202.13 | 9500 | 1.8757 | 0.8417 | 0.9338 | 0.8854 | 0.8123 |
|
101 |
+
| 0.0 | 212.77 | 10000 | 1.8792 | 0.8408 | 0.9348 | 0.8853 | 0.8117 |
|
102 |
+
|
103 |
+
|
104 |
+
### Framework versions
|
105 |
+
|
106 |
+
- Transformers 4.35.2
|
107 |
+
- Pytorch 2.1.0+cu121
|
108 |
+
- Datasets 2.18.0
|
109 |
+
- Tokenizers 0.15.1
|
config.json
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "nielsr/lilt-xlm-roberta-base",
|
3 |
+
"architectures": [
|
4 |
+
"LiltForTokenClassification"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"bos_token_id": 0,
|
8 |
+
"channel_shrink_ratio": 4,
|
9 |
+
"classifier_dropout": null,
|
10 |
+
"eos_token_id": 2,
|
11 |
+
"hidden_act": "gelu",
|
12 |
+
"hidden_dropout_prob": 0.1,
|
13 |
+
"hidden_size": 768,
|
14 |
+
"id2label": {
|
15 |
+
"0": "O",
|
16 |
+
"1": "B-QUESTION",
|
17 |
+
"2": "B-ANSWER",
|
18 |
+
"3": "B-HEADER",
|
19 |
+
"4": "I-ANSWER",
|
20 |
+
"5": "I-QUESTION",
|
21 |
+
"6": "I-HEADER"
|
22 |
+
},
|
23 |
+
"initializer_range": 0.02,
|
24 |
+
"intermediate_size": 3072,
|
25 |
+
"label2id": {
|
26 |
+
"B-ANSWER": 2,
|
27 |
+
"B-HEADER": 3,
|
28 |
+
"B-QUESTION": 1,
|
29 |
+
"I-ANSWER": 4,
|
30 |
+
"I-HEADER": 6,
|
31 |
+
"I-QUESTION": 5,
|
32 |
+
"O": 0
|
33 |
+
},
|
34 |
+
"layer_norm_eps": 1e-05,
|
35 |
+
"max_2d_position_embeddings": 1024,
|
36 |
+
"max_position_embeddings": 514,
|
37 |
+
"model_type": "lilt",
|
38 |
+
"num_attention_heads": 12,
|
39 |
+
"num_hidden_layers": 12,
|
40 |
+
"output_past": true,
|
41 |
+
"pad_token_id": 1,
|
42 |
+
"position_embedding_type": "absolute",
|
43 |
+
"torch_dtype": "float32",
|
44 |
+
"transformers_version": "4.35.2",
|
45 |
+
"type_vocab_size": 1,
|
46 |
+
"use_cache": true,
|
47 |
+
"vocab_size": 250002
|
48 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ed2cc4c3389de7ee572fab53fa70e9a82df956536bc8d6a8d3d2ea0319a7635b
|
3 |
+
size 1134319924
|
special_tokens_map.json
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token": "<s>",
|
3 |
+
"cls_token": "<s>",
|
4 |
+
"eos_token": "</s>",
|
5 |
+
"mask_token": {
|
6 |
+
"content": "<mask>",
|
7 |
+
"lstrip": true,
|
8 |
+
"normalized": false,
|
9 |
+
"rstrip": false,
|
10 |
+
"single_word": false
|
11 |
+
},
|
12 |
+
"pad_token": "<pad>",
|
13 |
+
"sep_token": "</s>",
|
14 |
+
"unk_token": "<unk>"
|
15 |
+
}
|
tokenizer.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f59925fcb90c92b894cb93e51bb9b4a6105c5c249fe54ce1c704420ac39b81af
|
3 |
+
size 17082756
|
tokenizer_config.json
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"added_tokens_decoder": {
|
3 |
+
"0": {
|
4 |
+
"content": "<s>",
|
5 |
+
"lstrip": false,
|
6 |
+
"normalized": false,
|
7 |
+
"rstrip": false,
|
8 |
+
"single_word": false,
|
9 |
+
"special": true
|
10 |
+
},
|
11 |
+
"1": {
|
12 |
+
"content": "<pad>",
|
13 |
+
"lstrip": false,
|
14 |
+
"normalized": false,
|
15 |
+
"rstrip": false,
|
16 |
+
"single_word": false,
|
17 |
+
"special": true
|
18 |
+
},
|
19 |
+
"2": {
|
20 |
+
"content": "</s>",
|
21 |
+
"lstrip": false,
|
22 |
+
"normalized": false,
|
23 |
+
"rstrip": false,
|
24 |
+
"single_word": false,
|
25 |
+
"special": true
|
26 |
+
},
|
27 |
+
"3": {
|
28 |
+
"content": "<unk>",
|
29 |
+
"lstrip": false,
|
30 |
+
"normalized": false,
|
31 |
+
"rstrip": false,
|
32 |
+
"single_word": false,
|
33 |
+
"special": true
|
34 |
+
},
|
35 |
+
"250001": {
|
36 |
+
"content": "<mask>",
|
37 |
+
"lstrip": true,
|
38 |
+
"normalized": false,
|
39 |
+
"rstrip": false,
|
40 |
+
"single_word": false,
|
41 |
+
"special": true
|
42 |
+
}
|
43 |
+
},
|
44 |
+
"bos_token": "<s>",
|
45 |
+
"clean_up_tokenization_spaces": true,
|
46 |
+
"cls_token": "<s>",
|
47 |
+
"eos_token": "</s>",
|
48 |
+
"mask_token": "<mask>",
|
49 |
+
"max_length": 512,
|
50 |
+
"model_max_length": 512,
|
51 |
+
"pad_token": "<pad>",
|
52 |
+
"sep_token": "</s>",
|
53 |
+
"tokenizer_class": "XLMRobertaTokenizer",
|
54 |
+
"unk_token": "<unk>"
|
55 |
+
}
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a279c6f7fdd6b60351e3a5cf0cfa5807a87e5442cda51b1ddb77aaa0822970ad
|
3 |
+
size 4728
|