xinhe commited on
Commit
1ffada6
1 Parent(s): 05d10ae

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +56 -0
README.md CHANGED
@@ -1,3 +1,59 @@
1
  ---
 
 
2
  license: apache-2.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ language:
3
+ - en
4
  license: apache-2.0
5
+ tags:
6
+ - text-classfication
7
+ - int8
8
+ - PostTrainingStatic
9
+ datasets:
10
+ - conll2003
11
+ metrics:
12
+ - accuracy
13
+ model-index:
14
+ - name: distilbert-base-uncased-finetuned-conll03-english-int8-static
15
+ results:
16
+ - task:
17
+ name: Token Classification
18
+ type: token-classification
19
+ dataset:
20
+ name: Conll2003
21
+ type: conll2003
22
+ metrics:
23
+ - name: Accuracy
24
+ type: accuracy
25
+ value: 0.9858650364082395
26
  ---
27
+ # INT8 distilbert-base-uncased-finetuned-conll03-english
28
+
29
+ ### Post-training static quantization
30
+
31
+ This is an INT8 PyTorch model quantized with [Intel® Neural Compressor](https://github.com/intel/neural-compressor).
32
+
33
+ The original fp32 model comes from the fine-tuned model [elastic/distilbert-base-uncased-finetuned-conll03-english](https://huggingface.co/elastic/distilbert-base-uncased-finetuned-conll03-english).
34
+
35
+ The calibration dataloader is the train dataloader. The default calibration sampling size 100 isn't divisible exactly by batch size 8, so the real sampling size is 104.
36
+
37
+ ### Test result
38
+
39
+ - Batch size = 8
40
+ - [Amazon Web Services](https://aws.amazon.com/) c6i.xlarge (Intel ICE Lake: 4 vCPUs, 8g Memory) instance.
41
+
42
+ | |INT8|FP32|
43
+ |---|:---:|:---:|
44
+ | **Throughput (samples/sec)** |148.144|77.108|
45
+ | **Accuracy (eval-f1)** |0.9859|0.9882|
46
+ | **Model size (MB)** |64.5|253|
47
+
48
+ ### Load with Intel® Neural Compressor (build from source):
49
+
50
+ ```python
51
+ from neural_compressor.utils.load_huggingface import OptimizedModel
52
+ int8_model = OptimizedModel.from_pretrained(
53
+ 'Intel/distilbert-base-uncased-finetuned-conll03-english-int8-static',
54
+ )
55
+ ```
56
+
57
+ Notes:
58
+ - 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.
59
+