AutoNLP Admin commited on
Commit ·
db2a767
1
Parent(s): 96211f4
Commit From AutoNLP
Browse files- .gitattributes +2 -0
- README.md +52 -0
- config.json +57 -0
- pytorch_model.bin +3 -0
- sample_input.pkl +3 -0
- special_tokens_map.json +1 -0
- tokenizer.json +0 -0
- tokenizer_config.json +1 -0
- vocab.txt +0 -0
.gitattributes
CHANGED
|
@@ -25,3 +25,5 @@ saved_model/**/* 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
|
|
|
|
|
|
|
|
|
| 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
|
| 28 |
+
*.tar.gz filter=lfs diff=lfs merge=lfs -text
|
| 29 |
+
*.pkl filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
tags: autonlp
|
| 3 |
+
language: en
|
| 4 |
+
widget:
|
| 5 |
+
- text: "I love AutoNLP 🤗"
|
| 6 |
+
datasets:
|
| 7 |
+
- bgoel4132/autonlp-data-tweet-disaster-classifier
|
| 8 |
+
co2_eq_emissions: 27.22397099134103
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Model Trained Using AutoNLP
|
| 12 |
+
|
| 13 |
+
- Problem type: Multi-class Classification
|
| 14 |
+
- Model ID: 28716412
|
| 15 |
+
- CO2 Emissions (in grams): 27.22397099134103
|
| 16 |
+
|
| 17 |
+
## Validation Metrics
|
| 18 |
+
|
| 19 |
+
- Loss: 0.4146720767021179
|
| 20 |
+
- Accuracy: 0.8066924731182795
|
| 21 |
+
- Macro F1: 0.7835463282531184
|
| 22 |
+
- Micro F1: 0.8066924731182795
|
| 23 |
+
- Weighted F1: 0.7974252447208724
|
| 24 |
+
- Macro Precision: 0.8183917344767431
|
| 25 |
+
- Micro Precision: 0.8066924731182795
|
| 26 |
+
- Weighted Precision: 0.8005510296861892
|
| 27 |
+
- Macro Recall: 0.7679676081852519
|
| 28 |
+
- Micro Recall: 0.8066924731182795
|
| 29 |
+
- Weighted Recall: 0.8066924731182795
|
| 30 |
+
|
| 31 |
+
|
| 32 |
+
## Usage
|
| 33 |
+
|
| 34 |
+
You can use cURL to access this model:
|
| 35 |
+
|
| 36 |
+
```
|
| 37 |
+
$ curl -X POST -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"inputs": "I love AutoNLP"}' https://api-inference.huggingface.co/models/bgoel4132/autonlp-tweet-disaster-classifier-28716412
|
| 38 |
+
```
|
| 39 |
+
|
| 40 |
+
Or Python API:
|
| 41 |
+
|
| 42 |
+
```
|
| 43 |
+
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
| 44 |
+
|
| 45 |
+
model = AutoModelForSequenceClassification.from_pretrained("bgoel4132/autonlp-tweet-disaster-classifier-28716412", use_auth_token=True)
|
| 46 |
+
|
| 47 |
+
tokenizer = AutoTokenizer.from_pretrained("bgoel4132/autonlp-tweet-disaster-classifier-28716412", use_auth_token=True)
|
| 48 |
+
|
| 49 |
+
inputs = tokenizer("I love AutoNLP", return_tensors="pt")
|
| 50 |
+
|
| 51 |
+
outputs = model(**inputs)
|
| 52 |
+
```
|
config.json
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "AutoNLP",
|
| 3 |
+
"_num_labels": 13,
|
| 4 |
+
"activation": "gelu",
|
| 5 |
+
"architectures": [
|
| 6 |
+
"DistilBertForSequenceClassification"
|
| 7 |
+
],
|
| 8 |
+
"attention_dropout": 0.1,
|
| 9 |
+
"dim": 768,
|
| 10 |
+
"dropout": 0.1,
|
| 11 |
+
"hidden_dim": 3072,
|
| 12 |
+
"id2label": {
|
| 13 |
+
"0": "accident",
|
| 14 |
+
"1": "cyclone",
|
| 15 |
+
"2": "earthquake",
|
| 16 |
+
"3": "explosion",
|
| 17 |
+
"4": "fire",
|
| 18 |
+
"5": "flood",
|
| 19 |
+
"6": "hurricane",
|
| 20 |
+
"7": "medical",
|
| 21 |
+
"8": "other",
|
| 22 |
+
"9": "pollution",
|
| 23 |
+
"10": "tornado",
|
| 24 |
+
"11": "typhoon",
|
| 25 |
+
"12": "volcano"
|
| 26 |
+
},
|
| 27 |
+
"initializer_range": 0.02,
|
| 28 |
+
"label2id": {
|
| 29 |
+
"accident": 0,
|
| 30 |
+
"cyclone": 1,
|
| 31 |
+
"earthquake": 2,
|
| 32 |
+
"explosion": 3,
|
| 33 |
+
"fire": 4,
|
| 34 |
+
"flood": 5,
|
| 35 |
+
"hurricane": 6,
|
| 36 |
+
"medical": 7,
|
| 37 |
+
"other": 8,
|
| 38 |
+
"pollution": 9,
|
| 39 |
+
"tornado": 10,
|
| 40 |
+
"typhoon": 11,
|
| 41 |
+
"volcano": 12
|
| 42 |
+
},
|
| 43 |
+
"max_length": 32,
|
| 44 |
+
"max_position_embeddings": 512,
|
| 45 |
+
"model_type": "distilbert",
|
| 46 |
+
"n_heads": 12,
|
| 47 |
+
"n_layers": 6,
|
| 48 |
+
"pad_token_id": 0,
|
| 49 |
+
"padding": "max_length",
|
| 50 |
+
"problem_type": "single_label_classification",
|
| 51 |
+
"qa_dropout": 0.1,
|
| 52 |
+
"seq_classif_dropout": 0.2,
|
| 53 |
+
"sinusoidal_pos_embds": false,
|
| 54 |
+
"tie_weights_": true,
|
| 55 |
+
"transformers_version": "4.8.0",
|
| 56 |
+
"vocab_size": 30522
|
| 57 |
+
}
|
pytorch_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f0473f0c2f7634aa17374e8c1eb0efff0e899e8325b8e5fd2f8a088e57218d4f
|
| 3 |
+
size 267893873
|
sample_input.pkl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a55e6593b26c4d63c41e90b0404e91fc00f7382bc736b3dd57e9f1822a122379
|
| 3 |
+
size 1522
|
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": "AutoNLP", "tokenizer_class": "DistilBertTokenizer"}
|
vocab.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|