Update README.md
Browse files
README.md
CHANGED
@@ -7,14 +7,15 @@ inference: false
|
|
7 |
pipeline_tag: text-generation
|
8 |
---
|
9 |
## Mixtral-8x7B-Instruct-v0.1-hf-attn-4bit-moe-2bit-metaoffload-HQQ
|
10 |
-
This is a version of the Mixtral-8x7B-Instruct-v0.1
|
11 |
|
12 |
-
|
|
|
|
|
13 |
|
14 |
|
15 |
![image/gif](https://cdn-uploads.huggingface.co/production/uploads/636b945ef575d3705149e982/-gwGOZHDb9l5VxLexIhkM.gif)
|
16 |
|
17 |
-
The difference between this model and https://huggingface.co/mobiuslabsgmbh/Mixtral-8x7B-Instruct-v0.1-hf-attn-4bit-moe-2bit-HQQ is that this one offloads the metadata to the CPU and you only need 13GB Vram to run it instead of 20GB!
|
18 |
|
19 |
----------------------------------------------------------------------------------------------------------------------------------
|
20 |
</p>
|
@@ -23,14 +24,14 @@ The difference between this model and https://huggingface.co/mobiuslabsgmbh/Mixt
|
|
23 |
## Performance
|
24 |
| Models | Mixtral Original | HQQ quantized |
|
25 |
|-------------------|------------------|------------------|
|
26 |
-
| Runtime VRAM |
|
27 |
-
| ARC (25-shot) | 70.22 | 66.
|
28 |
-
| Hellaswag (10-shot)| 87.63 | 84.
|
29 |
-
| MMLU (5-shot) | 71.16 | 67.
|
30 |
-
| TruthfulQA-MC2 | 64.58 | 62.
|
31 |
-
| Winogrande (5-shot)| 81.37 |
|
32 |
-
| GSM8K (5-shot)| 60.73 | 45.
|
33 |
-
| Average| 72.62 | 67.
|
34 |
|
35 |
|
36 |
## Screencast
|
@@ -104,8 +105,12 @@ model = HQQModelForCausalLM.from_pretrained(model_id, use_auth_token=hf_auth
|
|
104 |
from hqq.core.quantize import *
|
105 |
attn_prams = BaseQuantizeConfig(nbits=4, group_size=64, offload_meta=True)
|
106 |
experts_params = BaseQuantizeConfig(nbits=2, group_size=16, offload_meta=True)
|
107 |
-
|
108 |
-
|
|
|
|
|
|
|
|
|
109 |
|
110 |
quant_config = {}
|
111 |
#Attention
|
|
|
7 |
pipeline_tag: text-generation
|
8 |
---
|
9 |
## Mixtral-8x7B-Instruct-v0.1-hf-attn-4bit-moe-2bit-metaoffload-HQQ
|
10 |
+
This is a version of the <a href="https://huggingface.co/mistralai/Mixtral-8x7B-Instruct-v0.1"> Mixtral-8x7B-Instruct-v0.1 model</a> quantized with a mix of 4-bit and 2-bit via Half-Quadratic Quantization (HQQ). More specifically, the attention layers are quantized to 4-bit and the experts are quantized to 2-bit.
|
11 |
|
12 |
+
The difference between this model and <a href="https://huggingface.co/mobiuslabsgmbh/Mixtral-8x7B-Instruct-v0.1-hf-attn-4bit-moe-2bit-HQQ"> our previous release </a> is that this one offloads the metadata to the CPU and you only need 13GB Vram to run it instead of 20GB!
|
13 |
+
|
14 |
+
*Note*: this model was updated to use a group-size of 128 instead of 256 for the scale/zero parameters, which slightly improves the overall score with a negligible increase in VRAM.
|
15 |
|
16 |
|
17 |
![image/gif](https://cdn-uploads.huggingface.co/production/uploads/636b945ef575d3705149e982/-gwGOZHDb9l5VxLexIhkM.gif)
|
18 |
|
|
|
19 |
|
20 |
----------------------------------------------------------------------------------------------------------------------------------
|
21 |
</p>
|
|
|
24 |
## Performance
|
25 |
| Models | Mixtral Original | HQQ quantized |
|
26 |
|-------------------|------------------|------------------|
|
27 |
+
| Runtime VRAM | 94 GB | <b>13.5 GB</b> |
|
28 |
+
| ARC (25-shot) | 70.22 | 66.55 |
|
29 |
+
| Hellaswag (10-shot)| 87.63 | 84.83 |
|
30 |
+
| MMLU (5-shot) | 71.16 | 67.39 |
|
31 |
+
| TruthfulQA-MC2 | 64.58 | 62.80 |
|
32 |
+
| Winogrande (5-shot)| 81.37 | 80.03 |
|
33 |
+
| GSM8K (5-shot)| 60.73 | 45.41 |
|
34 |
+
| Average| 72.62 | 67.83 |
|
35 |
|
36 |
|
37 |
## Screencast
|
|
|
105 |
from hqq.core.quantize import *
|
106 |
attn_prams = BaseQuantizeConfig(nbits=4, group_size=64, offload_meta=True)
|
107 |
experts_params = BaseQuantizeConfig(nbits=2, group_size=16, offload_meta=True)
|
108 |
+
zero_scale_group_size = 128
|
109 |
+
|
110 |
+
attn_prams['scale_quant_params']['group_size'] = zero_scale_group_size
|
111 |
+
attn_prams['zero_quant_params']['group_size'] = zero_scale_group_size
|
112 |
+
experts_params['scale_quant_params']['group_size'] = zero_scale_group_size
|
113 |
+
experts_params['zero_quant_params']['group_size'] = zero_scale_group_size
|
114 |
|
115 |
quant_config = {}
|
116 |
#Attention
|