<?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[尝鲜但不怎么成功 ：7900 XTX + 128GB 跑 Hy4-flash-Q3_K]]></title><description><![CDATA[<p dir="auto"><strong>结论：在我这套硬件上，Hy4-flash-Q3_K 的速度对日常 DSH / 长上下文任务不可用。最终短测 decode 只有 16.17 token/s，实际使用后已停用。感觉模型文件不大， 但没有像strata那样的优化。 另外再说说这个模型 （对比QFN Q4KM）给我感觉： 啰嗦，写完代码还给我总结一大段， 再加上本来就慢就更让人郁闷。 遵循rag/rule的能力差一些， 会自己创造一些代码， 但倒是准确性还不错， 我觉得是优点也是缺点： 模板有的内容让它写效率比较低， 处理模板没有的信息应该比QFN Q4KM 强。 等等strata有没有更新吧</strong></p>
<h2>环境与模型</h2>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>项目</th>
<th>配置</th>
</tr>
</thead>
<tbody>
<tr>
<td>CPU / RAM</td>
<td>Ryzen 9 5900XT，16 核 32 线程；128GB RAM，无 swap</td>
</tr>
<tr>
<td>GPU</td>
<td>Sapphire PULSE RX 7900 XTX 24GB，gfx1100，PCIe 4.0 ×16</td>
</tr>
<tr>
<td>存储</td>
<td>XG7000 1TB NVMe，ZFS；ARC 自动管理</td>
</tr>
<tr>
<td>系统</td>
<td>TrueNAS 25.10.7，Linux 6.12.105-production+truenas</td>
</tr>
<tr>
<td>驱动 / HIP</td>
<td>amdgpu 7.1.9.31600000；沿用 <code>/opt/rocm</code>，<code>hipconfig --version</code> 为 7.16.26385-0000000</td>
</tr>
<tr>
<td>引擎</td>
<td>llama.cpp Hy4 + 本地 HIP 补丁</td>
</tr>
<tr>
<td>模型</td>
<td><a href="https://huggingface.co/AngelSlim/Hy4-flash-GGUF/tree/ecd803c859a36bdf9f3614dbd7c548165df74c30" rel="nofollow ugc">AngelSlim/Hy4-flash-GGUF</a>，Q3_K，两分片共 <strong>144.70GiB</strong></td>
</tr>
<tr>
<td>文件布局</td>
<td>主权重 85.69GiB，1MiB ZFS 块；FP8 Engram 59.01GiB，16KiB ZFS 块</td>
</tr>
</tbody>
</table>
<h2>最终代码修改与构建</h2>
<ul>
<li><strong>稀疏 MLA attention</strong>：为 Hy4 的 576/512 维路径启用 gfx1100 WMMA 实现。</li>
<li><strong>16-head indexer</strong>：补充 HIP FP32 路径，保留 FP32 pooled keys。</li>
<li><strong>CPU 原生线程池</strong>：关闭 OpenMP，使用 ggml 原生线程池。</li>
</ul>
<p dir="auto">构建关键项：</p>
<pre><code class="language-sh">-DCMAKE_BUILD_TYPE=Release -DGGML_HIP=ON -DGPU_TARGETS=gfx1100 \
-DCMAKE_HIP_ARCHITECTURES=gfx1100 -DGGML_NATIVE=ON -DGGML_OPENMP=OFF
</code></pre>
<h2>最终运行设置</h2>
<p dir="auto">主权重 RAM 加载，Engram 按需 mmap；<strong>KV 和索引缓存全部放显存，F16，合计约 3.30GiB</strong>。专家显存缓存 <strong>10GiB</strong>，MTP 关闭。没有启用 <code>--no-kv-offload</code>。</p>
<pre><code class="language-sh">export LD_LIBRARY_PATH=/opt/rocm/lib
export HIP_PLATFORM=amd
export HSA_OVERRIDE_GFX_VERSION=11.0.0
export GPU_MAX_HW_QUEUES=6
export GGML_HIP_SPARSE_MLA=1
export GGML_HIP_HY4_INDEXER=1

llama-server \
  -m /models/Hy4-flash-Q3_K/Hy4-flash-Q3_K-00001-of-00002.gguf \
  --alias Hy4-flash-Q3_K --host 127.0.0.1 --port 18177 \
  --fit off --n-gpu-layers all --cpu-moe \
  --load-mode none --lazy-mode on \
  --ctx-size 150000 --parallel 1 \
  --threads 12 --threads-batch 16 \
  --batch-size 2048 --ubatch-size 2048 \
  --flash-attn on --cache-type-k f16 --cache-type-v f16 \
  --moe-cache-mib 10240 --moe-cache-cpu-share 0.55 \
  --poll 50 --no-warmup --no-context-shift --jinja \
  --reasoning-format deepseek -lv 4
</code></pre>
<p dir="auto"><code>0.55</code> 指专家缓存未命中部分的 CPU 分担比例。主权重放 RAM 不代表整个模型文件常驻 RAM，Engram 仍按需读盘。</p>
<p dir="auto">DSH 设置：上下文 <strong>150000</strong>，最大输出 <strong>32768</strong>；关闭思考使用模板参数 <code>reasoning_effort=no_think</code>。后端内部将上下文对齐到 150016 tokens。</p>
<h2>最终实测</h2>
<p dir="auto">固定输入，关闭思考和前缀缓存，<code>temperature=0</code>、<code>top_k=1</code>、<code>top_p=1</code>、<code>seed=42</code>，固定输出长度。</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>实际输入 / 输出</th>
<th style="text-align:right">Prefill</th>
<th style="text-align:right">Decode</th>
<th style="text-align:right">首 token 等待</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>2048 / 256 tokens</strong></td>
<td style="text-align:right"><strong>370.47 token/s</strong></td>
<td style="text-align:right"><strong>16.17 token/s</strong></td>
<td style="text-align:right"><strong>5.53 秒</strong></td>
</tr>
</tbody>
</table>
<p dir="auto">这是单次 2K 输入成绩；150k 是配置容量，并非 150k 输入测速结果。以上仅记录这一套最终配置。</p>
]]></description><link>https://lcz.me/topic/3193</link><generator>RSS for Node</generator><lastBuildDate>Sun, 29 Nov 2026 04:08:16 GMT</lastBuildDate><atom:link href="https://lcz.me/topic/3193.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 19 Nov 2026 02:46:26 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to 尝鲜但不怎么成功 ：7900 XTX + 128GB 跑 Hy4-flash-Q3_K on Sun, 22 Nov 2026 04:19:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/liu-jy" aria-label="Profile: LIU-JY">@<bdi>LIU-JY</bdi></a> 多谢， 哈哈， 赶紧测试上。</p>
]]></description><link>https://lcz.me/post/35147</link><guid isPermaLink="true">https://lcz.me/post/35147</guid><dc:creator><![CDATA[J Z 0]]></dc:creator><pubDate>Sun, 22 Nov 2026 04:19:04 GMT</pubDate></item><item><title><![CDATA[Reply to 尝鲜但不怎么成功 ：7900 XTX + 128GB 跑 Hy4-flash-Q3_K on Sun, 22 Nov 2026 03:11:18 GMT]]></title><description><![CDATA[<p dir="auto">今天看到strata更新支持HY Flash了</p>
]]></description><link>https://lcz.me/post/35143</link><guid isPermaLink="true">https://lcz.me/post/35143</guid><dc:creator><![CDATA[LIU JY]]></dc:creator><pubDate>Sun, 22 Nov 2026 03:11:18 GMT</pubDate></item></channel></rss>