thanaphatt1
commited on
Commit
·
ced5390
1
Parent(s):
59fb418
thanaphatt1/WangchanBERTa-LST20
Browse files- README.md +92 -0
- config.json +95 -0
- model.safetensors +3 -0
- sentencepiece.bpe.model +3 -0
- special_tokens_map.json +20 -0
- tokenizer.json +0 -0
- tokenizer_config.json +84 -0
- training_args.bin +3 -0
README.md
ADDED
@@ -0,0 +1,92 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: cc-by-4.0
|
3 |
+
base_model: pythainlp/thainer-corpus-v2-base-model
|
4 |
+
tags:
|
5 |
+
- generated_from_trainer
|
6 |
+
datasets:
|
7 |
+
- lst20
|
8 |
+
metrics:
|
9 |
+
- precision
|
10 |
+
- recall
|
11 |
+
- f1
|
12 |
+
- accuracy
|
13 |
+
model-index:
|
14 |
+
- name: toneza
|
15 |
+
results:
|
16 |
+
- task:
|
17 |
+
name: Token Classification
|
18 |
+
type: token-classification
|
19 |
+
dataset:
|
20 |
+
name: lst20
|
21 |
+
type: lst20
|
22 |
+
config: default
|
23 |
+
split: validation
|
24 |
+
args: default
|
25 |
+
metrics:
|
26 |
+
- name: Precision
|
27 |
+
type: precision
|
28 |
+
value: 0.768370802562324
|
29 |
+
- name: Recall
|
30 |
+
type: recall
|
31 |
+
value: 0.8120041393583994
|
32 |
+
- name: F1
|
33 |
+
type: f1
|
34 |
+
value: 0.7895851240015932
|
35 |
+
- name: Accuracy
|
36 |
+
type: accuracy
|
37 |
+
value: 0.956478116244312
|
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 |
+
# toneza
|
44 |
+
|
45 |
+
This model is a fine-tuned version of [pythainlp/thainer-corpus-v2-base-model](https://huggingface.co/pythainlp/thainer-corpus-v2-base-model) on the lst20 dataset.
|
46 |
+
It achieves the following results on the evaluation set:
|
47 |
+
- Loss: 0.1293
|
48 |
+
- Precision: 0.7684
|
49 |
+
- Recall: 0.8120
|
50 |
+
- F1: 0.7896
|
51 |
+
- Accuracy: 0.9565
|
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: 2e-05
|
71 |
+
- train_batch_size: 32
|
72 |
+
- eval_batch_size: 32
|
73 |
+
- seed: 42
|
74 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
75 |
+
- lr_scheduler_type: linear
|
76 |
+
- num_epochs: 3
|
77 |
+
|
78 |
+
### Training results
|
79 |
+
|
80 |
+
| Training Loss | Epoch | Step | Validation Loss | Precision | Recall | F1 | Accuracy |
|
81 |
+
|:-------------:|:-----:|:----:|:---------------:|:---------:|:------:|:------:|:--------:|
|
82 |
+
| 0.1226 | 1.0 | 1978 | 0.1416 | 0.7414 | 0.7802 | 0.7603 | 0.9518 |
|
83 |
+
| 0.098 | 2.0 | 3956 | 0.1324 | 0.7602 | 0.7966 | 0.7780 | 0.9545 |
|
84 |
+
| 0.0895 | 3.0 | 5934 | 0.1293 | 0.7684 | 0.8120 | 0.7896 | 0.9565 |
|
85 |
+
|
86 |
+
|
87 |
+
### Framework versions
|
88 |
+
|
89 |
+
- Transformers 4.35.2
|
90 |
+
- Pytorch 2.1.0+cu118
|
91 |
+
- Datasets 2.15.0
|
92 |
+
- Tokenizers 0.15.0
|
config.json
ADDED
@@ -0,0 +1,95 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "pythainlp/thainer-corpus-v2-base-model",
|
3 |
+
"architectures": [
|
4 |
+
"CamembertForTokenClassification"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"bos_token_id": 0,
|
8 |
+
"classifier_dropout": null,
|
9 |
+
"eos_token_id": 2,
|
10 |
+
"gradient_checkpointing": false,
|
11 |
+
"hidden_act": "gelu",
|
12 |
+
"hidden_dropout_prob": 0.1,
|
13 |
+
"hidden_size": 768,
|
14 |
+
"id2label": {
|
15 |
+
"0": "O",
|
16 |
+
"1": "B_BRN",
|
17 |
+
"2": "B_DES",
|
18 |
+
"3": "B_DTM",
|
19 |
+
"4": "B_LOC",
|
20 |
+
"5": "B_MEA",
|
21 |
+
"6": "B_NUM",
|
22 |
+
"7": "B_ORG",
|
23 |
+
"8": "B_PER",
|
24 |
+
"9": "B_TRM",
|
25 |
+
"10": "B_TTL",
|
26 |
+
"11": "I_BRN",
|
27 |
+
"12": "I_DES",
|
28 |
+
"13": "I_DTM",
|
29 |
+
"14": "I_LOC",
|
30 |
+
"15": "I_MEA",
|
31 |
+
"16": "I_NUM",
|
32 |
+
"17": "I_ORG",
|
33 |
+
"18": "I_PER",
|
34 |
+
"19": "I_TRM",
|
35 |
+
"20": "I_TTL",
|
36 |
+
"21": "E_BRN",
|
37 |
+
"22": "E_DES",
|
38 |
+
"23": "E_DTM",
|
39 |
+
"24": "E_LOC",
|
40 |
+
"25": "E_MEA",
|
41 |
+
"26": "E_NUM",
|
42 |
+
"27": "E_ORG",
|
43 |
+
"28": "E_PER",
|
44 |
+
"29": "E_TRM",
|
45 |
+
"30": "E_TTL"
|
46 |
+
},
|
47 |
+
"initializer_range": 0.02,
|
48 |
+
"intermediate_size": 3072,
|
49 |
+
"label2id": {
|
50 |
+
"B_BRN": 1,
|
51 |
+
"B_DES": 2,
|
52 |
+
"B_DTM": 3,
|
53 |
+
"B_LOC": 4,
|
54 |
+
"B_MEA": 5,
|
55 |
+
"B_NUM": 6,
|
56 |
+
"B_ORG": 7,
|
57 |
+
"B_PER": 8,
|
58 |
+
"B_TRM": 9,
|
59 |
+
"B_TTL": 10,
|
60 |
+
"E_BRN": 21,
|
61 |
+
"E_DES": 22,
|
62 |
+
"E_DTM": 23,
|
63 |
+
"E_LOC": 24,
|
64 |
+
"E_MEA": 25,
|
65 |
+
"E_NUM": 26,
|
66 |
+
"E_ORG": 27,
|
67 |
+
"E_PER": 28,
|
68 |
+
"E_TRM": 29,
|
69 |
+
"E_TTL": 30,
|
70 |
+
"I_BRN": 11,
|
71 |
+
"I_DES": 12,
|
72 |
+
"I_DTM": 13,
|
73 |
+
"I_LOC": 14,
|
74 |
+
"I_MEA": 15,
|
75 |
+
"I_NUM": 16,
|
76 |
+
"I_ORG": 17,
|
77 |
+
"I_PER": 18,
|
78 |
+
"I_TRM": 19,
|
79 |
+
"I_TTL": 20,
|
80 |
+
"O": 0
|
81 |
+
},
|
82 |
+
"layer_norm_eps": 1e-12,
|
83 |
+
"max_position_embeddings": 512,
|
84 |
+
"model_type": "camembert",
|
85 |
+
"num_attention_head": 12,
|
86 |
+
"num_attention_heads": 12,
|
87 |
+
"num_hidden_layers": 12,
|
88 |
+
"pad_token_id": 1,
|
89 |
+
"position_embedding_type": "absolute",
|
90 |
+
"torch_dtype": "float32",
|
91 |
+
"transformers_version": "4.35.2",
|
92 |
+
"type_vocab_size": 1,
|
93 |
+
"use_cache": true,
|
94 |
+
"vocab_size": 25005
|
95 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c1c7135a6e32117beefb11e6d9aa1a26708311a16826dd528cc59623ba263d3b
|
3 |
+
size 418734556
|
sentencepiece.bpe.model
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:49c4ba4e495ddf31eb2fdba7fc6aef3c233091d25d35bc9d24694ccf48ae114c
|
3 |
+
size 904693
|
special_tokens_map.json
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"additional_special_tokens": [
|
3 |
+
"<s>NOTUSED",
|
4 |
+
"</s>NOTUSED",
|
5 |
+
"<_>"
|
6 |
+
],
|
7 |
+
"bos_token": "<s>",
|
8 |
+
"cls_token": "<s>",
|
9 |
+
"eos_token": "</s>",
|
10 |
+
"mask_token": {
|
11 |
+
"content": "<mask>",
|
12 |
+
"lstrip": true,
|
13 |
+
"normalized": true,
|
14 |
+
"rstrip": false,
|
15 |
+
"single_word": false
|
16 |
+
},
|
17 |
+
"pad_token": "<pad>",
|
18 |
+
"sep_token": "</s>",
|
19 |
+
"unk_token": "<unk>"
|
20 |
+
}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"added_tokens_decoder": {
|
3 |
+
"0": {
|
4 |
+
"content": "<s>NOTUSED",
|
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>NOTUSED",
|
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 |
+
"5": {
|
36 |
+
"content": "<s>",
|
37 |
+
"lstrip": false,
|
38 |
+
"normalized": false,
|
39 |
+
"rstrip": false,
|
40 |
+
"single_word": false,
|
41 |
+
"special": true
|
42 |
+
},
|
43 |
+
"6": {
|
44 |
+
"content": "</s>",
|
45 |
+
"lstrip": false,
|
46 |
+
"normalized": false,
|
47 |
+
"rstrip": false,
|
48 |
+
"single_word": false,
|
49 |
+
"special": true
|
50 |
+
},
|
51 |
+
"8": {
|
52 |
+
"content": "<_>",
|
53 |
+
"lstrip": false,
|
54 |
+
"normalized": false,
|
55 |
+
"rstrip": false,
|
56 |
+
"single_word": false,
|
57 |
+
"special": true
|
58 |
+
},
|
59 |
+
"25004": {
|
60 |
+
"content": "<mask>",
|
61 |
+
"lstrip": true,
|
62 |
+
"normalized": true,
|
63 |
+
"rstrip": false,
|
64 |
+
"single_word": false,
|
65 |
+
"special": true
|
66 |
+
}
|
67 |
+
},
|
68 |
+
"additional_special_tokens": [
|
69 |
+
"<s>NOTUSED",
|
70 |
+
"</s>NOTUSED",
|
71 |
+
"<_>"
|
72 |
+
],
|
73 |
+
"bos_token": "<s>",
|
74 |
+
"clean_up_tokenization_spaces": true,
|
75 |
+
"cls_token": "<s>",
|
76 |
+
"eos_token": "</s>",
|
77 |
+
"mask_token": "<mask>",
|
78 |
+
"model_max_length": 1000000000000000019884624838656,
|
79 |
+
"pad_token": "<pad>",
|
80 |
+
"sep_token": "</s>",
|
81 |
+
"sp_model_kwargs": {},
|
82 |
+
"tokenizer_class": "CamembertTokenizer",
|
83 |
+
"unk_token": "<unk>"
|
84 |
+
}
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:217d55f7698d62c36e0572fe4a8df8c6bc3aa6f48bac62f6e8c1f3619f72a1ba
|
3 |
+
size 4536
|