Instructions to use unsloth/Qwen3.6-27B-MTP-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use unsloth/Qwen3.6-27B-MTP-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="unsloth/Qwen3.6-27B-MTP-GGUF") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("unsloth/Qwen3.6-27B-MTP-GGUF", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use unsloth/Qwen3.6-27B-MTP-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf unsloth/Qwen3.6-27B-MTP-GGUF:UD-Q4_K_XL # Run inference directly in the terminal: llama cli -hf unsloth/Qwen3.6-27B-MTP-GGUF:UD-Q4_K_XL
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf unsloth/Qwen3.6-27B-MTP-GGUF:UD-Q4_K_XL # Run inference directly in the terminal: llama cli -hf unsloth/Qwen3.6-27B-MTP-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.6-27B-MTP-GGUF:UD-Q4_K_XL # Run inference directly in the terminal: ./llama-cli -hf unsloth/Qwen3.6-27B-MTP-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.6-27B-MTP-GGUF:UD-Q4_K_XL # Run inference directly in the terminal: ./build/bin/llama-cli -hf unsloth/Qwen3.6-27B-MTP-GGUF:UD-Q4_K_XL
Use Docker
docker model run hf.co/unsloth/Qwen3.6-27B-MTP-GGUF:UD-Q4_K_XL
- LM Studio
- Jan
- vLLM
How to use unsloth/Qwen3.6-27B-MTP-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "unsloth/Qwen3.6-27B-MTP-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.6-27B-MTP-GGUF", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/unsloth/Qwen3.6-27B-MTP-GGUF:UD-Q4_K_XL
- SGLang
How to use unsloth/Qwen3.6-27B-MTP-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.6-27B-MTP-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.6-27B-MTP-GGUF", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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.6-27B-MTP-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.6-27B-MTP-GGUF", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Ollama
How to use unsloth/Qwen3.6-27B-MTP-GGUF with Ollama:
ollama run hf.co/unsloth/Qwen3.6-27B-MTP-GGUF:UD-Q4_K_XL
- Unsloth Desktop
- Pi
How to use unsloth/Qwen3.6-27B-MTP-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf unsloth/Qwen3.6-27B-MTP-GGUF:UD-Q4_K_XL
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/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.6-27B-MTP-GGUF:UD-Q4_K_XL" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use unsloth/Qwen3.6-27B-MTP-GGUF with Docker Model Runner:
docker model run hf.co/unsloth/Qwen3.6-27B-MTP-GGUF:UD-Q4_K_XL
- Lemonade
How to use unsloth/Qwen3.6-27B-MTP-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull unsloth/Qwen3.6-27B-MTP-GGUF:UD-Q4_K_XL
Run and chat with the model
lemonade run user.Qwen3.6-27B-MTP-GGUF-UD-Q4_K_XL
List all available models
lemonade list
- Hermes Agent
How to use unsloth/Qwen3.6-27B-MTP-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf unsloth/Qwen3.6-27B-MTP-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.6-27B-MTP-GGUF:UD-Q4_K_XL
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use unsloth/Qwen3.6-27B-MTP-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf unsloth/Qwen3.6-27B-MTP-GGUF:UD-Q4_K_XL
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "unsloth/Qwen3.6-27B-MTP-GGUF:UD-Q4_K_XL" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Low VRAM<=8GB best result (40t/s WITHOUT MTP)
Qwen 3.6 is already using every last bit of resources with 8GB cards.
If you have sufficient VRAM, please ignore. This is not for you.
The first time I tried this, no matter the settings, I was getting 2 tokens/sec. I must have done a bad build.
Now that --spec-type draft-mtp is part of the official llama.cpp, it appears to be working, sort of.
To get performance with full context is going to be a balancing act.
UD quants are the way to go. And 2- or 3-bit isn't really that bad.
I one-shot prompted two complete games, with sound and all, no errors, with 2-bit quants.
Currently, llama-server doesn't seem to honor different spec-type & spec-draft-n-max settings on a per-model basis in router mode.
So I ran the server with and without those options for these tests.
Hardware
0.00.244.412 I - CUDA0 : NVIDIA GeForce RTX 3070 Laptop GPU (7819 MiB, 29009 MiB free)
0.00.244.417 I - CPU : AMD Ryzen 9 5900HX with Radeon Graphics (31981 MiB, 31981 MiB free)
Default settings
[*]
jinja = true
kv-unified = true
temp = 0.0
top-p = 0.95
top-k = 20
min-p = 0.0
ctk = q4_0
ctv = q4_0
Results comparison
2-bit WITHOUT MTP
[Qwen3.6-35B-A3B-UD-Q2_K_XL]
reasoning-budget = 32000
c = 262144
ncmoe = 25
[51523] 0.40.479.772 I slot print_timing: id 0 | task 0 | prompt eval time = 5310.02 ms / 2189 tokens ( 2.43 ms per token, 412.24 tokens per second)
[51523] 0.40.479.778 I slot print_timing: id 0 | task 0 | eval time = 27769.75 ms / 1229 tokens ( 22.60 ms per token, 44.26 tokens per second)
(I got 24 tokens per second eval time before. It was because I had another llama.cpp process running in the background somehow.)
2-bit WITH MTP
Best result. (I had to bump up ncmoe to 30 to accommodate the extra MTP overhead. 7.7GB VRAM used)
[51530] 1.34.227.671 I slot print_timing: id 0 | task 0 | prompt eval time = 6498.15 ms / 2513 tokens ( 2.59 ms per token, 386.73 tokens per second)
[51530] 1.34.227.677 I slot print_timing: id 0 | task 0 | eval time = 77643.29 ms / 2566 tokens ( 30.26 ms per token, 33.05 tokens per second)
4-bit WITHOUT MTP
[Qwen3.6-35B-A3B-UD-Q4_K_XL]
reasoning-budget = 32000
c = 262144
ncmoe = 33
[63577] 1.51.410.621 I slot print_timing: id 0 | task 0 | prompt eval time = 18975.05 ms / 4383 tokens ( 4.33 ms per token, 230.99 tokens per second)
[63577] 1.51.410.627 I slot print_timing: id 0 | task 0 | eval time = 81967.32 ms / 3016 tokens ( 27.18 ms per token, 36.80 tokens per second)
3-bit WITH MTP
[Qwen3.6-35B-A3B-UD-IQ3_K_XL]
reasoning-budget = 32000
ctx-size = 262144
alias = qwen3.6q3
ncmoe = 35
Best result. (Again, the MTP overhead is not worth the cost. Here, the 3-bit model is out-performed by plain, vanilla 4-bit)
[64055] 1.52.818.880 I slot print_timing: id 0 | task 0 | prompt eval time = 5184.85 ms / 1013 tokens ( 5.12 ms per token, 195.38 tokens per second)
[64055] 1.52.818.887 I slot print_timing: id 0 | task 0 | eval time = 101676.40 ms / 3022 tokens ( 33.65 ms per token, 29.72 tokens per second)
llama-server --host 0.0.0.0 --port 8087 --models-dir mtp/ --models-preset mtp/.models.ini -np 1 --spec-type draft-mtp --spec-draft-n-max 6
--no-warmup --models-max 1 --sleep-idle-seconds 420 --jinja -t 6 --no-mmproj-offload
Conclusions
- No speedup noticed with MTP on 8GB RTX 3070 mobile with full context window.
- The extra gigabyte used by MTP means we need more -cpumoe to compensate.
- This could be worked around by using a smaller context window. We get that.**
- Earlier results with slow prompt eval were from having another llama.cpp process running in the background.
- It's fairly-new. More optimization for low mem might be OTW.
Cheers!
Do not use -ngl 99. It [lllama.cpp] will auto-optimize without it. If you keep getting low t/s, try bumping up ncmoe instead.
I've got rtx3070 and 400-700 prompt/25-32 gen tps using q5km mtp.
128k ctx
I've got rtx3070 and 400-700 prompt/25-32 gen tps using q5km mtp.
128k ctx
please share your settings good sir
please share your settings good sir
--host 0.0.0.0 -fa 1 -c 131072 --min-p 0.0 --fit 1 -b 2024 -ub 512 --no-mmap -ctk q8_0 -ctv q8_0 --jinja -m Qwen3.6-35B-A3B-UD-MTP-Q5_K_M.gguf --temp 0.7 --top-p 0.95 --top-k 20 --presence-penalty 0.0 --repeat-penalty 1.0 --chat-template-kwargs "{"preserve_thinking":true}" --no-mmproj -np 1 --spec-type draft-mtp --spec-draft-n-max 2 --chat-template-file qwen3.6_chat_template.txt --reasoning-budget 4096 --metrics --ctx-checkpoints 65 --checkpoint-every-n-tokens 4096
The template from here - https://huggingface.co/froggeric/Qwen-Fixed-Chat-Templates
please share your settings good sir
--host 0.0.0.0 -fa 1 -c 131072 --min-p 0.0 --fit 1 -b 2024 -ub 512 --no-mmap -ctk q8_0 -ctv q8_0 --jinja -m Qwen3.6-35B-A3B-UD-MTP-Q5_K_M.gguf --temp 0.7 --top-p 0.95 --top-k 20 --presence-penalty 0.0 --repeat-penalty 1.0 --chat-template-kwargs "{"preserve_thinking":true}" --no-mmproj -np 1 --spec-type draft-mtp --spec-draft-n-max 2 --chat-template-file qwen3.6_chat_template.txt --reasoning-budget 4096 --metrics --ctx-checkpoints 65 --checkpoint-every-n-tokens 4096
The template from here - https://huggingface.co/froggeric/Qwen-Fixed-Chat-Templates
thanks, I just managed stable 35 t/s on two 3060 ti + 32gb ram with these specs, I'll play with your, as they seem better, and see what changes. I'll paste mine below
.\llama-server.exe ^
--models-preset "D:\Local_AI\custom_models\models.ini" ^
--models-dir "D:\Local_AI\custom_models" ^
--models-max 1 ^
--port 8080 ^
--host 127.0.0.2 ^
--fit on ^
--fit-target 128 ^
--mmap ^
--flash-attn on ^
--parallel 1 ^
--spec-type draft-mtp ^
--spec-draft-n-max 2 ^
--spec-draft-p-min 0.6 ^
--split-mode layer ^
--main-gpu 0 ^
--batch-size 512 ^
--ubatch-size 128
models.ini
[Qwen3.6-27B-MTP-UD-IQ3_XXS]
model=D:\Local_AI\custom_models\Qwen3.6-27B-MTP-UD-IQ3_XXS.gguf
jinja=true
ctx-size=81920
temperature=0.6
top-p=0.95
top-k=20
min-p=0.0
presence-penalty=0.0
repeat-penalty=1.0
cache-type-k=q4_0
cache-type-v=q4_0
Also, I read somewhere that draft token prediction is only good for stuff like coding, which has strict rules and surprisingly, many predictable tokens.
Creative writing, on the other hand, is free-flowing and very unpredictable. Supposedly won't benefit much from MTP, and could even be worse.
--spec-draft-n-max 1 seems to be fastest in many cases.
