Commit From AutoNLP
Browse files- .gitattributes +2 -0
- README.md +46 -0
- config.json +45 -0
- pytorch_model.bin +3 -0
- sample_input.pkl +3 -0
- special_tokens_map.json +1 -0
- spiece.model +3 -0
- tokenizer.json +0 -0
- tokenizer_config.json +1 -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,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
tags: autonlp
|
3 |
+
language: unk
|
4 |
+
widget:
|
5 |
+
- text: "I love AutoNLP 🤗"
|
6 |
+
datasets:
|
7 |
+
- dtam/autonlp-data-covid-fake-news
|
8 |
+
co2_eq_emissions: 123.79523392848652
|
9 |
+
---
|
10 |
+
|
11 |
+
# Model Trained Using AutoNLP
|
12 |
+
|
13 |
+
- Problem type: Binary Classification
|
14 |
+
- Model ID: 36839110
|
15 |
+
- CO2 Emissions (in grams): 123.79523392848652
|
16 |
+
|
17 |
+
## Validation Metrics
|
18 |
+
|
19 |
+
- Loss: 0.17188367247581482
|
20 |
+
- Accuracy: 0.9714953271028037
|
21 |
+
- Precision: 0.9917948717948718
|
22 |
+
- Recall: 0.9480392156862745
|
23 |
+
- AUC: 0.9947452731092438
|
24 |
+
- F1: 0.9694235588972432
|
25 |
+
|
26 |
+
## Usage
|
27 |
+
|
28 |
+
You can use cURL to access this model:
|
29 |
+
|
30 |
+
```
|
31 |
+
$ 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/dtam/autonlp-covid-fake-news-36839110
|
32 |
+
```
|
33 |
+
|
34 |
+
Or Python API:
|
35 |
+
|
36 |
+
```
|
37 |
+
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
38 |
+
|
39 |
+
model = AutoModelForSequenceClassification.from_pretrained("dtam/autonlp-covid-fake-news-36839110", use_auth_token=True)
|
40 |
+
|
41 |
+
tokenizer = AutoTokenizer.from_pretrained("dtam/autonlp-covid-fake-news-36839110", use_auth_token=True)
|
42 |
+
|
43 |
+
inputs = tokenizer("I love AutoNLP", return_tensors="pt")
|
44 |
+
|
45 |
+
outputs = model(**inputs)
|
46 |
+
```
|
config.json
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "AutoNLP",
|
3 |
+
"_num_labels": 2,
|
4 |
+
"architectures": [
|
5 |
+
"AlbertForSequenceClassification"
|
6 |
+
],
|
7 |
+
"attention_probs_dropout_prob": 0,
|
8 |
+
"bos_token_id": 2,
|
9 |
+
"classifier_dropout_prob": 0.1,
|
10 |
+
"down_scale_factor": 1,
|
11 |
+
"embedding_size": 128,
|
12 |
+
"eos_token_id": 3,
|
13 |
+
"gap_size": 0,
|
14 |
+
"hidden_act": "gelu_new",
|
15 |
+
"hidden_dropout_prob": 0,
|
16 |
+
"hidden_size": 4096,
|
17 |
+
"id2label": {
|
18 |
+
"0": "0",
|
19 |
+
"1": "1"
|
20 |
+
},
|
21 |
+
"initializer_range": 0.02,
|
22 |
+
"inner_group_num": 1,
|
23 |
+
"intermediate_size": 16384,
|
24 |
+
"label2id": {
|
25 |
+
"0": 0,
|
26 |
+
"1": 1
|
27 |
+
},
|
28 |
+
"layer_norm_eps": 1e-12,
|
29 |
+
"layers_to_keep": [],
|
30 |
+
"max_length": 192,
|
31 |
+
"max_position_embeddings": 512,
|
32 |
+
"model_type": "albert",
|
33 |
+
"net_structure_type": 0,
|
34 |
+
"num_attention_heads": 64,
|
35 |
+
"num_hidden_groups": 1,
|
36 |
+
"num_hidden_layers": 12,
|
37 |
+
"num_memory_blocks": 0,
|
38 |
+
"pad_token_id": 0,
|
39 |
+
"padding": "max_length",
|
40 |
+
"position_embedding_type": "absolute",
|
41 |
+
"problem_type": "single_label_classification",
|
42 |
+
"transformers_version": "4.8.0",
|
43 |
+
"type_vocab_size": 2,
|
44 |
+
"vocab_size": 30000
|
45 |
+
}
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c5f6c5ad9688a3da4ba54a361960a7be9a50abe8706ce287e812ff2fd0c0f7dc
|
3 |
+
size 890430161
|
sample_input.pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:2803f6b92c2155aeee4b4b8c06c92696d26a74dc5f12d891eef913380578bd35
|
3 |
+
size 5920
|
special_tokens_map.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"bos_token": "[CLS]", "eos_token": "[SEP]", "unk_token": "<unk>", "sep_token": "[SEP]", "pad_token": "<pad>", "cls_token": "[CLS]", "mask_token": {"content": "[MASK]", "single_word": false, "lstrip": true, "rstrip": false, "normalized": false}}
|
spiece.model
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:fefb02b667a6c5c2fe27602d28e5fb3428f66ab89c7d6f388e7c8d44a02d0336
|
3 |
+
size 760289
|
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, "remove_space": true, "keep_accents": false, "bos_token": "[CLS]", "eos_token": "[SEP]", "unk_token": "<unk>", "sep_token": "[SEP]", "pad_token": "<pad>", "cls_token": "[CLS]", "mask_token": {"content": "[MASK]", "single_word": false, "lstrip": true, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "model_max_length": 512, "special_tokens_map_file": null, "name_or_path": "AutoNLP", "tokenizer_class": "AlbertTokenizer"}
|