lrl-modelcloud
commited on
Commit
•
a56a098
1
Parent(s):
7c6b254
Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
license_link: https://huggingface.co/Qwen/Qwen2.5-Coder-32B-Instruct/blob/main/LICENSE
|
4 |
+
language:
|
5 |
+
- en
|
6 |
+
base_model:
|
7 |
+
- Qwen/Qwen2.5-Coder-32B
|
8 |
+
pipeline_tag: text-generation
|
9 |
+
tags:
|
10 |
+
- gptqmodel
|
11 |
+
- modelcloud
|
12 |
+
- code
|
13 |
+
- codeqwen
|
14 |
+
- chat
|
15 |
+
- qwen
|
16 |
+
- qwen-coder
|
17 |
+
- instruct
|
18 |
+
- int4
|
19 |
+
---
|
20 |
+
|
21 |
+
![image/png](https://cdn-uploads.huggingface.co/production/uploads/641c13e7999935676ec7bc03/sIFlsIQiR88zq-Y_hH0gf.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.2.1
|
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 |
+
model_name = "ModelCloud/Qwen2.5-Coder-32B-Instruct-gptqmodel-4bit-vortex-v1"
|
48 |
+
|
49 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
50 |
+
model = GPTQModel.from_quantized(model_name)
|
51 |
+
|
52 |
+
messages = [
|
53 |
+
{"role": "system", "content": "You are an AI programming assistant, skilled in analyzing and generating code."},
|
54 |
+
{"role": "user", "content": "How can I design a data structure in C++ to store the top 5 largest integer numbers?"},
|
55 |
+
]
|
56 |
+
input_tensor = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt")
|
57 |
+
|
58 |
+
outputs = model.generate(input_ids=input_tensor.to(model.device), max_new_tokens=512)
|
59 |
+
result = tokenizer.decode(outputs[0][input_tensor.shape[1]:], skip_special_tokens=True)
|
60 |
+
|
61 |
+
print(result)
|
62 |
+
```
|