English
yintongl commited on
Commit
749e513
·
verified ·
1 Parent(s): 4266d21

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +94 -0
README.md ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ datasets:
4
+ - NeelNanda/pile-10k
5
+ language:
6
+ - en
7
+ ---
8
+
9
+
10
+ ## Model Details
11
+
12
+ This model is an int2 model with group_size 32 of [mistralai/Mistral-7B-Instruct-v0.2](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2) generated by [intel/auto-round](https://github.com/intel/auto-round).
13
+ The model size of it is 2.6 Gb.
14
+ Inference of this model is compatible with AutoGPTQ's Kernel.
15
+
16
+
17
+
18
+
19
+ ### Reproduce the model
20
+
21
+ Here is the sample command to reproduce the model
22
+
23
+ ```bash
24
+ git clone https://github.com/intel/auto-round
25
+ cd auto-round/examples/language-modeling
26
+ pip install -r requirements.txt
27
+ python3 main.py \
28
+ --model_name mistralai/Mistral-7B-Instruct-v0.2 \
29
+ --device 0 \
30
+ --group_size 32 \
31
+ --bits 2 \
32
+ --iters 200 \
33
+ --minmax_lr 0.01 \
34
+ --deployment_device 'gpu' \
35
+ --output_dir "./tmp_autoround" \
36
+
37
+ ```
38
+
39
+
40
+
41
+ ### Evaluate the model
42
+
43
+ Install [lm-eval-harness 0.4.2](https://github.com/EleutherAI/lm-evaluation-harness.git) from source.
44
+
45
+ ```bash
46
+ git clone https://github.com/intel/auto-round
47
+ cd auto-round/examples/language-modeling
48
+ pip install -r requirements.txt
49
+ python3 eval_042/evaluation.py --model_name ./tmp_autoround --eval_bs 16 --tasks lambada_openai,hellaswag,piqa,winogrande,truthfulqa_mc1,openbookqa,boolq,arc_easy,arc_challenge,mmlu
50
+ ```
51
+
52
+ | Metric | FP16 | INT2 |
53
+ | -------------- | ------ | ------ |
54
+ | Avg. | 0.6591 | 0.6014 |
55
+ | mmlu | 0.5877 | 0.5140 |
56
+ | lambada_openai | 0.7155 | 0.6295 |
57
+ | hellaswag | 0.6602 | 0.5856 |
58
+ | winogrande | 0.7411 | 0.6835 |
59
+ | piqa | 0.8014 | 0.7748 |
60
+ | truthfulqa_mc1 | 0.5251 | 0.4651 |
61
+ | openbookqa | 0.3520 | 0.2900 |
62
+ | boolq | 0.8529 | 0.8226 |
63
+ | arc_easy | 0.8136 | 0.7647 |
64
+ | arc_challenge | 0.5418 | 0.4846 |
65
+
66
+
67
+
68
+
69
+
70
+
71
+
72
+
73
+ ## Caveats and Recommendations
74
+
75
+ Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model.
76
+
77
+ Here are a couple of useful links to learn more about Intel's AI software:
78
+
79
+ * Intel Neural Compressor [link](https://github.com/intel/neural-compressor)
80
+ * Intel Extension for Transformers [link](https://github.com/intel/intel-extension-for-transformers)
81
+
82
+
83
+
84
+ ## Disclaimer
85
+
86
+ The license on this model does not constitute legal advice. We are not responsible for the actions of third parties who use this model. Please consult an attorney before using this model for commercial purposes.
87
+
88
+
89
+
90
+ ## Cite
91
+
92
+ @article{cheng2023optimize, title={Optimize weight rounding via signed gradient descent for the quantization of llms}, author={Cheng, Wenhua and Zhang, Weiwei and Shen, Haihao and Cai, Yiyang and He, Xin and Lv, Kaokao}, journal={arXiv preprint arXiv:2309.05516}, year={2023} }
93
+
94
+ [arxiv](https://arxiv.org/abs/2309.05516) [github](https://github.com/intel/auto-round)