Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,79 @@
|
|
1 |
---
|
2 |
license: apache-2.0
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
license: apache-2.0
|
3 |
+
datasets:
|
4 |
+
- NeelNanda/pile-10k
|
5 |
+
language:
|
6 |
+
- en
|
7 |
+
tags:
|
8 |
+
- text-generation-inference
|
9 |
---
|
10 |
+
|
11 |
+
## Model Details
|
12 |
+
|
13 |
+
This model is an int8 model by smooth quant of [tiiuae/falcon-7b](https://huggingface.co/tiiuae/falcon-7b)
|
14 |
+
|
15 |
+
## Uses
|
16 |
+
|
17 |
+
### Direct Use
|
18 |
+
|
19 |
+
## Evaluate
|
20 |
+
|
21 |
+
Env setup: following https://github.com/intel/intel-extension-for-transformers/blob/main/examples/huggingface/pytorch/text-generation/quantization/README.md
|
22 |
+
|
23 |
+
```bash
|
24 |
+
# Installation
|
25 |
+
git clone https://github.com/intel/intel-extension-for-transformers.git
|
26 |
+
|
27 |
+
# install ITREX
|
28 |
+
cd intel-extension-for-transformers
|
29 |
+
git checkout d6e6e9f944a2b3f9cf7d8346a310233094885dda
|
30 |
+
pip install -r requirements.txt
|
31 |
+
pip install -v .
|
32 |
+
|
33 |
+
# install requirements
|
34 |
+
cd examples/huggingface/pytorch/text-generation/quantization
|
35 |
+
pip install -r requirements.txt
|
36 |
+
pip install neural-compressor==2.5
|
37 |
+
pip install transformers==4.35.2
|
38 |
+
pip install torch==2.2.0+cpu --index-url https://download.pytorch.org/whl/cpu
|
39 |
+
pip install intel-extension-for-pytorch==2.2.0
|
40 |
+
```
|
41 |
+
|
42 |
+
### Evaluate the model
|
43 |
+
|
44 |
+
```bash
|
45 |
+
python run_generation.py \
|
46 |
+
--model tiiuae/falcon-7b \
|
47 |
+
--output_dir <git_clone_path>/falcon-7b-sq-int8-inc \
|
48 |
+
--tasks lambada_openai \
|
49 |
+
--int8 --accuracy --benchmark \
|
50 |
+
--batch_size 1 \
|
51 |
+
--alpha 0.95
|
52 |
+
```
|
53 |
+
|
54 |
+
### Results
|
55 |
+
|
56 |
+
| Metric | fp32 | int8 sq |
|
57 |
+
| -------------- | ------ | -------- |
|
58 |
+
| Avg. | 0.6982 | 0.6992 |
|
59 |
+
| lambada_openai | 0.7467 | 0.7648 |
|
60 |
+
| hellaswag | 0.5778 | 0.5659 |
|
61 |
+
| winogrande | 0.6732 | 0.6717 |
|
62 |
+
| piqa | 0.7949 | 0.7943 |
|
63 |
+
|
64 |
+
|
65 |
+
## Ethical Considerations and Limitations
|
66 |
+
|
67 |
+
The model can produce factually incorrect output, and should not be relied on to produce factually accurate information. Because of the limitations of the pretrained model and the finetuning datasets, it is possible that this model could generate lewd, biased or otherwise offensive outputs.
|
68 |
+
|
69 |
+
Therefore, before deploying any applications of the model, developers should perform safety testing.
|
70 |
+
|
71 |
+
## Caveats and Recommendations
|
72 |
+
|
73 |
+
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model.
|
74 |
+
|
75 |
+
Here are a couple of useful links to learn more about Intel's AI software:
|
76 |
+
|
77 |
+
* Intel® Neural Compressor [link](https://github.com/intel/neural-compressor)
|
78 |
+
* Intel® Extension for Transformers [link](https://github.com/intel/intel-extension-for-transformers)
|
79 |
+
* Intel® Extension for PyTorch [link](https://github.com/intel/intel-extension-for-pytorch)
|