Rakshit122
commited on
Commit
•
d4842b4
1
Parent(s):
bb0a0bc
Upload 9 files
Browse files- .gitattributes +0 -3
- README.md +30 -0
- config.json +3 -3
.gitattributes
CHANGED
@@ -2,7 +2,6 @@
|
|
2 |
*.arrow filter=lfs diff=lfs merge=lfs -text
|
3 |
*.bin filter=lfs diff=lfs merge=lfs -text
|
4 |
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
5 |
-
*.ckpt 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
|
@@ -22,10 +21,8 @@
|
|
22 |
*.pt filter=lfs diff=lfs merge=lfs -text
|
23 |
*.pth filter=lfs diff=lfs merge=lfs -text
|
24 |
*.rar filter=lfs diff=lfs merge=lfs -text
|
25 |
-
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
26 |
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
27 |
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
28 |
-
*.tar filter=lfs diff=lfs merge=lfs -text
|
29 |
*.tflite filter=lfs diff=lfs merge=lfs -text
|
30 |
*.tgz filter=lfs diff=lfs merge=lfs -text
|
31 |
*.wasm 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 |
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
|
|
5 |
*.ftz filter=lfs diff=lfs merge=lfs -text
|
6 |
*.gz filter=lfs diff=lfs merge=lfs -text
|
7 |
*.h5 filter=lfs diff=lfs merge=lfs -text
|
|
|
21 |
*.pt filter=lfs diff=lfs merge=lfs -text
|
22 |
*.pth filter=lfs diff=lfs merge=lfs -text
|
23 |
*.rar filter=lfs diff=lfs merge=lfs -text
|
|
|
24 |
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
25 |
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
|
|
26 |
*.tflite filter=lfs diff=lfs merge=lfs -text
|
27 |
*.tgz filter=lfs diff=lfs merge=lfs -text
|
28 |
*.wasm filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language: en
|
3 |
+
tags:
|
4 |
+
- text-classification
|
5 |
+
- pytorch
|
6 |
+
- roberta
|
7 |
+
- emotions
|
8 |
+
- multi-class-classification
|
9 |
+
- multi-label-classification
|
10 |
+
datasets:
|
11 |
+
- go_emotions
|
12 |
+
license: mit
|
13 |
+
widget:
|
14 |
+
- text: "I am not having a great day."
|
15 |
+
---
|
16 |
+
|
17 |
+
Model trained from [roberta-base](https://huggingface.co/roberta-base) on the [go_emotions](https://huggingface.co/datasets/go_emotions) dataset for multi-label classification.
|
18 |
+
|
19 |
+
[go_emotions](https://huggingface.co/datasets/go_emotions) is based on Reddit data and has 28 labels. It is a multi-label dataset where one or multiple labels may apply for any given input text, hence this model is a multi-label classification model with 28 'probability' float outputs for any given input text. Typically a threshold of 0.5 is applied to the probabilities for the prediction for each label.
|
20 |
+
|
21 |
+
The model was trained using `AutoModelForSequenceClassification.from_pretrained` with `problem_type="multi_label_classification"` for 3 epochs with a learning rate of 2e-5 and weight decay of 0.01.
|
22 |
+
|
23 |
+
Evaluation (of the 28 dim output via a threshold of 0.5 to binarize each) using the dataset test split gives:
|
24 |
+
- Micro F1 0.585
|
25 |
+
- ROC AUC 0.751
|
26 |
+
- Accuracy 0.474
|
27 |
+
|
28 |
+
But the metrics would be more meaningful when measured per label given the multi-label nature.
|
29 |
+
|
30 |
+
Additionally some labels (E.g. `gratitude`) when considered independently perform very strongly with F1 around 0.9, whilst others (E.g. `relief`) perform very poorly. This is a challenging dataset. Labels such as `relief` do have much fewer examples in the training data (less than 100 out of the 40k+), but there is also some ambiguity and/or labelling errors visible in the training data of `go_emotions` that is suspected to constrain the performance.
|
config.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
{
|
2 |
-
"_name_or_path": "
|
3 |
"architectures": [
|
4 |
-
"
|
5 |
],
|
6 |
"attention_probs_dropout_prob": 0.1,
|
7 |
"bos_token_id": 0,
|
@@ -81,7 +81,7 @@
|
|
81 |
"position_embedding_type": "absolute",
|
82 |
"problem_type": "multi_label_classification",
|
83 |
"torch_dtype": "float32",
|
84 |
-
"transformers_version": "4.
|
85 |
"type_vocab_size": 1,
|
86 |
"use_cache": true,
|
87 |
"vocab_size": 50265
|
|
|
1 |
{
|
2 |
+
"_name_or_path": "roberta-base",
|
3 |
"architectures": [
|
4 |
+
"RobertaForSequenceClassification"
|
5 |
],
|
6 |
"attention_probs_dropout_prob": 0.1,
|
7 |
"bos_token_id": 0,
|
|
|
81 |
"position_embedding_type": "absolute",
|
82 |
"problem_type": "multi_label_classification",
|
83 |
"torch_dtype": "float32",
|
84 |
+
"transformers_version": "4.21.3",
|
85 |
"type_vocab_size": 1,
|
86 |
"use_cache": true,
|
87 |
"vocab_size": 50265
|