AmirlyPhd/final_V1-bert-text-classification-model
Browse files- README.md +94 -0
- config.json +45 -0
- model.safetensors +3 -0
- special_tokens_map.json +7 -0
- tokenizer.json +0 -0
- tokenizer_config.json +55 -0
- training_args.bin +3 -0
- vocab.txt +0 -0
README.md
ADDED
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
base_model: bert-base-uncased
|
4 |
+
tags:
|
5 |
+
- generated_from_trainer
|
6 |
+
metrics:
|
7 |
+
- accuracy
|
8 |
+
- f1
|
9 |
+
- precision
|
10 |
+
- recall
|
11 |
+
model-index:
|
12 |
+
- name: final_V1-bert-text-classification-model
|
13 |
+
results: []
|
14 |
+
---
|
15 |
+
|
16 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
17 |
+
should probably proofread and complete it, then remove this comment. -->
|
18 |
+
|
19 |
+
# final_V1-bert-text-classification-model
|
20 |
+
|
21 |
+
This model is a fine-tuned version of [bert-base-uncased](https://huggingface.co/bert-base-uncased) on an unknown dataset.
|
22 |
+
It achieves the following results on the evaluation set:
|
23 |
+
- Loss: 0.1498
|
24 |
+
- Accuracy: 0.9713
|
25 |
+
- F1: 0.8341
|
26 |
+
- Precision: 0.8330
|
27 |
+
- Recall: 0.8356
|
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: 5e-05
|
47 |
+
- train_batch_size: 16
|
48 |
+
- eval_batch_size: 32
|
49 |
+
- seed: 42
|
50 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
51 |
+
- lr_scheduler_type: linear
|
52 |
+
- lr_scheduler_warmup_steps: 100
|
53 |
+
- num_epochs: 3
|
54 |
+
- mixed_precision_training: Native AMP
|
55 |
+
|
56 |
+
### Training results
|
57 |
+
|
58 |
+
| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 | Precision | Recall |
|
59 |
+
|:-------------:|:-----:|:----:|:---------------:|:--------:|:------:|:---------:|:------:|
|
60 |
+
| 1.6252 | 0.11 | 50 | 1.7120 | 0.3451 | 0.1545 | 0.2382 | 0.1762 |
|
61 |
+
| 0.7857 | 0.22 | 100 | 0.7296 | 0.8209 | 0.4973 | 0.4815 | 0.5166 |
|
62 |
+
| 0.2986 | 0.33 | 150 | 0.5358 | 0.8830 | 0.6565 | 0.6402 | 0.6744 |
|
63 |
+
| 0.2612 | 0.44 | 200 | 0.4678 | 0.9035 | 0.6704 | 0.6621 | 0.6795 |
|
64 |
+
| 0.153 | 0.55 | 250 | 0.4325 | 0.9065 | 0.6648 | 0.6446 | 0.6879 |
|
65 |
+
| 0.2274 | 0.66 | 300 | 0.3498 | 0.8969 | 0.6440 | 0.6237 | 0.6677 |
|
66 |
+
| 0.1449 | 0.76 | 350 | 0.4254 | 0.8964 | 0.6885 | 0.8012 | 0.6895 |
|
67 |
+
| 0.1695 | 0.87 | 400 | 0.3484 | 0.9248 | 0.7301 | 0.7857 | 0.7208 |
|
68 |
+
| 0.1206 | 0.98 | 450 | 0.3075 | 0.9218 | 0.7351 | 0.7586 | 0.7279 |
|
69 |
+
| 0.1142 | 1.09 | 500 | 0.2241 | 0.9467 | 0.8063 | 0.7964 | 0.8218 |
|
70 |
+
| 0.0642 | 1.2 | 550 | 0.2527 | 0.9491 | 0.8159 | 0.8106 | 0.8239 |
|
71 |
+
| 0.0935 | 1.31 | 600 | 0.1961 | 0.9601 | 0.8216 | 0.8270 | 0.8173 |
|
72 |
+
| 0.0755 | 1.42 | 650 | 0.1290 | 0.9691 | 0.8272 | 0.8348 | 0.8201 |
|
73 |
+
| 0.108 | 1.53 | 700 | 0.1712 | 0.9612 | 0.8215 | 0.8311 | 0.8130 |
|
74 |
+
| 0.0667 | 1.64 | 750 | 0.1449 | 0.9716 | 0.8354 | 0.8371 | 0.8338 |
|
75 |
+
| 0.0925 | 1.75 | 800 | 0.1193 | 0.9721 | 0.8345 | 0.8353 | 0.8337 |
|
76 |
+
| 0.0769 | 1.86 | 850 | 0.1477 | 0.9675 | 0.8299 | 0.8270 | 0.8334 |
|
77 |
+
| 0.0558 | 1.97 | 900 | 0.1988 | 0.9606 | 0.8239 | 0.8194 | 0.8299 |
|
78 |
+
| 0.0379 | 2.07 | 950 | 0.1546 | 0.9694 | 0.8319 | 0.8300 | 0.8340 |
|
79 |
+
| 0.0358 | 2.18 | 1000 | 0.1871 | 0.9655 | 0.8295 | 0.8283 | 0.8312 |
|
80 |
+
| 0.0248 | 2.29 | 1050 | 0.1631 | 0.9661 | 0.8303 | 0.8278 | 0.8333 |
|
81 |
+
| 0.0412 | 2.4 | 1100 | 0.1688 | 0.9658 | 0.8283 | 0.8235 | 0.8340 |
|
82 |
+
| 0.0096 | 2.51 | 1150 | 0.1726 | 0.9661 | 0.8316 | 0.8297 | 0.8342 |
|
83 |
+
| 0.0025 | 2.62 | 1200 | 0.1808 | 0.9653 | 0.8300 | 0.8261 | 0.8348 |
|
84 |
+
| 0.0074 | 2.73 | 1250 | 0.1697 | 0.9677 | 0.8323 | 0.8291 | 0.8360 |
|
85 |
+
| 0.028 | 2.84 | 1300 | 0.1630 | 0.9705 | 0.8359 | 0.8344 | 0.8377 |
|
86 |
+
| 0.0292 | 2.95 | 1350 | 0.1743 | 0.9696 | 0.8352 | 0.8341 | 0.8366 |
|
87 |
+
|
88 |
+
|
89 |
+
### Framework versions
|
90 |
+
|
91 |
+
- Transformers 4.39.3
|
92 |
+
- Pytorch 2.1.2
|
93 |
+
- Datasets 2.18.0
|
94 |
+
- Tokenizers 0.15.2
|
config.json
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "bert-base-uncased",
|
3 |
+
"architectures": [
|
4 |
+
"BertForSequenceClassification"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"classifier_dropout": null,
|
8 |
+
"gradient_checkpointing": false,
|
9 |
+
"hidden_act": "gelu",
|
10 |
+
"hidden_dropout_prob": 0.1,
|
11 |
+
"hidden_size": 768,
|
12 |
+
"id2label": {
|
13 |
+
"0": "LABEL_0",
|
14 |
+
"1": "LABEL_1",
|
15 |
+
"2": "LABEL_2",
|
16 |
+
"3": "LABEL_3",
|
17 |
+
"4": "LABEL_4",
|
18 |
+
"5": "LABEL_5",
|
19 |
+
"6": "LABEL_6"
|
20 |
+
},
|
21 |
+
"initializer_range": 0.02,
|
22 |
+
"intermediate_size": 3072,
|
23 |
+
"label2id": {
|
24 |
+
"LABEL_0": 0,
|
25 |
+
"LABEL_1": 1,
|
26 |
+
"LABEL_2": 2,
|
27 |
+
"LABEL_3": 3,
|
28 |
+
"LABEL_4": 4,
|
29 |
+
"LABEL_5": 5,
|
30 |
+
"LABEL_6": 6
|
31 |
+
},
|
32 |
+
"layer_norm_eps": 1e-12,
|
33 |
+
"max_position_embeddings": 512,
|
34 |
+
"model_type": "bert",
|
35 |
+
"num_attention_heads": 12,
|
36 |
+
"num_hidden_layers": 12,
|
37 |
+
"pad_token_id": 0,
|
38 |
+
"position_embedding_type": "absolute",
|
39 |
+
"problem_type": "single_label_classification",
|
40 |
+
"torch_dtype": "float32",
|
41 |
+
"transformers_version": "4.39.3",
|
42 |
+
"type_vocab_size": 2,
|
43 |
+
"use_cache": true,
|
44 |
+
"vocab_size": 30522
|
45 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:08ace5345b704ef67d0077b47f8c909614a113fbc4dca522dca900ef29b4037f
|
3 |
+
size 437974028
|
special_tokens_map.json
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"cls_token": "[CLS]",
|
3 |
+
"mask_token": "[MASK]",
|
4 |
+
"pad_token": "[PAD]",
|
5 |
+
"sep_token": "[SEP]",
|
6 |
+
"unk_token": "[UNK]"
|
7 |
+
}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
"clean_up_tokenization_spaces": true,
|
45 |
+
"cls_token": "[CLS]",
|
46 |
+
"do_lower_case": true,
|
47 |
+
"mask_token": "[MASK]",
|
48 |
+
"model_max_length": 512,
|
49 |
+
"pad_token": "[PAD]",
|
50 |
+
"sep_token": "[SEP]",
|
51 |
+
"strip_accents": null,
|
52 |
+
"tokenize_chinese_chars": true,
|
53 |
+
"tokenizer_class": "BertTokenizer",
|
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:1027cfa045ff361f8629fe3dfdb411af1d9ecd4de7bc0372c23d26eb6a2d632e
|
3 |
+
size 4920
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|