Add openvino model
Browse files- README.md +27 -0
- config.json +32 -0
- ov_model.bin +3 -0
- ov_model.xml +0 -0
- special_tokens_map.json +7 -0
- tokenizer.json +0 -0
- tokenizer_config.json +16 -0
- vocab.txt +0 -0
README.md
CHANGED
@@ -1,3 +1,30 @@
|
|
1 |
---
|
|
|
2 |
license: apache-2.0
|
|
|
|
|
|
|
|
|
|
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
language: en
|
3 |
license: apache-2.0
|
4 |
+
datasets:
|
5 |
+
- sst2
|
6 |
+
- glue
|
7 |
+
tags:
|
8 |
+
- openvino
|
9 |
---
|
10 |
+
|
11 |
+
## [distilbert-base-uncased-finetuned-sst-2-english](https://huggingface.co/distilbert-base-uncased-finetuned-sst-2-english) exported to the OpenVINO IR.
|
12 |
+
|
13 |
+
## Model Details
|
14 |
+
**Model Description:** This model is a fine-tune checkpoint of DistilBERT-base-uncased, fine-tuned on SST-2. This model reaches an accuracy of 91.3 on the dev set.
|
15 |
+
|
16 |
+
## Usage example
|
17 |
+
|
18 |
+
You can use this model with Transformers *pipeline*.
|
19 |
+
|
20 |
+
```python
|
21 |
+
from transformers import AutoTokenizer, pipeline
|
22 |
+
from optimum.intel.openvino import OVModelForSequenceClassification
|
23 |
+
|
24 |
+
model_id = "echarlaix/distilbert-base-uncased-finetuned-sst-2-english-openvino"
|
25 |
+
model = OVModelForSequenceClassification.from_pretrained(model_id)
|
26 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
27 |
+
cls_pipe = pipeline("text-classification", model=model, tokenizer=tokenizer)
|
28 |
+
text = "He's a dreadful magician."
|
29 |
+
outputs = cls_pipe(text)
|
30 |
+
```
|
config.json
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "distilbert-base-uncased-finetuned-sst-2-english",
|
3 |
+
"activation": "gelu",
|
4 |
+
"architectures": [
|
5 |
+
"DistilBertForSequenceClassification"
|
6 |
+
],
|
7 |
+
"attention_dropout": 0.1,
|
8 |
+
"dim": 768,
|
9 |
+
"dropout": 0.1,
|
10 |
+
"finetuning_task": "sst-2",
|
11 |
+
"hidden_dim": 3072,
|
12 |
+
"id2label": {
|
13 |
+
"0": "NEGATIVE",
|
14 |
+
"1": "POSITIVE"
|
15 |
+
},
|
16 |
+
"initializer_range": 0.02,
|
17 |
+
"label2id": {
|
18 |
+
"NEGATIVE": 0,
|
19 |
+
"POSITIVE": 1
|
20 |
+
},
|
21 |
+
"max_position_embeddings": 512,
|
22 |
+
"n_heads": 12,
|
23 |
+
"n_layers": 6,
|
24 |
+
"output_past": true,
|
25 |
+
"pad_token_id": 0,
|
26 |
+
"qa_dropout": 0.1,
|
27 |
+
"seq_classif_dropout": 0.2,
|
28 |
+
"sinusoidal_pos_embds": false,
|
29 |
+
"tie_weights_": true,
|
30 |
+
"transformers_version": "4.22.1",
|
31 |
+
"vocab_size": 30522
|
32 |
+
}
|
ov_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:bbe61c3b2eeb6717ac24eeadf4d0c5617a2a8af3715b7c523aa6e968b70b3034
|
3 |
+
size 267824276
|
ov_model.xml
ADDED
The diff for this file is too large to render.
See raw diff
|
|
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,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"cls_token": "[CLS]",
|
3 |
+
"do_basic_tokenize": true,
|
4 |
+
"do_lower_case": true,
|
5 |
+
"mask_token": "[MASK]",
|
6 |
+
"model_max_length": 512,
|
7 |
+
"name_or_path": "distilbert-base-uncased-finetuned-sst-2-english",
|
8 |
+
"never_split": null,
|
9 |
+
"pad_token": "[PAD]",
|
10 |
+
"sep_token": "[SEP]",
|
11 |
+
"special_tokens_map_file": null,
|
12 |
+
"strip_accents": null,
|
13 |
+
"tokenize_chinese_chars": true,
|
14 |
+
"tokenizer_class": "DistilBertTokenizer",
|
15 |
+
"unk_token": "[UNK]"
|
16 |
+
}
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|