violetch24's picture
Update README.md
654df1f
|
raw
history blame
1.01 kB
---
language: en
license: apache-2.0
tags:
- text-classfication
- int8
- Intel® Neural Compressor
- PostTrainingStatic
- bert
datasets:
- mrpc
- cola
metrics:
- f1
---
# INT8 BERT base uncased finetuned CoLA
## Post-training static quantization
### PyTorch
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).
The original fp32 model comes from the fine-tuned model [Intel/bert-base-uncased-mrpc](https://huggingface.co/textattack/bert-base-uncased-CoLA).
#### Test result
| |INT8|FP32|
|---|:---:|:---:|
| **Accuracy (eval-f1)** |0.5451|0.5339|
| **Model size (MB)** |388|438|
#### Load with optimum:
```python
from optimum.intel.neural_compressor.quantization import IncQuantizedModelForSequenceClassification
int8_model = IncQuantizedModelForSequenceClassification.from_pretrained(
'Intel/bert-base-uncased-CoLA-int8',
)
```