ββββββββββ βββββββββββββββββββββββββββββββ ββββββββ βββββββββββββ βββββββββββββββββββββββββββββββββ ββββββββ ββββββββββββββ βββββββββββββββββββββββββ ββββββββββββββββ ββββββββββββββ ββββββββββββββββββββββββββ βββββββββ βββ ββββββββββββββ ββββββββββββββββββββββββββ ββββββββ βββββββββββ βββ ββββββββββββββββββββββββββ βββββββββ ββββββββββββββββββββββββββββββββββββββββ ββββββββββββββ ββββββββββββββββββββββββββββ β β β β β β β β β β β β ββββββββββββββββ βββββββ βββββββββββββββββββββββββββββββββββββββ βββββββββ βββββββ ββββββββββββββββββββββββββββββββββ ββββββββNEX-N2-MINI 4-BIT ROCmFP4 Β· CODE-WEIGHTED IMATRIX Β· HIGH-SPARSITY MoE (3B ACTIVE) Β· AGENTIC CODER Β· SINGLE AMD APU
| FORMATROCmFP4 4-BIT | PRECISION~4.5 BPW | SIZE18.4 GB | CONTEXT131 K |
| ARCHqwen35moe | PARAMS35B / 3B ACTIVE | BACKENDVULKAN0 | LICENSEAPACHE-2.0 |
The custom
q4_0_rocmfp4 / q4_0_rocmfp4_fast tensor types will not load in stock llama.cpp, LM Studio, or Ollama. Build/run with charlie12345/ROCmFPX Β· branch mtp-rocmfp4-strix.
NOTE // Ignore HuggingFace's auto-detected "F16" badge β its parser can't read ROCmFP4 and mislabels by the f16 embeddings. These are ~4.5 bpw 4-bit files; pick by filename.
01 Β· FILES
| File | Size | Output head | Pick if |
|---|---|---|---|
β¦-STRIX-embF16-imatrix-headQ6.gguf β
| 18.4 GB | Q6_K | the one build β best speed/quality balance: f16 embeddings + Q6 output head on the fast single-scale body |
One file β the best speed/quality balance in ROCmFP4 for Strix Halo. It keeps the two quality levers that are actually felt β genuine f16 token embeddings (from BF16) and a Q6_K output head β on the fast single-scale q4_0_rocmfp4_fast body + the code-weighted imatrix (see Β§04). Not the leanest-fastest possible (a 4-bit output head squeezes out a few more tok/s, at a fidelity cost), and not the most faithful possible (see the base-model fidelity link in Β§04) β it's the point where speed and quality meet best. The Qwen (ChatML) chat template is baked into the GGUF β just pass --jinja.
Run from the folder holding the .gguf:
env HSA_OVERRIDE_GFX_VERSION=11.5.1 GGML_HIP_ENABLE_UNIFIED_MEMORY=1 \
llama-server \
-m Nex-N2-mini-ROCmFP4-STRIX-embF16-imatrix-headQ6.gguf \
--alias nex-n2-mini \
--host 0.0.0.0 \
--port 8080 \
-dev Vulkan0 \
-ngl 999 \
-fa on \
-c 131072 \
-b 2048 \
-ub 256 \
-t 16 \
-tb 16 \
-ctk f16 \
-ctv f16 \
-cpent 256 \
-ctxcp 32 \
--cache-reuse 256 \
--cache-ram 65536 \
--temp 0.6 \
--top-p 0.95 \
--top-k 20 \
--min-p 0.0 \
--jinja \
--parallel 1 \
--metrics \
--no-mmap
NOTE // No --spec-* / --spec-type draft-mtp flags β Nex-N2-mini ships without an MTP head (non-speculative). At ~72 t/s it doesn't need speculative decoding to be quick.
| Flag | Function |
|---|---|
HSA_OVERRIDE_GFX_VERSION=11.5.1 | treat the APU as gfx1151 (Strix Halo) |
GGML_HIP_ENABLE_UNIFIED_MEMORY=1 | allow use of the full 128 GB unified memory |
-dev Vulkan0 | run on Vulkan β fastest backend for ROCmFP4 on Strix Halo |
-ngl 999 Β· -fa on | offload all layers Β· flash attention |
-c 131072 | context length (128K) |
-b 2048 Β· -ub 256 Β· -t/-tb 16 | prefill batch / micro-batch Β· CPU threads |
-ctk f16 Β· -ctv f16 | f16 KV cache β how we run it; drop to q8_0/q4_0 to use less memory |
-cpent Β· -ctxcp Β· --cache-reuse Β· --cache-ram 65536 | cross-turn KV checkpointing + 64 GB resident reuse cache |
--temp 0.6 --top-p 0.95 --top-k 20 --min-p 0.0 | base-model recommended sampling |
--jinja --parallel 1 --metrics --no-mmap | apply baked ChatML template Β· single slot Β· metrics Β· weights in RAM |
Nex-N2-mini is an agentic / "thinking" coder β agentic tool-use trained. To get native tool calls, your client must use the qwen3_coder tool-call parser. Without it the model tends to narrate code instead of emitting structured tool calls.
| CHAT TEMPLATE | Qwen (ChatML) β baked into the GGUF; pass --jinja |
| TOOL-CALL PARSER | qwen3_coder β set in your client/runtime |
| SAMPLING | temp 0.6 Β· top-p 0.95 Β· top-k 20 (base-model recommended) |
| DECODE Β· short-context | ~72 t/s (Vulkan / Ryzen AI Max+ 395) |
| SWE-BENCH VERIFIED Β· base model | 74.4 |
| ACTIVE PARAMS | 3B of 35B (high-sparsity MoE) |
| QUANTIZATION | fast single-scale body + f16 embeddings + Q6 head + code-weighted imatrix |
This is the best speed/quality balance in ROCmFP4 β by design, not the absolute fastest. It keeps the two quality levers that are actually felt β genuine f16 token embeddings and a Q6_K output head β on the fast single-scale q4_0_rocmfp4_fast body. A leaner 4-bit-output-head build is a few tok/s faster but degrades fidelity you'll notice; an all-dual-scale body buys a KL improvement that sits inside the measurement noise while costing decode speed. The fast body + f16 embeddings + Q6 head is the point where those meet best.
How we landed on this recipe. We ran the full body-kernel / head-precision / dual-scale sweep β KL divergence vs the BF16 reference plus llama-bench decode β on the dense Qwen3.6-27B sibling, where the same q4_0_rocmfp4 levers apply. The frontier there was unambiguous: the all-dual-scale body and selective higher-precision tensors both traded decode speed for a KL gain inside the noise, so the fast body + f16 embeddings + Q6 head won the balance. We carry that conclusion to this MoE rather than re-running the whole sweep per model β see the 27B sweep for the numbers and the format-limit reasoning. (Directional internal measurements β reproduce before citing.)
The imatrix β code-weighted, and measured (it helps here). Quantized with an importance matrix from a code-weighted calibration mix (~2.6:1 code:general β eaddario code + Kalomaze groups_merged via froggeric/imatrix). Measured by KL-divergence + perplexity vs the true BF16 on a held-out code slice (disjoint from calibration):
| Metric (vs BF16, held-out code) | No-imatrix | Imatrix | Change |
|---|---|---|---|
| Perplexity | 4.076 | 4.013 | β1.5% (recovers >Β½ the 4-bit loss; ~3.3Ο) |
| Median KLD | 0.0184 | 0.0159 | β13% |
| RMS Ξp | 8.57% | 8.00% | β7% |
| Same top token as BF16 | 88.97% | 89.44% | +0.5 pp |
For this model the imatrix is a clean win β better on every metric, including perplexity. (It's model-dependent β on the dense Qwopus-Coder the same recipe worsened code-PPL, so we shipped that one without imatrix. Always measure.)
05 Β· BUILD (REPRODUCIBLE)# code-weighted imatrix on the BF16 (single pass)
llama-imatrix -m Nex-N2-mini-bf16.gguf -f code-weighted-calib.txt -o nexn2.imatrix -c 512 -ngl 999
# quant -> ROCmFP4 with the imatrix + genuine f16 embeddings
llama-quantize --token-embedding-type f16 --imatrix nexn2.imatrix \
Nex-N2-mini-bf16.gguf \
Nex-N2-mini-ROCmFP4-STRIX-embF16-imatrix.gguf Q4_0_ROCMFP4_STRIX
# THE ONE BUILD (β
): add the Q6_K output head on the fast single-scale body β best speed/quality balance (Β§04)
llama-quantize --token-embedding-type f16 --output-tensor-type q6_K --imatrix nexn2.imatrix \
Nex-N2-mini-bf16.gguf \
Nex-N2-mini-ROCmFP4-STRIX-embF16-imatrix-headQ6.gguf Q4_0_ROCMFP4_STRIX
06 Β· LINEAGE & CREDITSExperimental research build for AMD Strix Halo β hardware/driver/prompt-sensitive, may not reproduce elsewhere. Not native FP4 tensor-core execution.
| BASE MODEL | nex-agi/Nex-N2-mini (Apache-2.0) Β· Qwen3.5-35B-A3B lineage (35B total / 3B active MoE) |
| CALIBRATION | eaddario/imatrix-calibration (code) + Kalomaze groups_merged via froggeric/imatrix (general) |
| FORMAT + RUNTIME | charlie12345/ROCmFPX (based on llama.cpp, MIT) |
Derivative quantization β verify the base model's license before redistribution / use.