Duplicate from transformersbook/distilbert-base-uncased-finetuned-emotion
Browse filesCo-authored-by: Julien Chaumond <julien-c@users.noreply.huggingface.co>
- .gitattributes +27 -0
- .gitignore +1 -0
- README.md +79 -0
- config.json +41 -0
- emissions.csv +7 -0
- pytorch_model.bin +3 -0
- runs/Oct18_16-27-24_vorace/1634567251.70946/events.out.tfevents.1634567251.vorace.553066.5 +3 -0
- runs/Oct18_16-27-24_vorace/events.out.tfevents.1634567251.vorace.553066.4 +3 -0
- runs/Oct18_16-27-24_vorace/events.out.tfevents.1634567380.vorace.553066.6 +3 -0
- runs/Oct23_00-02-09_vorace/1634940147.751533/events.out.tfevents.1634940147.vorace.1081817.1 +3 -0
- runs/Oct23_00-02-09_vorace/events.out.tfevents.1634940147.vorace.1081817.0 +3 -0
- runs/Oct23_00-07-49_vorace/1634940475.0388427/events.out.tfevents.1634940475.vorace.1081817.3 +3 -0
- runs/Oct23_00-07-49_vorace/events.out.tfevents.1634940475.vorace.1081817.2 +3 -0
- runs/Oct23_10-17-16_vorace/1634977047.3566914/events.out.tfevents.1634977047.vorace.1461984.1 +3 -0
- runs/Oct23_10-17-16_vorace/events.out.tfevents.1634977047.vorace.1461984.0 +3 -0
- runs/Oct23_11-11-20_vorace/1634980287.1597767/events.out.tfevents.1634980287.vorace.1470145.1 +3 -0
- runs/Oct23_11-11-20_vorace/events.out.tfevents.1634980287.vorace.1470145.0 +3 -0
- runs/Oct23_11-43-32_vorace/1634982217.3120878/events.out.tfevents.1634982217.vorace.1481626.1 +3 -0
- runs/Oct23_11-43-32_vorace/events.out.tfevents.1634982217.vorace.1481626.0 +3 -0
- runs/Oct23_16-20-43_vorace/1634998852.1440287/events.out.tfevents.1634998852.vorace.1486728.1 +3 -0
- runs/Oct23_16-20-43_vorace/events.out.tfevents.1634998852.vorace.1486728.0 +3 -0
- runs/Oct23_17-08-02_vorace/1635001689.7326474/events.out.tfevents.1635001689.vorace.1560238.1 +3 -0
- runs/Oct23_17-08-02_vorace/events.out.tfevents.1635001689.vorace.1560238.0 +3 -0
- special_tokens_map.json +1 -0
- tokenizer.json +0 -0
- tokenizer_config.json +1 -0
- training_args.bin +3 -0
- vocab.txt +0 -0
.gitattributes
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
4 |
+
*.bin.* filter=lfs diff=lfs merge=lfs -text
|
5 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
11 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
12 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
13 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
14 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
15 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
16 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
17 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
18 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
19 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
20 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
21 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
22 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
23 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
24 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
25 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
26 |
+
*.zstandard filter=lfs diff=lfs merge=lfs -text
|
27 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
.gitignore
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
checkpoint-*/
|
README.md
ADDED
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
tags:
|
4 |
+
- generated_from_trainer
|
5 |
+
datasets:
|
6 |
+
- emotion
|
7 |
+
metrics:
|
8 |
+
- accuracy
|
9 |
+
- f1
|
10 |
+
model-index:
|
11 |
+
- name: distilbert-base-uncased-finetuned-emotion
|
12 |
+
results:
|
13 |
+
- task:
|
14 |
+
name: Text Classification
|
15 |
+
type: text-classification
|
16 |
+
dataset:
|
17 |
+
name: emotion
|
18 |
+
type: emotion
|
19 |
+
args: default
|
20 |
+
metrics:
|
21 |
+
- name: Accuracy
|
22 |
+
type: accuracy
|
23 |
+
value: 0.927
|
24 |
+
- name: F1
|
25 |
+
type: f1
|
26 |
+
value: 0.9271664736493986
|
27 |
+
---
|
28 |
+
|
29 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
30 |
+
should probably proofread and complete it, then remove this comment. -->
|
31 |
+
|
32 |
+
# distilbert-base-uncased-finetuned-emotion
|
33 |
+
|
34 |
+
This model is a fine-tuned version of [distilbert-base-uncased](https://huggingface.co/distilbert-base-uncased) on the emotion dataset. The model is trained in Chapter 2: Text Classification in the [NLP with Transformers book](https://learning.oreilly.com/library/view/natural-language-processing/9781098103231/). You can find the full code in the accompanying [Github repository](https://github.com/nlp-with-transformers/notebooks/blob/main/02_classification.ipynb).
|
35 |
+
|
36 |
+
It achieves the following results on the evaluation set:
|
37 |
+
- Loss: 0.2192
|
38 |
+
- Accuracy: 0.927
|
39 |
+
- F1: 0.9272
|
40 |
+
|
41 |
+
## Model description
|
42 |
+
|
43 |
+
More information needed
|
44 |
+
|
45 |
+
## Intended uses & limitations
|
46 |
+
|
47 |
+
More information needed
|
48 |
+
|
49 |
+
## Training and evaluation data
|
50 |
+
|
51 |
+
More information needed
|
52 |
+
|
53 |
+
## Training procedure
|
54 |
+
|
55 |
+
### Training hyperparameters
|
56 |
+
|
57 |
+
The following hyperparameters were used during training:
|
58 |
+
- learning_rate: 2e-05
|
59 |
+
- train_batch_size: 64
|
60 |
+
- eval_batch_size: 64
|
61 |
+
- seed: 42
|
62 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
63 |
+
- lr_scheduler_type: linear
|
64 |
+
- num_epochs: 2
|
65 |
+
|
66 |
+
### Training results
|
67 |
+
|
68 |
+
| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 |
|
69 |
+
|:-------------:|:-----:|:----:|:---------------:|:--------:|:------:|
|
70 |
+
| 0.8569 | 1.0 | 250 | 0.3386 | 0.894 | 0.8888 |
|
71 |
+
| 0.2639 | 2.0 | 500 | 0.2192 | 0.927 | 0.9272 |
|
72 |
+
|
73 |
+
|
74 |
+
### Framework versions
|
75 |
+
|
76 |
+
- Transformers 4.11.3
|
77 |
+
- Pytorch 1.9.1+cu102
|
78 |
+
- Datasets 1.13.0
|
79 |
+
- Tokenizers 0.10.3
|
config.json
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "distilbert-base-uncased",
|
3 |
+
"activation": "gelu",
|
4 |
+
"architectures": [
|
5 |
+
"DistilBertForSequenceClassification"
|
6 |
+
],
|
7 |
+
"attention_dropout": 0.1,
|
8 |
+
"dim": 768,
|
9 |
+
"dropout": 0.1,
|
10 |
+
"hidden_dim": 3072,
|
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 |
+
"label2id": {
|
21 |
+
"sadness": "0",
|
22 |
+
"joy": "1",
|
23 |
+
"love": "2",
|
24 |
+
"anger": "3",
|
25 |
+
"fear": "4",
|
26 |
+
"surprise": "5"
|
27 |
+
},
|
28 |
+
"max_position_embeddings": 512,
|
29 |
+
"model_type": "distilbert",
|
30 |
+
"n_heads": 12,
|
31 |
+
"n_layers": 6,
|
32 |
+
"pad_token_id": 0,
|
33 |
+
"problem_type": "single_label_classification",
|
34 |
+
"qa_dropout": 0.1,
|
35 |
+
"seq_classif_dropout": 0.2,
|
36 |
+
"sinusoidal_pos_embds": false,
|
37 |
+
"tie_weights_": true,
|
38 |
+
"torch_dtype": "float32",
|
39 |
+
"transformers_version": "4.11.3",
|
40 |
+
"vocab_size": 30522
|
41 |
+
}
|
emissions.csv
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
timestamp,experiment_id,project_name,duration,emissions,energy_consumed,country_name,country_iso_code,region,on_cloud,cloud_provider,cloud_region
|
2 |
+
2021-10-18T16:29:13,1acf5014-b116-4224-a94e-e3b2d3f8db11,codecarbon,101.29942727088928,0.0038884288309597092,0.009158210105033168,France,FRA,île-de-france,N,,
|
3 |
+
2021-10-23T00:09:44,b02a5ceb-21d0-4e71-b5d6-4d83dc43b512,codecarbon,108.99232506752014,0.0040636192465329036,0.009570826795207075,France,FRA,île-de-france,N,,
|
4 |
+
2021-10-23T10:19:16,d4befc3a-f33e-41ce-98b2-4b12665f810d,codecarbon,108.94981837272644,0.0038685866100055207,0.009111476774850524,France,FRA,île-de-france,N,,
|
5 |
+
2021-10-23T11:13:14,e90ba3ca-756f-417b-8b0e-25358d929a6a,codecarbon,107.7050142288208,0.003867900864302768,0.009109861674382585,France,FRA,île-de-france,N,,
|
6 |
+
2021-10-23T11:45:26,f161684b-18a8-448c-9c75-93da1feb3b4c,codecarbon,108.97961115837097,0.0038663447091092486,0.00910619654462508,France,FRA,île-de-france,N,,
|
7 |
+
2021-10-23T16:22:41,db3738aa-6db0-403d-a921-89ffe86aa145,codecarbon,108.88656783103943,0.003823073508759959,0.009004282182417769,France,FRA,île-de-france,N,,
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:966c88a104f380351a8c5a5b241dde857ed8c43288de4387f6f75529227a9439
|
3 |
+
size 267872369
|
runs/Oct18_16-27-24_vorace/1634567251.70946/events.out.tfevents.1634567251.vorace.553066.5
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:fb3b32950e7757f444af5a54d582ea27c2b52c0eddcd5de87d0f0f9542d22a39
|
3 |
+
size 4590
|
runs/Oct18_16-27-24_vorace/events.out.tfevents.1634567251.vorace.553066.4
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5967906c5ec9fe35a3a0e30893ed43c5d1ca254ef4affae86b39f7692d78e3fa
|
3 |
+
size 4792
|
runs/Oct18_16-27-24_vorace/events.out.tfevents.1634567380.vorace.553066.6
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0d36e8f487149bdaa524c9c0331c331d2e8f602171f683d4538bf9c92b016bad
|
3 |
+
size 409
|
runs/Oct23_00-02-09_vorace/1634940147.751533/events.out.tfevents.1634940147.vorace.1081817.1
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a90897ab821b6ffd0d84a3ae2b72a34dc049021c8e18e25d0e184d87b19e65c0
|
3 |
+
size 4590
|
runs/Oct23_00-02-09_vorace/events.out.tfevents.1634940147.vorace.1081817.0
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:af866d8b7a4e5d53d2028ae2f884a76dfef3d766d8e9a08bc64a453ce6b5cae5
|
3 |
+
size 3386
|
runs/Oct23_00-07-49_vorace/1634940475.0388427/events.out.tfevents.1634940475.vorace.1081817.3
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f6831a394de114d91a64bab7e3a2eef2862d0dfdf9e71c1295701a6fd1719bcb
|
3 |
+
size 4590
|
runs/Oct23_00-07-49_vorace/events.out.tfevents.1634940475.vorace.1081817.2
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:2f13a18bf0bd1a051d2984922e1c73b9704aaf68c7488b6a303cc3da91c769f0
|
3 |
+
size 4792
|
runs/Oct23_10-17-16_vorace/1634977047.3566914/events.out.tfevents.1634977047.vorace.1461984.1
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a45a353d5eba0e77e911a69e29911fb45fbebee20fca0cad45e8d50f5e463fb5
|
3 |
+
size 4590
|
runs/Oct23_10-17-16_vorace/events.out.tfevents.1634977047.vorace.1461984.0
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e8b78125646bb1984644cd8d7852e57ac1d5983515380565c1bbab9d14c14c5d
|
3 |
+
size 4792
|
runs/Oct23_11-11-20_vorace/1634980287.1597767/events.out.tfevents.1634980287.vorace.1470145.1
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0eacf7d50df6ae965e6d3940fcfb4909178d7a53a740376a3c5fedd6e64ce547
|
3 |
+
size 4590
|
runs/Oct23_11-11-20_vorace/events.out.tfevents.1634980287.vorace.1470145.0
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e32872bee90a71850d1cc1101d9e8001a21e05d39cf59c06f95287e81bb66d24
|
3 |
+
size 4792
|
runs/Oct23_11-43-32_vorace/1634982217.3120878/events.out.tfevents.1634982217.vorace.1481626.1
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d5e1520895cc185493d1e9d7016e3eb2ec65a06c0ba21de475caaa579814dc30
|
3 |
+
size 4590
|
runs/Oct23_11-43-32_vorace/events.out.tfevents.1634982217.vorace.1481626.0
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:1a258c6df14ec5d6d1fcea1359ea3d8d167e7bd8768cc9c595785d0132875951
|
3 |
+
size 4792
|
runs/Oct23_16-20-43_vorace/1634998852.1440287/events.out.tfevents.1634998852.vorace.1486728.1
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:dc8115f7d020260b2dbe152e44ee8bb123f28a965a9868b41aefe49585471c8e
|
3 |
+
size 4590
|
runs/Oct23_16-20-43_vorace/events.out.tfevents.1634998852.vorace.1486728.0
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a640e35c55815d9597bc85339a6e95ce80e666a0aab07f7b52f4426341420a0f
|
3 |
+
size 4792
|
runs/Oct23_17-08-02_vorace/1635001689.7326474/events.out.tfevents.1635001689.vorace.1560238.1
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5f8b5ee72ae361682f7fcc70f9ce17a2fb28c60c04006b8ab893f5a9bd27406b
|
3 |
+
size 4590
|
runs/Oct23_17-08-02_vorace/events.out.tfevents.1635001689.vorace.1560238.0
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:2e88ecc3897289e4b1e99092c0da06db3c4b89bfcce218db467bf33e156decdd
|
3 |
+
size 4069
|
special_tokens_map.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"unk_token": "[UNK]", "sep_token": "[SEP]", "pad_token": "[PAD]", "cls_token": "[CLS]", "mask_token": "[MASK]"}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"do_lower_case": true, "unk_token": "[UNK]", "sep_token": "[SEP]", "pad_token": "[PAD]", "cls_token": "[CLS]", "mask_token": "[MASK]", "tokenize_chinese_chars": true, "strip_accents": null, "model_max_length": 512, "special_tokens_map_file": null, "name_or_path": "distilbert-base-uncased", "tokenizer_class": "DistilBertTokenizer"}
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3dff9d408f2876782eaf23df35b7d6151f54361bcc1c116266d7dcd6f2f05e9b
|
3 |
+
size 2863
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|