
Niwaki-Flash-Next-23GB-v4.0-gguf
GGUF build of Niwaki-Flash-Next-19GB-v4.0-mlx — Qwen3.8-Flash-Next at 119B total / ~5.6B active parameters — for llama.cpp on CUDA, Vulkan, Metal and CPU. One 40.2 GB file whose GPU part is 21.1 GiB: the 15.6 GiB n-gram embedding table stays in CPU memory, read from the file as tokens need it. 18% lower perplexity than v2.4's 102B GGUF in a smaller file. 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-Flash-Next-23GB-v4.0.gguf | 40.2 GB | 7.16 ±0.05 | 13.44 ±0.11 |
Against our other Flash-Next GGUF builds under the identical protocol:
| file | size | wt2 ppl ↓ |
|---|---|---|
| Qwen3.8-Flash-Next-99B-A5B-Niwaki-3bit UD-Q3K | 42.5 GB | 8.79 ±0.06 |
| Qwen3.8-Flash-Next-102B-A5B-Niwaki-v2.4-3bit UD-Q3K | 43.9 GB | 8.75 ±0.06 |
| Qwen3.8-Flash-Next-113B-A5B-Niwaki-3bit UD-Q3K | 49.1 GB | 7.90 ±0.05 |
| Qwen3.8-Flash-Next-119B-A5B-Niwaki-v2.4-3bit UD-Q3K | 51.0 GB | 7.04 ±0.05 |
| Niwaki-Qwen3.8-Flash-Next-141B-A6B-v4.0 | 61.7 GB | 5.76 ±0.04 |
| this file | 40.2 GB | 7.16 ±0.05 |
This is the smallest Flash-Next GGUF we have published. It reads 18% lower WikiText-2 perplexity than v2.4's 102B build, and within 2% of v2.4's 119B build, which is 11 GB larger. v4.0's GGUF remains the stronger model where memory allows.
Against the MLX artifact. Scored on identical tokens (WikiText-2, 40 windows of 512 tokens), this file reads 5.45 against the MLX artifact's 5.28 (+3%). On FLORES-200 it reads lower than the MLX artifact in eight of English, Spanish, French, German, Russian, Chinese, Japanese, Korean, Arabic and Hindi (0.89–0.99×), and within 2% in the other two (English 1.02×, Chinese 1.01×).
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.917 / 0.958 (0.950 / 0.975) | 0.883 (0.967) | 0.950 (0.917) | 1.000 (1.000) |
Forced choice on the tracking families reads below the MLX artifact. Greedy generation on the same 300 tracking items reads at or above it on two of the three: 0.967 / 0.967 / 0.933 (MLX 0.983 / 0.942 / 0.900). 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 the MLX artifact's, under every layer's full router, at IQ2_XXS (about 2.06 bits per weight; the MLX artifact's lattice codes take about 2.0). llama.cpp's 2-bit types work in 256-weight blocks and the experts are 640 wide, so each is stored zero-padded to 768. The padding is exact (the added rows and columns are zero), and it accounts for 3.2 GB of the file. The always-active backbone (attention, linear attention, hyper-connections) is at Q5_K, with a few small tensors at Q5_1, F16, BF16 or F32; the shared experts and the token embedding are at Q8_0, the output at Q6_K 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, mean of three rounds in one session with v4.0's GGUF):
| file | prompt, 512 tokens | prompt, 2,048 tokens | decode (128 tokens) |
|---|---|---|---|
| this file | 492 tok/s | 416 tok/s | 28 tok/s |
| v4.0 GGUF | 530 tok/s | 444 tok/s | 27 tok/s |
With 32,768 tokens already in the context, this file processes prompts at 228 tok/s and decodes at 19.6 tok/s. It decodes as fast as v4.0's GGUF and processes prompts about 6% slower. Absolute speeds move between sessions and between rounds on the same machine (about ±10% here), so compare files within one session.
Model dimensions
| total / active parameters | 119B / ~5.6B |
| layers / routed experts / top-k | 48 / 512 / 10 (every layer keeps its full router) |
| routed experts stored | 12,672 of 24,576: all 512 in layers 0–9 and 34–47, 16 per layer in layers 10–33 (there the routed path contributes only when the router picks a stored expert) |
| expert storage | IQ2_XXS gate / up / down for every stored expert |
| expert intermediate size | 640 (stored zero-padded to 768; llama.cpp's parameter count, 130.9B, includes the padding) |
| n-gram embedding table | Q2_K, 15.6 GiB, in CPU memory, read from the file as tokens need it |
| memory (Metal) | 21.1 GiB of weights on the GPU; with the context, 21.8 GiB at 2,048 tokens and 22.8 GiB at 32,768 |
| 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-Flash-Next-23GB-v4.0-gguf Niwaki-Flash-Next-23GB-v4.0.gguf --local-dir .
./build/bin/llama-cli -m Niwaki-Flash-Next-23GB-v4.0.gguf -c 32768
# or serve:
./build/bin/llama-server -m Niwaki-Flash-Next-23GB-v4.0.gguf -c 32768
If you already built the fork at its v4.0 tag for the v4.0 GGUF, that
build runs this file too.
On a 32 GB Mac, the GPU may use 21.3 GiB by default, below this file's 21.8 GiB. Raise the limit before loading it:
sudo sysctl iogpu.wired_limit_mb=24576 # 24 GiB for the GPU; resets at reboot
That leaves 8 GiB for macOS and the n-gram table's pages. Keep the file on a fast internal SSD, since the table is read from it as tokens need it. The MLX repo fits a 32 GB Mac without changing the limit.
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 16 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 ~18 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.765 against the reference's 0.759, KL divergence 0.78, and every program-state behaviour we test at or above v2.4's 102B. Two-step arithmetic is the weakest behaviour (92.9% of fresh problems in the MLX artifact, against the reference's 98.0%). Fluent and on-topic; numbers and niche technical facts are less reliable than the reference.
- 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-Flash-Next-19GB-v4.0-mlx. Other GGUF builds: v4.0 141B, 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.