GGUF
English
rocmfp4
qwen3.5
nex-n2
coder
agentic
Mixture of Experts
imatrix
strix-halo
amd
rocm
vulkan
conversational
Instructions to use plunderstruck/Nex-N2-mini-ROCmFP4-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use plunderstruck/Nex-N2-mini-ROCmFP4-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="plunderstruck/Nex-N2-mini-ROCmFP4-GGUF", filename="Nex-N2-mini-ROCmFP4-STRIX-embF16-imatrix-headQ6.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use plunderstruck/Nex-N2-mini-ROCmFP4-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 plunderstruck/Nex-N2-mini-ROCmFP4-GGUF:BF16 # Run inference directly in the terminal: llama cli -hf plunderstruck/Nex-N2-mini-ROCmFP4-GGUF:BF16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf plunderstruck/Nex-N2-mini-ROCmFP4-GGUF:BF16 # Run inference directly in the terminal: llama cli -hf plunderstruck/Nex-N2-mini-ROCmFP4-GGUF:BF16
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf plunderstruck/Nex-N2-mini-ROCmFP4-GGUF:BF16 # Run inference directly in the terminal: ./llama-cli -hf plunderstruck/Nex-N2-mini-ROCmFP4-GGUF:BF16
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf plunderstruck/Nex-N2-mini-ROCmFP4-GGUF:BF16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf plunderstruck/Nex-N2-mini-ROCmFP4-GGUF:BF16
Use Docker
docker model run hf.co/plunderstruck/Nex-N2-mini-ROCmFP4-GGUF:BF16
- LM Studio
- Jan
- Ollama
How to use plunderstruck/Nex-N2-mini-ROCmFP4-GGUF with Ollama:
ollama run hf.co/plunderstruck/Nex-N2-mini-ROCmFP4-GGUF:BF16
- Unsloth Studio
How to use plunderstruck/Nex-N2-mini-ROCmFP4-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for plunderstruck/Nex-N2-mini-ROCmFP4-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for plunderstruck/Nex-N2-mini-ROCmFP4-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for plunderstruck/Nex-N2-mini-ROCmFP4-GGUF to start chatting
- Pi
How to use plunderstruck/Nex-N2-mini-ROCmFP4-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf plunderstruck/Nex-N2-mini-ROCmFP4-GGUF:BF16
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "plunderstruck/Nex-N2-mini-ROCmFP4-GGUF:BF16" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use plunderstruck/Nex-N2-mini-ROCmFP4-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 plunderstruck/Nex-N2-mini-ROCmFP4-GGUF:BF16
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:8080/v1 hermes config set model.default plunderstruck/Nex-N2-mini-ROCmFP4-GGUF:BF16
Run Hermes
hermes
- Atomic Chat new
- OpenClaw new
How to use plunderstruck/Nex-N2-mini-ROCmFP4-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf plunderstruck/Nex-N2-mini-ROCmFP4-GGUF:BF16
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:8080/v1 \ --custom-model-id "plunderstruck/Nex-N2-mini-ROCmFP4-GGUF:BF16" \ --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"
- Docker Model Runner
How to use plunderstruck/Nex-N2-mini-ROCmFP4-GGUF with Docker Model Runner:
docker model run hf.co/plunderstruck/Nex-N2-mini-ROCmFP4-GGUF:BF16
- Lemonade
How to use plunderstruck/Nex-N2-mini-ROCmFP4-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull plunderstruck/Nex-N2-mini-ROCmFP4-GGUF:BF16
Run and chat with the model
lemonade run user.Nex-N2-mini-ROCmFP4-GGUF-BF16
List all available models
lemonade list
| 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 | |
| <div style="border:2px solid currentColor; font-family:ui-monospace,'SF Mono','Cascadia Mono',Consolas,'Liberation Mono',monospace;"> | |
| <div style="border-bottom:1px solid currentColor; padding:6px 12px; font-size:11px; letter-spacing:3px; text-transform:uppercase; opacity:0.7; text-align:center;">PLUNDERSTRUCK // ROCmFP4 QUANTIZED MODEL // STRIX HALO Β· gfx1151</div> | |
| <div style="padding:14px; display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:18px;"> | |
| <pre style="margin:0; flex:0 0 auto; font-family:ui-monospace,'SF Mono','Cascadia Mono',Consolas,monospace; font-size:5px; line-height:1.1; letter-spacing:0;"> | |
| ββββββββββ βββββββββββββββββββββββββββββββ ββββββββ | |
| βββββββββββββ βββββββββββββββββββββββββββββββββ ββββββββ | |
| ββββββββββββββ βββββββββββββββββββββββββ ββββββββββββββββ | |
| ββββββββββββββ ββββββββββββββββββββββββββ βββββββββ βββ | |
| ββββββββββββββ ββββββββββββββββββββββββββ ββββββββ | |
| βββββββββββ βββ ββββββββββββββββββββββββββ βββββββββ | |
| ββββββββββββββββββββββββββββββββββββββββ ββββββββββββββ | |
| ββββββββββββββββββββββββββββ β β β β β β β β β β β β ββββββββββββββββ | |
| βββββββ βββββββββββββββββββββββββββββββββββββββ βββββββββ | |
| βββββββ ββββββββββββββββββββββββββββββββββ ββββββββ | |
| </pre> | |
| <div style="flex:0 1 auto; max-width:100%; text-align:center;"> | |
| <div style="font-size:23px; font-weight:800; letter-spacing:1px;">NEX-N2-MINI</div> | |
| <div style="font-size:12.5px; letter-spacing:1px; opacity:0.8; margin-top:5px;"><span style="white-space:nowrap;">4-BIT ROCmFP4</span> Β· <span style="white-space:nowrap;">CODE-WEIGHTED IMATRIX</span> Β· <span style="white-space:nowrap;">HIGH-SPARSITY MoE (3B ACTIVE)</span> Β· <span style="white-space:nowrap;">AGENTIC CODER</span> Β· <span style="white-space:nowrap;">SINGLE AMD APU</span></div> | |
| </div> | |
| </div> | |
| <table style="display:table; table-layout:fixed; width:100%; margin:0; border-collapse:collapse; border-radius:0; font-family:ui-monospace,'SF Mono',Consolas,monospace; font-size:12px;"> | |
| <tr> | |
| <td style="border-top:1px solid currentColor; border-right:1px solid currentColor; padding:8px 12px;"><div style="font-size:10px; letter-spacing:1px; opacity:0.6;">FORMAT</div><div style="font-weight:700;">ROCmFP4 4-BIT</div></td> | |
| <td style="border-top:1px solid currentColor; border-right:1px solid currentColor; padding:8px 12px;"><div style="font-size:10px; letter-spacing:1px; opacity:0.6;">PRECISION</div><div style="font-weight:700;">~4.5 BPW</div></td> | |
| <td style="border-top:1px solid currentColor; border-right:1px solid currentColor; padding:8px 12px;"><div style="font-size:10px; letter-spacing:1px; opacity:0.6;">SIZE</div><div style="font-weight:700;">18.4 GB</div></td> | |
| <td style="border-top:1px solid currentColor; padding:8px 12px;"><div style="font-size:10px; letter-spacing:1px; opacity:0.6;">CONTEXT</div><div style="font-weight:700;">131 K</div></td> | |
| </tr> | |
| <tr> | |
| <td style="border-top:1px solid currentColor; border-right:1px solid currentColor; padding:8px 12px;"><div style="font-size:10px; letter-spacing:1px; opacity:0.6;">ARCH</div><div style="font-weight:700;">qwen35moe</div></td> | |
| <td style="border-top:1px solid currentColor; border-right:1px solid currentColor; padding:8px 12px;"><div style="font-size:10px; letter-spacing:1px; opacity:0.6;">PARAMS</div><div style="font-weight:700;">35B / 3B ACTIVE</div></td> | |
| <td style="border-top:1px solid currentColor; border-right:1px solid currentColor; padding:8px 12px;"><div style="font-size:10px; letter-spacing:1px; opacity:0.6;">BACKEND</div><div style="font-weight:700;">VULKAN0</div></td> | |
| <td style="border-top:1px solid currentColor; padding:8px 12px;"><div style="font-size:10px; letter-spacing:1px; opacity:0.6;">LICENSE</div><div style="font-weight:700;">APACHE-2.0</div></td> | |
| </tr> | |
| </table> | |
| </div> | |
| <div style="border:2px solid #dc2626; padding:10px 13px; font-family:ui-monospace,'SF Mono',Consolas,monospace; font-size:12.5px; margin:14px 0;"> | |
| <b style="color:#dc2626; letter-spacing:1px;">β REQUIRES THE ROCmFP4 FORK</b><br> | |
| The custom <code>q4_0_rocmfp4</code> / <code>q4_0_rocmfp4_fast</code> tensor types <b>will not load in stock llama.cpp, LM Studio, or Ollama</b>. Build/run with <a href="https://github.com/charlie12345/ROCmFPX">charlie12345/ROCmFPX</a> Β· branch <code>mtp-rocmfp4-strix</code>. | |
| </div> | |
| <div style="border:1px solid currentColor; padding:8px 13px; font-family:ui-monospace,'SF Mono',Consolas,monospace; font-size:12px; margin:14px 0; opacity:0.85;"> | |
| <b>NOTE //</b> Ignore HuggingFace's auto-detected "F16" badge β its parser can't read ROCmFP4 and mislabels by the f16 embeddings. These are <b>~4.5 bpw 4-bit</b> files; pick by filename. | |
| </div> | |
| <div style="font-family:ui-monospace,'SF Mono',Consolas,monospace; font-weight:800; font-size:14px; letter-spacing:2px; text-transform:uppercase; border-bottom:2px solid currentColor; padding-bottom:5px; margin:26px 0 12px;"><span style="color:#ea580c;">01</span> Β· FILES</div> | |
| <div style="overflow:hidden; border-radius:0;"> | |
| <table style="width:100%; border-collapse:collapse; border-radius:0; font-family:ui-monospace,'SF Mono',Consolas,monospace; font-size:12.5px;"> | |
| <thead><tr> | |
| <th style="border:1px solid currentColor; padding:7px 10px; text-align:left; text-transform:uppercase; font-size:10px; letter-spacing:1px;">File</th> | |
| <th style="border:1px solid currentColor; padding:7px 10px; text-align:left; text-transform:uppercase; font-size:10px; letter-spacing:1px;">Size</th> | |
| <th style="border:1px solid currentColor; padding:7px 10px; text-align:left; text-transform:uppercase; font-size:10px; letter-spacing:1px;">Output head</th> | |
| <th style="border:1px solid currentColor; padding:7px 10px; text-align:left; text-transform:uppercase; font-size:10px; letter-spacing:1px;">Pick if</th> | |
| </tr></thead> | |
| <tbody> | |
| <tr><td style="border:1px solid currentColor; padding:7px 10px;"><code>β¦-STRIX-embF16-imatrix-headQ6.gguf</code> β </td><td style="border:1px solid currentColor; padding:7px 10px;">18.4 GB</td><td style="border:1px solid currentColor; padding:7px 10px;">Q6_K</td><td style="border:1px solid currentColor; padding:7px 10px;"><b>the one build</b> β best speed/quality balance: f16 embeddings + Q6 output head on the fast single-scale body</td></tr> | |
| </tbody> | |
| </table> | |
| </div> | |
| 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`. | |
| <div style="font-family:ui-monospace,'SF Mono',Consolas,monospace; font-weight:800; font-size:14px; letter-spacing:2px; text-transform:uppercase; border-bottom:2px solid currentColor; padding-bottom:5px; margin:26px 0 12px;"><span style="color:#ea580c;">02</span> Β· QUICK START</div> | |
| Run from the folder holding the `.gguf`: | |
| ```bash | |
| 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 | |
| ``` | |
| <div style="border:1px solid currentColor; padding:8px 13px; font-family:ui-monospace,'SF Mono',Consolas,monospace; font-size:12px; margin:14px 0; opacity:0.85;"> | |
| <b>NOTE //</b> No <code>--spec-*</code> / <code>--spec-type draft-mtp</code> flags β Nex-N2-mini ships <b>without an MTP head</b> (non-speculative). At ~72 t/s it doesn't need speculative decoding to be quick. | |
| </div> | |
| <div style="overflow:hidden; border-radius:0;"> | |
| <table style="width:100%; border-collapse:collapse; border-radius:0; font-family:ui-monospace,'SF Mono',Consolas,monospace; font-size:12px;"> | |
| <thead><tr> | |
| <th style="border:1px solid currentColor; padding:6px 10px; text-align:left; text-transform:uppercase; font-size:10px; letter-spacing:1px; width:40%;">Flag</th> | |
| <th style="border:1px solid currentColor; padding:6px 10px; text-align:left; text-transform:uppercase; font-size:10px; letter-spacing:1px;">Function</th> | |
| </tr></thead> | |
| <tbody> | |
| <tr><td style="border:1px solid currentColor; padding:6px 10px;"><code>HSA_OVERRIDE_GFX_VERSION=11.5.1</code></td><td style="border:1px solid currentColor; padding:6px 10px;">treat the APU as gfx1151 (Strix Halo)</td></tr> | |
| <tr><td style="border:1px solid currentColor; padding:6px 10px;"><code>GGML_HIP_ENABLE_UNIFIED_MEMORY=1</code></td><td style="border:1px solid currentColor; padding:6px 10px;">allow use of the full 128 GB unified memory</td></tr> | |
| <tr><td style="border:1px solid currentColor; padding:6px 10px;"><code>-dev Vulkan0</code></td><td style="border:1px solid currentColor; padding:6px 10px;">run on Vulkan β fastest backend for ROCmFP4 on Strix Halo</td></tr> | |
| <tr><td style="border:1px solid currentColor; padding:6px 10px;"><code>-ngl 999 Β· -fa on</code></td><td style="border:1px solid currentColor; padding:6px 10px;">offload all layers Β· flash attention</td></tr> | |
| <tr><td style="border:1px solid currentColor; padding:6px 10px;"><code>-c 131072</code></td><td style="border:1px solid currentColor; padding:6px 10px;">context length (128K)</td></tr> | |
| <tr><td style="border:1px solid currentColor; padding:6px 10px;"><code>-b 2048 Β· -ub 256 Β· -t/-tb 16</code></td><td style="border:1px solid currentColor; padding:6px 10px;">prefill batch / micro-batch Β· CPU threads</td></tr> | |
| <tr><td style="border:1px solid currentColor; padding:6px 10px;"><code>-ctk f16 Β· -ctv f16</code></td><td style="border:1px solid currentColor; padding:6px 10px;">f16 KV cache β how we run it; drop to <code>q8_0</code>/<code>q4_0</code> to use less memory</td></tr> | |
| <tr><td style="border:1px solid currentColor; padding:6px 10px;"><code>-cpent Β· -ctxcp Β· --cache-reuse Β· --cache-ram 65536</code></td><td style="border:1px solid currentColor; padding:6px 10px;">cross-turn KV checkpointing + 64 GB resident reuse cache</td></tr> | |
| <tr><td style="border:1px solid currentColor; padding:6px 10px;"><code>--temp 0.6 --top-p 0.95 --top-k 20 --min-p 0.0</code></td><td style="border:1px solid currentColor; padding:6px 10px;">base-model recommended sampling</td></tr> | |
| <tr><td style="border:1px solid currentColor; padding:6px 10px;"><code>--jinja --parallel 1 --metrics --no-mmap</code></td><td style="border:1px solid currentColor; padding:6px 10px;">apply baked ChatML template Β· single slot Β· metrics Β· weights in RAM</td></tr> | |
| </tbody> | |
| </table> | |
| </div> | |
| <div style="font-family:ui-monospace,'SF Mono',Consolas,monospace; font-weight:800; font-size:14px; letter-spacing:2px; text-transform:uppercase; border-bottom:2px solid currentColor; padding-bottom:5px; margin:26px 0 12px;"><span style="color:#ea580c;">03</span> Β· AGENTIC CODING / TOOLS</div> | |
| 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. | |
| <div style="overflow:hidden; border-radius:0;"> | |
| <table style="width:100%; border-collapse:collapse; border-radius:0; font-family:ui-monospace,'SF Mono',Consolas,monospace; font-size:12.5px;"> | |
| <tbody> | |
| <tr><td style="border:1px solid currentColor; padding:8px 11px; width:30%;">CHAT TEMPLATE</td><td style="border:1px solid currentColor; padding:8px 11px;">Qwen (ChatML) β baked into the GGUF; pass <code>--jinja</code></td></tr> | |
| <tr><td style="border:1px solid currentColor; padding:8px 11px;">TOOL-CALL PARSER</td><td style="border:1px solid currentColor; padding:8px 11px;"><code>qwen3_coder</code> β set in your client/runtime</td></tr> | |
| <tr><td style="border:1px solid currentColor; padding:8px 11px;">SAMPLING</td><td style="border:1px solid currentColor; padding:8px 11px;">temp <code>0.6</code> Β· top-p <code>0.95</code> Β· top-k <code>20</code> (base-model recommended)</td></tr> | |
| </tbody> | |
| </table> | |
| </div> | |
| <div style="font-family:ui-monospace,'SF Mono',Consolas,monospace; font-weight:800; font-size:14px; letter-spacing:2px; text-transform:uppercase; border-bottom:2px solid currentColor; padding-bottom:5px; margin:26px 0 12px;"><span style="color:#ea580c;">04</span> Β· PERFORMANCE & QUALITY</div> | |
| <div style="overflow:hidden; border-radius:0;"> | |
| <table style="width:100%; border-collapse:collapse; border-radius:0; font-family:ui-monospace,'SF Mono',Consolas,monospace; font-size:12.5px;"> | |
| <tbody> | |
| <tr><td style="border:1px solid currentColor; padding:8px 11px; width:42%;">DECODE Β· short-context</td><td style="border:1px solid currentColor; padding:8px 11px; font-weight:700;">~72 t/s (Vulkan / Ryzen AI Max+ 395)</td></tr> | |
| <tr><td style="border:1px solid currentColor; padding:8px 11px;">SWE-BENCH VERIFIED Β· base model</td><td style="border:1px solid currentColor; padding:8px 11px; font-weight:700;">74.4</td></tr> | |
| <tr><td style="border:1px solid currentColor; padding:8px 11px;">ACTIVE PARAMS</td><td style="border:1px solid currentColor; padding:8px 11px;">3B of 35B (high-sparsity MoE)</td></tr> | |
| <tr><td style="border:1px solid currentColor; padding:8px 11px;">QUANTIZATION</td><td style="border:1px solid currentColor; padding:8px 11px;">fast single-scale body + f16 embeddings + Q6 head + code-weighted imatrix</td></tr> | |
| </tbody> | |
| </table> | |
| </div> | |
| **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**](https://huggingface.co/plunderstruck/Qwen3.6-27B-MTP-ROCmFP4-GGUF) for the numbers and the format-limit reasoning. (Directional internal measurements β reproduce before citing.) | |
| <div style="border:1px solid currentColor; padding:8px 13px; font-family:ui-monospace,'SF Mono',Consolas,monospace; font-size:12px; margin:12px 0; opacity:0.9;"> | |
| <b>WANT MAXIMUM FIDELITY INSTEAD OF SPEED?</b> Grab a <b>Q6_K / Q8_0 GGUF of the base</b> from <a href="https://huggingface.co/nex-agi/Nex-N2-mini"><b>nex-agi/Nex-N2-mini</b></a> β 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. | |
| </div> | |
| **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](https://huggingface.co/datasets/eaddario/imatrix-calibration) code + Kalomaze `groups_merged` via [`froggeric/imatrix`](https://huggingface.co/datasets/froggeric/imatrix)). Measured by KL-divergence + perplexity vs the **true BF16** on a held-out **code** slice (disjoint from calibration): | |
| <div style="overflow:hidden; border-radius:0;"> | |
| <table style="width:100%; border-collapse:collapse; border-radius:0; font-family:ui-monospace,'SF Mono',Consolas,monospace; font-size:12.5px;"> | |
| <thead><tr> | |
| <th style="border:1px solid currentColor; padding:7px 10px; text-align:left; text-transform:uppercase; font-size:10px; letter-spacing:1px;">Metric (vs BF16, held-out code)</th> | |
| <th style="border:1px solid currentColor; padding:7px 10px; text-align:left; text-transform:uppercase; font-size:10px; letter-spacing:1px;">No-imatrix</th> | |
| <th style="border:1px solid currentColor; padding:7px 10px; text-align:left; text-transform:uppercase; font-size:10px; letter-spacing:1px;">Imatrix</th> | |
| <th style="border:1px solid currentColor; padding:7px 10px; text-align:left; text-transform:uppercase; font-size:10px; letter-spacing:1px;">Change</th> | |
| </tr></thead> | |
| <tbody> | |
| <tr><td style="border:1px solid currentColor; padding:7px 10px;"><b>Perplexity</b></td><td style="border:1px solid currentColor; padding:7px 10px;">4.076</td><td style="border:1px solid currentColor; padding:7px 10px;"><b>4.013</b></td><td style="border:1px solid currentColor; padding:7px 10px;"><b>β1.5%</b> (recovers >Β½ the 4-bit loss; ~3.3Ο)</td></tr> | |
| <tr><td style="border:1px solid currentColor; padding:7px 10px;"><b>Median KLD</b></td><td style="border:1px solid currentColor; padding:7px 10px;">0.0184</td><td style="border:1px solid currentColor; padding:7px 10px;"><b>0.0159</b></td><td style="border:1px solid currentColor; padding:7px 10px;"><b>β13%</b></td></tr> | |
| <tr><td style="border:1px solid currentColor; padding:7px 10px;">RMS Ξp</td><td style="border:1px solid currentColor; padding:7px 10px;">8.57%</td><td style="border:1px solid currentColor; padding:7px 10px;">8.00%</td><td style="border:1px solid currentColor; padding:7px 10px;">β7%</td></tr> | |
| <tr><td style="border:1px solid currentColor; padding:7px 10px;"><b>Same top token as BF16</b></td><td style="border:1px solid currentColor; padding:7px 10px;">88.97%</td><td style="border:1px solid currentColor; padding:7px 10px;"><b>89.44%</b></td><td style="border:1px solid currentColor; padding:7px 10px;">+0.5 pp</td></tr> | |
| </tbody> | |
| </table> | |
| </div> | |
| For this model the imatrix is a **clean win** β better on *every* metric, including perplexity. (It's model-dependent β on the dense [Qwopus-Coder](https://huggingface.co/plunderstruck/Qwopus3.6-27B-Coder-MTP-ROCmFP4-GGUF) the same recipe *worsened* code-PPL, so we shipped that one without imatrix. Always measure.) | |
| <div style="font-family:ui-monospace,'SF Mono',Consolas,monospace; font-weight:800; font-size:14px; letter-spacing:2px; text-transform:uppercase; border-bottom:2px solid currentColor; padding-bottom:5px; margin:26px 0 12px;"><span style="color:#ea580c;">05</span> Β· BUILD (REPRODUCIBLE)</div> | |
| ```bash | |
| # 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. | |
| <div style="font-family:ui-monospace,'SF Mono',Consolas,monospace; font-weight:800; font-size:14px; letter-spacing:2px; text-transform:uppercase; border-bottom:2px solid currentColor; padding-bottom:5px; margin:26px 0 12px;"><span style="color:#ea580c;">06</span> Β· LINEAGE & CREDITS</div> | |
| <div style="overflow:hidden; border-radius:0;"> | |
| <table style="width:100%; border-collapse:collapse; border-radius:0; font-family:ui-monospace,'SF Mono',Consolas,monospace; font-size:12.5px;"> | |
| <tbody> | |
| <tr><td style="border:1px solid currentColor; padding:8px 11px; width:26%;">BASE MODEL</td><td style="border:1px solid currentColor; padding:8px 11px;"><a href="https://huggingface.co/nex-agi/Nex-N2-mini">nex-agi/Nex-N2-mini</a> (Apache-2.0) Β· Qwen3.5-35B-A3B lineage (35B total / 3B active MoE)</td></tr> | |
| <tr><td style="border:1px solid currentColor; padding:8px 11px;">CALIBRATION</td><td style="border:1px solid currentColor; padding:8px 11px;"><a href="https://huggingface.co/datasets/eaddario/imatrix-calibration">eaddario/imatrix-calibration</a> (code) + Kalomaze <code>groups_merged</code> via <a href="https://huggingface.co/datasets/froggeric/imatrix">froggeric/imatrix</a> (general)</td></tr> | |
| <tr><td style="border:1px solid currentColor; padding:8px 11px;">FORMAT + RUNTIME</td><td style="border:1px solid currentColor; padding:8px 11px;"><a href="https://github.com/charlie12345/ROCmFPX">charlie12345/ROCmFPX</a> (based on llama.cpp, MIT)</td></tr> | |
| </tbody> | |
| </table> | |
| </div> | |
| *Derivative quantization β verify the base model's license before redistribution / use.* | |