lrl-modelcloud commited on
Commit
fe4b924
1 Parent(s): 9fb4017

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +57 -0
README.md ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ license_link: https://huggingface.co/Qwen/QwQ-32B-Preview/blob/main/LICENSE
4
+ language:
5
+ - en
6
+ base_model:
7
+ - Qwen/QwQ-32B-Preview
8
+ pipeline_tag: text-generation
9
+ tags:
10
+ - gptqmodel
11
+ - modelcloud
12
+ - chat
13
+ - qwen
14
+ - instruct
15
+ - int4
16
+ - gptq
17
+ - 4bit
18
+ ---
19
+
20
+ This model has been quantized using [GPTQModel](https://github.com/ModelCloud/GPTQModel).
21
+
22
+ - **bits**: 4
23
+ - **dynamic**: null
24
+ - **group_size**: 32
25
+ - **desc_act**: true
26
+ - **static_groups**: false
27
+ - **sym**: true
28
+ - **lm_head**: false
29
+ - **true_sequential**: true
30
+ - **quant_method**: "gptq"
31
+ - **checkpoint_format**: "gptq"
32
+ - **meta**:
33
+ - **quantizer**: gptqmodel:1.2.2
34
+ - **uri**: https://github.com/modelcloud/gptqmodel
35
+ - **damp_percent**: 0.1
36
+ - **damp_auto_increment**: 0.0015
37
+
38
+
39
+ ## Example:
40
+ ```python
41
+ from transformers import AutoTokenizer
42
+ from gptqmodel import GPTQModel
43
+
44
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
45
+ model = GPTQModel.load("ModelCloud/QwQ-32B-Preview-GPTQ-4bit")
46
+
47
+ messages = [
48
+ {"role": "system", "content": "You are Qwen, created by Alibaba Cloud. You are a helpful assistant."},
49
+ {"role": "user", "content": "How can I design a data structure in C++ to store the top 5 largest integer numbers?"},
50
+ ]
51
+ input_tensor = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt")
52
+
53
+ outputs = model.generate(input_ids=input_tensor.to(model.device), max_new_tokens=512)
54
+ result = tokenizer.decode(outputs[0][input_tensor.shape[1]:], skip_special_tokens=True)
55
+
56
+ print(result)
57
+ ```