lrl-modelcloud
commited on
Commit
•
1a6cf10
1
Parent(s):
7f2a75f
Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
- qwen2
|
14 |
+
- qwq
|
15 |
+
- instruct
|
16 |
+
- int4
|
17 |
+
- gptq
|
18 |
+
- 4bit
|
19 |
+
---
|
20 |
+
|
21 |
+
![image/png](https://cdn-uploads.huggingface.co/production/uploads/641c13e7999935676ec7bc03/2oH8KNg_qFoi7BQtxv9hr.png)
|
22 |
+
|
23 |
+
This model has been quantized using [GPTQModel](https://github.com/ModelCloud/GPTQModel).
|
24 |
+
|
25 |
+
- **bits**: 4
|
26 |
+
- **dynamic**: null
|
27 |
+
- **group_size**: 32
|
28 |
+
- **desc_act**: true
|
29 |
+
- **static_groups**: false
|
30 |
+
- **sym**: true
|
31 |
+
- **lm_head**: false
|
32 |
+
- **true_sequential**: true
|
33 |
+
- **quant_method**: "gptq"
|
34 |
+
- **checkpoint_format**: "gptq"
|
35 |
+
- **meta**:
|
36 |
+
- **quantizer**: gptqmodel:1.4.4
|
37 |
+
- **uri**: https://github.com/modelcloud/gptqmodel
|
38 |
+
- **damp_percent**: 0.1
|
39 |
+
- **damp_auto_increment**: 0.0015
|
40 |
+
|
41 |
+
|
42 |
+
## Example:
|
43 |
+
```python
|
44 |
+
from transformers import AutoTokenizer
|
45 |
+
from gptqmodel import GPTQModel
|
46 |
+
|
47 |
+
tokenizer = AutoTokenizer.from_pretrained("ModelCloud/QwQ-32B-Preview-gptqmodel-4bit-vortex-v2")
|
48 |
+
model = GPTQModel.load("ModelCloud/QwQ-32B-Preview-gptqmodel-4bit-vortex-v2")
|
49 |
+
|
50 |
+
messages = [
|
51 |
+
{"role": "system", "content": "You are a helpful and harmless assistant. You are Qwen developed by Alibaba. You should think step-by-step."},
|
52 |
+
{"role": "user", "content": "How can I design a data structure in C++ to store the top 5 largest integer numbers?"},
|
53 |
+
]
|
54 |
+
input_tensor = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt")
|
55 |
+
|
56 |
+
outputs = model.generate(input_ids=input_tensor.to(model.device), max_new_tokens=512)
|
57 |
+
result = tokenizer.decode(outputs[0][input_tensor.shape[1]:], skip_special_tokens=True)
|
58 |
+
|
59 |
+
print(result)
|
60 |
+
```
|