MPWARE commited on
Commit
a4ba036
·
verified ·
1 Parent(s): 49f4e03

Update README.md

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