Update README.md
Browse files
README.md
CHANGED
@@ -3,4 +3,16 @@ license: mit
|
|
3 |
base_model:
|
4 |
- deepseek-ai/DeepSeek-R1-Distill-Qwen-14B
|
5 |
---
|
6 |
-
AWQ 4 bits quantization from DeepSeek-R1-Distill-Qwen-14B commit 123265213609ea67934b1790bbb0203d3c50f54f
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
base_model:
|
4 |
- deepseek-ai/DeepSeek-R1-Distill-Qwen-14B
|
5 |
---
|
6 |
+
AWQ 4 bits quantization from DeepSeek-R1-Distill-Qwen-14B commit 123265213609ea67934b1790bbb0203d3c50f54f
|
7 |
+
|
8 |
+
```python
|
9 |
+
from awq import AutoAWQForCausalLM
|
10 |
+
from transformers import AutoTokenizer
|
11 |
+
model_name = "deepseek-ai/DeepSeek-R1-Distill-Qwen-14B"
|
12 |
+
commit_hash = "123265213609ea67934b1790bbb0203d3c50f54f"
|
13 |
+
# Download the model and tokenizer at the specific commit hash
|
14 |
+
model = AutoAWQForCausalLM.from_pretrained(model_name, revision=commit_hash)
|
15 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name, revision=commit_hash)
|
16 |
+
quant_config = { "zero_point": True, "q_group_size": 128, "w_bit": 4, "version": "GEMM" }
|
17 |
+
model.quantize(tokenizer, quant_config=quant_config)
|
18 |
+
```
|