gabrielblins
commited on
Commit
•
b61c930
1
Parent(s):
f3e6d7c
emotion_classifier_bert_mini
Browse files- README.md +73 -0
- config.json +42 -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,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: mit
|
3 |
+
base_model: prajjwal1/bert-mini
|
4 |
+
tags:
|
5 |
+
- generated_from_trainer
|
6 |
+
metrics:
|
7 |
+
- f1
|
8 |
+
- accuracy
|
9 |
+
model-index:
|
10 |
+
- name: bert-mini-emotion_classifier
|
11 |
+
results: []
|
12 |
+
---
|
13 |
+
|
14 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
15 |
+
should probably proofread and complete it, then remove this comment. -->
|
16 |
+
|
17 |
+
# bert-mini-emotion_classifier
|
18 |
+
|
19 |
+
This model is a fine-tuned version of [prajjwal1/bert-mini](https://huggingface.co/prajjwal1/bert-mini) on an unknown dataset.
|
20 |
+
It achieves the following results on the evaluation set:
|
21 |
+
- Loss: 0.0648
|
22 |
+
- F1: 0.9315
|
23 |
+
- Roc Auc: 0.9589
|
24 |
+
- Accuracy: 0.9224
|
25 |
+
|
26 |
+
## Model description
|
27 |
+
|
28 |
+
More information needed
|
29 |
+
|
30 |
+
## Intended uses & limitations
|
31 |
+
|
32 |
+
More information needed
|
33 |
+
|
34 |
+
## Training and evaluation data
|
35 |
+
|
36 |
+
More information needed
|
37 |
+
|
38 |
+
## Training procedure
|
39 |
+
|
40 |
+
### Training hyperparameters
|
41 |
+
|
42 |
+
The following hyperparameters were used during training:
|
43 |
+
- learning_rate: 2e-05
|
44 |
+
- train_batch_size: 64
|
45 |
+
- eval_batch_size: 64
|
46 |
+
- seed: 42
|
47 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
48 |
+
- lr_scheduler_type: linear
|
49 |
+
- lr_scheduler_warmup_steps: 5
|
50 |
+
- num_epochs: 1
|
51 |
+
|
52 |
+
### Training results
|
53 |
+
|
54 |
+
| Training Loss | Epoch | Step | Validation Loss | F1 | Roc Auc | Accuracy |
|
55 |
+
|:-------------:|:-----:|:----:|:---------------:|:------:|:-------:|:--------:|
|
56 |
+
| 0.4176 | 0.1 | 500 | 0.2929 | 0.6755 | 0.7687 | 0.5550 |
|
57 |
+
| 0.2278 | 0.19 | 1000 | 0.1623 | 0.8931 | 0.9246 | 0.8630 |
|
58 |
+
| 0.1513 | 0.29 | 1500 | 0.1184 | 0.9185 | 0.9450 | 0.9022 |
|
59 |
+
| 0.1198 | 0.38 | 2000 | 0.0957 | 0.9274 | 0.9536 | 0.9197 |
|
60 |
+
| 0.1011 | 0.48 | 2500 | 0.0815 | 0.9306 | 0.9568 | 0.9230 |
|
61 |
+
| 0.0881 | 0.58 | 3000 | 0.0729 | 0.9320 | 0.9575 | 0.9237 |
|
62 |
+
| 0.0815 | 0.67 | 3500 | 0.0669 | 0.9337 | 0.9596 | 0.9256 |
|
63 |
+
| 0.0767 | 0.77 | 4000 | 0.0633 | 0.9346 | 0.9609 | 0.9260 |
|
64 |
+
| 0.0721 | 0.86 | 4500 | 0.0612 | 0.9333 | 0.9602 | 0.9233 |
|
65 |
+
| 0.071 | 0.96 | 5000 | 0.0601 | 0.9339 | 0.9607 | 0.9251 |
|
66 |
+
|
67 |
+
|
68 |
+
### Framework versions
|
69 |
+
|
70 |
+
- Transformers 4.36.2
|
71 |
+
- Pytorch 2.1.2+cu121
|
72 |
+
- Datasets 2.16.0
|
73 |
+
- Tokenizers 0.15.0
|
config.json
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "prajjwal1/bert-mini",
|
3 |
+
"architectures": [
|
4 |
+
"BertForSequenceClassification"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"classifier_dropout": null,
|
8 |
+
"hidden_act": "gelu",
|
9 |
+
"hidden_dropout_prob": 0.1,
|
10 |
+
"hidden_size": 256,
|
11 |
+
"id2label": {
|
12 |
+
"0": "sadness",
|
13 |
+
"1": "joy",
|
14 |
+
"2": "love",
|
15 |
+
"3": "anger",
|
16 |
+
"4": "fear",
|
17 |
+
"5": "surprise"
|
18 |
+
},
|
19 |
+
"initializer_range": 0.02,
|
20 |
+
"intermediate_size": 1024,
|
21 |
+
"label2id": {
|
22 |
+
"anger": 3,
|
23 |
+
"fear": 4,
|
24 |
+
"joy": 1,
|
25 |
+
"love": 2,
|
26 |
+
"sadness": 0,
|
27 |
+
"surprise": 5
|
28 |
+
},
|
29 |
+
"layer_norm_eps": 1e-12,
|
30 |
+
"max_position_embeddings": 512,
|
31 |
+
"model_type": "bert",
|
32 |
+
"num_attention_heads": 4,
|
33 |
+
"num_hidden_layers": 4,
|
34 |
+
"pad_token_id": 0,
|
35 |
+
"position_embedding_type": "absolute",
|
36 |
+
"problem_type": "multi_label_classification",
|
37 |
+
"torch_dtype": "float32",
|
38 |
+
"transformers_version": "4.36.2",
|
39 |
+
"type_vocab_size": 2,
|
40 |
+
"use_cache": true,
|
41 |
+
"vocab_size": 30522
|
42 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3fea424e925459af0fff990071c58f6b5197d5be63d7c9d2f5a22107a2479360
|
3 |
+
size 44696720
|
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:809bcb71655e8d5375bcc7d461f4b0588fecefbd50ec9fc916ff7fd41a38d5db
|
3 |
+
size 4728
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|