Instructions to use unsloth/Qwen3.8-Flash-Next-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-Flash-Next-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-Flash-Next-GGUF:UD-Q4_K_XL # Run inference directly in the terminal: llama cli -hf unsloth/Qwen3.8-Flash-Next-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.8-Flash-Next-GGUF:UD-Q4_K_XL # Run inference directly in the terminal: llama cli -hf unsloth/Qwen3.8-Flash-Next-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.8-Flash-Next-GGUF:UD-Q4_K_XL # Run inference directly in the terminal: ./llama-cli -hf unsloth/Qwen3.8-Flash-Next-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.8-Flash-Next-GGUF:UD-Q4_K_XL # Run inference directly in the terminal: ./build/bin/llama-cli -hf unsloth/Qwen3.8-Flash-Next-GGUF:UD-Q4_K_XL
Use Docker
docker model run hf.co/unsloth/Qwen3.8-Flash-Next-GGUF:UD-Q4_K_XL
- LM Studio
- Jan
- vLLM
How to use unsloth/Qwen3.8-Flash-Next-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "unsloth/Qwen3.8-Flash-Next-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.8-Flash-Next-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.8-Flash-Next-GGUF:UD-Q4_K_XL
- Ollama
How to use unsloth/Qwen3.8-Flash-Next-GGUF with Ollama:
ollama run hf.co/unsloth/Qwen3.8-Flash-Next-GGUF:UD-Q4_K_XL
- Unsloth Desktop
- Pi
How to use unsloth/Qwen3.8-Flash-Next-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-Flash-Next-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.8-Flash-Next-GGUF:UD-Q4_K_XL" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use unsloth/Qwen3.8-Flash-Next-GGUF with Docker Model Runner:
docker model run hf.co/unsloth/Qwen3.8-Flash-Next-GGUF:UD-Q4_K_XL
- Lemonade
How to use unsloth/Qwen3.8-Flash-Next-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull unsloth/Qwen3.8-Flash-Next-GGUF:UD-Q4_K_XL
Run and chat with the model
lemonade run user.Qwen3.8-Flash-Next-GGUF-UD-Q4_K_XL
List all available models
lemonade list
- Hermes Agent
How to use unsloth/Qwen3.8-Flash-Next-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-Flash-Next-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.8-Flash-Next-GGUF:UD-Q4_K_XL
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use unsloth/Qwen3.8-Flash-Next-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-Flash-Next-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.8-Flash-Next-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"
Measured: ngram-map-k beats ngram-mod; ngram-cache costs -24% on prose (5060 Ti 16GB + 128GB)
Tuning results on RTX 5060 Ti 16GB / Ryzen 9 9950X / 128GB DDR5-5600, UD-IQ4_XS, llama.cpp PR #27742 @ af1ffaf37 (build 10706).
The speculative decoding variant matters far more than anything else, and the commonly recommended one isn't the best. Same server, one variable changed, measured on a copy-heavy code edit and on freeform prose:
--spec-type |
code | prose | accept |
|---|---|---|---|
| none | 20.75 | 21.12 | β |
| ngram-mod | 27.51 | 20.96 | 79.7% |
| ngram-simple | 29.97 | β | 90.7% |
| ngram-map-k | 30.02 | 21.24 | 92.0% |
| ngram-map-k4v | 31.08 | β | 95.5% |
| ngram-cache | 32.46 | 16.06 | 87.9% |
β οΈ ngram-cache looks best on code and costs β24% on prose. If you only benchmark the workload speculation helps, you'll pick it and ship a silent regression on everything else. ngram-map-k takes nearly all the gain with prose fractionally faster than no speculation at all.
Other measured findings:
--spec-draft-n-maxhas no effect on any n-gram variant (tested 2, 4, 6, 8, 12 β identical speed and identical acceptance every time).- KV
q4_0βq8_0is free (20.75 vs 20.70 code). Only 12 of 48 layers are full-attention with 2 KV heads, so KV is tiny. Take the better-validated q8_0. -c 131072measured no slower than 32K (32.00 vs 30.66).262144hits the VRAM ceiling β 15.6/16 GB and drops to 22.54.- Threads are flat (t8 20.98 / t12 21.46 / t16 21.13). CPU sits ~37% and the cores are stalled on memory, not computing.
--tensor-read-lazy autodid nothing here (30.59 vs 30.66, RAM 89 GB either way) β it's redundant with--load-mode none, which forces the model resident anyway.--load-mode noneis a prefill lever only: ~45% better PP, zero effect on decode, at the cost of 43 s load vs 10 s.
Expert residency is worth only ~0.66% speed per point, so filling the GPU barely helps:
--n-cpu-moe |
layers on GPU | VRAM | tok/s |
|---|---|---|---|
| 48 | 0 | 8,130 MB | 19.12 |
| 46 | 2 | 11,216 MB | 19.67 |
| 44 | 4 | 13,490 MB | 20.10 |
| 43 | 5 | 14,628 MB | 20.43 |
Two consequences: a second 16GB card isn't worth buying for this, and guides suggesting --n-cpu-moe 38 or 36 won't fit on a 16GB card β expert weights are 1.34 GB/layer with an 8.1 GB zero-expert baseline.
Degradation with a genuinely loaded cache (real mixed documents and code, cache_prompt=false): 19.43 t/s at 1.1K tokens in β 19.03 at 8K β 18.00 at 16K β 16.40 at 29K. That's β15.6% across the span with prefill flat at ~123 t/s β it degrades gracefully rather than falling off a cliff.
Note --spec-type draft-mtp fails with "model doesn't contain MTP layers" β the MTP head isn't in the GGUF.
Config landed on (128K context, ~14.3 GB VRAM, ~90 GB RAM, 43 s load):
-ngl 999 --n-cpu-moe 44 -c 131072 -np 1 -fa on \
-b 2048 -ub 512 -ctk q8_0 -ctv q8_0 -t 12 \
--load-mode none --spec-type ngram-map-k \
--jinja --reasoning-format deepseek
Full data, harness scripts and raw JSON: https://github.com/solarkyle/qwen38-flashnext-16gb
Single machine, one run per config unless noted β differences under ~3% are noise.
Why is the prose result empty for ngram-map-k4v and ngram-simple?
I don't think those ngrams work with --spec-draft-n-max
what about settings like
--spec-ngram-mod-n-min N minimum number of ngram tokens to use for ngram-based speculative
decoding (default: 48)
--spec-ngram-mod-n-max N maximum number of ngram tokens to use for ngram-based speculative
decoding (default: 64)
--spec-ngram-mod-n-match N ngram-mod lookup length (default: 24)
--spec-ngram-simple-size-n N ngram size N for ngram-simple speculative decoding, length of lookup
n-gram (default: 12)
--spec-ngram-simple-size-m N ngram size M for ngram-simple speculative decoding, length of draft
m-gram (default: 48)
--spec-ngram-simple-min-hits N minimum hits for ngram-simple speculative decoding (default: 1)
--spec-ngram-map-k-size-n N ngram size N for ngram-map-k speculative decoding, length of lookup
n-gram (default: 12)
--spec-ngram-map-k-size-m N ngram size M for ngram-map-k speculative decoding, length of draft
m-gram (default: 48)
--spec-ngram-map-k-min-hits N minimum hits for ngram-map-k speculative decoding (default: 1)
--spec-ngram-map-k4v-size-n N ngram size N for ngram-map-k4v speculative decoding, length of lookup
n-gram (default: 12)
--spec-ngram-map-k4v-size-m N ngram size M for ngram-map-k4v speculative decoding, length of draft
m-gram (default: 48)
--spec-ngram-map-k4v-min-hits N minimum hits for ngram-map-k4v speculative decoding (default: 1)
should test with those, different combos