INT8 GPT-J 6B
GPT-J 6B is a transformer model trained using Ben Wang's Mesh Transformer JAX. "GPT-J" refers to the class of model, while "6B" represents the number of trainable parameters.
This int8 ONNX model is generated by neural-compressor and the fp32 model can be exported with below command:
python -m transformers.onnx --model=EleutherAI/gpt-j-6B onnx_gptj/ --framework pt --opset 13 --feature=causal-lm-with-past
Test result
INT8 | FP32 | |
---|---|---|
Lambada Acc | 0.7944 | 0.7954 |
Model size (GB) | 6 | 23 |
How to use
Download the model and script by cloning the repository:
git clone https://huggingface.co/Intel/gpt-j-6B-int8-static
Then you can do inference based on the model and script 'evaluation.ipynb'.
- Downloads last month
- 1