GGUF
English
rocmfp4
qwen3next
qwen3-coder-next
coder
Mixture of Experts
imatrix
strix-halo
amd
rocm
vulkan
conversational
Instructions to use plunderstruck/Qwen3-Coder-Next-ROCmFP4-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use plunderstruck/Qwen3-Coder-Next-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/Qwen3-Coder-Next-ROCmFP4-GGUF # Run inference directly in the terminal: llama cli -hf plunderstruck/Qwen3-Coder-Next-ROCmFP4-GGUF
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf plunderstruck/Qwen3-Coder-Next-ROCmFP4-GGUF # Run inference directly in the terminal: llama cli -hf plunderstruck/Qwen3-Coder-Next-ROCmFP4-GGUF
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf plunderstruck/Qwen3-Coder-Next-ROCmFP4-GGUF # Run inference directly in the terminal: ./build/bin/llama cli -hf plunderstruck/Qwen3-Coder-Next-ROCmFP4-GGUF
Use Docker
docker model run hf.co/plunderstruck/Qwen3-Coder-Next-ROCmFP4-GGUF
- Llama new
- LM Studio
- Jan
- Ollama
How to use plunderstruck/Qwen3-Coder-Next-ROCmFP4-GGUF with Ollama:
ollama run hf.co/plunderstruck/Qwen3-Coder-Next-ROCmFP4-GGUF
- Unsloth Desktop
- Pi
How to use plunderstruck/Qwen3-Coder-Next-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/Qwen3-Coder-Next-ROCmFP4-GGUF
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "plunderstruck/Qwen3-Coder-Next-ROCmFP4-GGUF" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use plunderstruck/Qwen3-Coder-Next-ROCmFP4-GGUF with Docker Model Runner:
docker model run hf.co/plunderstruck/Qwen3-Coder-Next-ROCmFP4-GGUF
- Lemonade
How to use plunderstruck/Qwen3-Coder-Next-ROCmFP4-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull plunderstruck/Qwen3-Coder-Next-ROCmFP4-GGUF
Run and chat with the model
lemonade run user.Qwen3-Coder-Next-ROCmFP4-GGUF-{{QUANT_TAG}}List all available models
lemonade list
- Hermes Agent
How to use plunderstruck/Qwen3-Coder-Next-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/Qwen3-Coder-Next-ROCmFP4-GGUF
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:9931/v1 hermes config set model.default plunderstruck/Qwen3-Coder-Next-ROCmFP4-GGUF
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use plunderstruck/Qwen3-Coder-Next-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/Qwen3-Coder-Next-ROCmFP4-GGUF
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:9931/v1 \ --custom-model-id "plunderstruck/Qwen3-Coder-Next-ROCmFP4-GGUF" \ --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"
Card: datasheet/neo-brutalist restyle (monospace, hard borders, spec grid, numbered sections); claims audited (f16 KV stated as config only)
Browse files
README.md
CHANGED
|
@@ -16,75 +16,183 @@ tags:
|
|
| 16 |
- vulkan
|
| 17 |
language:
|
| 18 |
- en
|
|
|
|
| 19 |
---
|
| 20 |
|
| 21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|---|---|---|
|
| 53 |
-
| `…-STRIX-embQ8-imatrix.gguf` | 4-bit | **fastest** — recommended default |
|
| 54 |
-
| `…-STRIX-embQ8-imatrix-headQ6.gguf` | **Q6_K** | a notch more faithful output, ~5–7% slower decode |
|
| 55 |
-
|
| 56 |
-
- **Q8 embeddings** (not f16): the source is Q8_0, so Q8 matches its precision exactly — f16 would be
|
| 57 |
-
fake-f16 bloat for zero gain (embeddings are a lookup, not a matmul).
|
| 58 |
-
- **MoE experts + attention/SSM projections** → 4-bit ROCmFP4; the DeltaNet-specific tensors
|
| 59 |
-
(`ssm_conv1d`, `ssm_a`, norms, router) stay **F32**.
|
| 60 |
-
|
| 61 |
-
## The imatrix — code-weighted, and measured
|
| 62 |
-
|
| 63 |
-
Quantized **with an importance matrix** built from a **code-weighted** calibration mix (~2.6:1 code:general):
|
| 64 |
-
- **Code:** real multi-language source + code-analysis prompts, sampled from
|
| 65 |
-
[`eaddario/imatrix-calibration`](https://huggingface.co/datasets/eaddario/imatrix-calibration).
|
| 66 |
-
- **General:** Kalomaze's `groups_merged` (via [`froggeric/imatrix`](https://huggingface.co/datasets/froggeric/imatrix)).
|
| 67 |
-
|
| 68 |
-
*(Note on "dual imatrix": a plain merge of two imatrices is mathematically identical to concatenating the
|
| 69 |
-
corpora at the same ratio — the only real lever is the code:general ratio, which is what's set here. True
|
| 70 |
-
size-decoupled balancing would need normalized-merge tooling; not used.)*
|
| 71 |
-
|
| 72 |
-
**Measured benefit** — KL-divergence + perplexity vs the **Q8 reference** on a **held-out code** slice
|
| 73 |
-
(disjoint from calibration), imatrix vs no-imatrix:
|
| 74 |
-
|
| 75 |
-
| metric (vs Q8, held-out code) | no-imatrix | **imatrix** | change |
|
| 76 |
-
|---|---|---|---|
|
| 77 |
-
| **Median KLD** | 0.00597 | **0.00478** | **−20%** |
|
| 78 |
-
| 90th-pct KLD | 0.1342 | 0.1083 | −19% |
|
| 79 |
-
| **RMS Δp** | 8.14% | **7.36%** | −10% |
|
| 80 |
-
| **Same top token as Q8** | 91.01% | **91.49%** | +0.48 pp |
|
| 81 |
-
| Mean PPL | 3.4556 | 3.4686 | +0.013 (within ±0.077 noise — a wash) |
|
| 82 |
-
|
| 83 |
-
So the imatrix **measurably improves quantization fidelity to the full model on code** (median KL −20%,
|
| 84 |
-
the gold-standard metric), at **zero cost** (same size/speed). PPL is a statistical wash. Honest scope:
|
| 85 |
-
this is a fidelity-vs-Q8 measurement on ~20 K tokens of held-out code, **not** an absolute coding benchmark.
|
| 86 |
|
| 87 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 88 |
|
| 89 |
```bash
|
| 90 |
# code-weighted imatrix on the Q8 (single pass; ratio = the real lever)
|
|
@@ -95,27 +203,18 @@ llama-quantize --allow-requantize --token-embedding-type q8_0 --imatrix coder-ne
|
|
| 95 |
Qwen3-Coder-Next-Q8_0.gguf Qwen3-Coder-Next-ROCmFP4-STRIX-embQ8-imatrix.gguf Q4_0_ROCMFP4_STRIX
|
| 96 |
```
|
| 97 |
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
- **Chat template:** Qwen (ChatML) — baked into the GGUF, so just pass `--jinja` (in the run command below); your client applies it automatically.
|
| 101 |
-
- **Tool calling:** this is an agentic coder — use the **`qwen3_coder`** tool-call parser in your client.
|
| 102 |
-
- **Recommended sampling** (Qwen-Coder): **temp `0.7`, top-p `0.8`, top-k `20`** — already set below.
|
| 103 |
-
|
| 104 |
-
## Usage
|
| 105 |
-
|
| 106 |
-
```bash
|
| 107 |
-
env HSA_OVERRIDE_GFX_VERSION=11.5.1 GGML_HIP_ENABLE_UNIFIED_MEMORY=1 \
|
| 108 |
-
llama-server -m Qwen3-Coder-Next-ROCmFP4-STRIX-embQ8-imatrix.gguf \
|
| 109 |
-
--alias qwen3-coder-next-rocmfp4 --host 0.0.0.0 --port 8080 \
|
| 110 |
-
-dev Vulkan0 -ngl 999 -fa on -c 131072 -b 2048 -ub 256 -t 16 -tb 16 \
|
| 111 |
-
-ctk f16 -ctv f16 --cache-reuse 256 \
|
| 112 |
-
--temp 0.7 --top-p 0.8 --top-k 20 --jinja --parallel 1 --metrics --no-mmap
|
| 113 |
-
```
|
| 114 |
|
| 115 |
-
|
| 116 |
|
| 117 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 118 |
|
| 119 |
-
|
| 120 |
-
- **Calibration:** [`eaddario/imatrix-calibration`](https://huggingface.co/datasets/eaddario/imatrix-calibration) (code), Kalomaze `groups_merged` via [`froggeric/imatrix`](https://huggingface.co/datasets/froggeric/imatrix) (general).
|
| 121 |
-
- **ROCmFP4 format & runtime:** [`charlie12345/rocmfp4-llama`](https://github.com/charlie12345/rocmfp4-llama) (based on llama.cpp, MIT).
|
|
|
|
| 16 |
- vulkan
|
| 17 |
language:
|
| 18 |
- en
|
| 19 |
+
base_model_relation: quantized
|
| 20 |
---
|
| 21 |
|
| 22 |
+
<div style="border:2px solid currentColor; font-family:ui-monospace,'SF Mono','Cascadia Mono',Consolas,'Liberation Mono',monospace;">
|
| 23 |
+
<div style="border-bottom:1px solid currentColor; padding:6px 12px; font-size:11px; letter-spacing:3px; text-transform:uppercase; opacity:0.7;">PLUNDERSTRUCK // ROCmFP4 QUANTIZED MODEL // STRIX HALO · gfx1151</div>
|
| 24 |
+
<div style="padding:16px 14px 12px 14px;">
|
| 25 |
+
<div style="font-size:23px; font-weight:800; letter-spacing:1px;">QWEN3-CODER-NEXT</div>
|
| 26 |
+
<div style="font-size:12.5px; letter-spacing:1px; opacity:0.8; margin-top:5px;">4-BIT ROCmFP4 · 80B-A3B MoE · CODE-WEIGHTED IMATRIX · AGENTIC CODER · SINGLE AMD APU</div>
|
| 27 |
+
</div>
|
| 28 |
+
<table style="width:100%; border-collapse:collapse; border-radius:0; font-family:ui-monospace,'SF Mono',Consolas,monospace; font-size:12px;">
|
| 29 |
+
<tr>
|
| 30 |
+
<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>
|
| 31 |
+
<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>
|
| 32 |
+
<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;">QWEN3NEXT</div></td>
|
| 33 |
+
<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;">262 K</div></td>
|
| 34 |
+
</tr>
|
| 35 |
+
<tr>
|
| 36 |
+
<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;">80B · A3B MoE</div></td>
|
| 37 |
+
<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;">DRAFT</div><div style="font-weight:700;">NO MTP</div></td>
|
| 38 |
+
<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>
|
| 39 |
+
<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>
|
| 40 |
+
</tr>
|
| 41 |
+
</table>
|
| 42 |
+
</div>
|
| 43 |
+
|
| 44 |
+
<div style="border:2px solid #dc2626; padding:10px 13px; font-family:ui-monospace,'SF Mono',Consolas,monospace; font-size:12.5px; margin:14px 0;">
|
| 45 |
+
<b style="color:#dc2626; letter-spacing:1px;">⚠ REQUIRES THE ROCmFP4 FORK</b><br>
|
| 46 |
+
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/rocmfp4-llama">charlie12345/rocmfp4-llama</a> · branch <code>mtp-rocmfp4-strix</code>.
|
| 47 |
+
</div>
|
| 48 |
+
|
| 49 |
+
<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;">
|
| 50 |
+
<b>NOTE //</b> Ignore HuggingFace's auto-detected "F16"/16-bit badge — its parser can't read ROCmFP4 and mislabels the file. These are <b>~4.5 bpw 4-bit</b> ROCmFP4 files; pick by filename in <i>Files and versions</i>.
|
| 51 |
+
</div>
|
| 52 |
+
|
| 53 |
+
Experimental **AMD Strix Halo (gfx1151)** quant of [**Qwen3-Coder-Next**](https://huggingface.co/Qwen/Qwen3-Coder-Next) — Qwen's agentic coding model (**80B total / 3B active** high-sparsity MoE, hybrid Gated-DeltaNet attention, arch `qwen3next`, 262K context) — in the custom **ROCmFP4** 4-bit format, **imatrix-quantized** with a code-weighted importance matrix.
|
| 54 |
+
|
| 55 |
+
<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>
|
| 56 |
+
|
| 57 |
+
<div style="overflow:hidden; border-radius:0;">
|
| 58 |
+
<table style="width:100%; border-collapse:collapse; border-radius:0; font-family:ui-monospace,'SF Mono',Consolas,monospace; font-size:12.5px;">
|
| 59 |
+
<thead><tr>
|
| 60 |
+
<th style="border:1px solid currentColor; padding:7px 10px; text-align:left; text-transform:uppercase; font-size:10px; letter-spacing:1px;">File</th>
|
| 61 |
+
<th style="border:1px solid currentColor; padding:7px 10px; text-align:left; text-transform:uppercase; font-size:10px; letter-spacing:1px;">Output head</th>
|
| 62 |
+
<th style="border:1px solid currentColor; padding:7px 10px; text-align:left; text-transform:uppercase; font-size:10px; letter-spacing:1px;">Pick if</th>
|
| 63 |
+
</tr></thead>
|
| 64 |
+
<tbody>
|
| 65 |
+
<tr><td style="border:1px solid currentColor; padding:7px 10px;"><code>…-STRIX-embQ8-imatrix.gguf</code></td><td style="border:1px solid currentColor; padding:7px 10px;">ROCmFP4 4-bit</td><td style="border:1px solid currentColor; padding:7px 10px;">fastest decode (recommended default)</td></tr>
|
| 66 |
+
<tr><td style="border:1px solid currentColor; padding:7px 10px;"><code>…-STRIX-embQ8-imatrix-headQ6.gguf</code></td><td style="border:1px solid currentColor; padding:7px 10px;">Q6_K</td><td style="border:1px solid currentColor; padding:7px 10px;">a notch more faithful output (~5–7% slower decode)</td></tr>
|
| 67 |
+
</tbody>
|
| 68 |
+
</table>
|
| 69 |
+
</div>
|
| 70 |
+
|
| 71 |
+
Both share the same 4-bit ROCmFP4 body, **Q8 embeddings**, and the code-weighted imatrix (see §04). The DeltaNet-specific tensors (`ssm_conv1d`, `ssm_a`, norms, router) stay **F32**; MoE experts + attention/SSM projections are 4-bit ROCmFP4.
|
| 72 |
+
|
| 73 |
+
<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.85;">
|
| 74 |
+
<b>NOTE //</b> <b>Q8 embeddings</b> (not f16): the source is Q8_0, so Q8 matches its precision exactly — f16 would be fake-f16 bloat for zero gain (embeddings are a lookup, not a matmul).
|
| 75 |
+
</div>
|
| 76 |
+
|
| 77 |
+
<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>
|
| 78 |
+
|
| 79 |
+
Run from the folder holding the `.gguf` (the Qwen ChatML template is baked in — just pass `--jinja`):
|
| 80 |
|
| 81 |
+
```bash
|
| 82 |
+
env HSA_OVERRIDE_GFX_VERSION=11.5.1 GGML_HIP_ENABLE_UNIFIED_MEMORY=1 \
|
| 83 |
+
llama-server \
|
| 84 |
+
-m Qwen3-Coder-Next-ROCmFP4-STRIX-embQ8-imatrix-headQ6.gguf \
|
| 85 |
+
--alias coder-next \
|
| 86 |
+
--host 0.0.0.0 \
|
| 87 |
+
--port 8080 \
|
| 88 |
+
-c 262144 \
|
| 89 |
+
-ctk q8_0 \
|
| 90 |
+
-ctv q8_0 \
|
| 91 |
+
--temp 0.7 \
|
| 92 |
+
--top-p 0.8 \
|
| 93 |
+
--top-k 20 \
|
| 94 |
+
-dev Vulkan0 \
|
| 95 |
+
-ngl 999 \
|
| 96 |
+
-fa on \
|
| 97 |
+
-b 2048 \
|
| 98 |
+
-ub 256 \
|
| 99 |
+
-t 16 \
|
| 100 |
+
-tb 16 \
|
| 101 |
+
-cpent 256 \
|
| 102 |
+
-ctxcp 32 \
|
| 103 |
+
--cache-reuse 256 \
|
| 104 |
+
--cache-ram 65536 \
|
| 105 |
+
--jinja \
|
| 106 |
+
--parallel 1 \
|
| 107 |
+
--metrics \
|
| 108 |
+
--no-mmap
|
| 109 |
+
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 110 |
|
| 111 |
+
<div style="overflow:hidden; border-radius:0;">
|
| 112 |
+
<table style="width:100%; border-collapse:collapse; border-radius:0; font-family:ui-monospace,'SF Mono',Consolas,monospace; font-size:12px;">
|
| 113 |
+
<thead><tr>
|
| 114 |
+
<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>
|
| 115 |
+
<th style="border:1px solid currentColor; padding:6px 10px; text-align:left; text-transform:uppercase; font-size:10px; letter-spacing:1px;">Function</th>
|
| 116 |
+
</tr></thead>
|
| 117 |
+
<tbody>
|
| 118 |
+
<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>
|
| 119 |
+
<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>
|
| 120 |
+
<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>
|
| 121 |
+
<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>
|
| 122 |
+
<tr><td style="border:1px solid currentColor; padding:6px 10px;"><code>-c 262144</code></td><td style="border:1px solid currentColor; padding:6px 10px;">context length (256K)</td></tr>
|
| 123 |
+
<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>
|
| 124 |
+
<tr><td style="border:1px solid currentColor; padding:6px 10px;"><code>-ctk q8_0 · -ctv q8_0</code></td><td style="border:1px solid currentColor; padding:6px 10px;">q8_0 (8-bit) KV cache — how we run it; drop to <code>q4_0</code> to use less memory, or raise to <code>f16</code></td></tr>
|
| 125 |
+
<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>
|
| 126 |
+
<tr><td style="border:1px solid currentColor; padding:6px 10px;"><code>--temp 0.7 --top-p 0.8 --top-k 20</code></td><td style="border:1px solid currentColor; padding:6px 10px;">Qwen-Coder recommended sampling</td></tr>
|
| 127 |
+
<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>
|
| 128 |
+
</tbody>
|
| 129 |
+
</table>
|
| 130 |
+
</div>
|
| 131 |
+
|
| 132 |
+
<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.85;">
|
| 133 |
+
<b>NOTE //</b> No <code>--spec-*</code> / <code>--spec-type draft-mtp</code> flags — this arch has <b>no MTP head</b> (see §04). It's already fast on its own.
|
| 134 |
+
</div>
|
| 135 |
+
|
| 136 |
+
<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>
|
| 137 |
+
|
| 138 |
+
Qwen3-Coder-Next is an **agentic coder** — built to call tools, not narrate code. To wire it up:
|
| 139 |
+
|
| 140 |
+
- **Chat template:** Qwen (ChatML) is baked into the GGUF — just pass `--jinja` and your client applies it automatically.
|
| 141 |
+
- **Tool calling:** enable the **`qwen3_coder`** tool-call parser in your client (e.g. the matching parser flag in llama-server / your agent harness). Without it, native tool calls won't be parsed and the model tends to narrate code instead of calling tools.
|
| 142 |
+
- **Sampling:** temp `0.7`, top-p `0.8`, top-k `20` (Qwen-Coder recommended) — already set in §02.
|
| 143 |
+
|
| 144 |
+
<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.85;">
|
| 145 |
+
<b>NOTE //</b> The cross-turn reuse cache (<code>--cache-reuse</code> / <code>--cache-ram</code>) keeps long agentic sessions cheap — the leading prompt isn't re-prefilled every turn.
|
| 146 |
+
</div>
|
| 147 |
+
|
| 148 |
+
<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>
|
| 149 |
+
|
| 150 |
+
<div style="overflow:hidden; border-radius:0;">
|
| 151 |
+
<table style="width:100%; border-collapse:collapse; border-radius:0; font-family:ui-monospace,'SF Mono',Consolas,monospace; font-size:12.5px;">
|
| 152 |
+
<tbody>
|
| 153 |
+
<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;">~54 t/s (Vulkan / Ryzen AI Max+ 395)</td></tr>
|
| 154 |
+
<tr><td style="border:1px solid currentColor; padding:8px 11px;">SPECULATIVE DECODE</td><td style="border:1px solid currentColor; padding:8px 11px; font-weight:700;">none (no MTP head)</td></tr>
|
| 155 |
+
<tr><td style="border:1px solid currentColor; padding:8px 11px;">LONG CONTEXT</td><td style="border:1px solid currentColor; padding:8px 11px;">cheap — DeltaNet near-constant memory</td></tr>
|
| 156 |
+
<tr><td style="border:1px solid currentColor; padding:8px 11px;">QUANTIZATION</td><td style="border:1px solid currentColor; padding:8px 11px;">code-weighted imatrix (measured win — below)</td></tr>
|
| 157 |
+
</tbody>
|
| 158 |
+
</table>
|
| 159 |
+
</div>
|
| 160 |
+
|
| 161 |
+
**Fast even without speculative decoding.** 3B active params + linear Gated-DeltaNet attention → ~54 t/s short-context decode on a Ryzen AI Max+ 395 (Vulkan0), and cheap long context. No MTP needed — and it's already ~2× the decode speed of the 27B/40B MTP models.
|
| 162 |
+
|
| 163 |
+
<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.85;">
|
| 164 |
+
<b>NOTE // NO MTP</b> Qwen3-Coder-Next ships <b>without</b> an MTP head, and the ROCmFP4 fork currently wires MTP drafting only for the <code>qwen35</code>/<code>qwen35moe</code> archs, <b>not</b> <code>qwen3next</code>. So these are <b>no-MTP</b> (non-speculative) builds — in practice it doesn't matter, it's fast on its own.
|
| 165 |
+
</div>
|
| 166 |
+
|
| 167 |
+
**The imatrix — code-weighted, and measured (a clean win here).** Quantized **with an importance matrix** built from a **code-weighted** calibration mix (~2.6:1 code:general): real multi-language source + code-analysis prompts from [`eaddario/imatrix-calibration`](https://huggingface.co/datasets/eaddario/imatrix-calibration), plus Kalomaze's `groups_merged` (via [`froggeric/imatrix`](https://huggingface.co/datasets/froggeric/imatrix)) for general.
|
| 168 |
+
|
| 169 |
+
KL-divergence + perplexity vs the **Q8 reference** on a **held-out code** slice (disjoint from calibration), imatrix vs no-imatrix:
|
| 170 |
+
|
| 171 |
+
<div style="overflow:hidden; border-radius:0;">
|
| 172 |
+
<table style="width:100%; border-collapse:collapse; border-radius:0; font-family:ui-monospace,'SF Mono',Consolas,monospace; font-size:12.5px;">
|
| 173 |
+
<thead><tr>
|
| 174 |
+
<th style="border:1px solid currentColor; padding:7px 10px; text-align:left; text-transform:uppercase; font-size:10px; letter-spacing:1px;">Metric (vs Q8, held-out code)</th>
|
| 175 |
+
<th style="border:1px solid currentColor; padding:7px 10px; text-align:left; text-transform:uppercase; font-size:10px; letter-spacing:1px;">No-imatrix</th>
|
| 176 |
+
<th style="border:1px solid currentColor; padding:7px 10px; text-align:left; text-transform:uppercase; font-size:10px; letter-spacing:1px;">Imatrix</th>
|
| 177 |
+
<th style="border:1px solid currentColor; padding:7px 10px; text-align:left; text-transform:uppercase; font-size:10px; letter-spacing:1px;">Change</th>
|
| 178 |
+
</tr></thead>
|
| 179 |
+
<tbody>
|
| 180 |
+
<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.00597</td><td style="border:1px solid currentColor; padding:7px 10px; font-weight:700;">0.00478</td><td style="border:1px solid currentColor; padding:7px 10px; font-weight:700;">−20%</td></tr>
|
| 181 |
+
<tr><td style="border:1px solid currentColor; padding:7px 10px;">90th-pct KLD</td><td style="border:1px solid currentColor; padding:7px 10px;">0.1342</td><td style="border:1px solid currentColor; padding:7px 10px;">0.1083</td><td style="border:1px solid currentColor; padding:7px 10px;">−19%</td></tr>
|
| 182 |
+
<tr><td style="border:1px solid currentColor; padding:7px 10px;"><b>RMS Δp</b></td><td style="border:1px solid currentColor; padding:7px 10px;">8.14%</td><td style="border:1px solid currentColor; padding:7px 10px; font-weight:700;">7.36%</td><td style="border:1px solid currentColor; padding:7px 10px; font-weight:700;">−10%</td></tr>
|
| 183 |
+
<tr><td style="border:1px solid currentColor; padding:7px 10px;"><b>Same top token as Q8</b></td><td style="border:1px solid currentColor; padding:7px 10px;">91.01%</td><td style="border:1px solid currentColor; padding:7px 10px; font-weight:700;">91.49%</td><td style="border:1px solid currentColor; padding:7px 10px; font-weight:700;">+0.48 pp</td></tr>
|
| 184 |
+
<tr><td style="border:1px solid currentColor; padding:7px 10px;">Mean PPL</td><td style="border:1px solid currentColor; padding:7px 10px;">3.4556</td><td style="border:1px solid currentColor; padding:7px 10px;">3.4686</td><td style="border:1px solid currentColor; padding:7px 10px;">+0.013 (within ±0.077 noise — a wash)</td></tr>
|
| 185 |
+
</tbody>
|
| 186 |
+
</table>
|
| 187 |
+
</div>
|
| 188 |
+
|
| 189 |
+
So the imatrix **measurably improves quantization fidelity to the full model on code** (median KL **−20%**, the gold-standard metric), at **zero cost** (same size/speed). PPL is a statistical wash. Honest scope: this is a fidelity-vs-Q8 measurement on ~20 K tokens of held-out code, **not** an absolute coding benchmark.
|
| 190 |
+
|
| 191 |
+
<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.85;">
|
| 192 |
+
<b>NOTE //</b> On "dual imatrix": a plain merge of two imatrices is mathematically identical to concatenating the corpora at the same ratio — the only real lever is the code:general ratio, which is what's set here. True size-decoupled balancing would need normalized-merge tooling; not used.
|
| 193 |
+
</div>
|
| 194 |
+
|
| 195 |
+
<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>
|
| 196 |
|
| 197 |
```bash
|
| 198 |
# code-weighted imatrix on the Q8 (single pass; ratio = the real lever)
|
|
|
|
| 203 |
Qwen3-Coder-Next-Q8_0.gguf Qwen3-Coder-Next-ROCmFP4-STRIX-embQ8-imatrix.gguf Q4_0_ROCMFP4_STRIX
|
| 204 |
```
|
| 205 |
|
| 206 |
+
> Experimental research build for AMD Strix Halo — hardware/driver/prompt-sensitive, may not reproduce elsewhere. Not native FP4 tensor-core execution.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 207 |
|
| 208 |
+
<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>
|
| 209 |
|
| 210 |
+
<div style="overflow:hidden; border-radius:0;">
|
| 211 |
+
<table style="width:100%; border-collapse:collapse; border-radius:0; font-family:ui-monospace,'SF Mono',Consolas,monospace; font-size:12.5px;">
|
| 212 |
+
<tbody>
|
| 213 |
+
<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/Qwen/Qwen3-Coder-Next">Qwen/Qwen3-Coder-Next</a> (Apache-2.0, Qwen team) · 80B-A3B MoE, arch <code>qwen3next</code></td></tr>
|
| 214 |
+
<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>
|
| 215 |
+
<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/rocmfp4-llama">charlie12345/rocmfp4-llama</a> (based on llama.cpp, MIT)</td></tr>
|
| 216 |
+
</tbody>
|
| 217 |
+
</table>
|
| 218 |
+
</div>
|
| 219 |
|
| 220 |
+
*Derivative quantization — verify the base model's license before redistribution / use.*
|
|
|
|
|
|