Instructions to use unsloth/Qwen3-Coder-480B-A35B-Instruct-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use unsloth/Qwen3-Coder-480B-A35B-Instruct-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="unsloth/Qwen3-Coder-480B-A35B-Instruct-GGUF") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("unsloth/Qwen3-Coder-480B-A35B-Instruct-GGUF", dtype="auto") - llama-cpp-python
How to use unsloth/Qwen3-Coder-480B-A35B-Instruct-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="unsloth/Qwen3-Coder-480B-A35B-Instruct-GGUF", filename="BF16/Qwen3-Coder-480B-A35B-Instruct-BF16-00001-of-00021.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use unsloth/Qwen3-Coder-480B-A35B-Instruct-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf unsloth/Qwen3-Coder-480B-A35B-Instruct-GGUF:UD-Q4_K_XL # Run inference directly in the terminal: llama-cli -hf unsloth/Qwen3-Coder-480B-A35B-Instruct-GGUF:UD-Q4_K_XL
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf unsloth/Qwen3-Coder-480B-A35B-Instruct-GGUF:UD-Q4_K_XL # Run inference directly in the terminal: llama-cli -hf unsloth/Qwen3-Coder-480B-A35B-Instruct-GGUF:UD-Q4_K_XL
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf unsloth/Qwen3-Coder-480B-A35B-Instruct-GGUF:UD-Q4_K_XL # Run inference directly in the terminal: ./llama-cli -hf unsloth/Qwen3-Coder-480B-A35B-Instruct-GGUF:UD-Q4_K_XL
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf unsloth/Qwen3-Coder-480B-A35B-Instruct-GGUF:UD-Q4_K_XL # Run inference directly in the terminal: ./build/bin/llama-cli -hf unsloth/Qwen3-Coder-480B-A35B-Instruct-GGUF:UD-Q4_K_XL
Use Docker
docker model run hf.co/unsloth/Qwen3-Coder-480B-A35B-Instruct-GGUF:UD-Q4_K_XL
- LM Studio
- Jan
- vLLM
How to use unsloth/Qwen3-Coder-480B-A35B-Instruct-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "unsloth/Qwen3-Coder-480B-A35B-Instruct-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "unsloth/Qwen3-Coder-480B-A35B-Instruct-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/unsloth/Qwen3-Coder-480B-A35B-Instruct-GGUF:UD-Q4_K_XL
- SGLang
How to use unsloth/Qwen3-Coder-480B-A35B-Instruct-GGUF 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 "unsloth/Qwen3-Coder-480B-A35B-Instruct-GGUF" \ --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": "unsloth/Qwen3-Coder-480B-A35B-Instruct-GGUF", "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 "unsloth/Qwen3-Coder-480B-A35B-Instruct-GGUF" \ --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": "unsloth/Qwen3-Coder-480B-A35B-Instruct-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use unsloth/Qwen3-Coder-480B-A35B-Instruct-GGUF with Ollama:
ollama run hf.co/unsloth/Qwen3-Coder-480B-A35B-Instruct-GGUF:UD-Q4_K_XL
- Unsloth Studio new
How to use unsloth/Qwen3-Coder-480B-A35B-Instruct-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for unsloth/Qwen3-Coder-480B-A35B-Instruct-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for unsloth/Qwen3-Coder-480B-A35B-Instruct-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for unsloth/Qwen3-Coder-480B-A35B-Instruct-GGUF to start chatting
- Pi new
How to use unsloth/Qwen3-Coder-480B-A35B-Instruct-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf unsloth/Qwen3-Coder-480B-A35B-Instruct-GGUF:UD-Q4_K_XL
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "unsloth/Qwen3-Coder-480B-A35B-Instruct-GGUF:UD-Q4_K_XL" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use unsloth/Qwen3-Coder-480B-A35B-Instruct-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf unsloth/Qwen3-Coder-480B-A35B-Instruct-GGUF:UD-Q4_K_XL
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default unsloth/Qwen3-Coder-480B-A35B-Instruct-GGUF:UD-Q4_K_XL
Run Hermes
hermes
- Docker Model Runner
How to use unsloth/Qwen3-Coder-480B-A35B-Instruct-GGUF with Docker Model Runner:
docker model run hf.co/unsloth/Qwen3-Coder-480B-A35B-Instruct-GGUF:UD-Q4_K_XL
- Lemonade
How to use unsloth/Qwen3-Coder-480B-A35B-Instruct-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull unsloth/Qwen3-Coder-480B-A35B-Instruct-GGUF:UD-Q4_K_XL
Run and chat with the model
lemonade run user.Qwen3-Coder-480B-A35B-Instruct-GGUF-UD-Q4_K_XL
List all available models
lemonade list
Qwen3-Coder Tool Calling Fixes
Hey everyone! We managed to fix tool calling via llama.cpp --jinja specifically for serving through llama-server!
PLEASE NOTE: This issue was universal and affected all uploads (not just Unsloth) regardless of source/uploader, and we've communicated with the Qwen team about our fixes!
To get the latest updates, either do:
- Download the first file at https://huggingface.co/unsloth/Qwen3-Coder-480B-A35B-Instruct-GGUF/tree/main/UD-Q2_K_XL for UD-Q2_K_XL, and replace your current file
- Use
snapshot_downloadas usual as in https://docs.unsloth.ai/basics/qwen3-coder-how-to-run-locally#llama.cpp-run-qwen3-tutorial which will auto override the old files - Use the new chat template via
--chat-template-file. See GGUF chat template or chat_template.jinja - As an extra, I also made 1 single 150GB UD-IQ1_M file (so Ollama works) at https://huggingface.co/unsloth/Qwen3-Coder-480B-A35B-Instruct-GGUF/blob/main/Qwen3-Coder-480B-A35B-Instruct-UD-IQ1_M.gguf
This should solve issues like https://github.com/ggml-org/llama.cpp/issues/14915
I tried the version and tool calling still crashed.
Here is my command
./build/bin/llama-server \
--alias Qwen3-480B-A35B-Instruct \
--model /root/models/Qwen3-Coder-480B-A35B-Instruct-GGUF/UD-Q4_K_XL/UD-Q4_K_XL/Qwen3-Coder-480B-A35B-Instruct-UD-Q4_K_XL-00001-of-00006.gguf \
--ctx-size 102400 \
--cache-type-k q8_0 \
--cache-type-v q8_0 \
-fa \
--temp 0.7 \
--top_p 0.8 \
--top_k 20 \
--n-gpu-layers 99 \
--override-tensor "blk\.[0-3]\.ffn_.*=CUDA0,exps=CPU" \
--parallel 1 \
--threads 104 \
--host 0.0.0.0 \
--port 8080 \
--min_p 0.001 \
--threads-batch 52 \
--jinja \
-b 8192 -ub 4096 \
--chat-template-file /root/models/Qwen3-Coder-480B-A35B-Instruct-GGUF/chat_template_working.jinja
I created a chat template that doesn't crash. Feel free to use it https://gist.github.com/iSevenDays/4583750a17ee453783cbaa3acd4ab5fc
I had a lot of different problems using qwen3-coder with OpenCode, see e.g.: https://github.com/sst/opencode/issues/1809
It just does not follow the rules for tool calling: problems were wrong formatting like array "hidden" in a string instead of a plain array or missing mandatory fields. And this even with the chat template that comes with unsloth/Qwen3-Coder-30B-A3B-Instruct or the template from the last post.
(When using the chat template with vLLM from @isevendays even all tool calls failed for me.)
I experimented with a number of chat templates - without success. (And I'm even not convinced that this is the root cause.)
As a fast and dirty workaround I created a small proxy that can live between the qwen3-coder and the client (e.g. OpenCode) that corrects the tool calls, e.g. adding the mandatory "description" field in the "bash" tool call if not provided by the LLM. https://github.com/florath/qwen3-call-patch-proxy
I'd be happy if somebody could tell me the root cause of these problems and provide a fix. I'd be more than happy to purge my hackisch workaround if not needed any longer.
I adapted the earlier posted version to get it to work in opencode https://gist.github.com/tifoji/8559819fa289f1fe26fa5fd86d62216f
llama-server \
--model "Qwen3-Coder-480B-A35B-Instruct-UD-Q4_K_XL-00001-of-00006.gguf" \
--alias qwen3-coder \
--threads -1 \
--n-gpu-layers 99 \
-ot ".ffn_.*_exps.=CPU" \
--temp 0.7 \
--min-p 0.0 \
--top-p 0.8 \
--top-k 20 \
--repeat-penalty 1.05 \
--jinja \
--reasoning-format auto \
--no-context-shift \
--ctx-size 131072 \
--chat-template-file chat_template_llamacpp.jinja
First prompt "explain daylight savings time" took a long time to respond.
prompt eval time = 249554.33 ms / 9433 tokens ( 26.46 ms per token, 37.80 tokens per second)
eval time = 54438.50 ms / 224 tokens ( 243.03 ms per token, 4.11 tokens per second)
total time = 303992.83 ms / 9657 tokens
srv update_slots: all slots are idle
Subsequent ones were faster , for example "what is the current temperature in san francisco" ... It tried a webfetch first but failed and made a bash curl tool call successfully
slot print_timing: id 0 | task 584 |
prompt eval time = 1926.32 ms / 30 tokens ( 64.21 ms per token, 15.57 tokens per second)
eval time = 18938.54 ms / 81 tokens ( 233.81 ms per token, 4.28 tokens per second)
total time = 20864.86 ms / 111 tokens
Tested on mac studio 512GB