Text Generation
Transformers
Safetensors
English
qwen2
chat
conversational
text-generation-inference
Instructions to use Qwen/QwQ-32B-Preview with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Qwen/QwQ-32B-Preview with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Qwen/QwQ-32B-Preview") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Qwen/QwQ-32B-Preview") model = AutoModelForCausalLM.from_pretrained("Qwen/QwQ-32B-Preview") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Qwen/QwQ-32B-Preview with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Qwen/QwQ-32B-Preview" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Qwen/QwQ-32B-Preview", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Qwen/QwQ-32B-Preview
- SGLang
How to use Qwen/QwQ-32B-Preview 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 "Qwen/QwQ-32B-Preview" \ --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": "Qwen/QwQ-32B-Preview", "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 "Qwen/QwQ-32B-Preview" \ --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": "Qwen/QwQ-32B-Preview", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Qwen/QwQ-32B-Preview with Docker Model Runner:
docker model run hf.co/Qwen/QwQ-32B-Preview
Install & run Qwen/QwQ-32B-Preview easily using llmpm
#62 opened 3 months ago
by
sarthak-saxena
Improve language tag
#61 opened about 1 year ago
by
lbourdois
add new model metadata
#60 opened about 1 year ago
by
davanstrien
question about output length
1
#59 opened over 1 year ago
by
skylerr
Remove CoT prompt from chat template
1
#58 opened over 1 year ago
by
SumanthRH
Why is this not in inference api?
#56 opened over 1 year ago
by
Reality123b
请问你们qwq的prompt是什么? 推理有什么特殊设置吗?我这边复现live-codebench只有35~38分。(live-code-bench-0801-1101)
#53 opened over 1 year ago
by
xxzcc
Does QwQ support function calling?
4
#52 opened over 1 year ago
by
nanma
Tried the "strawberry" demo case but got wrong answer😂
2
#51 opened over 1 year ago
by
HuggingLianWang
🖐️🖐️ Can we please get a 7B reasoning model? 😎🤗🤗😍
🔥 3
1
#50 opened over 1 year ago
by
so-anyway
Request: DOI
#49 opened over 1 year ago
by
daniqt2
Can't reproduce the evaluation result of GPQA dataset
➕ 1
5
#47 opened over 1 year ago
by
Rinn000
Adding Evaluation Results
#44 opened over 1 year ago
by
QueCumber
Evaluation Details of QwQ-32B-Preview on LiveCodeBench Benchmark
👍🔥 13
#43 opened over 1 year ago
by
survivi
Independent Evaluation of QwQ-32B-Preview on MMLU-Pro Benchmark
👍👀 7
1
#42 opened over 1 year ago
by
yaronr
Can't copy the full reasoning
2
#41 opened over 1 year ago
by
saipangon
Create bsnwritingservices
#40 opened over 1 year ago
by
carlo34
https://huggingface.co/Qwen/QwQ-32B-Preview/resolve/main/.gitattributes
#39 opened over 1 year ago
by
tongtong22
Floating point exception
2
#38 opened over 1 year ago
by
zhongqy
My prompt induced infinite loops with QwQ
1
#35 opened over 1 year ago
by
hanaoverride
docs: update README.md
#34 opened over 1 year ago
by
eltociear
Which one is more risky, type 1 or type 2?
2
#33 opened over 1 year ago
by
Hanialy
Silly tavern template?
4
#32 opened over 1 year ago
by
BigBeavis
Update README.md
#31 opened over 1 year ago
by
cumanpc
Adding Evaluation Results
#30 opened over 1 year ago
by
leaderboard-pr-bot
Fine-tuning or system prompt for fiction writing?
1
#28 opened over 1 year ago
by
advokat
Update README.md
#26 opened over 1 year ago
by
OMSRI-SRI-RADHAKRSNA-1728
Will the training code and data be released?
1
#25 opened over 1 year ago
by
WbjuSrceu
early exit reasoning inference
#24 opened over 1 year ago
by
miniTsl
RAG architecture based on the model family qwen2.5
#22 opened over 1 year ago
by
shevel
This is way too much... USB? Yes. U SB.
3
#21 opened over 1 year ago
by
imoc
该模型只适合聊天,没有其他能力
2
#20 opened over 1 year ago
by
royabcde
trick for less token usage and less halucination
👍🔥 1
4
#19 opened over 1 year ago
by
gopi87
multi GPU inferencing
2
#18 opened over 1 year ago
by
cjj2003
Install QwQ 32B Locally - Step by Step Video Tutorial
👍🤗 5
#17 opened over 1 year ago
by
fahdmirzac
Adds Chinese characters to responses
8
#16 opened over 1 year ago
by
maxbenk
Problem with specific output format
🚀 1
#15 opened over 1 year ago
by
sszymczyk
About Releasing Some Examples of QWQ's Training Dataset
#13 opened over 1 year ago
by
tanhuajie2001
Nice name QAQ. I'll later upload a 4.7bpw quantized model if it works.
👀🤗 4
#12 opened over 1 year ago
by
imoc
QuietSTAR?
1
#9 opened over 1 year ago
by
albatrossbirdie
Inference Speed Benchmark and GPU memeory usage
👍 2
#8 opened over 1 year ago
by
Yunxz
Some Badcases
👍 2
1
#7 opened over 1 year ago
by
yirgacheffe
ways to contain the thought process from users for a cleaner interface
#5 opened over 1 year ago
by
Steelskull
A huge thanks!
#2 opened over 1 year ago
by
owao
ggggggggg
👍🧠 8
2
#1 opened over 1 year ago
by
Smougueni