<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[【實測】Ryzen AI MAX+ 395 跑 Gemma 4 全家桶無審查版：E2B / E4B / 12B / 26B-A4B / 31B × HIP / Vulkan / hipEngine / Strata / vLLM 完整對照]]></title><description><![CDATA[<blockquote>
<p dir="auto"><strong>TL;DR（30 秒版）</strong></p>
<ol>
<li><strong>同一部 MAX+ 395，五個 Gemma 4 size 全部跑得到</strong>，但速度差成 10 倍：E2B decode 111 t/s vs 31B 得 11.4 t/s</li>
<li><strong>HIP 贏 prefill、Vulkan 贏 decode</strong> —— 兩邊全面分裂，冇一個引擎兩樣都贏</li>
<li><strong>26B A4B（MoE，4B active）係甜點</strong>：pp 比 12B dense 快 <strong>1.8×</strong>、tg 快 <strong>2.2×</strong>，但質素係 26B 級</li>
<li><strong>31B dense 唔適合互動</strong>：decode 得 9.9–11.4 t/s，實際打字機速度</li>
<li><strong>長 context 有代價</strong>：8K → 64K，prefill 吞吐跌 <strong>55–60%</strong>（attention 平方成本，唔關引擎事）</li>
<li><strong>hipEngine 載到但慢 7 倍；Strata 直接拒絕；vLLM 食唔到 GGUF</strong> —— 想跑 Gemma 4 無審查 GGUF，llama.cpp 係唯一實用選擇</li>
</ol>
</blockquote>
<hr />
<h2>一、平台</h2>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>項目</th>
<th>規格</th>
</tr>
</thead>
<tbody>
<tr>
<td>CPU / APU</td>
<td><strong>AMD Ryzen AI MAX+ 395</strong></td>
</tr>
<tr>
<td>GPU</td>
<td><strong>Radeon 8060S</strong>（gfx1151，RDNA3.5）</td>
</tr>
<tr>
<td>記憶體</td>
<td><strong>124GB 統一記憶體</strong>（CPU/GPU 共用，無獨立 VRAM）</td>
</tr>
<tr>
<td>系統</td>
<td>Ubuntu 24.04 LTS</td>
</tr>
<tr>
<td>ROCm</td>
<td>Core SDK 10.2</td>
</tr>
<tr>
<td>引擎 A</td>
<td><strong>llama.cpp v1.0.0 — HIP（ROCm 10.2）</strong></td>
</tr>
<tr>
<td>引擎 B</td>
<td><strong>llama.cpp v1.0.0 — Vulkan</strong></td>
</tr>
<tr>
<td>引擎 C</td>
<td>hipEngine 0.8.3（<code>hip_gfx1151</code>）</td>
</tr>
<tr>
<td>引擎 D</td>
<td>Strata 0.2.18（build 0.1.64）</td>
</tr>
<tr>
<td>引擎 E</td>
<td>vLLM 0.34.0（rocm100）</td>
</tr>
</tbody>
</table>
<p dir="auto">統一記憶體架構係呢部機最大特點 —— 冇「VRAM 夠唔夠」嘅問題，124GB 全部可俾 GPU 用。所以成個測試嘅重點唔係「跑到唔跑到」，而係「邊個引擎跑到盡」。</p>
<h2>二、模型：HauhauCS 無審查版全套</h2>
<p dir="auto">之前手上嗰批全部係官方 <code>it</code>（有審查）版 —— 用 GGUF 嘅 <code>general.name</code> 逐個實證過先發現。所以另外落咗 <strong>HauhauCS 無審查版全套</strong>（同佢哋 Qwen3.8-27B / 35B 無審查版同一來源，HF tag <code>uncensored</code>）：</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>目錄</th>
<th>主模型</th>
<th>大小</th>
<th>mmproj（vision）</th>
<th>MTP draft</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>e2b/</code></td>
<td>Gemma-4-E2B-Uncensored-HauhauCS-<strong>Aggressive</strong>-Q4_K_P</td>
<td>3.45GB</td>
<td>f16 0.99GB</td>
<td>—</td>
</tr>
<tr>
<td><code>e4b/</code></td>
<td>Gemma-4-E4B-Uncensored-HauhauCS-<strong>Aggressive</strong>-Q4_K_M</td>
<td>5.34GB</td>
<td>f16 0.99GB</td>
<td>—</td>
</tr>
<tr>
<td><code>12b/</code></td>
<td>Gemma4-12B-<strong>QAT</strong>-Uncensored-HauhauCS-Balanced-Q4_K_M</td>
<td>7.38GB</td>
<td>BF16 0.18GB</td>
<td>0.25GB</td>
</tr>
<tr>
<td><code>26b/</code></td>
<td>Gemma4-26B-A4B-<strong>QAT</strong>-Uncensored-HauhauCS-Balanced-Q4_K_M</td>
<td>16.80GB</td>
<td>BF16 1.19GB</td>
<td>0.25GB</td>
</tr>
<tr>
<td><code>31b/</code></td>
<td>Gemma4-31B-<strong>QAT</strong>-Uncensored-HauhauCS-Balanced-Q4_K_M</td>
<td>18.69GB</td>
<td>BF16 1.20GB</td>
<td>0.28GB</td>
</tr>
</tbody>
</table>
<ul>
<li><strong>13 個 GGUF 全部驗證通過</strong>：magic <code>GGUF</code>、<code>general.name</code> 全部帶 <code>Uncensored</code>、<code>arch=gemma4</code>（mmproj 係 <code>arch=clip</code>，MTP draft 係 <code>arch=gemma4-assistant</code>），大小同 HF 清單逐個對得上</li>
<li>總約 <strong>57GB</strong></li>
<li>注意 12B／26B／31B 係 <strong>QAT</strong>（量化感知訓練）+ 有 MTP draft；E2B／E4B 係 <strong>Aggressive</strong> 量化，冇 MTP</li>
</ul>
<h2>三、Prefill 實測（pp，t/s，越大越好）</h2>
<p dir="auto"><code>llama-bench -ngl 99 -r 1</code>，prompt 長度 8K / 32K / 64K：</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>模型</th>
<th>引擎</th>
<th>8K</th>
<th>32K</th>
<th>64K</th>
</tr>
</thead>
<tbody>
<tr>
<td>E2B (4.6B)</td>
<td><strong>HIP</strong></td>
<td><strong>8126.18</strong></td>
<td><strong>5090.63</strong></td>
<td><strong>3324.41</strong></td>
</tr>
<tr>
<td>E2B</td>
<td>Vulkan</td>
<td>7579.88</td>
<td>4616.90</td>
<td>2904.21</td>
</tr>
<tr>
<td>E4B</td>
<td><strong>HIP</strong></td>
<td><strong>2996.67</strong></td>
<td><strong>2249.60</strong></td>
<td><strong>1671.93</strong></td>
</tr>
<tr>
<td>E4B</td>
<td>Vulkan</td>
<td>2942.60</td>
<td>2170.33</td>
<td>1575.45</td>
</tr>
<tr>
<td>12B (dense)</td>
<td><strong>HIP</strong></td>
<td><strong>790.39</strong></td>
<td><strong>585.41</strong></td>
<td><strong>447.54</strong></td>
</tr>
<tr>
<td>12B</td>
<td>Vulkan</td>
<td>710.88</td>
<td>531.59</td>
<td>404.64</td>
</tr>
<tr>
<td>26B A4B (MoE)</td>
<td><strong>HIP</strong></td>
<td><strong>1456.09</strong></td>
<td><strong>1012.44</strong></td>
<td><strong>731.75</strong></td>
</tr>
<tr>
<td>26B A4B</td>
<td>Vulkan</td>
<td>1288.35</td>
<td>941.23</td>
<td>695.19</td>
</tr>
<tr>
<td>31B (dense)</td>
<td><strong>HIP</strong></td>
<td><strong>306.42</strong></td>
<td><strong>217.33</strong></td>
<td><strong>157.22</strong></td>
</tr>
<tr>
<td>31B</td>
<td>Vulkan</td>
<td>265.72</td>
<td>205.83</td>
<td>153.28</td>
</tr>
</tbody>
</table>
<p dir="auto"><strong>HIP 喺 prefill 全部贏晒</strong>，冇例外。</p>
<h2>四、Decode 實測（tg，t/s）</h2>
<p dir="auto">生成 128 tokens：</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>模型</th>
<th>HIP</th>
<th>Vulkan</th>
<th>邊個快</th>
</tr>
</thead>
<tbody>
<tr>
<td>E2B</td>
<td>96.87</td>
<td><strong>111.26</strong></td>
<td>Vulkan <strong>+15%</strong></td>
</tr>
<tr>
<td>E4B</td>
<td>57.37</td>
<td><strong>61.11</strong></td>
<td>Vulkan +6%</td>
</tr>
<tr>
<td>12B</td>
<td>26.80</td>
<td><strong>27.47</strong></td>
<td>Vulkan +2%</td>
</tr>
<tr>
<td>26B A4B</td>
<td>58.02</td>
<td><strong>64.18</strong></td>
<td>Vulkan <strong>+11%</strong></td>
</tr>
<tr>
<td>31B</td>
<td>9.92</td>
<td><strong>11.40</strong></td>
<td>Vulkan <strong>+15%</strong></td>
</tr>
</tbody>
</table>
<p dir="auto"><strong>Vulkan 喺 decode 亦全部贏晒。</strong> 兩邊完全分裂 —— 呢個係本次測試最乾淨嘅一個結論。</p>
<h2>五、六個結論</h2>
<ol>
<li><strong>HIP 贏 prefill，Vulkan 贏 decode，全面分裂。</strong> 8K 時 prefill 差距 2–6%，長 context 反而收窄。所以：<strong>長 prompt／RAG 用 HIP，長輸出／chat 用 Vulkan。</strong></li>
<li><strong>長 context 有實打實嘅代價。</strong> 所有模型 8K → 64K，pp 吞吐跌 <strong>55–60%</strong>（31B：306 → 157；E2B：8126 → 3324）。呢個係 attention 嘅平方成本，唔關引擎事。</li>
<li><strong>MoE 明顯抵玩。</strong> 26B A4B 只有 4B active，pp 比 12B dense 快 <strong>1.8×</strong>、tg 快 <strong>2.2×</strong>（58 vs 26.8），但質素係 26B 級 → <strong>26B A4B 係呢部機嘅甜點</strong>。</li>
<li><strong>31B dense 唔適合互動。</strong> decode 得 9.9–11.4 t/s，即係打字機速度，除非只做 batch 處理。</li>
<li><strong>E2B／E4B 快得誇張。</strong> E4B decode 57–61 t/s 同 26B A4B 同級，但只食 5.3GB 記憶體。要極速小模型佢哋先係首選。</li>
<li><strong>統一記憶體唔等於免成本。</strong> 124GB 令你永遠唔使驚 VRAM，但 attention 平方成本、記憶體頻寬上限照樣存在。</li>
</ol>
<h2>六、其他三個引擎：一個慢、一個拒絕、一個食唔到</h2>
<h3>hipEngine 0.8.3 —— 載到，但慢 7 倍</h3>
<p dir="auto">hipEngine 聲稱只測過 Gemma 4 26B-A4B，但實測 <strong>12B / E2B / E4B / 31B 都載得入</strong>。問題係速度：</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Context</th>
<th>prefill</th>
<th>decode（差分量）</th>
</tr>
</thead>
<tbody>
<tr>
<td>6,945</td>
<td>194.8 t/s</td>
<td>20.2 t/s</td>
</tr>
<tr>
<td>27,681</td>
<td>192.6 t/s</td>
<td>31.3 t/s</td>
</tr>
<tr>
<td>53,196</td>
<td>185.9 t/s</td>
<td>10.7 t/s</td>
</tr>
<tr>
<td>短 prompt（~20 tokens）</td>
<td>—</td>
<td>38.3 t/s</td>
</tr>
</tbody>
</table>
<p dir="auto">對比同機 llama.cpp HIP 嘅 <strong>1329 t/s prefill / 50.6 t/s decode</strong>（26B Q6_K），hipEngine prefill <strong>慢約 7 倍</strong>，decode 亦明顯低。原因：hipEngine 嘅 Gemma plugin 官方只測 <code>UD-Q4_K_XL</code>，Q6_K 路徑未必有同等優化；且 BF16 KV、無 MTP 實測。</p>
<h3>Strata 0.2.18 —— 直接拒絕</h3>
<pre><code>strata models import  →  "this is not a model size Strata knows"
strata launch         →  unrecognized_or_unsupported_model_variant
</code></pre>
<p dir="auto">Strata <strong>完全唔支援 Gemma 4</strong>，佢只認 Qwen Flash-Next / Qwen3.6 系列。所以「用 Strata 跑 Gemma 4 無審查」呢條路根本唔存在。</p>
<h3>vLLM 0.34.0 —— 食唔到 GGUF</h3>
<p dir="auto"><code>vllm-openai-rocm:v0.34.0-rocm100</code> 嘅 quantization backend 清單：</p>
<pre><code>auto_awq, auto_gptq, awq_triton, base_config, compressed_tensors, experts_int8,
fbgemm_fp8, fp8, humming, inc, input_hadamard, input_quant_fp8, kv_cache,
modelopt, modelopt_block_quant, moe_wna16, mxfp4, online, quark, torchao,
turboquant, w4afp8
</code></pre>
<p dir="auto">→ <strong>完全冇 <code>gguf</code> / <code>ggml</code></strong>。呢批無審查 GGUF 用唔到 vLLM。</p>
<p dir="auto">要用 vLLM 就必須另外落 <strong>safetensors</strong> 版（例：<code>TrevorJS/gemma-4-26B-A4B-it-uncensored</code> 51.6GB）再自己 quant。不過 <code>vllm.model_executor.models.gemma4</code> 模組本身存在，即係話 safetensors 版係支援 gemma4 架構嘅 —— 只係 GGUF 格式入唔到。</p>
<h2>七、hipEngine 一個幾隱蔽嘅坑：Q5_0</h2>
<p dir="auto">想用 hipEngine 要特別注意：HauhauCS 26B-A4B QAT 嘅 <code>Q4_K_M</code> 檔入面，其實混咗 <strong>32 個 Q5_0 tensor</strong>（主要喺 <code>ffn_down</code>）。</p>
<p dir="auto">而 hipEngine 嘅 resident layout 只支援 <code>Q4_K, Q5_1, Q5_K, Q6_K, Q8_0</code> —— <strong>冇 Q5_0</strong>。實測錯誤：</p>
<pre><code>layers.3.ffn_down: blk.3.ffn_down.weight has ggml type Q5_0,
which this loader has no resident layout for
</code></pre>
<p dir="auto">即係一個名叫 <code>Q4_K_M</code> 嘅檔，因為混咗 32 個 Q5_0 就 load 唔到。解法：改用純 <code>Q4_K</code> / <code>Q6_K</code> / <code>Q8_0</code> 檔（例如 <code>llmfan46</code> 嘅 heretic 版 Q6_K 就 load 到）。</p>
<p dir="auto">另外 hipEngine 首次啟動會 <strong>JIT 編譯 kernel（約 90 秒）</strong>，第二次先快；佢 <code>/v1/models</code> 仲會將 Q6_K 檔錯標成 <code>quant: gguf_q4_k_m</code>（標籤錯誤，唔影響載入）。</p>
<h2>八、點揀（一句話版）</h2>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>你要咩</th>
<th>用咩</th>
</tr>
</thead>
<tbody>
<tr>
<td>Gemma 4 無審查 + 速度</td>
<td><strong>llama.cpp v1.0</strong>（唯一實用選擇）</td>
</tr>
<tr>
<td>長 prompt / RAG</td>
<td>llama.cpp <strong>HIP</strong></td>
</tr>
<tr>
<td>長輸出 / chat 順暢</td>
<td>llama.cpp <strong>Vulkan</strong></td>
</tr>
<tr>
<td>本機主力</td>
<td><strong>26B A4B</strong>（MoE，質素／速度最平衡）</td>
</tr>
<tr>
<td>極速小模型</td>
<td><strong>E4B</strong>（5.3GB，decode 61 t/s）</td>
</tr>
<tr>
<td>要 vision</td>
<td>全部都有 mmproj，照用</td>
</tr>
<tr>
<td>想跑 vLLM</td>
<td>要另外落 safetensors 自己 quant</td>
</tr>
<tr>
<td>想用 Strata</td>
<td>唔得，佢只認 Qwen</td>
</tr>
</tbody>
</table>
<h2>九、測試方法（俾人覆核）</h2>
<ul>
<li>工具：<code>llama-bench</code>，<code>-ngl 99 -r 1</code>（每個測試只跑一次）</li>
<li>Prompt：<code>-p 8192, 32768, 65536</code>；生成 <code>-n 128</code></li>
<li>全部模型為 HauhauCS 無審查 Q4（E2B／E4B 為 Aggressive，12B／26B／31B 為 QAT-Balanced）</li>
<li>同一部機、同一個 ROCm 10.2 環境、同日測完</li>
<li>hipEngine 嘅 decode 因為 SSE <strong>唔係逐 token 推送</strong>，所以用 paired <code>max_tokens=1/128</code> 差分計，唔係直接讀 streaming</li>
</ul>
<hr />
<p dir="auto"><em>實測日期：2026-11-22（HKT）。有邊個 size 想我補測其他量化（Q6_K／Q8_0）或者更長 context（128K），可以留言。</em></p>
]]></description><link>https://lcz.me/topic/3273</link><generator>RSS for Node</generator><lastBuildDate>Sun, 29 Nov 2026 03:12:03 GMT</lastBuildDate><atom:link href="https://lcz.me/topic/3273.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 22 Nov 2026 12:59:44 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to 【實測】Ryzen AI MAX+ 395 跑 Gemma 4 全家桶無審查版：E2B / E4B / 12B / 26B-A4B / 31B × HIP / Vulkan / hipEngine / Strata / vLLM 完整對照 on Mon, 23 Nov 2026 03:07:46 GMT]]></title><description><![CDATA[<p dir="auto">下次叫AI整理做書面語，平時習慣用粤语同AI對話，忘記了</p>
]]></description><link>https://lcz.me/post/35395</link><guid isPermaLink="true">https://lcz.me/post/35395</guid><dc:creator><![CDATA[Mountain HO]]></dc:creator><pubDate>Mon, 23 Nov 2026 03:07:46 GMT</pubDate></item><item><title><![CDATA[Reply to 【實測】Ryzen AI MAX+ 395 跑 Gemma 4 全家桶無審查版：E2B / E4B / 12B / 26B-A4B / 31B × HIP / Vulkan / hipEngine / Strata / vLLM 完整對照 on Sun, 22 Nov 2026 21:33:58 GMT]]></title><description><![CDATA[<p dir="auto">每个字都是中文，怎么连一起有点难懂呀</p>
]]></description><link>https://lcz.me/post/35326</link><guid isPermaLink="true">https://lcz.me/post/35326</guid><dc:creator><![CDATA[nqs]]></dc:creator><pubDate>Sun, 22 Nov 2026 21:33:58 GMT</pubDate></item><item><title><![CDATA[Reply to 【實測】Ryzen AI MAX+ 395 跑 Gemma 4 全家桶無審查版：E2B / E4B / 12B / 26B-A4B / 31B × HIP / Vulkan / hipEngine / Strata / vLLM 完整對照 on Sun, 22 Nov 2026 17:25:28 GMT]]></title><description><![CDATA[<p dir="auto">你这粤语，很多人看不懂。</p>
]]></description><link>https://lcz.me/post/35320</link><guid isPermaLink="true">https://lcz.me/post/35320</guid><dc:creator><![CDATA[Mj Wang]]></dc:creator><pubDate>Sun, 22 Nov 2026 17:25:28 GMT</pubDate></item></channel></rss>