Update README.md
Browse files
README.md
CHANGED
@@ -29,6 +29,25 @@ This int8 PyTorch model is generated by [intel-extension-for-transformers](https
|
|
29 |
| intel-extension-for-pytorch | 2.1.0 |
|
30 |
| transformers | 4.32.0 |
|
31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
## Evaluation results
|
33 |
Evaluating the accuracy of the optimized model of gpt-j-6b using the lambada_openai dataset in lm_eval.
|
34 |
|
|
|
29 |
| intel-extension-for-pytorch | 2.1.0 |
|
30 |
| transformers | 4.32.0 |
|
31 |
|
32 |
+
## Usage
|
33 |
+
Currently, we only support the method of downloading the model and then loading it. In this approach, the model files are downloaded from the server and stored locally on the user's machine.
|
34 |
+
- Clone this model repository
|
35 |
+
```bash
|
36 |
+
# Make sure you have git-lfs installed (https://git-lfs.com)
|
37 |
+
git lfs install
|
38 |
+
git clone https://huggingface.co/Intel/gpt-j-6B-pytorch-int8-static
|
39 |
+
```
|
40 |
+
- Load int8 model
|
41 |
+
```python
|
42 |
+
from intel_extension_for_transformers.llm.evaluation.models import TSModelCausalLMForITREX
|
43 |
+
|
44 |
+
user_model = TSModelCausalLMForITREX.from_pretrained(
|
45 |
+
args.output_dir, # Your saved path
|
46 |
+
file_name="best_model.pt",
|
47 |
+
trust_remote_code=args.trust_remote_code, # Default is False
|
48 |
+
)
|
49 |
+
```
|
50 |
+
|
51 |
## Evaluation results
|
52 |
Evaluating the accuracy of the optimized model of gpt-j-6b using the lambada_openai dataset in lm_eval.
|
53 |
|