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
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-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
- Llama new
- 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:9931/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:9931/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:9931/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"
Up to 34 t/s on 2Γ Tesla V100 16 GB + dual Xeon E5-2680 v4 (128 GB DDR4): tuning results for llama.cpp and ik_llama.cpp
Qwen3.8-Flash-Next on 2Γ Tesla V100 16 GB + dual Xeon E5-2680 v4 (128 GB DDR4): tuning results for llama.cpp and ik_llama.cpp
This report presents measured tuning results for the Qwen3.8-Flash-Next MoE model (Unsloth dynamic GGUFs, UD-IQ4_XS and UD-Q4_K_XL) on a dual-socket Xeon + dual-V100 server, using mainline llama.cpp and ik_llama.cpp, at five context sizes (32k / 131k / 262k / 500k / 1M).
Every number in the tables was measured warm (server up, weights paged in, one warm-up generation, cache_prompt=false), best of 2β3 runs, 256-token generations, greedy sampling. Negative results are included as well β they cost the most time to establish and may save you the same.
Workload note:
copy= output a Python module verbatim (repetitive, speculation-friendly);code= a refactor task that begins with a<think>block (mixed);prose= essay continuation (non-repetitive). Speculative decoding gains oncodeare much smaller than oncopy, because reasoning tokens do not repeat.
Hardware
| Component | Detail |
|---|---|
| CPU | 2Γ Intel Xeon E5-2680 v4 (28 cores / 56 threads, DDR4-2400, 2 NUMA nodes, memory interleaved via numactl --interleave=all) |
| GPU | 2Γ Tesla V100-SXM2-16 GB (sm_70), PCIe 3.0 Γ16, no NVLink (nvidia-smi topo: SYS across QPI) |
| RAM | 128 GB, 4 of 8 DIMM slots populated (2 memory channels per CPU active instead of the board's maximum 4) β theoretical bandwidth ceiling β 76.8 GB/s aggregate, not ~153 GB/s |
| OS | Arch Linux, kernel 6.18.49-lts, CUDA 12.9 (nvcc), driver 580.178.04 |
Model
| Architecture | qwen4exp (Qwen3.8-Flash-Next, ~180B total / ~6B active MoE) |
| Layers | 48 (12 full-attention with 2 KV heads + hybrid linear-attention layers; KV β 6.75 KiB/token at q8_0) |
| Experts | 512 per layer, 10 active per token, FFN 640 |
| PLE (per-layer embedding / n-gram table) | one tensor per_layer_token_embd.weight: 26.8β28.8 GB in both quants β must stay in RAM, not VRAM |
| Sparse attention | QSA indexer (4 heads Γ 128), head dim 256 |
Tensor breakdown (from GGUF headers):
| Quant | File size | PLE | Experts (48 layers) | Dense+embed |
|---|---|---|---|---|
| UD-IQ4_XS | 93.65 GB | 26.8 GB | 53.4 GB (1.11 GB/layer) | ~13.4 GB |
| UD-Q4_K_XL | 111.33 GB | 28.8 GB | 77.0 GB (1.60 GB/layer) | ~5.5 GB |
(The dense+embed difference between quants is not a column swap: Unsloth's dynamic recipe keeps the dense layers at a higher effective precision in IQ4_XS than in Q4_K_XL.)
Consequence: with the PLE table kept out of VRAM, putting all remaining weights on GPU needs ~67 GB for UD-IQ4_XS and ~83 GB for UD-Q4_K_XL β impossible on 2Γ16 GB, which is why every config here keeps most expert weights in system RAM.
Software under test
| Engine | Version | Patches |
|---|---|---|
| llama.cpp (stock) | master 8172e6577 (build 10914). All stock rows below use the patched build 10932 (c3e790b2c) described in the next column |
includes merged #27742 (qwen4exp model) and #28040 (kv-cells); applies unmerged PR #28623 (eae4cb045): LLAMA_PLE_RESIDENT, GGML_SCHED_HOST_WGT_ACT, qwen4exp MTP draft head, sparse-FA head-dim-256 dispatch, host-weight scheduling fix |
| ik_llama.cpp | upstream main 3bb386e (incl. ik PR #2416) |
none additional; --defer-ple, --prefetch-experts, fused CPU MoE, NCCL multi-GPU |
Build: -DGGML_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=70 -DGGML_NATIVE=ON, gcc-14/g++-14 (GCC 16 is not compatible with nvcc 12.9).
Draft models (MTP = multi-token prediction): llama.cpp uses mtp-Qwen3.8-Flash-Next-shared-Q8_0.gguf (2.8 GB, works with both the shared and the full draft); ik_llama.cpp requires the full mtp-Qwen3.8-Flash-Next-Q8_0.gguf (4.1 GB) β the shared variant fails there (token_embd.weight not found).
Key findings
--no-op-offloadis mandatory on llama.cpp with CPU-resident experts. By default the scheduler "offloads" host-weight MoE ops onto the GPU and streams weights over PCIe 3.0 on every step: on a 9.2k-token prompt, prompt processing collapsed to ~11 tok/s. With the flag the same setup does 91β115 tok/s. This single flag was the largest gain in the whole study.- Never use
--numa distributeβ it is deprecated and serializes CPU work to a single thread here (~1 core busy, PP dropped 8Γ). - ik_llama.cpp wins nearly every cell. Its fused CPU-MoE kernels gather expert weights more efficiently (measured RAM read 13β23 GB/s vs 11.5β19.8 for mainline). At 32k the advantage is PP +18β37% and decode up to +14% (mainline keeps a
code-workload lead at 32k); from 262k it becomes decisive because ik also fits the MTP draft where mainline cannot, and at 500k/1M its CPU-MoE kernels deliver +36β160% PP and +22β36% decode. - MTP works in ik up to 262k context β the draft model opens a second full context (its own KV cache and compute buffers), which no longer fits in 2Γ16 GB beyond that, neither on mainline (even at
--n-cpu-moe 42for 131k) nor on ik at 500k. At 262k on ik the MTP multiplier over the same engine without MTP is ~Γ2.1 oncopy, ~Γ1.9 oncodeand ~Γ1.2 onprose. - Speculative decoding knobs:
--spec-draft-n-max(llama.cpp) /n_max(ik) peak at 5β7; n β₯ 8 starts hurtingprose. (Sweep data not tabulated.) - n-gram speculation (
ngram-map-k, the best variant per solarkyle's study) gives only ~+14% on thecopyworkload here and nothing oncode/proseβ MTP supersedes it. (Data not tabulated.) - VRAM balancing across two GPUs: the GPU-resident expert layers are always the tail layers
[n-cpu-moe, 48), and-tsmoves the layer boundary between the cards. Without shifting that boundary into the tail (e.g.-ts 5,1for--n-cpu-moe 32), one card OOMs while the other idles. Each expert layer moved into VRAM was worth ~+0.3β0.5 tok/s of decode.
Results: UD-IQ4_XS (93.65 GB)
Decode (256 tokens, greedy) and prompt processing (~9.2k-token prompt), warm, best of 2β3 runs.
VRAM = GPU0+GPU1 MiB after load (cards are 16384 MiB each); RSS = llama-server resident RAM (GB). ik rows additionally cache the ~27β29 GB PLE table in the page cache (not counted in RSS). "+MTP" = speculative MTP decoding as described under Software; "no MTP" = the draft does not fit in VRAM at that context.
| Ctx | Engine | Key settings | PP tok/s | copy tok/s | code tok/s | prose tok/s | VRAM MiB | RSS GB |
|---|---|---|---|---|---|---|---|---|
| 32k | llama.cpp | -ncmoe 32 -ts 5,1 -b 4096 -ub 768 +MTP |
133.3 | 31.7 | 31.9 | 17.0 | 15767+14125 | 69 |
| 32k | ik_llama.cpp | -ncmoe 40 -ts 2.7,1 -b 4096 -ub 1024 +MTP |
183.1 | 34.2 | 28.9 | 18.7 | 15275+7117 | 62 |
| 131k | llama.cpp | -ncmoe 42 -ts 5,1 -ub 256 +MTP |
73.8 | 25.1 | 22.1 | 13.2 | 7273+13973 | 55 |
| 131k | ik_llama.cpp | -ncmoe 42 -ts 2.4,1 -ub 256 +MTP |
123.9 | 29.8 | 26.2 | 17.6 | 13327+6497 | 62 |
| 262k | llama.cpp | -ncmoe 44 -ts 5,1 -ub 256, no MTP (draft does not fit) |
81.7 | 14.2 | 14.2 | 14.4 | 9565+9747 | 84 |
| 262k | ik_llama.cpp | -ncmoe 44 -ts 2,1 -ub 256 +MTP |
120.6 | 29.5 | 26.2 | 17.0 | 10969+9655 | 62 |
| 500k | llama.cpp | -ncmoe 48 -ub 256 yarn Γ2, no MTP |
75.2 | 13.7 | 14.0 | 13.7 | 10843+11139 | 89 |
| 500k | ik_llama.cpp | -ncmoe 48 -ub 1024 yarn Γ2, no MTP |
163.1 | 17.9 | 18.1 | 17.9 | 13943+14229 | 62 |
| 1M | llama.cpp | -ncmoe 48 -ub 128 yarn Γ4, no MTP |
45.8 | 13.1 | 13.3 | 13.1 | 15241+15539 | 90 |
| 1M | ik_llama.cpp | -ncmoe 48 -ub 256 yarn Γ4, no MTP |
118.9 | 17.8 | 17.8 | 17.8 | 14591+15059 | 62 |
Results: UD-Q4_K_XL (111.33 GB)
| Ctx | Engine | Key settings | PP tok/s | copy tok/s | code tok/s | prose tok/s | VRAM MiB | RSS GB |
|---|---|---|---|---|---|---|---|---|
| 32k | llama.cpp | -ncmoe 40 -ts 11,1 -b 4096 -ub 512 +MTP |
112.5 | 29.1 | 26.0 | 15.4 | 13377+9779 | 90 |
| 32k | ik_llama.cpp | -ncmoe 44 -ts 5,1 -b 4096 -ub 256 +MTP |
133.0 | 31.2 | 25.9 | 17.6 | 12307+4455 | 78 |
| 131k | llama.cpp | -ncmoe 44 -ts 11,1 -ub 256 +MTP |
95.8 | 27.2 | 24.8 | 14.2 | 9337+10891 | 96 |
| 131k | ik_llama.cpp | -ncmoe 46 -ts 2,1 -ub 256 +MTP |
128.5 | 27.4 | 18.7* | 15.6 | 9561+6083 | ~75 |
| 262k | llama.cpp | -ncmoe 46 -ts 23,1 -ub 512, no MTP |
103.3 | 14.1 | 14.1 | 14.1 | 14413+7605 | 93 |
| 262k | ik_llama.cpp | -ncmoe 44 -ts 2,1 -ub 256 +MTP |
126.9 | 26.8 | 20.9 | 15.5 | 11945+10165 | 75 |
| 500k | llama.cpp | -ncmoe 48 -ub 256 yarn Γ2, no MTP |
92.3 | 13.3 | 13.3 | 13.3 | 10843+11287 | 105 |
| 500k | ik_llama.cpp | -ncmoe 48 -ub 256 yarn Γ2, no MTP |
125.6 | 16.2 | 16.1 | 16.1 | 8433+9047 | 78 |
| 1M | llama.cpp | -ncmoe 48 -ub 128 yarn Γ4, no MTP |
76.5 | 12.7 | 12.7 | 12.7 | 15241+15687 | 106 |
| 1M | ik_llama.cpp | -ncmoe 48 -ub 256 yarn Γ4, no MTP |
123.1 | 16.4 | 16.4 | 16.2 | 14591+15205 | 78 |
* this 131k ik run survived only on its third attempt after transient port/startup issues; all three workload figures come from that marginal run and code in particular is likely underestimated.
Observations:
- ik_llama.cpp wins nearly every cell. At 32k its PP is +37% (IQ4_XS) / +18% (Q4_K_XL) and decode up to +14%, but llama.cpp keeps a
code-workload lead at 32k. From 262k ik becomes decisive: it still fits the MTP draft where llama.cpp cannot (decode Γ1.9β2.1 oncopy, Γ1.5β1.9 oncode, Γ1.1β1.2 onproseat 262k IQ4_XS), and at 500k/1M its fused CPU-MoE kernels deliver +36β160% PP and +22β36% decode. - UD-Q4_K_XL decodes ~0β10% slower than UD-IQ4_XS at β₯262k (active expert bytes per generated token grow from ~1.0β1.1 GB to ~1.5 GB); at shorter contexts the two quants trade blows within noise. The quant buys visibly better quality for that price.
- llama.cpp
-b 4096 -ub 1024at 32k crashes during large-prompt PP (compute-buffer OOM);u768is the sweet spot there (PP 133.3 vs 115.6 atub 512). ik toleratesub 1024and gains +42% PP from it (183.1 vs 128.6 atub 256).
Bottleneck analysis
RAM bandwidth was sampled with Intel PCM (Processor Counter Monitor, 1 Hz) during a copy-decode window and during prompt processing; CPU utilization via mpstat; VRAM via nvidia-smi. Theoretical DRAM ceiling on this host is ~76.8 GB/s (DDR4-2400, only 4 of 8 DIMM slots populated β 2 channels per CPU instead of 4).
| Workload | Engine | RAM read avg | RAM read peak | Verdict |
|---|---|---|---|---|
decode 32k (copy) |
ik_llama.cpp | 16.1 GB/s | 27.6 GB/s | latency-bound expert gather, not bandwidth-saturated |
decode 32k (copy) |
llama.cpp | 12.9 GB/s | 22.5 GB/s | same gather pattern, less efficient (GPU ~12% busy) |
| decode 131kβ1M | ik_llama.cpp | 17.3β21.0 GB/s | 24.3β33.8 GB/s | latency-bound expert gather |
| decode 131kβ1M | llama.cpp | 13.3β15.7 GB/s | 19.4β22.2 GB/s | same |
| PP 32kβ1M | ik_llama.cpp | 11.5β26.6 GB/s | 15.2β31.0 GB/s | GPU-compute bound; RAM never saturated |
| PP 32kβ1M | llama.cpp | 3.1β20.4 GB/s | 11.5β28.3 GB/s | GPU-compute bound |
Conclusions:
- Decode is bound by RAM access latency of the per-token expert gather, not by streaming bandwidth. Each generated token activates 10 of 512 experts per layer, so with all experts in RAM roughly 1.0β1.1 GB (IQ4_XS) / 1.5 GB (Q4_K_XL) of expert weights β plus PLE lookups and dense weights β must be gathered at random per token. Sustained read rates of 13β21 GB/s (peak 33.8 GB/s β 44% of the 76.8 GB/s ceiling) are typical of such pointer-chasing access patterns. The two practical escapes are exactly the ones measured here: move expert layers into VRAM (
-ncmoe/--n-cpu-moelower β worth ~+0.3β0.5 tok/s of decode per layer, measured betweenn-cpu-moe36 and 32) and amortize the gather over several tokens with MTP. - Prompt processing is bound by GPU compute on the V100s, not by RAM β RAM stays below ~27 GB/s average even at 183 tok/s PP, because a ubatch touches each expert weight once rather than once per token. ik's fused MoE kernels raise same-hardware PP by 15β160%.
- The 4-of-8 DIMM population halves the theoretical ceiling (76.8 vs ~153 GB/s). Since neither workload saturates even the halved ceiling, the immediate impact is modest, but fully populating the board raises the gather ceiling proportionally and should improve decode in the configs where most expert layers must stay in RAM (500k/1M); re-test after the RAM upgrade.
- RAM capacity, not bandwidth, is the hard wall for UD-Q4_K_XL at 500kβ1M on 128 GB: RSS reaches 105β106 GB (PLE 28.8 GB + all 48 expert layers ~77 GB + KV cache). The host survives via page-cache reclaim and swap, but this is the practical capacity limit of this machine for the fatter quant.
Presets
Two ready-to-use INI presets (one per engine) are provided below, each containing all ten model/context variants with the exact settings of the tables above. They are reproduced verbatim and are also shipped as standalone files alongside this report. Replace the model paths with your own download locations.
Notes:
- Sections whose table row says "no MTP" intentionally omit the
model-draft/spec-typekeys β the draft does not fit in VRAM there. The remaining sections carry their own draft keys. - The presets are for interactive serving (
cache-prompt = true, sampling defaults per the model card). The benchmarks above used greedy sampling with the prompt cache disabled. hostdefaults to127.0.0.1on purpose; expose the server only behind a proxy/API key if you need remote access.
presets-llamacpp-stock.ini
Requires LLAMA_PLE_RESIDENT=1 in the environment; launch under numactl --interleave=all.
version = 1
# Qwen3.8-Flash-Next presets for mainline llama.cpp
# Build: master 8172e6577 + merged #27742/#28040 + unmerged #28623 (see report)
# Required environment: LLAMA_PLE_RESIDENT=1
# Recommended launch wrapper: numactl --interleave=all
[*]
threads = 28
host = 127.0.0.1
port = 8080
parallel = 1
flash-attn = on
cache-prompt = true
cont-batching = true
jinja = true
cache-type-k = q8_0
cache-type-v = q8_0
chat-template-file = /path/to/chat_template.jinja
reasoning-format = deepseek
temperature = 1.0
top-p = 0.95
top-k = 20
min-p = 0.0
presence-penalty = 0.0
repeat-penalty = 1.0
no-op-offload = true
n-gpu-layers = 999
split-mode = tensor
device = CUDA0,CUDA1
[FlashNext-UD-IQ4_XS-32k]
model = /path/to/Qwen3.8-Flash-Next/UD-IQ4_XS/Qwen3.8-Flash-Next-UD-IQ4_XS-00001-of-00003.gguf
alias = FlashNext-UD-IQ4_XS-32k
n-cpu-moe = 32
tensor-split = 5,1
ctx-size = 32768
batch-size = 4096
ubatch-size = 768
model-draft = /path/to/Qwen3.8-Flash-Next/MTP/mtp-Qwen3.8-Flash-Next-shared-Q8_0.gguf
spec-type = draft-mtp
spec-draft-n-max = 5
[FlashNext-UD-IQ4_XS-131k]
model = /path/to/Qwen3.8-Flash-Next/UD-IQ4_XS/Qwen3.8-Flash-Next-UD-IQ4_XS-00001-of-00003.gguf
alias = FlashNext-UD-IQ4_XS-131k
n-cpu-moe = 42
tensor-split = 5,1
ctx-size = 131072
batch-size = 2048
ubatch-size = 256
model-draft = /path/to/Qwen3.8-Flash-Next/MTP/mtp-Qwen3.8-Flash-Next-shared-Q8_0.gguf
spec-type = draft-mtp
spec-draft-n-max = 5
[FlashNext-UD-IQ4_XS-262k]
model = /path/to/Qwen3.8-Flash-Next/UD-IQ4_XS/Qwen3.8-Flash-Next-UD-IQ4_XS-00001-of-00003.gguf
alias = FlashNext-UD-IQ4_XS-262k
n-cpu-moe = 44
tensor-split = 5,1
ctx-size = 262144
batch-size = 2048
ubatch-size = 256
[FlashNext-UD-IQ4_XS-500k]
model = /path/to/Qwen3.8-Flash-Next/UD-IQ4_XS/Qwen3.8-Flash-Next-UD-IQ4_XS-00001-of-00003.gguf
alias = FlashNext-UD-IQ4_XS-500k
ctx-checkpoints = 0
n-cpu-moe = 48
tensor-split = 1,1
ctx-size = 512000
batch-size = 2048
ubatch-size = 256
rope-scaling = yarn
rope-scale = 2
yarn-orig-ctx = 262144
[FlashNext-UD-IQ4_XS-1m]
model = /path/to/Qwen3.8-Flash-Next/UD-IQ4_XS/Qwen3.8-Flash-Next-UD-IQ4_XS-00001-of-00003.gguf
alias = FlashNext-UD-IQ4_XS-1m
ctx-checkpoints = 0
n-cpu-moe = 48
tensor-split = 1,1
ctx-size = 1048576
batch-size = 2048
ubatch-size = 128
rope-scaling = yarn
rope-scale = 4
yarn-orig-ctx = 262144
[FlashNext-UD-Q4_K_XL-32k]
model = /path/to/Qwen3.8-Flash-Next/UD-Q4_K_XL/Qwen3.8-Flash-Next-UD-Q4_K_XL-00001-of-00004.gguf
alias = FlashNext-UD-Q4_K_XL-32k
n-cpu-moe = 40
tensor-split = 11,1
ctx-size = 32768
batch-size = 4096
ubatch-size = 512
model-draft = /path/to/Qwen3.8-Flash-Next/MTP/mtp-Qwen3.8-Flash-Next-shared-Q8_0.gguf
spec-type = draft-mtp
spec-draft-n-max = 5
[FlashNext-UD-Q4_K_XL-131k]
model = /path/to/Qwen3.8-Flash-Next/UD-Q4_K_XL/Qwen3.8-Flash-Next-UD-Q4_K_XL-00001-of-00004.gguf
alias = FlashNext-UD-Q4_K_XL-131k
n-cpu-moe = 44
tensor-split = 11,1
ctx-size = 131072
batch-size = 2048
ubatch-size = 256
model-draft = /path/to/Qwen3.8-Flash-Next/MTP/mtp-Qwen3.8-Flash-Next-shared-Q8_0.gguf
spec-type = draft-mtp
spec-draft-n-max = 5
[FlashNext-UD-Q4_K_XL-262k]
model = /path/to/Qwen3.8-Flash-Next/UD-Q4_K_XL/Qwen3.8-Flash-Next-UD-Q4_K_XL-00001-of-00004.gguf
alias = FlashNext-UD-Q4_K_XL-262k
n-cpu-moe = 46
tensor-split = 23,1
ctx-size = 262144
batch-size = 2048
ubatch-size = 512
[FlashNext-UD-Q4_K_XL-500k]
model = /path/to/Qwen3.8-Flash-Next/UD-Q4_K_XL/Qwen3.8-Flash-Next-UD-Q4_K_XL-00001-of-00004.gguf
alias = FlashNext-UD-Q4_K_XL-500k
ctx-checkpoints = 0
n-cpu-moe = 48
tensor-split = 1,1
ctx-size = 512000
batch-size = 2048
ubatch-size = 256
rope-scaling = yarn
rope-scale = 2
yarn-orig-ctx = 262144
[FlashNext-UD-Q4_K_XL-1m]
model = /path/to/Qwen3.8-Flash-Next/UD-Q4_K_XL/Qwen3.8-Flash-Next-UD-Q4_K_XL-00001-of-00004.gguf
alias = FlashNext-UD-Q4_K_XL-1m
ctx-checkpoints = 0
n-cpu-moe = 48
tensor-split = 1,1
ctx-size = 1048576
batch-size = 2048
ubatch-size = 128
rope-scaling = yarn
rope-scale = 4
yarn-orig-ctx = 262144
presets-ikllama.ini
Requires GGML_CUDA_NO_PINNED=1 in the environment (without it -ncmoe pins expert buffers as CUDA_Host, which disables mmap and breaks --defer-ple); launch under numactl --interleave=all; pass --host/--port as the last arguments (ik's parser stops early otherwise).
version = 1
# Qwen3.8-Flash-Next presets for ik_llama.cpp (upstream main 3bb386e)
# Required environment: GGML_CUDA_NO_PINNED=1 (mandatory, see report)
# Recommended launch wrapper: numactl --interleave=all
# NOTE: pass --host/--port as the LAST arguments (ik's parser stops early otherwise)
[*]
threads = 28
host = 127.0.0.1
port = 8080
parallel = 1
flash-attn = on
cache-prompt = true
cont-batching = true
jinja = true
cache-type-k = q8_0
cache-type-v = q8_0
chat-template-file = /path/to/chat_template.jinja
reasoning-format = deepseek
temperature = 1.0
top-p = 0.95
top-k = 20
min-p = 0.0
presence-penalty = 0.0
repeat-penalty = 1.0
n-gpu-layers = 999
defer-ple = true
prefetch-experts = true
split-mode = tensor
device = CUDA0,CUDA1
[FlashNext-IK-UD-IQ4_XS-32k]
model = /path/to/Qwen3.8-Flash-Next/UD-IQ4_XS/Qwen3.8-Flash-Next-UD-IQ4_XS-00001-of-00003.gguf
alias = FlashNext-IK-UD-IQ4_XS-32k
n-cpu-moe = 40
tensor-split = 2.7,1
ctx-size = 32768
batch-size = 4096
ubatch-size = 1024
model-draft = /path/to/Qwen3.8-Flash-Next/MTP/mtp-Qwen3.8-Flash-Next-Q8_0.gguf
spec-type = mtp:n_max=5
[FlashNext-IK-UD-IQ4_XS-131k]
model = /path/to/Qwen3.8-Flash-Next/UD-IQ4_XS/Qwen3.8-Flash-Next-UD-IQ4_XS-00001-of-00003.gguf
alias = FlashNext-IK-UD-IQ4_XS-131k
n-cpu-moe = 42
tensor-split = 2.4,1
ctx-size = 131072
batch-size = 2048
ubatch-size = 256
model-draft = /path/to/Qwen3.8-Flash-Next/MTP/mtp-Qwen3.8-Flash-Next-Q8_0.gguf
spec-type = mtp:n_max=5
[FlashNext-IK-UD-IQ4_XS-262k]
model = /path/to/Qwen3.8-Flash-Next/UD-IQ4_XS/Qwen3.8-Flash-Next-UD-IQ4_XS-00001-of-00003.gguf
alias = FlashNext-IK-UD-IQ4_XS-262k
n-cpu-moe = 44
tensor-split = 2,1
ctx-size = 262144
batch-size = 2048
ubatch-size = 256
model-draft = /path/to/Qwen3.8-Flash-Next/MTP/mtp-Qwen3.8-Flash-Next-Q8_0.gguf
spec-type = mtp:n_max=5
[FlashNext-IK-UD-IQ4_XS-500k]
model = /path/to/Qwen3.8-Flash-Next/UD-IQ4_XS/Qwen3.8-Flash-Next-UD-IQ4_XS-00001-of-00003.gguf
alias = FlashNext-IK-UD-IQ4_XS-500k
ctx-checkpoints = 0
n-cpu-moe = 48
tensor-split = 1,1
ctx-size = 512000
batch-size = 2048
ubatch-size = 1024
rope-scaling = yarn
rope-scale = 2
yarn-orig-ctx = 262144
[FlashNext-IK-UD-IQ4_XS-1m]
model = /path/to/Qwen3.8-Flash-Next/UD-IQ4_XS/Qwen3.8-Flash-Next-UD-IQ4_XS-00001-of-00003.gguf
alias = FlashNext-IK-UD-IQ4_XS-1m
ctx-checkpoints = 0
n-cpu-moe = 48
tensor-split = 1,1
ctx-size = 1048576
batch-size = 2048
ubatch-size = 256
rope-scaling = yarn
rope-scale = 4
yarn-orig-ctx = 262144
[FlashNext-IK-UD-Q4_K_XL-32k]
model = /path/to/Qwen3.8-Flash-Next/UD-Q4_K_XL/Qwen3.8-Flash-Next-UD-Q4_K_XL-00001-of-00004.gguf
alias = FlashNext-IK-UD-Q4_K_XL-32k
n-cpu-moe = 44
tensor-split = 5,1
ctx-size = 32768
batch-size = 4096
ubatch-size = 256
model-draft = /path/to/Qwen3.8-Flash-Next/MTP/mtp-Qwen3.8-Flash-Next-Q8_0.gguf
spec-type = mtp:n_max=5
[FlashNext-IK-UD-Q4_K_XL-131k]
model = /path/to/Qwen3.8-Flash-Next/UD-Q4_K_XL/Qwen3.8-Flash-Next-UD-Q4_K_XL-00001-of-00004.gguf
alias = FlashNext-IK-UD-Q4_K_XL-131k
n-cpu-moe = 46
tensor-split = 2,1
ctx-size = 131072
batch-size = 2048
ubatch-size = 256
model-draft = /path/to/Qwen3.8-Flash-Next/MTP/mtp-Qwen3.8-Flash-Next-Q8_0.gguf
spec-type = mtp:n_max=5
[FlashNext-IK-UD-Q4_K_XL-262k]
model = /path/to/Qwen3.8-Flash-Next/UD-Q4_K_XL/Qwen3.8-Flash-Next-UD-Q4_K_XL-00001-of-00004.gguf
alias = FlashNext-IK-UD-Q4_K_XL-262k
n-cpu-moe = 44
tensor-split = 2,1
ctx-size = 262144
batch-size = 2048
ubatch-size = 256
model-draft = /path/to/Qwen3.8-Flash-Next/MTP/mtp-Qwen3.8-Flash-Next-Q8_0.gguf
spec-type = mtp:n_max=5
[FlashNext-IK-UD-Q4_K_XL-500k]
model = /path/to/Qwen3.8-Flash-Next/UD-Q4_K_XL/Qwen3.8-Flash-Next-UD-Q4_K_XL-00001-of-00004.gguf
alias = FlashNext-IK-UD-Q4_K_XL-500k
ctx-checkpoints = 0
n-cpu-moe = 48
tensor-split = 1,1
ctx-size = 512000
batch-size = 2048
ubatch-size = 256
rope-scaling = yarn
rope-scale = 2
yarn-orig-ctx = 262144
[FlashNext-IK-UD-Q4_K_XL-1m]
model = /path/to/Qwen3.8-Flash-Next/UD-Q4_K_XL/Qwen3.8-Flash-Next-UD-Q4_K_XL-00001-of-00004.gguf
alias = FlashNext-IK-UD-Q4_K_XL-1m
ctx-checkpoints = 0
n-cpu-moe = 48
tensor-split = 1,1
ctx-size = 1048576
batch-size = 2048
ubatch-size = 256
rope-scaling = yarn
rope-scale = 4
yarn-orig-ctx = 262144
About
Testing, tuning and analysis were performed with the assistance of GLM-5.3-Flash (Z.ai).
Acknowledgements
With thanks to:
- solarkyle β the outstanding qwen38-flashnext-16gb study (speculation variant methodology, the n-gram trap finding, expert-residency sweep, "negative results included" discipline) and discussion #34;
- gopi87 β PR #28623 (multi-GPU host-weight scheduling,
LLAMA_PLE_RESIDENT, qwen4exp MTP) and discussion #52; - QilinWan (#61), mayankiit04, logari81, Artem7799, nemilos, hendrik289 β the 16 GB-card tuning thread (critical patch set, ubatch trade-offs, dual-GPU datapoints, MTP-on-CPU-offload caveats);
- 2vibeornot2vibe (#48) and CHTL85 β low-VRAM RAM-offload configs and the ik_llama.cpp pointer;
- TitanMamo10 (#66) β ik_llama.cpp on a 1-bit quant,
GGML_CUDA_NO_PINNED=1,--defer-ple, shard-integrity warnings; - BVEsun, Dui999, NamerPRO, Ernestuz (#51) β the PLE/n-gram storage discussion;
- vasya1000 β speculation parameter notes in #34;
- unsloth (documentation, dynamic GGUFs, MTP drafts) and ikawrakow & contributors (ik_llama.cpp);
- the ggml-org llama.cpp community β PRs #27742, #28040, #27836, #28243, #28623 and the qwen4exp bring-up.
how about flags for 2x tesla v100-32gb ?
how about flags for 2x tesla v100-32gb ?
Unfortunatelly, I have only 16 Gb versions
On "stock" llama.cpp the --no-op-offload gave my setup a 30-45% boost on generating input tokens, previously I got ~150-170ts, using this switch I'm getting ~220-250t/s