Joe Davison
commited on
Commit
•
a6dc0fd
1
Parent(s):
db61cbd
Initial
Browse files- README.md +31 -0
- config.json +35 -0
- pytorch_model.bin +3 -0
- special_tokens_map.json +1 -0
- tf_model.h5 +3 -0
- tokenizer_config.json +1 -0
- training_args.bin +3 -0
- vocab.txt +0 -0
README.md
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language: en
|
3 |
+
tags:
|
4 |
+
- text-classification
|
5 |
+
- pytorch
|
6 |
+
- tensorflow
|
7 |
+
datasets:
|
8 |
+
- ag_news
|
9 |
+
license: mit
|
10 |
+
widget
|
11 |
+
- text: "Armed conflict has been a near-constant policial and economic burden."
|
12 |
+
- text: "Tom Brady won his seventh Super Bowl last night."
|
13 |
+
- text: "Dow falls more than 100 points after disappointing jobs data":
|
14 |
+
- text: "A new moon has been discovered in Jupter's orbit."
|
15 |
+
---
|
16 |
+
|
17 |
+
# distilbert-base-uncased-agnews-student
|
18 |
+
|
19 |
+
## Model Description
|
20 |
+
|
21 |
+
This model is distilled from the zero-shot classification pipeline on the unlabeled AG's News dataset using [this
|
22 |
+
script](https://github.com/huggingface/transformers/tree/master/examples/research_projects/zero-shot-distillation).
|
23 |
+
It is the result of the demo notebook
|
24 |
+
[here](https://colab.research.google.com/drive/1mjBjd0cR8G57ZpsnFCS3ngGyo5nCa9ya?usp=sharing), where more details
|
25 |
+
about the model can be found.
|
26 |
+
|
27 |
+
## Intended Usage
|
28 |
+
|
29 |
+
The model can be used like any other model trained on AG's News, but will likely not perform as well as a model
|
30 |
+
trained with full supervision. It is primarily intended as a demo of how an expensive NLI-based zero-shot model
|
31 |
+
can be distilled to a more efficient student.
|
config.json
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "./distilbert-base-uncased-agnews-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": "the world",
|
13 |
+
"1": "sports",
|
14 |
+
"2": "business",
|
15 |
+
"3": "science/tech"
|
16 |
+
},
|
17 |
+
"initializer_range": 0.02,
|
18 |
+
"label2id": {
|
19 |
+
"business": 2,
|
20 |
+
"science/tech": 3,
|
21 |
+
"sports": 1,
|
22 |
+
"the world": 0
|
23 |
+
},
|
24 |
+
"max_position_embeddings": 512,
|
25 |
+
"model_type": "distilbert",
|
26 |
+
"n_heads": 12,
|
27 |
+
"n_layers": 6,
|
28 |
+
"pad_token_id": 0,
|
29 |
+
"qa_dropout": 0.1,
|
30 |
+
"seq_classif_dropout": 0.2,
|
31 |
+
"sinusoidal_pos_embds": false,
|
32 |
+
"tie_weights_": true,
|
33 |
+
"transformers_version": "4.4.0.dev0",
|
34 |
+
"vocab_size": 30522
|
35 |
+
}
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ae45738d2e01161bb5de6af060e043ef7e0592fc9b8ffd54bc7aeb9848c3cd30
|
3 |
+
size 267866825
|
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:cd6486c59cf836b7b62d40f010d619bbc45ff2ee316b3ca353e6751e5056b47a
|
3 |
+
size 267958656
|
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, "name_or_path": "distilbert-base-uncased"}
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6004c90490755211a561ac7fd2c86ce8840a4fa12734cd4d493df54e07cc4b19
|
3 |
+
size 2095
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|