File size: 1,341 Bytes
b0ca7da
f631890
 
b0ca7da
f631890
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b0ca7da
f631890
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1e61ddd
f631890
1e61ddd
 
 
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
49
50
51
52
53
54
55
56
57
58
59
60
61
---
language:
- ja
license: mit
tags:
- ja
- japanese
- gpt_neox
- gpt
- text-generation
- lm
- nlp
- int8
- neural-compressor
- Intel® Neural Compressor
- PostTrainingStatic
datasets:
- oscar
model-index:
- name: gpt-neox-japanese-2.7b-int8
  results:
  - task:
      name: Text Generation
      type: text-generation
    dataset:
      name: oscar
      type: oscar
      args: unshuffled_original_ast
    metrics:
    - name: Acurracy
      type: loss
      value: 4.9920
---
# INT8 gpt-neox-japanese-2.7b-int8

## Post-training static quantization

### PyTorch

This is an INT8  PyTorch model quantized with [Intel® Neural Compressor](https://github.com/intel/neural-compressor). 

The original fp32 model comes from the fine-tuned model [abeja/gpt-neox-japanese-2.7b](https://huggingface.co/abeja/gpt-neox-japanese-2.7b).

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.

#### Test result

|   |INT8|FP32|
|---|:---:|:---:|
| **Accuracy (eval-loss)** |4.9920|3.5219|
| **Model size (MB)**  |2570|5360|

#### Load with Intel® Neural Compressor:

```python
from optimum.intel import INCModelForCausalLM

model_id = "Intel/gpt-neox-japanese-2.7b-int8"
int8_model = INCModelForCausalLM.from_pretrained(model_id)
```