Commit From AutoTrain
Browse files- .gitattributes +3 -0
- README.md +49 -0
- config.json +67 -0
- model.safetensors +3 -0
- pytorch_model.bin +3 -0
- special_tokens_map.json +7 -0
- tokenizer.json +3 -0
- tokenizer_config.json +13 -0
- vocab.txt +0 -0
.gitattributes
CHANGED
@@ -33,3 +33,6 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
+
*.bin.* filter=lfs diff=lfs merge=lfs -text
|
37 |
+
*.tar.gz filter=lfs diff=lfs merge=lfs -text
|
38 |
+
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
tags:
|
3 |
+
- autotrain
|
4 |
+
- token-classification
|
5 |
+
language:
|
6 |
+
- en
|
7 |
+
widget:
|
8 |
+
- text: "I love AutoTrain"
|
9 |
+
datasets:
|
10 |
+
- sophy/autotrain-data-ner-prescribing
|
11 |
+
co2_eq_emissions:
|
12 |
+
emissions: 0.31174601509032973
|
13 |
+
---
|
14 |
+
|
15 |
+
# Model Trained Using AutoTrain
|
16 |
+
|
17 |
+
- Problem type: Entity Extraction
|
18 |
+
- Model ID: 75398139974
|
19 |
+
- CO2 Emissions (in grams): 0.3117
|
20 |
+
|
21 |
+
## Validation Metrics
|
22 |
+
|
23 |
+
- Loss: 0.956
|
24 |
+
- Accuracy: 0.664
|
25 |
+
- Precision: 0.435
|
26 |
+
- Recall: 0.522
|
27 |
+
- F1: 0.474
|
28 |
+
|
29 |
+
## Usage
|
30 |
+
|
31 |
+
You can use cURL to access this model:
|
32 |
+
|
33 |
+
```
|
34 |
+
$ 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/sophy/autotrain-ner-prescribing-75398139974
|
35 |
+
```
|
36 |
+
|
37 |
+
Or Python API:
|
38 |
+
|
39 |
+
```
|
40 |
+
from transformers import AutoModelForTokenClassification, AutoTokenizer
|
41 |
+
|
42 |
+
model = AutoModelForTokenClassification.from_pretrained("sophy/autotrain-ner-prescribing-75398139974", use_auth_token=True)
|
43 |
+
|
44 |
+
tokenizer = AutoTokenizer.from_pretrained("sophy/autotrain-ner-prescribing-75398139974", use_auth_token=True)
|
45 |
+
|
46 |
+
inputs = tokenizer("I love AutoTrain", return_tensors="pt")
|
47 |
+
|
48 |
+
outputs = model(**inputs)
|
49 |
+
```
|
config.json
ADDED
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "AutoTrain",
|
3 |
+
"_num_labels": 17,
|
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-DOSAGE",
|
15 |
+
"1": "B-MANUFACTURER",
|
16 |
+
"2": "B-MEDICATION",
|
17 |
+
"3": "B-dosage",
|
18 |
+
"4": "B-duration",
|
19 |
+
"5": "B-frequency",
|
20 |
+
"6": "B-manufacturer",
|
21 |
+
"7": "B-medication",
|
22 |
+
"8": "I-DOSAGE",
|
23 |
+
"9": "I-MANUFACTURER",
|
24 |
+
"10": "I-MEDICATION",
|
25 |
+
"11": "I-dosage",
|
26 |
+
"12": "I-duration",
|
27 |
+
"13": "I-frequency",
|
28 |
+
"14": "I-manufacturer",
|
29 |
+
"15": "I-medication",
|
30 |
+
"16": "O"
|
31 |
+
},
|
32 |
+
"initializer_range": 0.02,
|
33 |
+
"intermediate_size": 3072,
|
34 |
+
"label2id": {
|
35 |
+
"B-DOSAGE": 0,
|
36 |
+
"B-MANUFACTURER": 1,
|
37 |
+
"B-MEDICATION": 2,
|
38 |
+
"B-dosage": 3,
|
39 |
+
"B-duration": 4,
|
40 |
+
"B-frequency": 5,
|
41 |
+
"B-manufacturer": 6,
|
42 |
+
"B-medication": 7,
|
43 |
+
"I-DOSAGE": 8,
|
44 |
+
"I-MANUFACTURER": 9,
|
45 |
+
"I-MEDICATION": 10,
|
46 |
+
"I-dosage": 11,
|
47 |
+
"I-duration": 12,
|
48 |
+
"I-frequency": 13,
|
49 |
+
"I-manufacturer": 14,
|
50 |
+
"I-medication": 15,
|
51 |
+
"O": 16
|
52 |
+
},
|
53 |
+
"layer_norm_eps": 1e-12,
|
54 |
+
"max_length": 64,
|
55 |
+
"max_position_embeddings": 512,
|
56 |
+
"model_type": "bert",
|
57 |
+
"num_attention_heads": 12,
|
58 |
+
"num_hidden_layers": 12,
|
59 |
+
"pad_token_id": 0,
|
60 |
+
"padding": "max_length",
|
61 |
+
"position_embedding_type": "absolute",
|
62 |
+
"torch_dtype": "float32",
|
63 |
+
"transformers_version": "4.29.2",
|
64 |
+
"type_vocab_size": 2,
|
65 |
+
"use_cache": true,
|
66 |
+
"vocab_size": 30522
|
67 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:43e3106af3f3511a1817bf2dc8db72b58ba3cd8503fd92202cafaa511ed3a1fa
|
3 |
+
size 435646420
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:361d5963b69fa1b199f1dedae9209225b64f9c93ba5343e115748504c98bf426
|
3 |
+
size 435691053
|
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
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:41b9d12a4c559e4098f30173bc0f76d092c43d7b1f873e7027da45a256f30f87
|
3 |
+
size 711659
|
tokenizer_config.json
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"clean_up_tokenization_spaces": true,
|
3 |
+
"cls_token": "[CLS]",
|
4 |
+
"do_lower_case": true,
|
5 |
+
"mask_token": "[MASK]",
|
6 |
+
"model_max_length": 512,
|
7 |
+
"pad_token": "[PAD]",
|
8 |
+
"sep_token": "[SEP]",
|
9 |
+
"strip_accents": null,
|
10 |
+
"tokenize_chinese_chars": true,
|
11 |
+
"tokenizer_class": "BertTokenizer",
|
12 |
+
"unk_token": "[UNK]"
|
13 |
+
}
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|