xinhe commited on
Commit
bb650cc
1 Parent(s): e2828af

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +54 -0
README.md CHANGED
@@ -1,3 +1,57 @@
1
  ---
 
 
2
  license: mit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ language:
3
+ - en
4
  license: mit
5
+ datasets:
6
+ - glue
7
+ metrics:
8
+ - f1
9
+ model-index:
10
+ - name: electra-small-discriminator-mrpc-int8-static
11
+ results:
12
+ - task:
13
+ name: Text Classification
14
+ type: text-classification
15
+ dataset:
16
+ name: GLUE MRPC
17
+ type: glue
18
+ args: mrpc
19
+ metrics:
20
+ - name: F1
21
+ type: f1
22
+ value: 0.900709219858156
23
  ---
24
+
25
+ # INT8 electra-small-discriminator-mrpc
26
+
27
+ ### Post-training static quantization
28
+
29
+ This is an INT8 PyTorch model quantized with [Intel® Neural Compressor](https://github.com/intel/neural-compressor).
30
+
31
+ The original fp32 model comes from the fine-tuned model [electra-small-discriminator-mrpc](https://huggingface.co/Intel/electra-small-discriminator-mrpc).
32
+
33
+ The calibration dataloader is the train dataloader. The default calibration sampling size 300 isn't divisible exactly by batch size 8, so
34
+ the real sampling size is 304.
35
+
36
+ ### Test result
37
+
38
+ - Batch size = 8
39
+ - [Amazon Web Services](https://aws.amazon.com/) c6i.xlarge (Intel ICE Lake: 4 vCPUs, 8g Memory) instance.
40
+
41
+ | |INT8|FP32|
42
+ |---|:---:|:---:|
43
+ | **Throughput (samples/sec)** |102.15|75.056|
44
+ | **Accuracy (eval-f1)** |0.9007|0.8983|
45
+ | **Model size (MB)** |14|51.8|
46
+
47
+ ### Load with Intel® Neural Compressor (build from source):
48
+
49
+ ```python
50
+ from neural_compressor.utils.load_huggingface import OptimizedModel
51
+ int8_model = OptimizedModel.from_pretrained(
52
+ 'Intel/electra-small-discriminator-mrpc-int8-static',
53
+ )
54
+ ```
55
+
56
+ Notes:
57
+ - The INT8 model has better performance than the FP32 model when the CPU is fully occupied. Otherwise, there will be the illusion that INT8 is inferior to FP32.