Text Generation
Transformers
Safetensors
English
qwen2
code
codeqwen
chat
qwen
qwen-coder
conversational
text-generation-inference
Instructions to use Qwen/Qwen2.5-Coder-32B-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Qwen/Qwen2.5-Coder-32B-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Qwen/Qwen2.5-Coder-32B-Instruct") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-Coder-32B-Instruct") model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-Coder-32B-Instruct") 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
- HuggingChat
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Qwen/Qwen2.5-Coder-32B-Instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Qwen/Qwen2.5-Coder-32B-Instruct" # 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/Qwen2.5-Coder-32B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Qwen/Qwen2.5-Coder-32B-Instruct
- SGLang
How to use Qwen/Qwen2.5-Coder-32B-Instruct 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/Qwen2.5-Coder-32B-Instruct" \ --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/Qwen2.5-Coder-32B-Instruct", "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/Qwen2.5-Coder-32B-Instruct" \ --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/Qwen2.5-Coder-32B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Qwen/Qwen2.5-Coder-32B-Instruct with Docker Model Runner:
docker model run hf.co/Qwen/Qwen2.5-Coder-32B-Instruct
Install & run this model easily using llmpm
#42 opened 2 months ago
by
sarthak-saxena
IDE Agent Kit v0.1.0 — Let your IDE AI join the team
1
#41 opened 3 months ago
by
petruspennanen
Request: DOI
#40 opened 11 months ago
by
Fasdxoox
Inference API respond problem
8
#35 opened over 1 year ago
by
tunaorhanli1986
Adding Evaluation Results
#34 opened over 1 year ago
by
JustifYI
请问你们qwq的prompt是什么? 推理有什么特殊设置吗?我这边复现live-codebench只有35~38分。(live-code-bench-0801-1101)
#33 opened over 1 year ago
by
xxzcc
The differences between models in Chinese and English
1
#32 opened over 1 year ago
by
Geureka
It's a code chat/agent, not an AI coder.
4
#30 opened over 1 year ago
by
kingriel
Requesting information about hardware resources
8
#28 opened over 1 year ago
by
Ishuks
HQQ quants
#27 opened over 1 year ago
by
wrtn2
How to use function calling?
#23 opened over 1 year ago
by
GuitarGeorge
VSCODE + Cline + Ollama + Qwen2.5-Coder-32B-Instruct.Q8_0
3
#20 opened over 1 year ago
by
BigDeeper
test
#19 opened over 1 year ago
by
iSolver-AI
How to run speculative decoding of this model with 0.5B model.
👀 1
3
#18 opened over 1 year ago
by
Eryk-Chmielewski
ST Settings
#17 opened over 1 year ago
by
Adzeiros
Update README.md
#11 opened over 1 year ago
by
OldElection
Update README.md
#10 opened over 1 year ago
by
AngelVenerov
Update README.md
#8 opened over 1 year ago
by
Uglytr
Update README.md
#7 opened over 1 year ago
by
Father122
This is a wonderful model
🔥❤️ 14
2
#6 opened over 1 year ago
by
graelo
Update config.json
#5 opened over 1 year ago
by
win10
Update README.md
#4 opened over 1 year ago
by
MrLirik
Update README.md
#3 opened over 1 year ago
by deleted
Update README.md
#2 opened over 1 year ago
by deleted
What is the correct norm eps for 14B and 32B base models?
🔥❤️ 2
1
#1 opened over 1 year ago
by
msdejong