Commit From AutoTrain
Browse files- .gitattributes +3 -0
- README.md +49 -0
- config.json +49 -0
- model.safetensors +3 -0
- pytorch_model.bin +3 -0
- special_tokens_map.json +7 -0
- tokenizer.json +3 -0
- tokenizer_config.json +16 -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 |
+
- unk
|
7 |
+
widget:
|
8 |
+
- text: "I love AutoTrain"
|
9 |
+
datasets:
|
10 |
+
- callebergstrom/autotrain-data-bert-political-statements-and-questions-swedish-ner
|
11 |
+
co2_eq_emissions:
|
12 |
+
emissions: 0.1436872980177535
|
13 |
+
---
|
14 |
+
|
15 |
+
# Model Trained Using AutoTrain
|
16 |
+
|
17 |
+
- Problem type: Entity Extraction
|
18 |
+
- Model ID: 69812137999
|
19 |
+
- CO2 Emissions (in grams): 0.1437
|
20 |
+
|
21 |
+
## Validation Metrics
|
22 |
+
|
23 |
+
- Loss: 0.000
|
24 |
+
- Accuracy: 1.000
|
25 |
+
- Precision: 1.000
|
26 |
+
- Recall: 0.999
|
27 |
+
- F1: 0.999
|
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/callebergstrom/autotrain-bert-political-statements-and-questions-swedish-ner-69812137999
|
35 |
+
```
|
36 |
+
|
37 |
+
Or Python API:
|
38 |
+
|
39 |
+
```
|
40 |
+
from transformers import AutoModelForTokenClassification, AutoTokenizer
|
41 |
+
|
42 |
+
model = AutoModelForTokenClassification.from_pretrained("callebergstrom/autotrain-bert-political-statements-and-questions-swedish-ner-69812137999", use_auth_token=True)
|
43 |
+
|
44 |
+
tokenizer = AutoTokenizer.from_pretrained("callebergstrom/autotrain-bert-political-statements-and-questions-swedish-ner-69812137999", 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,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "AutoTrain",
|
3 |
+
"_num_labels": 7,
|
4 |
+
"architectures": [
|
5 |
+
"BertForTokenClassification"
|
6 |
+
],
|
7 |
+
"attention_probs_dropout_prob": 0.1,
|
8 |
+
"classifier_dropout": null,
|
9 |
+
"finetuning_task": "ner",
|
10 |
+
"gradient_checkpointing": false,
|
11 |
+
"hidden_act": "gelu",
|
12 |
+
"hidden_dropout_prob": 0.1,
|
13 |
+
"hidden_size": 768,
|
14 |
+
"id2label": {
|
15 |
+
"0": "B-LOC",
|
16 |
+
"1": "B-ORG",
|
17 |
+
"2": "B-PER",
|
18 |
+
"3": "I-LOC",
|
19 |
+
"4": "I-ORG",
|
20 |
+
"5": "I-PER",
|
21 |
+
"6": "UNK"
|
22 |
+
},
|
23 |
+
"initializer_range": 0.02,
|
24 |
+
"intermediate_size": 3072,
|
25 |
+
"label2id": {
|
26 |
+
"B-LOC": 0,
|
27 |
+
"B-ORG": 1,
|
28 |
+
"B-PER": 2,
|
29 |
+
"I-LOC": 3,
|
30 |
+
"I-ORG": 4,
|
31 |
+
"I-PER": 5,
|
32 |
+
"UNK": 6
|
33 |
+
},
|
34 |
+
"layer_norm_eps": 1e-12,
|
35 |
+
"max_length": 64,
|
36 |
+
"max_position_embeddings": 512,
|
37 |
+
"model_type": "bert",
|
38 |
+
"num_attention_heads": 12,
|
39 |
+
"num_hidden_layers": 12,
|
40 |
+
"output_past": true,
|
41 |
+
"pad_token_id": 0,
|
42 |
+
"padding": "max_length",
|
43 |
+
"position_embedding_type": "absolute",
|
44 |
+
"torch_dtype": "float32",
|
45 |
+
"transformers_version": "4.29.2",
|
46 |
+
"type_vocab_size": 2,
|
47 |
+
"use_cache": true,
|
48 |
+
"vocab_size": 50325
|
49 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:39305aafff7a749af05d628b930291ff46558103ef7d9840f3b034c20079807c
|
3 |
+
size 496450484
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:1bb41fd4be223f107b54aeb765e761282b29384d7732fd9b25031d198092e33d
|
3 |
+
size 496495085
|
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:3009cf435066919c49bcf876270c9238f84bce8f5a5806f6e2d6444be5f2d232
|
3 |
+
size 1196151
|
tokenizer_config.json
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"add_prefix_space": true,
|
3 |
+
"clean_up_tokenization_spaces": true,
|
4 |
+
"cls_token": "[CLS]",
|
5 |
+
"do_basic_tokenize": true,
|
6 |
+
"do_lower_case": false,
|
7 |
+
"mask_token": "[MASK]",
|
8 |
+
"model_max_length": 1000000000000000019884624838656,
|
9 |
+
"never_split": null,
|
10 |
+
"pad_token": "[PAD]",
|
11 |
+
"sep_token": "[SEP]",
|
12 |
+
"strip_accents": false,
|
13 |
+
"tokenize_chinese_chars": true,
|
14 |
+
"tokenizer_class": "BertTokenizer",
|
15 |
+
"unk_token": "[UNK]"
|
16 |
+
}
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|