Commit From AutoTrain
Browse files- .gitattributes +3 -0
- README.md +45 -0
- config.json +43 -0
- pytorch_model.bin +3 -0
- special_tokens_map.json +7 -0
- tokenizer.json +0 -0
- tokenizer_config.json +14 -0
- vocab.txt +0 -0
.gitattributes
CHANGED
@@ -25,3 +25,6 @@ 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 |
+
*.bin.* filter=lfs diff=lfs merge=lfs -text
|
29 |
+
*.tar.gz filter=lfs diff=lfs merge=lfs -text
|
30 |
+
*.pkl filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
tags: autotrain
|
3 |
+
language: en
|
4 |
+
widget:
|
5 |
+
- text: "I love AutoTrain 🤗"
|
6 |
+
datasets:
|
7 |
+
- lewtun/autotrain-data-acronym-identification
|
8 |
+
co2_eq_emissions: 10.435358044493652
|
9 |
+
---
|
10 |
+
|
11 |
+
# Model Trained Using AutoTrain
|
12 |
+
|
13 |
+
- Problem type: Entity Extraction
|
14 |
+
- Model ID: 7324788
|
15 |
+
- CO2 Emissions (in grams): 10.435358044493652
|
16 |
+
|
17 |
+
## Validation Metrics
|
18 |
+
|
19 |
+
- Loss: 0.08991389721632004
|
20 |
+
- Accuracy: 0.9708090976211485
|
21 |
+
- Precision: 0.8998421675654347
|
22 |
+
- Recall: 0.9309429854401959
|
23 |
+
- F1: 0.9151284109149278
|
24 |
+
|
25 |
+
## Usage
|
26 |
+
|
27 |
+
You can use cURL to access this model:
|
28 |
+
|
29 |
+
```
|
30 |
+
$ curl -X POST -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"inputs": "I love AutoTrain"}' https://api-inference.huggingface.co/models/lewtun/autotrain-acronym-identification-7324788
|
31 |
+
```
|
32 |
+
|
33 |
+
Or Python API:
|
34 |
+
|
35 |
+
```
|
36 |
+
from transformers import AutoModelForTokenClassification, AutoTokenizer
|
37 |
+
|
38 |
+
model = AutoModelForTokenClassification.from_pretrained("lewtun/autotrain-acronym-identification-7324788", use_auth_token=True)
|
39 |
+
|
40 |
+
tokenizer = AutoTokenizer.from_pretrained("lewtun/autotrain-acronym-identification-7324788", use_auth_token=True)
|
41 |
+
|
42 |
+
inputs = tokenizer("I love AutoTrain", return_tensors="pt")
|
43 |
+
|
44 |
+
outputs = model(**inputs)
|
45 |
+
```
|
config.json
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "AutoTrain",
|
3 |
+
"_num_labels": 5,
|
4 |
+
"architectures": [
|
5 |
+
"BertForTokenClassification"
|
6 |
+
],
|
7 |
+
"attention_probs_dropout_prob": 0.1,
|
8 |
+
"classifier_dropout": null,
|
9 |
+
"gradient_checkpointing": false,
|
10 |
+
"hidden_act": "gelu",
|
11 |
+
"hidden_dropout_prob": 0.1,
|
12 |
+
"hidden_size": 768,
|
13 |
+
"id2label": {
|
14 |
+
"0": "B-long",
|
15 |
+
"1": "B-short",
|
16 |
+
"2": "I-long",
|
17 |
+
"3": "I-short",
|
18 |
+
"4": "O"
|
19 |
+
},
|
20 |
+
"initializer_range": 0.02,
|
21 |
+
"intermediate_size": 3072,
|
22 |
+
"label2id": {
|
23 |
+
"B-long": 0,
|
24 |
+
"B-short": 1,
|
25 |
+
"I-long": 2,
|
26 |
+
"I-short": 3,
|
27 |
+
"O": 4
|
28 |
+
},
|
29 |
+
"layer_norm_eps": 1e-12,
|
30 |
+
"max_length": 256,
|
31 |
+
"max_position_embeddings": 512,
|
32 |
+
"model_type": "bert",
|
33 |
+
"num_attention_heads": 12,
|
34 |
+
"num_hidden_layers": 12,
|
35 |
+
"pad_token_id": 0,
|
36 |
+
"padding": "max_length",
|
37 |
+
"position_embedding_type": "absolute",
|
38 |
+
"torch_dtype": "float32",
|
39 |
+
"transformers_version": "4.20.0",
|
40 |
+
"type_vocab_size": 2,
|
41 |
+
"use_cache": true,
|
42 |
+
"vocab_size": 28996
|
43 |
+
}
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b3c785aaf78f0a8d96eca9a6c6b5956b73a9ed84a4fa148c222c43ce51acb209
|
3 |
+
size 430964529
|
special_tokens_map.json
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"cls_token": "[CLS]",
|
3 |
+
"mask_token": "[MASK]",
|
4 |
+
"pad_token": "[PAD]",
|
5 |
+
"sep_token": "[SEP]",
|
6 |
+
"unk_token": "[UNK]"
|
7 |
+
}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"cls_token": "[CLS]",
|
3 |
+
"do_lower_case": false,
|
4 |
+
"mask_token": "[MASK]",
|
5 |
+
"model_max_length": 512,
|
6 |
+
"name_or_path": "AutoTrain",
|
7 |
+
"pad_token": "[PAD]",
|
8 |
+
"sep_token": "[SEP]",
|
9 |
+
"special_tokens_map_file": null,
|
10 |
+
"strip_accents": null,
|
11 |
+
"tokenize_chinese_chars": true,
|
12 |
+
"tokenizer_class": "BertTokenizer",
|
13 |
+
"unk_token": "[UNK]"
|
14 |
+
}
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|