File size: 1,193 Bytes
bff1d92
37ee185
bff1d92
37ee185
 
 
 
 
 
 
 
 
bff1d92
37ee185
25f4760
37ee185
 
 
da445e0
37ee185
 
 
 
 
 
 
 
 
 
da445e0
37ee185
 
a8e37e6
 
 
 
37ee185
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
---
language: en
license: mit
tags:
- text-classfication
- int8
- Intel® Neural Compressor
- QuantizationAwareTraining
datasets: 
- mrpc
metrics:
- f1
---

# INT8 MiniLM finetuned MRPC

### QuantizationAwareTraining

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/MiniLM-L12-H384-uncased-mrpc](https://huggingface.co/Intel/MiniLM-L12-H384-uncased-mrpc).

### Test result

|   |INT8|FP32|
|---|:---:|:---:|
| **Accuracy (eval-f1)** |0.9068|0.9097|
| **Model size (MB)**  |33.1|127|

### Load with optimum:

```python
from optimum.intel import INCModelForSequenceClassification 

model_id = "Intel/MiniLM-L12-H384-uncased-mrpc-int8-qat"
int8_model = INCModelForSequenceClassification(model_id)
```

### Training hyperparameters
    
The following hyperparameters were used during training:
- learning_rate: 1e-05
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- num_epochs: 1.0
- train_batch_size: 16
- eval_batch_size: 8