Text Generation
Safetensors
English
qwen2
gptqmodel
modelcloud
chat
qwq
instruct
int4
gptq
4bit
W4A16
conversational
4-bit precision
Instructions to use ModelCloud/QwQ-32B-Preview-gptqmodel-4bit-vortex-v3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Local Apps Settings
- vLLM
How to use ModelCloud/QwQ-32B-Preview-gptqmodel-4bit-vortex-v3 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ModelCloud/QwQ-32B-Preview-gptqmodel-4bit-vortex-v3" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ModelCloud/QwQ-32B-Preview-gptqmodel-4bit-vortex-v3", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ModelCloud/QwQ-32B-Preview-gptqmodel-4bit-vortex-v3
- SGLang
How to use ModelCloud/QwQ-32B-Preview-gptqmodel-4bit-vortex-v3 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "ModelCloud/QwQ-32B-Preview-gptqmodel-4bit-vortex-v3" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ModelCloud/QwQ-32B-Preview-gptqmodel-4bit-vortex-v3", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "ModelCloud/QwQ-32B-Preview-gptqmodel-4bit-vortex-v3" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ModelCloud/QwQ-32B-Preview-gptqmodel-4bit-vortex-v3", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ModelCloud/QwQ-32B-Preview-gptqmodel-4bit-vortex-v3 with Docker Model Runner:
docker model run hf.co/ModelCloud/QwQ-32B-Preview-gptqmodel-4bit-vortex-v3
Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
- W4A16
|
| 20 |
+
---
|
| 21 |
+
|
| 22 |
+

|
| 23 |
+
|
| 24 |
+
This model has been quantized using [GPTQModel](https://github.com/ModelCloud/GPTQModel).
|
| 25 |
+
|
| 26 |
+
- **bits**: 4
|
| 27 |
+
- **dynamic**: null
|
| 28 |
+
- **group_size**: 32
|
| 29 |
+
- **desc_act**: true
|
| 30 |
+
- **static_groups**: false
|
| 31 |
+
- **sym**: true
|
| 32 |
+
- **lm_head**: false
|
| 33 |
+
- **true_sequential**: true
|
| 34 |
+
- **quant_method**: "gptq"
|
| 35 |
+
- **checkpoint_format**: "gptq"
|
| 36 |
+
- **meta**:
|
| 37 |
+
- **quantizer**: gptqmodel:1.4.4
|
| 38 |
+
- **uri**: https://github.com/modelcloud/gptqmodel
|
| 39 |
+
- **damp_percent**: 0.1
|
| 40 |
+
- **damp_auto_increment**: 0.0025
|
| 41 |
+
|
| 42 |
+
|
| 43 |
+
## Example:
|
| 44 |
+
```python
|
| 45 |
+
from transformers import AutoTokenizer
|
| 46 |
+
from gptqmodel import GPTQModel
|
| 47 |
+
|
| 48 |
+
tokenizer = AutoTokenizer.from_pretrained("ModelCloud/QwQ-32B-Preview-gptqmodel-4bit-vortex-v3")
|
| 49 |
+
model = GPTQModel.load("ModelCloud/QwQ-32B-Preview-gptqmodel-4bit-vortex-v3")
|
| 50 |
+
|
| 51 |
+
messages = [
|
| 52 |
+
{"role": "system", "content": "You are a helpful and harmless assistant. You are Qwen developed by Alibaba. You should think step-by-step."},
|
| 53 |
+
{"role": "user", "content": "How can I design a data structure in C++ to store the top 5 largest integer numbers?"},
|
| 54 |
+
]
|
| 55 |
+
input_tensor = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt")
|
| 56 |
+
|
| 57 |
+
outputs = model.generate(input_ids=input_tensor.to(model.device), max_new_tokens=512)
|
| 58 |
+
result = tokenizer.decode(outputs[0][input_tensor.shape[1]:], skip_special_tokens=True)
|
| 59 |
+
|
| 60 |
+
print(result)
|
| 61 |
+
```
|