Commit
·
515ee7b
1
Parent(s):
f58e693
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,46 @@
|
|
| 1 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
license: apache-2.0
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
language: en
|
| 3 |
+
tags:
|
| 4 |
+
- bert
|
| 5 |
+
- rte
|
| 6 |
+
- glue
|
| 7 |
+
- torchdistill
|
| 8 |
+
- nlp
|
| 9 |
+
- int8
|
| 10 |
+
- neural-compressor
|
| 11 |
+
- Intel® Neural Compressor
|
| 12 |
+
- text-classfication
|
| 13 |
+
- PostTrainingStatic
|
| 14 |
license: apache-2.0
|
| 15 |
+
datasets:
|
| 16 |
+
- rte
|
| 17 |
+
metrics:
|
| 18 |
+
- f1
|
| 19 |
---
|
| 20 |
+
|
| 21 |
+
# INT8 bert-large-uncased-rte-int8-static
|
| 22 |
+
|
| 23 |
+
## Post-training static quantization
|
| 24 |
+
|
| 25 |
+
### PyTorch
|
| 26 |
+
|
| 27 |
+
This is an INT8 PyTorch model quantized with [Intel® Neural Compressor](https://github.com/intel/neural-compressor).
|
| 28 |
+
|
| 29 |
+
The original fp32 model comes from the fine-tuned model [yoshitomo-matsubara/bert-large-uncased-rte](https://huggingface.co/yoshitomo-matsubara/bert-large-uncased-rte).
|
| 30 |
+
|
| 31 |
+
#### Test result
|
| 32 |
+
|
| 33 |
+
| |INT8|FP32|
|
| 34 |
+
|---|:---:|:---:|
|
| 35 |
+
| **Accuracy (eval-f1)** |0.7365|0.7401|
|
| 36 |
+
| **Model size (MB)** |1244|1349|
|
| 37 |
+
|
| 38 |
+
#### Load with Intel® Neural Compressor:
|
| 39 |
+
|
| 40 |
+
```python
|
| 41 |
+
from optimum.intel.neural_compressor.quantization import IncQuantizedModelForSequenceClassification
|
| 42 |
+
|
| 43 |
+
int8_model = IncQuantizedModelForSequenceClassification.from_pretrained(
|
| 44 |
+
"Intel/bert-large-uncased-rte-int8-static",
|
| 45 |
+
)
|
| 46 |
+
```
|