Commit
·
6b117a5
1
Parent(s):
03f0960
Zamoranesis/mental_bert_classifier
Browse files- README.md +76 -0
- config.json +41 -0
- pytorch_model.bin +3 -0
- special_tokens_map.json +7 -0
- tokenizer.json +0 -0
- tokenizer_config.json +17 -0
- training_args.bin +3 -0
- vocab.txt +0 -0
README.md
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc-by-nc-4.0
|
| 3 |
+
base_model: Zamoranesis/mental_bert
|
| 4 |
+
tags:
|
| 5 |
+
- generated_from_trainer
|
| 6 |
+
metrics:
|
| 7 |
+
- f1
|
| 8 |
+
model-index:
|
| 9 |
+
- name: mental_bert_classifier
|
| 10 |
+
results: []
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
| 14 |
+
should probably proofread and complete it, then remove this comment. -->
|
| 15 |
+
|
| 16 |
+
# mental_bert_classifier
|
| 17 |
+
|
| 18 |
+
This model is a fine-tuned version of [Zamoranesis/mental_bert](https://huggingface.co/Zamoranesis/mental_bert) on an unknown dataset.
|
| 19 |
+
It achieves the following results on the evaluation set:
|
| 20 |
+
- Loss: 0.3709
|
| 21 |
+
- F1 Class 0: 0.8475
|
| 22 |
+
- F1 Class 1: 0.9157
|
| 23 |
+
- F1 Class 2: 0.7692
|
| 24 |
+
- F1 Class 3: 0.8764
|
| 25 |
+
- F1 Class 4: 0.8772
|
| 26 |
+
- F1: 0.8572
|
| 27 |
+
|
| 28 |
+
## Model description
|
| 29 |
+
|
| 30 |
+
More information needed
|
| 31 |
+
|
| 32 |
+
## Intended uses & limitations
|
| 33 |
+
|
| 34 |
+
More information needed
|
| 35 |
+
|
| 36 |
+
## Training and evaluation data
|
| 37 |
+
|
| 38 |
+
More information needed
|
| 39 |
+
|
| 40 |
+
## Training procedure
|
| 41 |
+
|
| 42 |
+
### Training hyperparameters
|
| 43 |
+
|
| 44 |
+
The following hyperparameters were used during training:
|
| 45 |
+
- learning_rate: 0.0005
|
| 46 |
+
- train_batch_size: 64
|
| 47 |
+
- eval_batch_size: 64
|
| 48 |
+
- seed: 42
|
| 49 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
| 50 |
+
- lr_scheduler_type: linear
|
| 51 |
+
- lr_scheduler_warmup_ratio: 0.1
|
| 52 |
+
- lr_scheduler_warmup_steps: 100
|
| 53 |
+
- training_steps: 1000
|
| 54 |
+
|
| 55 |
+
### Training results
|
| 56 |
+
|
| 57 |
+
| Training Loss | Epoch | Step | Validation Loss | F1 Class 0 | F1 Class 1 | F1 Class 2 | F1 Class 3 | F1 Class 4 | F1 |
|
| 58 |
+
|:-------------:|:-----:|:----:|:---------------:|:----------:|:----------:|:----------:|:----------:|:----------:|:------:|
|
| 59 |
+
| 1.3938 | 6.25 | 100 | 1.0235 | 0.7458 | 0.8000 | 0.6957 | 0.8315 | 0.8197 | 0.7785 |
|
| 60 |
+
| 0.7425 | 12.5 | 200 | 0.6302 | 0.7667 | 0.875 | 0.7755 | 0.8478 | 0.8475 | 0.8225 |
|
| 61 |
+
| 0.5225 | 18.75 | 300 | 0.5192 | 0.8276 | 0.9268 | 0.7843 | 0.8667 | 0.8475 | 0.8506 |
|
| 62 |
+
| 0.4433 | 25.0 | 400 | 0.4599 | 0.8276 | 0.9157 | 0.7692 | 0.8636 | 0.8475 | 0.8447 |
|
| 63 |
+
| 0.3862 | 31.25 | 500 | 0.4208 | 0.8475 | 0.9157 | 0.7692 | 0.8636 | 0.8621 | 0.8516 |
|
| 64 |
+
| 0.3702 | 37.5 | 600 | 0.3987 | 0.8475 | 0.9157 | 0.7692 | 0.8764 | 0.8772 | 0.8572 |
|
| 65 |
+
| 0.3437 | 43.75 | 700 | 0.3872 | 0.8475 | 0.9157 | 0.7692 | 0.8764 | 0.8772 | 0.8572 |
|
| 66 |
+
| 0.337 | 50.0 | 800 | 0.3759 | 0.8475 | 0.9157 | 0.7692 | 0.8764 | 0.8772 | 0.8572 |
|
| 67 |
+
| 0.3253 | 56.25 | 900 | 0.3727 | 0.8475 | 0.9157 | 0.7692 | 0.8764 | 0.8772 | 0.8572 |
|
| 68 |
+
| 0.3236 | 62.5 | 1000 | 0.3709 | 0.8475 | 0.9157 | 0.7692 | 0.8764 | 0.8772 | 0.8572 |
|
| 69 |
+
|
| 70 |
+
|
| 71 |
+
### Framework versions
|
| 72 |
+
|
| 73 |
+
- Transformers 4.33.3
|
| 74 |
+
- Pytorch 2.0.1+cu118
|
| 75 |
+
- Datasets 2.14.5
|
| 76 |
+
- Tokenizers 0.13.3
|
config.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "Zamoranesis/mental_bert",
|
| 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 |
+
},
|
| 19 |
+
"initializer_range": 0.02,
|
| 20 |
+
"intermediate_size": 3072,
|
| 21 |
+
"label2id": {
|
| 22 |
+
"LABEL_0": 0,
|
| 23 |
+
"LABEL_1": 1,
|
| 24 |
+
"LABEL_2": 2,
|
| 25 |
+
"LABEL_3": 3,
|
| 26 |
+
"LABEL_4": 4
|
| 27 |
+
},
|
| 28 |
+
"layer_norm_eps": 1e-12,
|
| 29 |
+
"max_position_embeddings": 512,
|
| 30 |
+
"model_type": "bert",
|
| 31 |
+
"num_attention_heads": 12,
|
| 32 |
+
"num_hidden_layers": 12,
|
| 33 |
+
"pad_token_id": 0,
|
| 34 |
+
"position_embedding_type": "absolute",
|
| 35 |
+
"problem_type": "single_label_classification",
|
| 36 |
+
"torch_dtype": "float32",
|
| 37 |
+
"transformers_version": "4.33.3",
|
| 38 |
+
"type_vocab_size": 2,
|
| 39 |
+
"use_cache": true,
|
| 40 |
+
"vocab_size": 30522
|
| 41 |
+
}
|
pytorch_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d1ab857dedd1fc10183a7b9067bf200d92cee4def568c5556c70314a7afd32fc
|
| 3 |
+
size 438012721
|
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,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"clean_up_tokenization_spaces": true,
|
| 3 |
+
"cls_token": "[CLS]",
|
| 4 |
+
"do_lower_case": true,
|
| 5 |
+
"mask_token": "[MASK]",
|
| 6 |
+
"max_length": 256,
|
| 7 |
+
"model_max_length": 512,
|
| 8 |
+
"pad_token": "[PAD]",
|
| 9 |
+
"sep_token": "[SEP]",
|
| 10 |
+
"stride": 0,
|
| 11 |
+
"strip_accents": null,
|
| 12 |
+
"tokenize_chinese_chars": true,
|
| 13 |
+
"tokenizer_class": "BertTokenizer",
|
| 14 |
+
"truncation_side": "right",
|
| 15 |
+
"truncation_strategy": "longest_first",
|
| 16 |
+
"unk_token": "[UNK]"
|
| 17 |
+
}
|
training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6fd4a41631288adc77945297c3e922f783dd3b8d5935c03faa243210690b06e7
|
| 3 |
+
size 4091
|
vocab.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|