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"
Single 16GB RTX 5060 Ti: 53 t/s with MTP and Quantized KV Cache
I’ve been testing Qwen3.8-27B-GGUF (UD-IQ3_XXS) locally using llama.cpp (llama-server) on a single mid-range consumer GPU setup (RTX 5060 Ti 16GB + 32GB RAM), and the performance-to-VRAM ratio achieved with Multi-Token Prediction (MTP) is worth highlighting. Amazing job from Qwen team.
Here is a quick breakdown of the setup and execution parameters that brought inference speed from ~35 t/s up to a steady 50–55 t/s with a 94k context window.
Some notes:
Without MTP, average of 35 t/s
Without "reasoning_effort": "medium" , the model overthink too much ( the default is xhigh )
Setting parallel to 1, make possible up the context to 92K
One shot prompt:
Create a complete space shooter game packaged as a single self-contained HTML file that includes all HTML markup, CSS styling, and JavaScript game logic. The game must meet the following detailed requirements:
Core Game Structure
- Package all game assets, styling, and functionality within one HTML file for standalone execution
- Implement a modern, visually polished user interface with clear visual hierarchy and responsive design that works across standard screen sizes
- Use canvas or WebGL for smooth 60fps game rendering with modern visual effects for explosions, engine trails, and weapon fire
Player Mechanics
- Implement a player spaceship with a starting health pool that is visually displayed on the UI
- Grant the player 3 initial lives, with remaining lives clearly shown on the game screen
- Allow the player to take damage from enemy projectiles and enemy collisions, with proper damage calculation applied to the player's health
- Add health pickup items (health potions) that spawn vertically from the top of the screen and move downward continuously
- Configure health potions to spawn with a 3% probability per second under normal conditions
- Pause health potion spawns for 30 seconds after the player collects any health potion, after which the 3% per second spawn probability resumes
- Ensure only one health potion exists on screen at any time to prevent excessive power-ups
Enemy System
- Include multiple distinct enemy types with unique movement patterns, health values, and firing behaviors to create varied gameplay challenges
- Use realistic, visually distinct spaceship designs for all enemy units to differentiate their threat levels
- Scale enemy spawn rates by 10% when advancing to each new stage, starting with the base spawn rate for Stage 1
- Implement horizontal-only movement for all boss entities to maintain consistent boss fight mechanics
- Create multiple unique boss characters, each equipped with entirely distinct attack patterns (such as spread fire, homing projectiles, laser barrages, and wave attacks)
- Trigger a boss fight at the end of each stage, requiring the player to defeat the boss to unlock progression
- Advance the game to Stage 2 after defeating the Stage 1 boss, with a 10% increase in enemy spawn rates
- Advance the game to Stage 3 after defeating the Stage 2 boss, with an additional 10% increase in enemy spawn rates for increased difficulty
UI Requirements
- Display the player's current score as a persistent, easy-to-read element on the game screen, updating in real-time as points are earned
- Show the player's current health as a visual bar or numeric value that updates immediately when damage is taken or health is restored
- Display remaining lives as icons or numeric text that update when the player loses a life
- Add stage number indicators to inform players which difficulty stage they are currently playing through
- Ensure all UI elements have high contrast against the space background to remain visible at all times
Gameplay Polish
- Implement proper collision detection for all projectiles, player ship, enemy ships, and collectible items
- Add sound effects for firing, explosions, health collection, and boss encounters to enhance immersion
- Include a game over screen that displays the final score and an option to restart the game
- Add a win condition for Stage 3 that triggers a victory screen after defeating the final boss
- Test all game mechanics to ensure smooth progression, correct spawn rates, and accurate damage calculation across all stages
Result:
https://codepen.io/editor/hfmiguel/pen/01a001bb-e93a-7305-8841-273b82691d0b
You can try the game, the boss fight and enemies works like a charm, i did the same prompt with others models and this was the best result ( the previous champion for my prompt was : Qwen3.6-35B-A3B-GGUF )
Settings:
llama serve
-hf unsloth/Qwen3.8-27B-GGUF:UD-IQ3_XXS
--no-mmproj
--gpu-layers-draft all
--spec-type draft-mtp
--spec-draft-n-max 3
--n-gpu-layers all
--threads 6
--fit off
--load-mode none
--no-mmap
--no-warmup
--flash-attn on
--ctx-size 94208
--parallel 1
--cache-type-k q4_0
--cache-type-v q4_0
--batch-size 512
--ubatch-size 512
--jinja
--temp 1
--top-p 0.95
--top-k 20
--min-p 0.0
--presence-penalty 0.0
--repeat-penalty 1.0
--reasoning auto
--reasoning-preserve
--chat-template-kwargs '{"preserve-thinking": true, "reasoning_effort": "medium"}'
--host 0.0.0.0
--port 1234
--gpu-layers-draft all
--spec-type draft-mtp
--spec-draft-n-max 3
--n-gpu-layers all
--threads 6
--ctx-size 94208
?
test on rtx 3080mobile 16g vram +48g ram only 10t/s Qwen3.8-27B-Q4_K_S.gguf Qwen3.8-27B-Q3_K_S.gguf nearly same speed
++++
If you need image recognition, please add:
--mmproj /unsloth/Qwen3.8-27B-GGUF/mmproj-F16.gguf
--threads 8
--load-mode dio
--no-mmproj-offload
mmproj load into normal memory!!
Hey, I’m trying to reproduce your results on an RTX 5060 Ti 16GB, but I’m only getting around 16–22 tok/s with MTP.
I’m using the same Qwen3.8-27B-UD-IQ3_XXS model and settings very close to yours: MTP with 3 draft tokens, full GPU offload, flash attention, parallel 1, Q4_0 KV cache and 512 batch/ubatch.
During generation the GPU is at around 97–100% utilization, ~15.1/16.3 GB VRAM and 150–160 W, but with around 38k tokens of context I’m still only getting roughly 16–20 tok/s.
I saw that you were getting around 50 tok/s, so I'm probably missing something. Do you see anything wrong with my setup, or is the difference mainly caused by the context length? Was your ~50 tok/s result with a fresh/short context, or do you get similar speeds with 30–40k+ context too?
I attached my logs/settings below. Thanks :)
llama serve -hf unsloth/Qwen3.8-27B-GGUF:UD-IQ3_XXS --no-mmproj --gpu-layers-draft all --spec-type draft-mtp --spec-draft-n-max 3 --n-gpu-layers all --threads 6 --fit off --load-mode none --no-warmup --flash-attn on --ctx-size 94208 --parallel 1 --cache-type-k q4_0 --cache-type-v q4_0 --batch-size 512 --ubatch-size 512 --jinja --temp 1 --top-p 0.95 --top-k 20 --min-p 0.0 --presence-penalty 0.0 --repeat-penalty 1.0 --reasoning auto --reasoning-preserve --host 127.0.0.1 --port 1234
Good question ...
Im running with an intel I5 10° and 32gb of ram ddr4 + rtx 5060 to 16Gb.
Try to pass the chat template to modify the reasoning effort to medium . I think it's the only difference between your command and mine .
I found the issue. My llama.cpp install from Winget was using the Vulkan backend instead of CUDA.
After switching to the official CUDA build of llama.cpp, performance improved a lot.
I also noticed that CLI agents add a large system/tool prompt, so even a fresh session can already start with ~20k context. That explains why the coding agent is slower than a raw API request.
With CUDA + MTP I now get around 50–57 tok/s on short context and roughly 40–50 tok/s in the coding agent.
This is the command I’m using (powershell):
llama-server -hf unsloth/Qwen3.8-27B-GGUF:UD-IQ3_XXS
--no-mmproj --device CUDA0
--spec-draft-device CUDA0 --gpu-layers-draft all
--spec-type draft-mtp --spec-draft-n-max 3
--n-gpu-layers all --threads 6
--fit off --load-mode none
--no-warmup --flash-attn on
--ctx-size 94208 --parallel 1
--cache-type-k q4_0 --cache-type-v q4_0
--batch-size 512 --ubatch-size 512
--jinja --temp 1
--top-p 0.95 --top-k 20
--min-p 0.0 --presence-penalty 0.0
--repeat-penalty 1.0 --reasoning auto
--reasoning-preserve --host 127.0.0.1
--port 1234
And I set:
LLAMA_ARG_CHAT_TEMPLATE_KWARGS={"preserve-thinking":true,"reasoning_effort":"medium"}
So if anyone has the same performance problem, first check whether llama.cpp is actually using CUDA and not Vulkan.
Thanks for this thread — it sent me down the MTP rabbit hole and the results on my 5060 Ti 16GB have been pretty wild.
I’m running Qwen3.8-27B UD-IQ4_XS rather than IQ3_XXS, on the official llama.cpp CUDA 13.3 build b10549, with the model fully on the 5060 Ti. My 3060 Ti handles Windows/monitors etc separately.
Current config:
Qwen3.8-27B UD-IQ4_XS
32K context
Q8_0 K + V cache
Flash Attention on
parallel=1
MTP draft layer fully on GPU
--spec-type draft-mtp
--spec-draft-n-max 3
RTX 5060 Ti 16GB
Without MTP I measured:
~2.5K context: 26.0 t/s
~14.2K: 24.9 t/s
~18.1K: 24.5 t/s
~25.4K: 23.7 t/s
With MTP n=3:
~2.5K: 54.1 t/s
~14.2K: 50.8 t/s
~18.1K: 51.3 t/s
~25.4K: 40.8 t/s
So it’s basically a 2x speedup through the context range I care about, while keeping the higher-quality IQ4_XS quant and Q8 KV.
Peak VRAM in the MTP n=3 tests was about 15.4GB, so it’s tight but fits cleanly. I also specifically checked for Windows shared-memory spill and didn’t find any.
One other interesting result: the GGUF definitely contains the Qwen MTP layer (qwen35.nextn_predict_layers = 1 / blk.64.nextn.*), so no separate draft model is needed.
I also tested reasoning effort. The model template supports xhigh / medium / low, with xhigh as default. Medium looks promising for coding quality, but it absolutely needs a bigger output budget — with a 3K-token ceiling it could spend the whole allowance reasoning and never emit the final answer. At 6K it completed and gave a stronger engineering analysis than thinking-off on my codebase.
So at the moment my likely production setup is:
IQ4_XS + Q8 KV + 32K + MTP n3 + medium reasoning for the higher-judgement roles.
Really appreciate the original numbers here — they gave me the clue to test MTP properly. I was expecting ~25–30 t/s from this card and am now seeing ~50 t/s at realistic coding-agent context sizes.
Has anyone else tried IQ4_XS + Q8 KV + MTP n3 on the 5060 Ti? I’d be interested to compare acceptance rates / VRAM / throughput.
Hey Bellatorius01, I will try this same
Update after more coding-agent testing: I found another surprisingly large config effect. My original runtime used temp=0.2 / top_p=0.95 with thinking disabled. On the same deterministic coding canary, switching to Qwen's non-thinking sampling profile (temp=0.7, top_p=0.8, top_k=20, presence_penalty=1.5) produced the same correct 8/8 implementation, but tool-call repetition dropped from 30 to 0, requests from 53 to 4, and wall time from 374.9s to 42.2s. So on this model, overly conservative sampling appears capable of massively hurting agentic convergence even when final coding capability is unchanged.
curious about the prompt prefill speed.




