
Niwaki-Qwen3.8-Flash-Next-141B-A6B-v4.0-gguf
GGUF build of Niwaki-Qwen3.8-Flash-Next-141B-A6B-v4.0-mlx — Qwen3.8-Flash-Next at 141B total / ~5.9B active parameters, with the program-state behaviours we test at the unpruned model's level — for llama.cpp on CUDA, Vulkan, Metal and CPU. One 61.7 GB file: 18% lower perplexity than v2.4's 51 GB GGUF, at the same decode speed. Requires the neopolita-llama.cpp fork (see Usage): stock llama.cpp cannot represent this model's layout yet.
Niwaki (庭木) are Japan's garden trees, sculpted by meticulous pruning so that every branch serves the form of the whole. This model applies that spirit to a Mixture-of-Experts. A paper with the full method and measurements is coming soon.
Project page, with the releases and their measurements side by side: niwakiai.com
File
| file | size | wt2 ppl (llama.cpp, 512-ctx) ↓ | C4 ppl ↓ |
|---|---|---|---|
| Niwaki-Qwen3.8-Flash-Next-141B-A6B-v4.0.gguf | 61.7 GB | 5.76 ±0.04 | 11.50 ±0.09 |
Against v2.4's GGUF builds under the identical protocol:
| file | size | wt2 ppl ↓ |
|---|---|---|
| Qwen3.8-Flash-Next-119B-A5B-Niwaki-v2.4-3bit UD-Q3K | 51.0 GB | 7.04 ±0.05 |
| Qwen3.8-Flash-Next-119B-A5B-Niwaki-v2.4-3bit UD-Q4K | 64.3 GB | 6.88 ±0.04 |
| this file | 61.7 GB | 5.76 ±0.04 |
This file reads 18% lower WikiText-2 perplexity than v2.4's UD-Q3K build, and 16% lower than its UD-Q4K build, which is 2.6 GB larger.
Against the MLX artifact. Scored on identical tokens (WikiText-2, 40 windows of 512 tokens), this file reads 3.92 against the MLX artifact's 4.31 (−9%). It also reads 5–12% lower on FLORES-200 in each of English, Spanish, French, German, Russian, Chinese, Japanese, Korean, Arabic and Hindi. It stores the same experts as the MLX artifact, at higher precision: every stored expert at Q3_K / IQ4_NL (about 3.4 / 4.5 bits per weight), where the MLX artifact's lattice codes take about 3, 1.4 or 1 bit per weight. That is why the file is 17 GB larger than the MLX repo.
Protocol: llama-perplexity, WikiText-2 test and a 512-chunk C4 slice, 512-token windows. These llama.cpp numbers are not directly comparable to the MLX repo's 2048-window benchmarks; the canonical measurements (task suite, KL divergence, program-state behaviours, generation battery, twenty languages) live there.
Program-state check through llama.cpp. 392 items of the program-state
suite, run through llama-server and scored by forced choice between
candidate answers from the server's top-100 log-probabilities. The MLX
artifact's scores on the same items are in brackets:
| variable tracking | tracking with distractors | two-step arithmetic | multi-hop |
|---|---|---|---|
| 0.950 / 0.967 (0.950 / 0.975) | 0.967 (0.967) | 0.933 (0.950) | 1.000 (1.000) |
Greedy generation on the 300 tracking items reads 0.950 / 0.958 / 0.983 (MLX 0.950 / 0.942 / 0.983). Two-step arithmetic and multi-hop are scored by forced choice only: on a raw prompt without a chat template, the model often continues the question instead of answering it.
The routed experts are stored as in the MLX artifact, under every layer's full router: gate / up projections Q3_K, down projections IQ4_NL (the 640-wide down rows take a 32-block type). The always-active backbone (attention, linear attention, hyper-connections, shared experts) is at Q6_K, with a few small tensors at Q8_0 or BF16. Embeddings and output are at Q8_0 and the n-gram embedding table at Q2_K. The file was quantized with an importance matrix collected on text in the ten languages above.
Speed (M4 Max, Metal, llama-bench, one session with v2.4's UD-Q3K build):
| file | prompt, 512 tokens | prompt, 2,048 tokens | decode (128 tokens) |
|---|---|---|---|
| this file | 506 tok/s | 396 tok/s | 26 tok/s |
| v2.4 UD-Q3K | 488 tok/s | 417 tok/s | 26 tok/s |
Decode runs at v2.4's speed, and prompt processing at 0.95× its speed on 2,048 tokens. v2.4's card lists 557 / 30 tok/s, measured in an earlier session; absolute speeds move between sessions on the same machine, so compare files within one session.
Model dimensions
| total / active parameters | 141B / ~5.9B |
| layers / routed experts / top-k | 48 / 512 / 10 (every layer keeps its full router) |
| routed experts stored | 17,259 of 24,576: all 512 in layers 0–9 and 34–47, 132–384 per layer in layers 10–33 (there the routed path contributes only when the router picks a stored expert) |
| expert storage | Q3_K gate / up and IQ4_NL down for every stored expert |
| expert intermediate size | 640 (unchanged) |
| memory (Metal) | 41.2 GiB of weights on the GPU; with the context, 42.0 GiB at 2,048 tokens and 43.0 GiB at 32,768 |
| n-gram embedding table | Q2_K, 15.6 GiB, in CPU memory, read from the file as tokens need it |
| context | as base model |
| modality | text only (vision tower not included; MTP draft head not included) |
Usage
git clone --branch v4.0 https://github.com/Neopolita/neopolita-llama.cpp
cd neopolita-llama.cpp
cmake -B build -DCMAKE_BUILD_TYPE=Release # add -DGGML_METAL=ON / -DGGML_CUDA=ON / -DGGML_VULKAN=ON as usual
cmake --build build -j --target llama-cli llama-server llama-completion
hf download neopolita/Niwaki-Qwen3.8-Flash-Next-141B-A6B-v4.0-gguf Niwaki-Qwen3.8-Flash-Next-141B-A6B-v4.0.gguf --local-dir .
./build/bin/llama-cli -m Niwaki-Qwen3.8-Flash-Next-141B-A6B-v4.0.gguf
# or serve:
./build/bin/llama-server -m Niwaki-Qwen3.8-Flash-Next-141B-A6B-v4.0.gguf
If you already built the fork for the v2.4 or v3.0 GGUFs, that build runs this file too.
Why a fork
This file uses two small, general additions to llama.cpp's qwen4exp
architecture, needed to store this model at its real size:
- a layer may store some of its routed experts under the full router
(
ffn_exp_ids): layers 10–33 keep 132–384 of their 512 experts. The router still scores all 512 and the top-10 is taken exactly as in the base model; an expert that is not stored contributes nothing. Stock llama.cpp needs uniform expert tensors, which would add ~17 GB of all-zero experts here; - a packed layout for the per-layer n-gram embedding table (
ple.row_pack), so block-256 quantization types apply to its 160-wide rows; otherwise the table alone is 28.8 GB at 4.5 bits.
Files produced by the fork's converter load only in the fork; we plan to offer these additions to llama.cpp itself.
Notes and limitations
- Quality follows the MLX artifact: a task average of 0.794 against the reference's 0.759, and the program-state behaviours at the unpruned model's level. Fluent and on-topic; numbers and niche technical facts are less reliable than the reference.
- Memory: on a Mac, the GPU holds 42.0 GiB at a 2,048-token context and
43.0 GiB at 32,768 (
-c 32768), under the default GPU limit of a 64 GB Mac (about 48 GiB). Keep the file on a fast internal SSD, since the n-gram table is read from it as tokens need it. - 2026-10-14: this file was re-written with the n-gram table and the token embedding at its start. On Metal, llama.cpp maps the stretch of the file between its first and last GPU tensors into GPU memory, and in the file first uploaded on 2026-10-12 that stretch held the table too (57.5 GiB in all). The tensors and metadata are unchanged, so outputs are identical, and speed measured the same within run-to-run noise; only the memory the GPU holds changes. CUDA and other discrete GPUs were not affected.
- With thinking on, the model reasons at length; use a no-thinking chat template setting for short-form tasks.
- Evaluated text-only; the base model's biases are inherited, and rare-domain behaviour of the removed experts is less tested.
- Canonical benchmarks, the twenty-language table and the MLX-native artifact: Niwaki-Qwen3.8-Flash-Next-141B-A6B-v4.0-mlx. Smaller: Niwaki-Flash-Next-23GB-v4.0-gguf, 40.2 GB, 21.8 GiB on the GPU at a 2,048-token context. Earlier GGUF builds: v2.4 119B / 102B, first generation 113B / 99B.
Base model by the Qwen team (see license); compression, recovery training and GGUF build by the Niwaki project, 2026-10.