Add model
Browse files- README.md +27 -0
- config.json +35 -0
- eval_results.json +7 -0
- pytorch_model.bin +3 -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 |
---
|
8 |
+
|
9 |
+
# Dynamically quantized DistilBERT base uncased finetuned SST-2
|
10 |
+
|
11 |
+
## Table of Contents
|
12 |
+
- [Model Details](#model-details)
|
13 |
+
- [How to Get Started With the Model](#how-to-get-started-with-the-model)
|
14 |
+
|
15 |
+
## Model Details
|
16 |
+
**Model Description:** This model is a [DistilBERT](https://huggingface.co/distilbert-base-uncased-finetuned-sst-2-english) fine-tuned on SST-2 dynamically quantized with [optimum-intel](https://github.com/huggingface/optimum-intel) through the usage of [Intel® Neural Compressor](https://github.com/intel/neural-compressor).
|
17 |
+
- **Model Type:** Text Classification
|
18 |
+
- **Language(s):** English
|
19 |
+
- **License:** Apache-2.0
|
20 |
+
- **Parent Model:** For more details on the original model, we encourage users to check out [this](https://huggingface.co/distilbert-base-uncased-finetuned-sst-2-english) model card.
|
21 |
+
|
22 |
+
## How to Get Started With the Model
|
23 |
+
|
24 |
+
To load the quantized model, you can do as follows:
|
25 |
+
|
26 |
+
```python
|
27 |
+
from optimum.intel.neural_compressor.quantization import IncQuantizedModelForSequenceClassification
|
28 |
+
|
29 |
+
model = IncQuantizedModelForSequenceClassification.from_pretrained("echarlaix/distilbert-base-uncased-finetuned-sst-2-english-int8-dynamic")
|
30 |
+
```
|
config.json
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
"model_type": "distilbert",
|
23 |
+
"n_heads": 12,
|
24 |
+
"n_layers": 6,
|
25 |
+
"output_past": true,
|
26 |
+
"pad_token_id": 0,
|
27 |
+
"problem_type": "single_label_classification",
|
28 |
+
"qa_dropout": 0.1,
|
29 |
+
"seq_classif_dropout": 0.2,
|
30 |
+
"sinusoidal_pos_embds": false,
|
31 |
+
"tie_weights_": true,
|
32 |
+
"torch_dtype": "int8",
|
33 |
+
"transformers_version": "4.19.4",
|
34 |
+
"vocab_size": 30522
|
35 |
+
}
|
eval_results.json
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"eval_accuracy": 0.9071100917431193,
|
3 |
+
"eval_loss": 0.3806319534778595,
|
4 |
+
"eval_runtime": 26.6222,
|
5 |
+
"eval_samples_per_second": 32.755,
|
6 |
+
"eval_steps_per_second": 4.094
|
7 |
+
}
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:980e9ed4055e37d54ba12c52383eb6b41bf8a4c11dde676aebab0d80e8d16531
|
3 |
+
size 139416577
|