Instructions to use unsloth/Qwen3.8-27B-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use unsloth/Qwen3.8-27B-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.8-27B-GGUF:UD-Q4_K_M # Run inference directly in the terminal: llama cli -hf unsloth/Qwen3.8-27B-GGUF:UD-Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf unsloth/Qwen3.8-27B-GGUF:UD-Q4_K_M # Run inference directly in the terminal: llama cli -hf unsloth/Qwen3.8-27B-GGUF:UD-Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf unsloth/Qwen3.8-27B-GGUF:UD-Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf unsloth/Qwen3.8-27B-GGUF:UD-Q4_K_M
Use Docker
docker model run hf.co/unsloth/Qwen3.8-27B-GGUF:UD-Q4_K_M
- Llama new
- LM Studio
- Jan
- Ollama
How to use unsloth/Qwen3.8-27B-GGUF with Ollama:
ollama run hf.co/unsloth/Qwen3.8-27B-GGUF:UD-Q4_K_M
- Unsloth Desktop
- Pi
How to use unsloth/Qwen3.8-27B-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.8-27B-GGUF:UD-Q4_K_M
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.8-27B-GGUF:UD-Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use unsloth/Qwen3.8-27B-GGUF with Docker Model Runner:
docker model run hf.co/unsloth/Qwen3.8-27B-GGUF:UD-Q4_K_M
- Lemonade
How to use unsloth/Qwen3.8-27B-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull unsloth/Qwen3.8-27B-GGUF:UD-Q4_K_M
Run and chat with the model
lemonade run user.Qwen3.8-27B-GGUF-UD-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use unsloth/Qwen3.8-27B-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.8-27B-GGUF:UD-Q4_K_M
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.8-27B-GGUF:UD-Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use unsloth/Qwen3.8-27B-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.8-27B-GGUF:UD-Q4_K_M
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.8-27B-GGUF:UD-Q4_K_M" \ --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"
UD quants for 16GB VRAM?
Hello,
Are any UD quants ~15GBs planned? These would be really helpful for 16GB VRAM warriors. Even something like a UD-IQ4_XS would be excellent, as MTP can be run on CPU and model on GPU. I was able to get ~40tok/s on 5070Ti with IQ4_XS for Qwen3.6 with MTP on CPU*, but sadly it is not a UD quant. If not planned, curious what you think would be the best quant level for 16GB VRAM.
Interpolating from the benchmark graph, this seems like an ideal quant.
*: Had to split MTP layer into separate GGUF and feed that to llama.cpp to avoid MTP KV cache on GPU
Thanks!
Even 14.6 GB doesn't fit into my 16 GB VRAM anymore. What am I doing wrong?
- Try getting agent to split MTP layer into separate GGUF and feed that to llama.cpp and tell it to be CPU only to avoid MTP KV cache on GPU (will slow down inference but quality > speed for me)
- Using the standard GGUF with CPU MTP still allocates MTP's KV cache on GPU for me
- Use KV cache quantization for MTP itself
For now I made the best setup suitable for the 16GB card:
Model: Qwen 3.8 Q3_K_XL
Context: 58880 tokens (Maximum is 60160, but it is not stable enough)
Important options:
--flash-attn "on"
--cache-type-k "q8_0"
--cache-type-v "f16"
--spec-type "draft-mtp"
--spec-draft-n-max "3"
--fit "off"
--n-gpu-layers "all"
--kv-unified
--batch-size "512"
--ubatch-size "256"
KV cache is quantized, but just a bit. It is almost untouched and works perfect.
PS: Don't forget to add the option --reasoning-effort 'medium'.
Do I have to detach the MTP "head" from the GGUF I use? When I offload a separate MTP GGUF into CPU, decode tanks so much, it's not even funny.
It's not required. I did that to prevent OOM.
It's not required. I did that to prevent OOM.
For us 16GB peasants it is tho. Can you share me what you did exactly to make you net speed and not tank
I get ~45tok/s on a 5070ti, with 72k context on q8, which I think is pretty good. This is without doing the separation thing.
[*]
jinja = true
threads = 12
threads-batch = 12
parallel = 1
gpu-layers = auto
ctx-size = 128000
fit-target = 500
flash-attn = on
port = 8065
cache-type-k = f16
cache-type-v = f16
temperature = 0.55
top-p = 0.95
top-k = 20
presence-penalty = 0
min-p = 0.05
reasoning = on
reasoning-format = deepseek
reasoning-preserve = true
mmap = false
direct-io = true
[Qwen3.8-27B-Q3-MTP]
model = /data/models/qwen3.8-27B/Qwen3.8-27B-UD-Q3_K_XL.gguf
chat-template-file = /data/models/qwen_chat_template.jinja
mmap = true
direct-io = true
gpu-layers = 99
ctx-size = 72000
fit-target = 16
batch-size = 1024
ubatch-size = 128
cache-type-k = q8_0
cache-type-v = q8_0
override-tensor = blk\.64\..*=CPU
spec-type = draft-mtp,ngram-mod
spec-draft-p-min = 0.82
spec-draft-n-max = 1
cache-type-k-draft = q4_0
cache-type-v-draft = q4_0
spec-ngram-mod-n-match = 24
spec-ngram-mod-n-min = 8
spec-ngram-mod-n-max = 32
ctx-checkpoints = 128
cache-ram = 6000
temperature = 0.75
min-p = 0.0