Text Generation
Transformers
Safetensors
English
qwen2
code
codeqwen
chat
qwen
qwen-coder
conversational
text-generation-inference
Instructions to use Model-SafeTensors/Qwen2.5-Coder-32B-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Model-SafeTensors/Qwen2.5-Coder-32B-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Model-SafeTensors/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("Model-SafeTensors/Qwen2.5-Coder-32B-Instruct") model = AutoModelForCausalLM.from_pretrained("Model-SafeTensors/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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Model-SafeTensors/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 "Model-SafeTensors/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": "Model-SafeTensors/Qwen2.5-Coder-32B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Model-SafeTensors/Qwen2.5-Coder-32B-Instruct
- SGLang
How to use Model-SafeTensors/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 "Model-SafeTensors/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": "Model-SafeTensors/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 "Model-SafeTensors/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": "Model-SafeTensors/Qwen2.5-Coder-32B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Model-SafeTensors/Qwen2.5-Coder-32B-Instruct with Docker Model Runner:
docker model run hf.co/Model-SafeTensors/Qwen2.5-Coder-32B-Instruct
Upload folder using huggingface_hub
Browse files- model-00001-of-00014.safetensors +1 -1
- model-00002-of-00014.safetensors +1 -1
- model-00003-of-00014.safetensors +1 -1
- model-00004-of-00014.safetensors +1 -1
- model-00005-of-00014.safetensors +1 -1
- model-00006-of-00014.safetensors +1 -1
- model-00007-of-00014.safetensors +1 -1
- model-00008-of-00014.safetensors +1 -1
- model-00009-of-00014.safetensors +1 -1
- model-00010-of-00014.safetensors +1 -1
- model-00011-of-00014.safetensors +1 -1
- model-00012-of-00014.safetensors +1 -1
- model-00013-of-00014.safetensors +1 -1
- model-00014-of-00014.safetensors +1 -1
model-00001-of-00014.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4891730992
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5746929d771eb06ba0105671a2018dca3c648d4664ca5a5ce2077df82fabad92
|
| 3 |
size 4891730992
|
model-00002-of-00014.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4876059352
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:12aaad653a85d7212a9cc7722937fff7b2bd060ab8522399b4a74d2bf736df8d
|
| 3 |
size 4876059352
|
model-00003-of-00014.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4876059384
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9bac433064b2c29f3e2a891539993b74b7a1da5b0a78c900b2e22fc20fe66059
|
| 3 |
size 4876059384
|
model-00004-of-00014.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4876059416
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4e859e864a61c45dc2e38650359540e5f35f09d4a6993ef66d7274760e7d1905
|
| 3 |
size 4876059416
|
model-00005-of-00014.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4876059416
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:57000579cf2e87cd575333288c25588a45816fc406ace74a52efed1e7bc910d5
|
| 3 |
size 4876059416
|
model-00006-of-00014.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4876059416
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:72dd80465092fad2665c9705332efa99c20b9fb22ad1944e7fe7429a222ede42
|
| 3 |
size 4876059416
|
model-00007-of-00014.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4876059416
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b91130f8049d3446221000a1d44cdf7bd344f01a2b5843f9bb81ac8193beeae8
|
| 3 |
size 4876059416
|
model-00008-of-00014.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4876059416
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:522db6c67390557f2964a4a0094a463a067c91992be164b6e141aa1267a225e5
|
| 3 |
size 4876059416
|
model-00009-of-00014.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4876059416
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7c03b072b4aad4da68016b75b78c6eb3ea6b35e18ac0dae4906146603fa32e23
|
| 3 |
size 4876059416
|
model-00010-of-00014.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4876059416
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c5ee9a4665ae7d5c9e6d37f77d93c47244a80ee41284060efde69d223472a87a
|
| 3 |
size 4876059416
|
model-00011-of-00014.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4876059416
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:49f60205e190369145352de972e3510bcfeef6b5a26041573032edbe132c1e06
|
| 3 |
size 4876059416
|
model-00012-of-00014.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4876059416
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9a53a0d4a02dcb5f036da4fcd50e408107144ff4c4b09357cf1829be2ef382f9
|
| 3 |
size 4876059416
|
model-00013-of-00014.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4876059416
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8b26127defc68bff2e0744ae9afc9c8ab1730fee071e0400b4bfe8f07fadda5b
|
| 3 |
size 4876059416
|
model-00014-of-00014.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 2123397800
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:983ebbded19c19264d08845710c9993714d60e17f81c62e1e15c8f174af79847
|
| 3 |
size 2123397800
|