violetch24
commited on
Commit
·
80d7df4
1
Parent(s):
760fef9
Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,49 @@
|
|
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 |
+
- PostTrainingsDynamic
|
14 |
+
- int8
|
15 |
+
- Intel® Neural Compressor
|
16 |
+
- albert
|
17 |
---
|
18 |
+
|
19 |
+
# Dynamically quantized Albert base finetuned MPRC
|
20 |
+
|
21 |
+
## Table of Contents
|
22 |
+
- [Model Details](#model-details)
|
23 |
+
- [How to Get Started With the Model](#how-to-get-started-with-the-model)
|
24 |
+
|
25 |
+
## Model Details
|
26 |
+
**Model Description:** This model is a [Albert](https://huggingface.co/textattack/albert-base-v2-MRPC) fine-tuned on MPRC dynamically 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).
|
27 |
+
- **Model Type:** Text Classification
|
28 |
+
- **Language(s):** English
|
29 |
+
- **License:** Apache-2.0
|
30 |
+
- **Parent Model:** For more details on the original model, we encourage users to check out [this](https://huggingface.co/textattack/albert-base-v2-MRPC) model card.
|
31 |
+
|
32 |
+
## How to Get Started With the Model
|
33 |
+
|
34 |
+
### PyTorch
|
35 |
+
|
36 |
+
To load the quantized model, you can do as follows:
|
37 |
+
|
38 |
+
```python
|
39 |
+
from optimum.intel.neural_compressor.quantization import IncQuantizedModelForSequenceClassification
|
40 |
+
|
41 |
+
model = IncQuantizedModelForSequenceClassification.from_pretrained("Intel/albert-base-v2-MRPC-int8")
|
42 |
+
```
|
43 |
+
|
44 |
+
#### Test result
|
45 |
+
|
46 |
+
| |INT8|FP32|
|
47 |
+
|---|:---:|:---:|
|
48 |
+
| **Accuracy (eval-f1)** |0.9193|0.9263|
|
49 |
+
| **Model size (MB)** |45.0|46.7|
|