Commit
·
eb18f4b
1
Parent(s):
55cdfec
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,48 @@
|
|
| 1 |
---
|
|
|
|
| 2 |
license: mit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
language: en
|
| 3 |
license: mit
|
| 4 |
+
datasets:
|
| 5 |
+
- glue
|
| 6 |
+
- mrpc
|
| 7 |
+
metrics:
|
| 8 |
+
- f1
|
| 9 |
+
tags:
|
| 10 |
+
- text-classfication
|
| 11 |
+
- nlp
|
| 12 |
+
- neural-compressor
|
| 13 |
+
- PostTrainingsStatic
|
| 14 |
+
- int8
|
| 15 |
+
- Intel® Neural Compressor
|
| 16 |
---
|
| 17 |
+
|
| 18 |
+
# Dynamically quantized DistilBERT base uncased finetuned MPRC
|
| 19 |
+
|
| 20 |
+
## Table of Contents
|
| 21 |
+
- [Model Details](#model-details)
|
| 22 |
+
- [How to Get Started With the Model](#how-to-get-started-with-the-model)
|
| 23 |
+
|
| 24 |
+
## Model Details
|
| 25 |
+
**Model Description:** This model is a [DistilBERT](https://huggingface.co/textattack/distilbert-base-uncased-MRPC) fine-tuned on MPRC statically quantized with [optimum-intel](https://github.com/huggingface/optimum-intel) through the usage of [huggingface/optimum-intel](https://github.com/huggingface/optimum-intel) through the usage of [Intel® Neural Compressor](https://github.com/intel/neural-compressor).
|
| 26 |
+
- **Model Type:** Text Classification
|
| 27 |
+
- **Language(s):** English
|
| 28 |
+
- **License:** Apache-2.0
|
| 29 |
+
- **Parent Model:** For more details on the original model, we encourage users to check out [this](https://huggingface.co/textattack/distilbert-base-uncased-MRPC) model card.
|
| 30 |
+
|
| 31 |
+
## How to Get Started With the Model
|
| 32 |
+
|
| 33 |
+
### PyTorch
|
| 34 |
+
|
| 35 |
+
To load the quantized model, you can do as follows:
|
| 36 |
+
|
| 37 |
+
```python
|
| 38 |
+
from optimum.intel.neural_compressor.quantization import IncQuantizedModelForSequenceClassification
|
| 39 |
+
|
| 40 |
+
model = IncQuantizedModelForSequenceClassification.from_pretrained("Intel/distilbert-base-uncased-MRPC-int8-static")
|
| 41 |
+
```
|
| 42 |
+
|
| 43 |
+
#### Test result
|
| 44 |
+
|
| 45 |
+
| |INT8|FP32|
|
| 46 |
+
|---|:---:|:---:|
|
| 47 |
+
| **Accuracy (eval-f1)** |0.9005|0.9027|
|
| 48 |
+
| **Model size (MB)** |242|268|
|