Joe Davison commited on
Commit
7e7f809
1 Parent(s): 3715109
README.md ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: en
3
+ tags:
4
+ - text-classification
5
+ - pytorch
6
+ - tensorflow
7
+ datasets:
8
+ - go_emotions
9
+ license: mit
10
+ ---
11
+
12
+ # distilbert-base-uncased-go-emotions-student
13
+
14
+ ## Model Description
15
+
16
+ This model is distilled from the zero-shot classification pipeline on the unlabeled GoEmotions dataset using [this
17
+ script](https://github.com/huggingface/transformers/tree/master/examples/research_projects/zero-shot-distillation).
18
+ It is the result of the demo notebook
19
+ [here](https://colab.research.google.com/drive/1mjBjd0cR8G57ZpsnFCS3ngGyo5nCa9ya?usp=sharing), where more details
20
+ about the model can be found.
21
+
22
+ - Teacher model: [roberta-large-mnli](https://huggingface.co/roberta-large-mnli)
23
+
24
+ ## Intended Usage
25
+
26
+ The model can be used like any other model trained on GoEmotions, but will likely not perform as well as a model
27
+ trained with full supervision. It is primarily intended as a demo of how an expensive NLI-based zero-shot model
28
+ can be distilled to a more efficient student. Note that although the GoEmotions dataset allow multiple labels
29
+ per instance, the teacher used single-label classification to create psuedo-labels.
config.json ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "./distilbert-base-uncased-go-emotions-student/",
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": "admiration",
13
+ "1": "amusement",
14
+ "2": "anger",
15
+ "3": "annoyance",
16
+ "4": "approval",
17
+ "5": "caring",
18
+ "6": "confusion",
19
+ "7": "curiosity",
20
+ "8": "desire",
21
+ "9": "disappointment",
22
+ "10": "disapproval",
23
+ "11": "disgust",
24
+ "12": "embarrassment",
25
+ "13": "excitement",
26
+ "14": "fear",
27
+ "15": "gratitude",
28
+ "16": "grief",
29
+ "17": "joy",
30
+ "18": "love",
31
+ "19": "nervousness",
32
+ "20": "optimism",
33
+ "21": "pride",
34
+ "22": "realization",
35
+ "23": "relief",
36
+ "24": "remorse",
37
+ "25": "sadness",
38
+ "26": "surprise",
39
+ "27": "neutral"
40
+ },
41
+ "initializer_range": 0.02,
42
+ "label2id": {
43
+ "admiration": 0,
44
+ "amusement": 1,
45
+ "anger": 2,
46
+ "annoyance": 3,
47
+ "approval": 4,
48
+ "caring": 5,
49
+ "confusion": 6,
50
+ "curiosity": 7,
51
+ "desire": 8,
52
+ "disappointment": 9,
53
+ "disapproval": 10,
54
+ "disgust": 11,
55
+ "embarrassment": 12,
56
+ "excitement": 13,
57
+ "fear": 14,
58
+ "gratitude": 15,
59
+ "grief": 16,
60
+ "joy": 17,
61
+ "love": 18,
62
+ "nervousness": 19,
63
+ "neutral": 27,
64
+ "optimism": 20,
65
+ "pride": 21,
66
+ "realization": 22,
67
+ "relief": 23,
68
+ "remorse": 24,
69
+ "sadness": 25,
70
+ "surprise": 26
71
+ },
72
+ "max_position_embeddings": 512,
73
+ "model_type": "distilbert",
74
+ "n_heads": 12,
75
+ "n_layers": 6,
76
+ "pad_token_id": 0,
77
+ "qa_dropout": 0.1,
78
+ "seq_classif_dropout": 0.2,
79
+ "sinusoidal_pos_embds": false,
80
+ "tie_weights_": true,
81
+ "transformers_version": "4.4.0.dev0",
82
+ "vocab_size": 30522
83
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0e97a8d55b9b6c9a57c217d71eb5068469baee9e0f229c8fceddcf33c1480a8b
3
+ size 267940614
special_tokens_map.json ADDED
@@ -0,0 +1 @@
 
1
+ {"unk_token": "[UNK]", "sep_token": "[SEP]", "pad_token": "[PAD]", "cls_token": "[CLS]", "mask_token": "[MASK]"}
tf_model.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c67cd66d24cde7b8e5562671ef83043d0d13976dff91aedfa5aba2c1233960b9
3
+ size 268032384
tokenizer_config.json ADDED
@@ -0,0 +1 @@
 
1
+ {"do_lower_case": true, "do_basic_tokenize": true, "never_split": null, "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, "name_or_path": "./go_emotions/distilled_model/", "special_tokens_map_file": "./go_emotions/distilled_model/special_tokens_map.json", "tokenizer_file": null}
vocab.txt ADDED
The diff for this file is too large to render. See raw diff