English
yintongl commited on
Commit
d483397
·
verified ·
1 Parent(s): ef6a704

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +90 -0
README.md ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 int4 model with group_size 128 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
+
14
+
15
+
16
+
17
+
18
+ ### Reproduce the model
19
+
20
+ Here is the sample command to reproduce the model
21
+
22
+ ```bash
23
+ git clone https://github.com/intel/auto-round
24
+ cd auto-round/examples/language-modeling
25
+ pip install -r requirements.txt
26
+ python3 main.py \
27
+ --model_name mistralai/Mistral-7B-Instruct-v0.2 \
28
+ --device 0 \
29
+ --group_size 128 \
30
+ --bits 4 \
31
+ --iters 1000 \
32
+ --deployment_device 'gpu' \
33
+ --output_dir "./tmp_autoround" \
34
+
35
+ ```
36
+
37
+
38
+
39
+ ### Evaluate the model
40
+
41
+ Install [lm-eval-harness](https://github.com/EleutherAI/lm-evaluation-harness.git) from source, we used the git id 96d185fa6232a5ab685ba7c43e45d1dbb3bb906d
42
+
43
+ ```bash
44
+ lm_eval --model hf --model_args pretrained="Intel/Mistral-7B-Instruct-v0.2-int4-inc",autogptq=True,gptq_use_triton=True --device cuda:0 --tasks lambada_openai,hellaswag,piqa,winogrande,truthfulqa_mc1,openbookqa,boolq,rte,arc_easy,arc_challenge,mmlu --batch_size 32
45
+ ```
46
+
47
+ | Metric | BF16 | INT4 |
48
+ | -------------- | ------ | ------ |
49
+ | Avg. | 0.6647 | 0.6621 |
50
+ | mmlu | 0.5906 | 0.5872 |
51
+ | lambada_openai | 0.7141 | 0.7141 |
52
+ | hellaswag | 0.6602 | 0.6557 |
53
+ | winogrande | 0.7395 | 0.7364 |
54
+ | piqa | 0.8052 | 0.8047 |
55
+ | truthfulqa_mc1 | 0.5251 | 0.5153 |
56
+ | openbookqa | 0.3600 | 0.3420 |
57
+ | boolq | 0.8535 | 0.8541 |
58
+ | rte | 0.7040 | 0.7148 |
59
+ | arc_easy | 0.8161 | 0.8165 |
60
+ | arc_challenge | 0.5435 | 0.5435 |
61
+
62
+
63
+
64
+
65
+
66
+
67
+
68
+
69
+ ## Caveats and Recommendations
70
+
71
+ Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model.
72
+
73
+ Here are a couple of useful links to learn more about Intel's AI software:
74
+
75
+ * Intel Neural Compressor [link](https://github.com/intel/neural-compressor)
76
+ * Intel Extension for Transformers [link](https://github.com/intel/intel-extension-for-transformers)
77
+
78
+
79
+
80
+ ## Disclaimer
81
+
82
+ 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.
83
+
84
+
85
+
86
+ ## Cite
87
+
88
+ @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} }
89
+
90
+ [arxiv](https://arxiv.org/abs/2309.05516) [github](https://github.com/intel/auto-round)