plunderstruck's picture
Repoint build instructions to charlie12345/ROCmFPX (ROCmFPX FP3/4/6/8 repo)
44d97db verified
|
Raw
History Blame Contribute Delete
22.8 kB
metadata
base_model: nex-agi/Nex-N2-mini
license: apache-2.0
library_name: gguf
tags:
  - gguf
  - rocmfp4
  - qwen3.5
  - nex-n2
  - coder
  - agentic
  - moe
  - imatrix
  - strix-halo
  - amd
  - rocm
  - vulkan
language:
  - en
base_model_relation: quantized
PLUNDERSTRUCK // ROCmFP4 QUANTIZED MODEL // STRIX HALO Β· gfx1151
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–†β–„β–     β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Žβ–β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ––β–€β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–™      β–Ÿβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–˜
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–†β–ƒβ–  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Žβ–β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–™β–β–œβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ––  β–—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–›  
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–† β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Žβ–β–ˆβ–ˆβ–ˆβ–ˆβ–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€ β–€β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–™β–Ÿβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–˜   
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–β–€β–œβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Žβ–β–ˆβ–ˆβ–ˆβ–ˆβ–ƒβ–ƒβ–ƒβ–ƒβ–ƒβ–ƒβ–ƒβ–ƒβ–ƒβ–ƒβ–ƒβ–ƒβ–ƒβ–– β–”β–œβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–˜ β–€β–ˆβ–›     
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–β–—β–‚β–”β–€β–œβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Žβ–β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–   β–β–ˆβ–ˆβ–ˆβ–›β–β–Ÿβ–™        
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–β–β–ˆβ–‡β–…β–‚β–”β–€ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Žβ–β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–    β–”β–€β–˜β–ƒβ–ˆβ–ˆβ–ˆβ–ˆβ––      
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–β–β–ˆβ–ˆβ–ˆβ–ˆβ–‡β–„β–‚β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Žβ–β–ˆβ–ˆβ–ˆβ–ˆβ–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€  β–—β–Ÿβ–ˆβ––β–β–Ÿβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–™β–    
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–β–β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Žβ–β–ˆβ–ˆβ–ˆβ–ˆβ–…β–…β–…β–…β–…β–…β–…β–…β–…β–…β–…β–…β–… β–„β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–›β–œβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ––   
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–  β–β–œβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Žβ–β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–›β–—β–Ÿβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–˜  β–β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–™β– 
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–     β–€β–œβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Žβ–β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–˜β–„β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–›      β–œβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ––
NEX-N2-MINI
4-BIT ROCmFP4 Β· CODE-WEIGHTED IMATRIX Β· HIGH-SPARSITY MoE (3B ACTIVE) Β· AGENTIC CODER Β· SINGLE AMD APU
FORMAT
ROCmFP4 4-BIT
PRECISION
~4.5 BPW
SIZE
18.4 GB
CONTEXT
131 K
ARCH
qwen35moe
PARAMS
35B / 3B ACTIVE
BACKEND
VULKAN0
LICENSE
APACHE-2.0
⚠ REQUIRES THE ROCmFP4 FORK
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 GBQ6_Kthe 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.

02 Β· QUICK START

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.1treat the APU as gfx1151 (Strix Halo)
GGML_HIP_ENABLE_UNIFIED_MEMORY=1allow use of the full 128 GB unified memory
-dev Vulkan0run on Vulkan β€” fastest backend for ROCmFP4 on Strix Halo
-ngl 999 Β· -fa onoffload all layers Β· flash attention
-c 131072context length (128K)
-b 2048 Β· -ub 256 Β· -t/-tb 16prefill batch / micro-batch Β· CPU threads
-ctk f16 Β· -ctv f16f16 KV cache β€” how we run it; drop to q8_0/q4_0 to use less memory
-cpent Β· -ctxcp Β· --cache-reuse Β· --cache-ram 65536cross-turn KV checkpointing + 64 GB resident reuse cache
--temp 0.6 --top-p 0.95 --top-k 20 --min-p 0.0base-model recommended sampling
--jinja --parallel 1 --metrics --no-mmapapply baked ChatML template Β· single slot Β· metrics Β· weights in RAM
03 Β· AGENTIC CODING / TOOLS

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 TEMPLATEQwen (ChatML) β€” baked into the GGUF; pass --jinja
TOOL-CALL PARSERqwen3_coder β€” set in your client/runtime
SAMPLINGtemp 0.6 Β· top-p 0.95 Β· top-k 20 (base-model recommended)
04 Β· PERFORMANCE & QUALITY
DECODE Β· short-context~72 t/s (Vulkan / Ryzen AI Max+ 395)
SWE-BENCH VERIFIED Β· base model74.4
ACTIVE PARAMS3B of 35B (high-sparsity MoE)
QUANTIZATIONfast 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.)

WANT MAXIMUM FIDELITY INSTEAD OF SPEED? Grab a Q6_K / Q8_0 GGUF of the base from nex-agi/Nex-N2-mini β€” those higher-bit GGUFs run on this same fork. We optimize for throughput in ROCmFP4; if you want the last bit of fidelity over speed, a higher-bit quant of the base is the one to grab.

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
Perplexity4.0764.013βˆ’1.5% (recovers >Β½ the 4-bit loss; ~3.3Οƒ)
Median KLD0.01840.0159βˆ’13%
RMS Ξ”p8.57%8.00%βˆ’7%
Same top token as BF1688.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

Experimental research build for AMD Strix Halo β€” hardware/driver/prompt-sensitive, may not reproduce elsewhere. Not native FP4 tensor-core execution.

06 Β· LINEAGE & CREDITS
BASE MODELnex-agi/Nex-N2-mini (Apache-2.0) Β· Qwen3.5-35B-A3B lineage (35B total / 3B active MoE)
CALIBRATIONeaddario/imatrix-calibration (code) + Kalomaze groups_merged via froggeric/imatrix (general)
FORMAT + RUNTIMEcharlie12345/ROCmFPX (based on llama.cpp, MIT)

Derivative quantization β€” verify the base model's license before redistribution / use.