violetch24
commited on
Commit
•
7812fcb
1
Parent(s):
858e521
Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,41 @@
|
|
1 |
---
|
|
|
2 |
license: apache-2.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
language: en
|
3 |
license: apache-2.0
|
4 |
+
tags:
|
5 |
+
- text-classfication
|
6 |
+
- int8
|
7 |
+
- Intel® Neural Compressor
|
8 |
+
- PostTrainingStatic
|
9 |
+
- bert
|
10 |
+
datasets:
|
11 |
+
- mrpc
|
12 |
+
- cola
|
13 |
+
metrics:
|
14 |
+
- f1
|
15 |
---
|
16 |
+
|
17 |
+
# INT8 BERT large uncased finetuned CoLA
|
18 |
+
|
19 |
+
## Post-training static quantization
|
20 |
+
|
21 |
+
### PyTorch
|
22 |
+
|
23 |
+
This is an INT8 PyTorch model quantized with [huggingface/optimum-intel](https://github.com/huggingface/optimum-intel) through the usage of [Intel® Neural Compressor](https://github.com/intel/neural-compressor).
|
24 |
+
|
25 |
+
The original fp32 model comes from the fine-tuned model [yoshitomo-matsubara/bert-large-uncased-cola](https://huggingface.co/yoshitomo-matsubara/bert-large-uncased-cola).
|
26 |
+
|
27 |
+
#### Test result
|
28 |
+
|
29 |
+
| |INT8|FP32|
|
30 |
+
|---|:---:|:---:|
|
31 |
+
| **Accuracy (eval-f1)** |0.6336|0.6335|
|
32 |
+
| **Model size (MB)** |388|1340|
|
33 |
+
|
34 |
+
#### Load with optimum:
|
35 |
+
|
36 |
+
```python
|
37 |
+
from optimum.intel.neural_compressor.quantization import IncQuantizedModelForSequenceClassification
|
38 |
+
int8_model = IncQuantizedModelForSequenceClassification.from_pretrained(
|
39 |
+
'Intel/bert-large-uncased-cola-int8',
|
40 |
+
)
|
41 |
+
```
|