AmirlyPhd/v6-bert-combined-dataset-text-classification-model
Browse files- README.md +103 -0
- config.json +45 -0
- model.safetensors +3 -0
- training_args.bin +3 -0
README.md
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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: V4-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 |
+
# V4-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.1669
|
| 24 |
+
- Accuracy: 0.9625
|
| 25 |
+
- F1: 0.8267
|
| 26 |
+
- Precision: 0.8224
|
| 27 |
+
- Recall: 0.8323
|
| 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: 4
|
| 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.5437 | 0.11 | 50 | 1.6872 | 0.2896 | 0.0712 | 0.1912 | 0.1327 |
|
| 61 |
+
| 0.7301 | 0.22 | 100 | 0.7109 | 0.8078 | 0.4981 | 0.4962 | 0.5091 |
|
| 62 |
+
| 0.3015 | 0.33 | 150 | 0.4554 | 0.8988 | 0.6675 | 0.6601 | 0.6756 |
|
| 63 |
+
| 0.2653 | 0.44 | 200 | 0.5038 | 0.8682 | 0.6422 | 0.6256 | 0.6615 |
|
| 64 |
+
| 0.1756 | 0.55 | 250 | 0.4243 | 0.9106 | 0.6947 | 0.8014 | 0.7020 |
|
| 65 |
+
| 0.2054 | 0.66 | 300 | 0.3561 | 0.9087 | 0.6890 | 0.8099 | 0.6808 |
|
| 66 |
+
| 0.1555 | 0.76 | 350 | 0.2747 | 0.9166 | 0.7225 | 0.8152 | 0.7111 |
|
| 67 |
+
| 0.1215 | 0.87 | 400 | 0.1767 | 0.9625 | 0.8282 | 0.8258 | 0.8313 |
|
| 68 |
+
| 0.1221 | 0.98 | 450 | 0.3365 | 0.9243 | 0.7956 | 0.7887 | 0.8103 |
|
| 69 |
+
| 0.1382 | 1.09 | 500 | 0.2132 | 0.9554 | 0.8235 | 0.8221 | 0.8263 |
|
| 70 |
+
| 0.0829 | 1.2 | 550 | 0.2316 | 0.9524 | 0.8216 | 0.8178 | 0.8279 |
|
| 71 |
+
| 0.0978 | 1.31 | 600 | 0.1630 | 0.9680 | 0.8356 | 0.8353 | 0.8363 |
|
| 72 |
+
| 0.0876 | 1.42 | 650 | 0.1157 | 0.9718 | 0.8363 | 0.8359 | 0.8370 |
|
| 73 |
+
| 0.0818 | 1.53 | 700 | 0.1504 | 0.9669 | 0.8338 | 0.8389 | 0.8289 |
|
| 74 |
+
| 0.0642 | 1.64 | 750 | 0.1519 | 0.9713 | 0.8364 | 0.8384 | 0.8347 |
|
| 75 |
+
| 0.0984 | 1.75 | 800 | 0.1716 | 0.9666 | 0.8334 | 0.8360 | 0.8310 |
|
| 76 |
+
| 0.0724 | 1.86 | 850 | 0.1554 | 0.9694 | 0.8358 | 0.8366 | 0.8353 |
|
| 77 |
+
| 0.0546 | 1.97 | 900 | 0.1799 | 0.9642 | 0.8329 | 0.8339 | 0.8328 |
|
| 78 |
+
| 0.0559 | 2.07 | 950 | 0.1864 | 0.9642 | 0.8323 | 0.8294 | 0.8363 |
|
| 79 |
+
| 0.0396 | 2.18 | 1000 | 0.2251 | 0.9601 | 0.8286 | 0.8262 | 0.8327 |
|
| 80 |
+
| 0.0509 | 2.29 | 1050 | 0.1233 | 0.9721 | 0.8341 | 0.8358 | 0.8325 |
|
| 81 |
+
| 0.0528 | 2.4 | 1100 | 0.1674 | 0.9669 | 0.8345 | 0.8336 | 0.8360 |
|
| 82 |
+
| 0.0269 | 2.51 | 1150 | 0.1662 | 0.9686 | 0.8365 | 0.8350 | 0.8384 |
|
| 83 |
+
| 0.009 | 2.62 | 1200 | 0.1835 | 0.9661 | 0.8341 | 0.8310 | 0.8378 |
|
| 84 |
+
| 0.0193 | 2.73 | 1250 | 0.1949 | 0.9666 | 0.8339 | 0.8342 | 0.8340 |
|
| 85 |
+
| 0.0502 | 2.84 | 1300 | 0.1532 | 0.9694 | 0.8327 | 0.8305 | 0.8351 |
|
| 86 |
+
| 0.027 | 2.95 | 1350 | 0.1821 | 0.9680 | 0.8355 | 0.8351 | 0.8365 |
|
| 87 |
+
| 0.0271 | 3.06 | 1400 | 0.2110 | 0.9344 | 0.7545 | 0.8226 | 0.7387 |
|
| 88 |
+
| 0.0149 | 3.17 | 1450 | 0.2127 | 0.9631 | 0.8336 | 0.8337 | 0.8345 |
|
| 89 |
+
| 0.018 | 3.28 | 1500 | 0.1662 | 0.9710 | 0.8366 | 0.8347 | 0.8388 |
|
| 90 |
+
| 0.0067 | 3.38 | 1550 | 0.1927 | 0.9669 | 0.8340 | 0.8309 | 0.8378 |
|
| 91 |
+
| 0.0102 | 3.49 | 1600 | 0.1735 | 0.9705 | 0.8363 | 0.8333 | 0.8398 |
|
| 92 |
+
| 0.0035 | 3.6 | 1650 | 0.1687 | 0.9705 | 0.8356 | 0.8350 | 0.8366 |
|
| 93 |
+
| 0.0014 | 3.71 | 1700 | 0.1689 | 0.9713 | 0.8363 | 0.8359 | 0.8370 |
|
| 94 |
+
| 0.0147 | 3.82 | 1750 | 0.1648 | 0.9710 | 0.8361 | 0.8355 | 0.8369 |
|
| 95 |
+
| 0.0085 | 3.93 | 1800 | 0.1667 | 0.9716 | 0.8364 | 0.8358 | 0.8371 |
|
| 96 |
+
|
| 97 |
+
|
| 98 |
+
### Framework versions
|
| 99 |
+
|
| 100 |
+
- Transformers 4.39.3
|
| 101 |
+
- Pytorch 2.1.2
|
| 102 |
+
- Datasets 2.18.0
|
| 103 |
+
- 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:54e3f715e0ee458d53abea70c1cc13ef642fb11179aff0b441ca979dd860762b
|
| 3 |
+
size 437974028
|
training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1f84fe99ac40e854d98bdc74e6cd520462c79bd69f7435cc129459282ef291cc
|
| 3 |
+
size 4920
|