yintongl commited on
Commit
540157f
·
verified ·
1 Parent(s): aad0885

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +84 -0
README.md ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ datasets:
4
+ - NeelNanda/pile-10k
5
+ ---
6
+
7
+
8
+
9
+
10
+
11
+
12
+ ## Model Details: Mixtral-8x7B-Instruct-v0.1-int4-inc
13
+
14
+ This model is an int4 model with group_size 128 of [mistralai/Mixtral-8x7B-Instruct-v0.1](https://huggingface.co/mistralai/Mixtral-8x7B-Instruct-v0.1) generated by [intel/auto-round](https://github.com/intel/auto-round). Layers "block_sparse_moe.gate" have not been quantized due to the exporting issue of AutoGPTQ format.
15
+
16
+ ## How To Use
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/Mixtral-8x7B-Instruct-v0.1 \
28
+ --device 0 \
29
+ --group_size 128 \
30
+ --bits 4 \
31
+ --iters 1000 \
32
+ --enable_minmax_tuning \
33
+ --low_gpu_mem_usage \
34
+ --deployment_device 'gpu' \
35
+ --scale_dtype 'fp32' \
36
+ --eval_bs 32 \
37
+ --output_dir "./tmp_autoround" \
38
+ --amp
39
+
40
+ ```
41
+
42
+
43
+
44
+
45
+
46
+ ### Evaluate the model
47
+
48
+ Install [lm-eval-harness](https://github.com/EleutherAI/lm-evaluation-harness.git) from source, and the git id f3b7917091afba325af3980a35d8a6dcba03dc3f is used
49
+
50
+ ```bash
51
+ lm_eval --model hf --model_args pretrained="Intel/Mixtral-8x7B-Instruct-v0.1-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
52
+ ```
53
+
54
+ | Metric | FP16 | INT4 |
55
+ | -------------- | ------ | ------ |
56
+ | Avg. | 0.7000 | 0.6977 |
57
+ | mmlu | 0.6885 | 0.6824 |
58
+ | lambada_openai | 0.7718 | 0.7790 |
59
+ | hellaswag | 0.6767 | 0.6745 |
60
+ | winogrande | 0.7687 | 0.7719 |
61
+ | piqa | 0.8351 | 0.8335 |
62
+ | truthfulqa_mc1 | 0.4969 | 0.4884 |
63
+ | openbookqa | 0.3680 | 0.3720 |
64
+ | boolq | 0.8850 | 0.8783 |
65
+ | rte | 0.7184 | 0.7004 |
66
+ | arc_easy | 0.8699 | 0.8712 |
67
+ | arc_challenge | 0.6220 | 0.6229 |
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
+ ## Disclaimer
83
+
84
+ 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.