<?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[gufo對決Halogen 實測Qwen3.8-Flash-Next (AMD AI Max+395)]]></title><description><![CDATA[<h1>gufo 跑 Qwen3.8-Flash-Next 完整設定與實測</h1>
<p dir="auto">halogen 的對家來了：開源引擎gufo、HF 公開 GGUF 104G</p>
<blockquote>
<p dir="auto">實測環境：AMD Strix Halo（Ryzen AI MAX+ 395，Radeon 8060S），2026-10。<br />
目標讀者：同架構想抄作業的人。照貼可跑。<br />
姊妹篇：<br />
<a href="https://lcz.me/topic/1659">halogen-flash-server 跑 Qwen3.8-Flash-Next 完整設定與實測</a><br />
<a href="https://lcz.me/topic/1991">新的推論引擎gufo 速度可比Halogen 還開源</a></p>
</blockquote>
<hr />
<p dir="auto">在reddit的strixhalo社群中，最近很紅的開源框架gufo出來幾天了，很快的版本來到v0.4.0，<br />
於此同時halogen 也很快更新到0.16.0版，這兩個都標榜Strix Halo專機設計的推論框架，今天同場競技吧~</p>
<h2>1. 案例系統</h2>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>項目</th>
<th>值</th>
</tr>
</thead>
<tbody>
<tr>
<td>APU</td>
<td>AMD Strix Halo <code>gfx1151</code>，32 thread</td>
</tr>
<tr>
<td>統一記憶體</td>
<td>128 GB</td>
</tr>
<tr>
<td>資料碟</td>
<td>2 TB NVMe Gen4（模型＋cache 全放這）</td>
</tr>
<tr>
<td>OS</td>
<td>Nobara 44（Fedora 系）</td>
</tr>
<tr>
<td>ROCm</td>
<td>host 7.2.4；gufo 診斷自報 pinned 7.2.3（相容跑得動，<code>gufo diagnose</code> 全綠）</td>
</tr>
<tr>
<td>Engine</td>
<td><code>gufo-org/gufo</code> <strong>v0.4.0</strong>（commit <code>d7cf7ee</code>），原始碼 build，單行程 <code>:8741</code></td>
</tr>
<tr>
<td>模型</td>
<td>Qwen3.8 Flash Next/Unsloth <code>UD-Q4_K_XL</code> 4 shards <strong>103.7 GiB</strong> ＋ MTP sidecar（shared Q8_0）＋ mmproj（BF16）</td>
</tr>
</tbody>
</table>
<hr />
<h2>2. 特別項目與特殊量化模型介紹</h2>
<h3>2.1 gufo 是什麼（開源、通用 ROCm 引擎，不是私有 checkpoint）</h3>
<p dir="auto">gufo-org 開源推論引擎（Apache/MIT 類，README 有 docs 全套），<strong>v0.4.0</strong>。跟 halogen 最大的不同：它是<strong>通用引擎</strong>，吃 HF 公開 GGUF，不綁自家量化。重點能力：</p>
<ul>
<li><strong>serve llm</strong>：<code>gufo serve llm --model ... --served-model-name ... -i -p</code>，OpenAI 相容（<code>/v1/chat/completions</code>、<code>/v1/models</code>、tool calling）</li>
<li><strong>原生關思考</strong>：<code>--think off</code>（server log 自報 <code>thinking=off</code>），不用 per-request flag</li>
<li><strong>adaptive MTP 投機</strong>：<code>--speculative mtp --mtp-model &lt;sidecar&gt;</code>，實測 <code>draft_limit=7</code>；另有 <code>off</code>／<code>dspark</code>／<code>dflash2</code> 模式</li>
<li><strong>ContinuationCache 兩層</strong>：記憶體層永遠開（<code>snapshot_cache_configured entries=128 capacity≈16.7GiB</code>），disk 層 <code>--cache-disk</code> 選配；存的是「prompt＋回覆」整段快照，<strong>只能整段當精確前綴續用</strong>（見 §3.4，測錯方法會誤判沒 cache）</li>
<li><strong>原生 JSON 約束</strong>：<code>response_format: json_object</code> 走引擎內建約束（會扣 ~26% 速度，見 §4.1）</li>
<li><strong>vision</strong>：掛 <code>--mmproj</code> 即可（<code>/v1/models</code> 顯示 text+image）</li>
<li>262144 ctx；<code>max_connections=16</code>、<code>max_body=8MB</code></li>
</ul>
<h3>2.2 模型：HF 公開 GGUF，不是私有 checkpoint</h3>
<p dir="auto">Unsloth <code>Qwen3.8-Flash-Next-UD-Q4_K_XL</code>，4 shards 共 <strong>103.7 GiB</strong>（<code>du</code> 104G）＋ <code>MTP/mtp-...-shared-Q8_0.gguf</code> ＋ <code>mmproj-BF16.gguf</code>。跟 halogen 的 5.53bpw 專屬算法（118G）相比：<strong>任何人在 HF 隨手可抓、可驗、可換 quant</strong>——這是開源生態 vs 專屬 checkpoint 的根本差異。</p>
<h3>2.3 跟 llama.cpp 系／halogen 的差異</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>維度</th>
<th>gufo</th>
<th>halogen flash</th>
<th>llama.cpp</th>
</tr>
</thead>
<tbody>
<tr>
<td>模型來源</td>
<td>HF 公開 GGUF（Unsloth）</td>
<td>專屬 checkpoint（5.53bpw）</td>
<td>HF 公開 GGUF</td>
</tr>
<tr>
<td>投機解碼</td>
<td>adaptive MTP（官方質量實證）</td>
<td>serial greedy＋MTP＋51B n-gram 表</td>
<td>MTMD／DFlash 等</td>
</tr>
<tr>
<td><strong>prefix cache 機制</strong></td>
<td>ContinuationCache 記憶體層永開：live frontier 原地續用＋快照「整段精確前綴」才續用（128 條、16.7GiB 預算）；不能修剪，短 prompt 打長快照天然 miss</td>
<td>slot KV pool 跨請求複用（實測：同源前綴命中、同 prompt ×9.7）；pool 本身就是 prefix cache 容器</td>
<td><strong>三層</strong>：① RAM prompt cache（<code>--cache-ram 8192</code>＋<code>--cache-idle-slots</code>，跨請求跨 session）② KV shifting（<code>--cache-reuse 1024</code>，<strong>非前綴</strong>的重複 chunk 也 shift 重用）③ slot 接續</td>
</tr>
<tr>
<td><strong>SSD 落盤機制</strong></td>
<td><code>--cache-disk</code> 選配 disk 層：快照跨重啟留存、還能「學對話邊界」（共享前綴的不同對話也能切開；本測 <code>disk_cache=off</code> 未開）</td>
<td><code>HALOGEN_CACHE_DIR=/cache</code>（unit 持久掛 <code>/mnt/nvme-data/halogen-cache</code>、health 有 <code>cache_counters</code>）；n-gram 47G 模型表本體放 SSD 走 page cache；<strong>KV 是否落盤待驗</strong></td>
<td><code>--slot-save-path DIR</code>＋<code>/slots/{id}?action=save\|restore</code>：跨重啟、跨模型切換保留 KV（本機帶上游 #26676 修補丁，wrapper 自動存還）</td>
</tr>
<tr>
<td><strong>多會話機制</strong></td>
<td><code>max_connections=16</code>，per-session 快照各自續用；官方 C1–C8 實測（8 用者 MTP 合計 106–157 tok/s 疊加）</td>
<td><strong>4 slot</strong> 共用 524288 positions 預算池（<code>HALOGEN_KV_POOL_FIT=1</code> 自適應縮水並印決定）</td>
<td>slots（<code>--parallel N</code>）各持 KV；多模型走 router 動態互斥（<code>models-preset</code>）＋wrapper 自動存還</td>
</tr>
<tr>
<td><strong>同捆模型</strong></td>
<td>同引擎 <strong>7 模型族</strong>：Flash-Next、27B、DeepSeek-V4-Flash、<strong>MiniMax-H3（文字進影音出）</strong>、<strong>Qwen3-ASR</strong>、<strong>Qwen3-TTS</strong>、<strong>Qwen-Image-2.1</strong>；但一行程一模型，切換＝重啟</td>
<td><strong>同端口同時</strong>：LLM＋NPU 小模（0.16.0版後新增decider-0.8b、embedding-0.6b、reranker-0.6b）</td>
<td>多模型 <img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/2705.png?v=fe25256ab4a" class="not-responsive emoji emoji-android emoji--white_check_mark" style="height:1.4em;width:auto;vertical-align:middle" title="✅" alt="✅" /></td>
</tr>
<tr>
<td>關思考</td>
<td><code>--think off</code> 原生</td>
<td>env 原生</td>
<td>per-request flag</td>
</tr>
<tr>
<td>部署</td>
<td>原始碼 build＋手動參數</td>
<td>容器映像＋自動下載</td>
<td>preset ini＋systemd</td>
</tr>
</tbody>
</table>
<blockquote>
<p dir="auto">同捆的差別在<strong>形態</strong>：halogen 是「一個行程同時端出多種能力」（文字＋NPU 小模，適合 agent 直接調 embedding/rerank）；gufo 是「同一引擎吃得下 7 個模型族」（多模態全家餐，但一次一個，切換要重啟）；llama.cpp 靠 router 層拼裝。</p>
</blockquote>
<hr />
<h2>3. gufo配置流程</h2>
<h3>3.1 建置＋診斷</h3>
<pre><code class="language-bash">cd ~/git/gufo &amp;&amp; # 照官方 README build（BUILD_EXIT=0）
# 診斷必須帶 ROCm lib 路徑，不然找不到 libhipblas.so.3：
LD_LIBRARY_PATH=/opt/rocm/lib ./build/release/gufo diagnose   # 全綠
</code></pre>
<h3>3.2 啟動（正式參數：MTP 開、思考關、全量 ctx）</h3>
<pre><code class="language-bash">export LD_LIBRARY_PATH=/opt/rocm/lib
./build/release/gufo serve llm \
  --model /mnt/nvme-data/gufo-models/qwen3.8-flash-next/UD-Q4_K_XL/Qwen3.8-Flash-Next-UD-Q4_K_XL-00001-of-00004.gguf \
  --mmproj /mnt/nvme-data/gufo-models/qwen3.8-flash-next/mmproj-BF16.gguf \
  --mtp-model /mnt/nvme-data/gufo-models/qwen3.8-flash-next/MTP/mtp-Qwen3.8-Flash-Next-shared-Q8_0.gguf \
  --speculative mtp --think off \
  --served-model-name gufo-qwen3.8-flash-next -i 0.0.0.0 -p 8741
</code></pre>
<p dir="auto">驗證：<code>curl :8741/health</code> → <code>{"status":"ok"}</code>；log 要看到 <code>event=load_completed ... speculative=mtp draft_limit=7</code> 與 <code>listening address=http://0.0.0.0:8741</code>。</p>
<p dir="auto"><strong>載入時間</strong>：頁快取熱＋RAM 乾淨只要 <strong>13 秒</strong>（官方 C1 基準 15.45s，llama.cpp 117.8s）；第一次冷載（daily 服務還在跑）675 秒 — 差在頁快取與 swap 壓力，不是引擎慢。</p>
<h3>3.3 GTT 設定（整份文件的關鍵，不修直接 OOM）</h3>
<p dir="auto"><strong>翻車現場</strong>：104G 模型載到一半 <code>hipMalloc failed for blk.38.ffn_up_exps.weight (471859200 bytes)</code> — AMD 內建 carve 512MiB GTT 上限不夠 MoE 專家分塊。<code>HSA_FORCE_FINE_GRAIN_PCI=1</code> 無效。</p>
<p dir="auto"><strong>修法（持久化，重開機有效）</strong>：</p>
<pre><code class="language-bash"># /etc/modprobe.d/ttm-limit.conf
options ttm pages_limit=31457280
options ttm page_pool_size=31457280
# 31457280 頁 × 4KiB = 120 GiB GTT；並同步進 BLS 與 /etc/default/grub：
# ttm.pages_limit=31457280 ttm.page_pool_size=31457280（舊參數 amdgpu.gttsize 刪掉）
</code></pre>
<p dir="auto">重開驗證：dmesg 出 <code>122880M of GTT memory ready</code>，64 GiB <code>hipMalloc</code> 成功。</p>
<h3>3.4 ContinuationCache 語義（測錯會誤判沒 cache）</h3>
<p dir="auto">gufo 快照 = <strong>prompt＋回覆的整段狀態</strong>（Flash-Next 還含 GDN recurrent/indexer/sampling 狀態），續用條件是「快照 tokens 是新 prompt 的精確前綴」。所以：</p>
<ul>
<li><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/274c.png?v=fe25256ab4a" class="not-responsive emoji emoji-android emoji--x" style="height:1.4em;width:auto;vertical-align:middle" title="❌" alt="❌" /> 「同一個 prompt 打兩次」→ 第二次比快照短，<strong>天然 miss</strong>（我第一次就測出滿盤 miss，文件讀完才懂是方法錯）</li>
<li><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/2705.png?v=fe25256ab4a" class="not-responsive emoji emoji-android emoji--white_check_mark" style="height:1.4em;width:auto;vertical-align:middle" title="✅" alt="✅" /> 「對話式第二輪」→ turn1 prompt＋回覆正是 turn2 的前綴 → hit</li>
</ul>
<p dir="auto">記憶體層永遠開；disk 層（<code>--cache-disk</code>）測試未開。</p>
<h3>3.5 地雷（全踩過）</h3>
<ol>
<li><code>LD_LIBRARY_PATH=/opt/rocm/lib</code> 少了就死在 <code>libhipblas.so.3</code>。</li>
<li>GTT 沒修 → <code>blk.38.ffn_up_exps</code> hipMalloc 失敗（§3.3）。</li>
<li>screen 手動跑重開機即失；正式化要 systemd（含 <code>LD_LIBRARY_PATH</code>）。</li>
<li>prefill 用「同源文字取前綴」測，大點位可能被前綴快取污染（§4.2 有雷標記）。</li>
</ol>
<hr />
<h2>4. 實測速度（對標 halogen flash-next <strong>0.16.0</strong>，同機同題，2026-10-02 更新後重測）</h2>
<blockquote>
<p dir="auto">llama.cpp就不測了、沒有競爭力，以下都是開mtp測試</p>
</blockquote>
<h3>4.1 Decode</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>口徑</th>
<th>gufo</th>
<th>halogen 0.16.0 同題</th>
<th>備註</th>
</tr>
</thead>
<tbody>
<tr>
<td>temp 0.4、250 out、<strong>MTP 開</strong> ×3</td>
<td>47.5／48.3／48.2 → <strong>48.0</strong></td>
<td><strong>50.4</strong></td>
<td>掛 MTP 也只到 95%；另注意 halogen 0.16.0 同題改自然停（ct 124–150，finish=stop），舊版是砍滿 250</td>
</tr>
<tr>
<td><strong>greedy tg128</strong>（官方口徑）</td>
<td>fib <strong>49.3</strong>、coding <strong>53.1</strong>、json <strong>50.0</strong>、repetitive <strong>~74</strong></td>
<td>fib <strong>64.1</strong>、coding <strong>56.8</strong>、json <strong>60.8</strong>、repetitive <strong>78.2</strong></td>
<td><strong>halogen 全面領先</strong>（fib +30%；coding/json 首發冷，暖跑 63／68）</td>
</tr>
<tr>
<td>json 原生約束 <code>response_format</code></td>
<td>36.9 tok/s、<strong>JSON_VALID ✓</strong></td>
<td><strong>49.7</strong> tok/s、147 tok finish=stop、<strong>JSON_VALID ✓</strong></td>
<td>兩台約束稅都 ~25%，halogen 級距高一檔</td>
</tr>
</tbody>
</table>
<p dir="auto">官方 d0 基準對照：AR tg 25.87、MTP mixed 32.20、repetitive 59.30 — 兩台的 greedy 都高於官方 mixed；repetitive 上 gufo ~74、halogen 78.2 都贏官方 59.30。</p>
<h3>4.2 Prefill階層速度</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>prompt（actual）</th>
<th>gufo</th>
<th>halogen 0.16.0</th>
<th>差</th>
</tr>
</thead>
<tbody>
<tr>
<td>~1.5K</td>
<td>1020.9（1,539）</td>
<td><strong>1139.3</strong>（1,509）</td>
<td>halogen +12%</td>
</tr>
<tr>
<td>~3K</td>
<td>1162.8（3,042）</td>
<td><strong>1366.4</strong>（2,961）</td>
<td>halogen +18%</td>
</tr>
<tr>
<td>~6K</td>
<td>1345.9（6,077）</td>
<td><strong>1528.5</strong>（5,895）</td>
<td>halogen +14%</td>
</tr>
<tr>
<td>~12K</td>
<td>1391.3（12,135）</td>
<td><strong>1597.5</strong>（11,746）</td>
<td>halogen +15%</td>
</tr>
<tr>
<td>~18K</td>
<td>1400.1（18,135）</td>
<td><strong>1704.8</strong>（17,543，峰值）</td>
<td>halogen +22%</td>
</tr>
<tr>
<td>~38K</td>
<td>1393.3（38,474）</td>
<td><strong>1684.0</strong>（37,192）</td>
<td>halogen +21%</td>
</tr>
<tr>
<td>~104–107K</td>
<td>1303.4（107,248，82.3s）</td>
<td><strong>1594.8</strong>（103,632，65.0s）</td>
<td>halogen +22%，wall 快 17 秒</td>
</tr>
<tr>
<td>~185–191K</td>
<td>1268.3（191,307，150.8s）</td>
<td><strong>1518.7</strong>（184,837，121.7s）</td>
<td>halogen +20%，wall 快 29 秒</td>
</tr>
</tbody>
</table>
<p dir="auto"><strong>0.16.0 反轉</strong>：舊版 16K 只有 1219.5、198K 1320.9；新版全程 1139→1705→1519，<strong>每一階都贏 gufo 12–22%</strong>，185K 只花 122 秒。<br />
<img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/26a0.png?v=fe25256ab4a" class="not-responsive emoji emoji-android emoji--warning" style="height:1.4em;width:auto;vertical-align:middle" title="⚠" alt="⚠" />️ gufo MTP 開的階梯有同源前綴污染（103K 點噴 5051 tok/s），gufo 欄採非 MTP 乾淨版；MTP 版待重測。</p>
<h3>4.3 Cache（16K 級長 prompt）</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th></th>
<th>gufo</th>
<th>halogen 0.16.0</th>
<th>舊 halogen（0.6.1）</th>
</tr>
</thead>
<tbody>
<tr>
<td>對話式第二輪</td>
<td>冷 13.36s → 暖 <strong>0.29s（×46）</strong></td>
<td>冷 11.24s → 暖 <strong>0.398s（×28.3）</strong></td>
<td>—</td>
</tr>
<tr>
<td>相同 prompt 兩發</td>
<td>設計上天然 miss（快照含回覆）</td>
<td>冷 10.89s → 暖 <strong>1.118s（×9.7）</strong></td>
<td>冷 10.7s → 暖 0.2s（×50）</td>
</tr>
</tbody>
</table>
<p dir="auto">gufo 對話續用更快；halogen 兩種測法都命中，但 identical 暖端從 0.2s 退到 1.1s（restore 路徑變貴，語義待查）。快照語義見 §3.4。</p>
<h3>4.4 Agentic（自寫 ReAct harness t1–t8，工具全開）</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th></th>
<th>gufo</th>
<th>halogen 0.16.0（同 harness）</th>
</tr>
</thead>
<tbody>
<tr>
<td>分數</td>
<td><strong>8/8</strong>，迴圈 0、核彈 0</td>
<td><strong>8/8</strong>，迴圈 0、核彈 0</td>
</tr>
<tr>
<td>tps 範圍</td>
<td>27.7–37.4</td>
<td>21.7–43.2（t6 一發直拒 <code>rm -rf /</code>）</td>
</tr>
</tbody>
</table>
<p dir="auto">兩台全過；halogen 天花板高（43.2）、地板低（21.7），gufo 穩在 28–37。</p>
<hr />
<h2>5. 測速總表</h2>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>項目</th>
<th><strong>gufo flash-next（Q4 104G）</strong></th>
<th>halogen flash-next 0.16.0（179B 5.53bpw）</th>
</tr>
</thead>
<tbody>
<tr>
<td>decode greedy tg128</td>
<td>fib 49.3／coding 53.1／repetitive ~74</td>
<td><strong>fib 64.1／coding 56.8／repetitive 78.2</strong></td>
</tr>
<tr>
<td>json 約束（JSON_VALID 兩台 ✓）</td>
<td>36.9</td>
<td><strong>49.7</strong></td>
</tr>
<tr>
<td>prefill 16K 附近</td>
<td>1391.3</td>
<td><strong>1597.5</strong></td>
</tr>
<tr>
<td>prefill 111K 附近</td>
<td>1303.4（107K，82.3s）</td>
<td><strong>1594.8</strong>（104K，65.0s）</td>
</tr>
<tr>
<td>prefill 198K 附近</td>
<td>1268.3（191K，150.8s）</td>
<td><strong>1518.7</strong>（185K，121.7s）</td>
</tr>
<tr>
<td>cache 對話第二輪</td>
<td><strong>0.29s（×46）</strong></td>
<td>0.398s（×28.3）</td>
</tr>
<tr>
<td>cache 相同 prompt 兩發</td>
<td>設計上 miss</td>
<td>1.118s（×9.7）</td>
</tr>
<tr>
<td>agentic</td>
<td>8/8（27.7–37.4 tps）</td>
<td>8/8（21.7–43.2 tps）</td>
</tr>
<tr>
<td>載入</td>
<td><strong>13s 熱</strong></td>
<td>幾分鐘（68G 冷載）</td>
</tr>
<tr>
<td>ctx 上限</td>
<td>262144</td>
<td>262144</td>
</tr>
<tr>
<td>體重</td>
<td>104G 磁碟／官方 peak 85.55G</td>
<td>118G 磁碟／95G 常駐（0.6.1 时代數字，0.16.0 待重測）</td>
</tr>
<tr>
<td>vision</td>
<td><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/2705.png?v=fe25256ab4a" class="not-responsive emoji emoji-android emoji--white_check_mark" style="height:1.4em;width:auto;vertical-align:middle" title="✅" alt="✅" />（mmproj）</td>
<td><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/2705.png?v=fe25256ab4a" class="not-responsive emoji emoji-android emoji--white_check_mark" style="height:1.4em;width:auto;vertical-align:middle" title="✅" alt="✅" />（0.6＋）</td>
</tr>
<tr>
<td>多模型</td>
<td><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/274c.png?v=fe25256ab4a" class="not-responsive emoji emoji-android emoji--x" style="height:1.4em;width:auto;vertical-align:middle" title="❌" alt="❌" /></td>
<td><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/274c.png?v=fe25256ab4a" class="not-responsive emoji emoji-android emoji--x" style="height:1.4em;width:auto;vertical-align:middle" title="❌" alt="❌" /></td>
</tr>
<tr>
<td>模型來源</td>
<td>HF 公開 GGUF</td>
<td>專屬 checkpoint</td>
</tr>
</tbody>
</table>
<hr />
<h2>6. 結論：兩台專用推論引擎的優缺取捨</h2>
<p dir="auto"><strong>一句話（0.16.0 更新後）</strong>：halogen 今天這版把速度面全面拉開 — <strong>decode 與 prefill 每一項都贏 gufo 12–30%</strong>；gufo 剩下的牌是<strong>開源模型自由度、官方品質實證、對話 cache 續用、13 秒熱啟動</strong>。純比快，選 halogen；要折騰權力，選 gufo。</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>取捨軸</th>
<th>gufo（開源系）</th>
<th>halogen 0.16.0（專屬系）</th>
</tr>
</thead>
<tbody>
<tr>
<td>decode（兩口徑）</td>
<td>48.0 MTP／greedy 49.3–74</td>
<td><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/2705.png?v=fe25256ab4a" class="not-responsive emoji emoji-android emoji--white_check_mark" style="height:1.4em;width:auto;vertical-align:middle" title="✅" alt="✅" /> <strong>50.4／greedy 56.8–78.2，全面 +12~30%</strong></td>
</tr>
<tr>
<td>prefill（1.5K→185K）</td>
<td>1021→1400→1268</td>
<td><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/2705.png?v=fe25256ab4a" class="not-responsive emoji emoji-android emoji--white_check_mark" style="height:1.4em;width:auto;vertical-align:middle" title="✅" alt="✅" /> <strong>1139→1705→1519，每階 +12~22%、185K 只要 122s</strong></td>
</tr>
<tr>
<td>cache 對話第二輪</td>
<td><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/2705.png?v=fe25256ab4a" class="not-responsive emoji emoji-android emoji--white_check_mark" style="height:1.4em;width:auto;vertical-align:middle" title="✅" alt="✅" /> <strong>0.29s（×46）</strong></td>
<td>0.398s（×28.3）</td>
</tr>
<tr>
<td>cache 相同 prompt</td>
<td>設計上天然 miss</td>
<td><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/2705.png?v=fe25256ab4a" class="not-responsive emoji emoji-android emoji--white_check_mark" style="height:1.4em;width:auto;vertical-align:middle" title="✅" alt="✅" /> 命中（×9.7，但比舊版 0.2s 退步）</td>
</tr>
<tr>
<td>模型自由度</td>
<td><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/2705.png?v=fe25256ab4a" class="not-responsive emoji emoji-android emoji--white_check_mark" style="height:1.4em;width:auto;vertical-align:middle" title="✅" alt="✅" /> HF 公開 GGUF，可換 quant、可審計</td>
<td><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/274c.png?v=fe25256ab4a" class="not-responsive emoji emoji-android emoji--x" style="height:1.4em;width:auto;vertical-align:middle" title="❌" alt="❌" /> 5.53bpw 專屬 checkpoint</td>
</tr>
<tr>
<td>品質保證</td>
<td><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/2705.png?v=fe25256ab4a" class="not-responsive emoji emoji-android emoji--white_check_mark" style="height:1.4em;width:auto;vertical-align:middle" title="✅" alt="✅" /> 官方 QUALITY 全套實證（63 項比對＋公開基準）</td>
<td>temperature 0 byte-identical 保證</td>
</tr>
<tr>
<td>agentic</td>
<td>8/8，tps 穩 27.7–37.4</td>
<td>8/8，tps 21.7–43.2（浮動較大）</td>
</tr>
<tr>
<td>json 原生約束</td>
<td>36.9（JSON_VALID）</td>
<td><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/2705.png?v=fe25256ab4a" class="not-responsive emoji emoji-android emoji--white_check_mark" style="height:1.4em;width:auto;vertical-align:middle" title="✅" alt="✅" /> 49.7（JSON_VALID）</td>
</tr>
<tr>
<td>部署整合</td>
<td><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/26a0.png?v=fe25256ab4a" class="not-responsive emoji emoji-android emoji--warning" style="height:1.4em;width:auto;vertical-align:middle" title="⚠" alt="⚠" />️ 原始碼 build＋手動參數＋GTT 手修；screen 非持久</td>
<td><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/2705.png?v=fe25256ab4a" class="not-responsive emoji emoji-android emoji--white_check_mark" style="height:1.4em;width:auto;vertical-align:middle" title="✅" alt="✅" /> 容器映像、env 全配、auto-download、watchdog、NPU 小模型同端口</td>
</tr>
<tr>
<td>載入</td>
<td><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/2705.png?v=fe25256ab4a" class="not-responsive emoji emoji-android emoji--white_check_mark" style="height:1.4em;width:auto;vertical-align:middle" title="✅" alt="✅" /> 13s 熱</td>
<td>十幾秒（68G 冷載）</td>
</tr>
</tbody>
</table>
<p dir="auto"><strong>怎麼選</strong>：</p>
<ol>
<li><strong>純速度（日常 agent＋長文）</strong>：halogen 0.16.0 全面贏 — 16K 開局快 15%、185K 快 20%、fib decode 快 30%。</li>
<li><strong>生態與折騰權力</strong>：gufo — HF 公開模型隨你換、原始碼可讀、官方基準持續追蹤、<code>--speculative</code> 四種投機模式可玩；halogen 綁定它家 checkpoint。</li>
<li><strong>cache 型工作流</strong>：對話式續用 gufo 快一截（0.29 vs 0.398）；但 halogen 兩種測法都命中、gufo 只吃對話式 — 看你的請求形狀。</li>
</ol>
<h1>這次對決非常驚人，halogen你怎麼可以愈進化愈快，之前說好的開源呢?</h1>
<p dir="auto">我應該會使用gufo體驗幾天啦</p>
]]></description><link>https://lcz.me/topic/2052</link><generator>RSS for Node</generator><lastBuildDate>Mon, 12 Oct 2026 15:39:16 GMT</lastBuildDate><atom:link href="https://lcz.me/topic/2052.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 02 Oct 2026 14:05:55 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to gufo對決Halogen 實測Qwen3.8-Flash-Next (AMD AI Max+395) on Sun, 11 Oct 2026 18:07:45 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/fcys" aria-label="Profile: fcys">@<bdi>fcys</bdi></a> 这个有意思，新奇</p>
]]></description><link>https://lcz.me/post/24064</link><guid isPermaLink="true">https://lcz.me/post/24064</guid><dc:creator><![CDATA[terry]]></dc:creator><pubDate>Sun, 11 Oct 2026 18:07:45 GMT</pubDate></item><item><title><![CDATA[Reply to gufo對決Halogen 實測Qwen3.8-Flash-Next (AMD AI Max+395) on Fri, 09 Oct 2026 18:58:45 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/fcys" aria-label="Profile: fcys">@<bdi>fcys</bdi></a> 這台感覺好像已經是ITX主機了 謝謝分享</p>
]]></description><link>https://lcz.me/post/23627</link><guid isPermaLink="true">https://lcz.me/post/23627</guid><dc:creator><![CDATA[dardeaw feng]]></dc:creator><pubDate>Fri, 09 Oct 2026 18:58:45 GMT</pubDate></item><item><title><![CDATA[Reply to gufo對決Halogen 實測Qwen3.8-Flash-Next (AMD AI Max+395) on Wed, 07 Oct 2026 11:26:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/terry" aria-label="Profile: terry">@<bdi>terry</bdi></a> 哈哈，主要是我现在人在外地。刚从手机翻出来两张以前拍的。</p>
<p dir="auto">液冷冷板几乎覆盖了PCB，一把140mm风扇把冷排的热风从顶部排出。满载时转速也不高，哪怕在深更半夜，一两米外就听不到了。</p>
<p dir="auto">我入手比较早，当时 18k，到现在来看性价比相当高。当然从综合的使用感受上来看，哪怕是现在价格涨了不少，我觉得也可以考虑，放家里跑着基本上是无感的，能效比还高。除了本地的机器，我办公室的pc和笔电也通过Tailscale连了进来。这个还真得感谢halogen，一个月之前还只是玩具。</p>
<p dir="auto"><img src="https://upload.lcz.me/uploads/8767469f-2e60-4b79-a2d7-79eae064592d.jpg" alt="001.jpg" class="img-markdown  img-fluid" /></p>
<p dir="auto"><img src="https://upload.lcz.me/uploads/821c5f53-09b8-4ecf-8a18-1127e8faf0b9.jpg" alt="002.jpg" class="img-markdown  img-fluid" /></p>
]]></description><link>https://lcz.me/post/23065</link><guid isPermaLink="true">https://lcz.me/post/23065</guid><dc:creator><![CDATA[fcys]]></dc:creator><pubDate>Wed, 07 Oct 2026 11:26:24 GMT</pubDate></item><item><title><![CDATA[Reply to gufo對決Halogen 實測Qwen3.8-Flash-Next (AMD AI Max+395) on Wed, 07 Oct 2026 09:53:54 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/fcys" aria-label="Profile: fcys">@<bdi>fcys</bdi></a> 正常讨论怎么会把你办定成广告呢？论坛会判断用户的发言记录，被封号的都是屡教不改，明显推广痕迹的。</p>
]]></description><link>https://lcz.me/post/23049</link><guid isPermaLink="true">https://lcz.me/post/23049</guid><dc:creator><![CDATA[terry]]></dc:creator><pubDate>Wed, 07 Oct 2026 09:53:54 GMT</pubDate></item><item><title><![CDATA[Reply to gufo對決Halogen 實測Qwen3.8-Flash-Next (AMD AI Max+395) on Wed, 07 Oct 2026 09:00:39 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dardeaw-feng" aria-label="Profile: dardeaw-feng">@<bdi>dardeaw-feng</bdi></a> 我就不发图了，怕被判定成广告<img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/1f627.png?v=fe25256ab4a" class="not-responsive emoji emoji-android emoji--anguished" style="height:1.4em;width:auto;vertical-align:middle" title=":anguished:" alt="😧" /> 。可以去搜搜液冷的395，要140液冷的那个，还有双8cm的就不太强了。</p>
<p dir="auto">你设置160，但是要看功率是否往下掉，到目前为止风冷的395好像没有能顶住长时间120w的。</p>
<p dir="auto">395这东西的TDP AMD已经限制死了。我没记错的话，60s的173w fast ppt，然后600s的154w slow ppt。跑模型只要散热够153w是可以常驻的，如果温度压不住，撞了温度墙就开始掉频率（不断降功耗）。</p>
<p dir="auto">液冷的优势就太大了，单140mm风扇，风扇转速12xx声音基本听不到，温度也就不到70度，跑满slow ppt不要太轻松。双8cm的冷排散热面积小风扇转速高，就会差不少。</p>
<p dir="auto"><img src="https://upload.lcz.me/uploads/74b3b446-0175-4e36-b0ce-d09325966544.png" alt="ba5495cb-a1ee-481d-89be-1d0ad1afceda.png" class="img-markdown  img-fluid" /></p>
]]></description><link>https://lcz.me/post/23042</link><guid isPermaLink="true">https://lcz.me/post/23042</guid><dc:creator><![CDATA[fcys]]></dc:creator><pubDate>Wed, 07 Oct 2026 09:00:39 GMT</pubDate></item><item><title><![CDATA[Reply to gufo對決Halogen 實測Qwen3.8-Flash-Next (AMD AI Max+395) on Wed, 07 Oct 2026 04:04:11 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/fcys" aria-label="Profile: fcys">@<bdi>fcys</bdi></a> <a href="/post/22814">说</a>:</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dardeaw-feng" aria-label="Profile: dardeaw-feng">@<bdi>dardeaw-feng</bdi></a> 我跑满153w没有任何掉功耗，用的一套液冷，性能释放很充分</p>
<p dir="auto">更新了0.16.2，解码速度又有了一点提升。</p>
<p dir="auto">我现在挺满意这台机器，放家里做个服务器用，不占地方也不吵，功耗比较低。<br />
其他机器我基本上就是各种折腾，这台基本是稳定使用</p>
</blockquote>
<p dir="auto">哇 迷你機用上液冷 能分享照片出來嗎<br />
我之前把TDP上調到160W那噪音我受不了<br />
還能上液冷可真是新鮮</p>
]]></description><link>https://lcz.me/post/22979</link><guid isPermaLink="true">https://lcz.me/post/22979</guid><dc:creator><![CDATA[dardeaw feng]]></dc:creator><pubDate>Wed, 07 Oct 2026 04:04:11 GMT</pubDate></item><item><title><![CDATA[Reply to gufo對決Halogen 實測Qwen3.8-Flash-Next (AMD AI Max+395) on Tue, 06 Oct 2026 11:03:20 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dardeaw-feng" aria-label="Profile: dardeaw-feng">@<bdi>dardeaw-feng</bdi></a> 我跑满153w没有任何掉功耗，用的一套液冷，性能释放很充分</p>
<p dir="auto">更新了0.16.2，解码速度又有了一点提升。</p>
<p dir="auto">我现在挺满意这台机器，放家里做个服务器用，不占地方也不吵，功耗比较低。<br />
其他机器我基本上就是各种折腾，这台基本是稳定使用</p>
]]></description><link>https://lcz.me/post/22814</link><guid isPermaLink="true">https://lcz.me/post/22814</guid><dc:creator><![CDATA[fcys]]></dc:creator><pubDate>Tue, 06 Oct 2026 11:03:20 GMT</pubDate></item><item><title><![CDATA[Reply to gufo對決Halogen 實測Qwen3.8-Flash-Next (AMD AI Max+395) on Tue, 06 Oct 2026 04:03:59 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/fcys" aria-label="Profile: fcys">@<bdi>fcys</bdi></a> <a href="/post/22106">说</a>:</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dardeaw-feng" aria-label="Profile: dardeaw-feng">@<bdi>dardeaw-feng</bdi></a> 先回答：<strong>全部是單路</strong>（一次一個請求、串行跑）。2080 / 1850 那些數字都是單請求測出來的。</p>
<p dir="auto">看到你問，我順手補測了 4 路併發（服務 <code>KV_SLOTS=4</code>，4 路同時打 8K 提示詞、<code>max_tokens=256</code>、temp 0）：</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>口徑</th>
<th>單路</th>
<th>4 路併發（每路）</th>
<th>聚合</th>
</tr>
</thead>
<tbody>
<tr>
<td>prefill</td>
<td>4.37 s（1830 tok/s）</td>
<td>4.26 / 4.35 / 4.40 s（1877 / 1840 / 1823 tok/s）</td>
<td>prefill <strong>不掉</strong></td>
</tr>
<tr>
<td>decode</td>
<td>43.2 tok/s</td>
<td>4.4 / 4.9 / 21.4 / 9.3 tok/s</td>
<td>4 路之和 ≈ <strong>40 tok/s</strong></td>
</tr>
</tbody>
</table>
<blockquote>
<p dir="auto">4 路裡有 1 路是同一條提示詞、命中了剛才單路測試留下的前綴快取（<code>prompt_n=0</code>），所以 prefill 只列另外 3 路；decode 四路都是真實數據。</p>
</blockquote>
<p dir="auto">兩個結論：</p>
<ol>
<li><strong>prefill 併發幾乎不掉</strong>（每路仍 ~1830–1877 tok/s）；</li>
<li><strong>decode 會塌</strong>：單路 43.2 → 每路 4–21 tok/s，四路加起來 ≈ 40 tok/s，跟單路同級。</li>
</ol>
<p dir="auto">原因寫在引擎自己的啟動日誌裡：</p>
<pre><code>flash_serve: listening on 127.0.0.1:8730, 4 slots over ONE 262144-position KV pool ...
             MTP depth-2 selectable (drafter 1, speculates while alone)
</code></pre>
<p dir="auto"><code>speculates while alone</code> —— <strong>投機解碼只在「獨占」時開</strong>，有人同時生成就退回串行。所以多路併發的意義是「多個會話都要有回應」，<strong>不是提高總吞吐</strong>。</p>
<hr />
<h2>特別調了什麼</h2>
<h3>硬體 / 內核層</h3>
<ol>
<li><strong>BIOS 的 UMA frame buffer 調回最小</strong>（只 carve 1 GiB），系統可見 124.4 GiB；</li>
<li>內核參數（<code>GRUB_CMDLINE_LINUX_DEFAULT</code>）：</li>
</ol>
<pre><code>amdgpu.gttsize=126976 ttm.pages_limit=32505856 ttm.page_pool_size=32505856 amd_iommu=off
</code></pre>
<p dir="auto">開機後 <code>mem_info_gtt_total</code> 出 <strong>124.0 GiB</strong>。（<code>amd_iommu=off</code> 是早期做過 A/B 後留下來的設定，這一輪沒有重測。）</p>
<ol start="3">
<li><strong>功耗：PBO 開啟</strong>，滿載穩定 <strong>~153 W</strong>（跑滿 AMD 的 PPT slow 上限）；CPU governor 是 <code>powersave</code>。</li>
</ol>
<h3>引擎層（<code>HALOGEN_*</code>，跟預設不同的就這幾個）</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>參數</th>
<th>我設</th>
<th>官方預設</th>
<th>為什麼</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>HALOGEN_MAX_TOK</code></td>
<td><strong>16384</strong></td>
<td>32768</td>
<td>prefill arena 減半。0.16.0 上兩者速度在噪聲內（@32K：2001 vs 1957），但 working memory 從 12.5 → 8.1 GiB</td>
</tr>
<tr>
<td><code>HALOGEN_KV_POOL_POSITIONS</code></td>
<td><strong>262144</strong></td>
<td>2×CTX = 524288</td>
<td>同理，省下 7.2 GiB 給頁快取</td>
</tr>
<tr>
<td><code>HALOGEN_HOST_RESERVE_GIB</code></td>
<td><strong>24</strong></td>
<td>20</td>
<td>同上，留更多給頁快取</td>
</tr>
<tr>
<td><code>HALOGEN_COMPOSABLE_CONTEXT</code></td>
<td><strong>0</strong></td>
<td>0</td>
<td>實測開著在 8K 提示詞上慢 16.7%</td>
</tr>
<tr>
<td><code>HALOGEN_REASONING_EFFORT</code></td>
<td><strong>low</strong></td>
<td>模板 xhigh</td>
<td>預設在 agent 長鏈上思考過久（慢約 3 倍）</td>
</tr>
<tr>
<td><code>HALOGEN_PROMPT_CACHE</code></td>
<td><strong>2</strong></td>
<td>2</td>
<td>resume-anywhere</td>
</tr>
<tr>
<td><code>HALOGEN_CACHE_DIR</code></td>
<td><code>/cache</code></td>
<td>未設</td>
<td>快取落盤，重啟後續聊</td>
</tr>
<tr>
<td><code>HALOGEN_CACHE_BRANCHES</code></td>
<td><strong>3</strong></td>
<td>2</td>
<td>父會話分叉出子代理時保住 resume point</td>
</tr>
<tr>
<td><code>HALOGEN_CACHE_PRUNE_OLD</code></td>
<td><strong>1</strong></td>
<td>0</td>
<td>升級時清掉舊 build 殘留子樹</td>
</tr>
<tr>
<td><code>HALOGEN_VISION_TOWER</code></td>
<td>1</td>
<td>未設</td>
<td>開視覺</td>
</tr>
</tbody>
</table>
<p dir="auto"><strong>核心邏輯一句話</strong>：<code>MAX_TOK</code> 與 <code>KV_POOL_POSITIONS</code> 都往小調，把 RAM 讓給那張 <strong>47.7 GiB 的 n-gram 查找表</strong>（它不常駐，全靠 page cache）。</p>
<h3>checkpoint</h3>
<p dir="auto">用 <strong>v2</strong>（<code>qwen38-flash-next-v2.hgn</code> 62.11 GiB ＋ 獨立 <code>ngram.hgn</code> 47.68 GiB），不是舊的 w4b。常駐從 87.0 → <strong>78.3 GiB</strong>（多出 8.7 GiB 給頁快取），同題 ppl 好 1.9%。</p>
<h3>容器啟動參數</h3>
<pre><code class="language-bash">podman run --rm --name halogen-flash -p 8731:8731 \
  --device /dev/kfd --device /dev/dri --group-add keep-groups \
  --security-opt seccomp=unconfined --ipc=host --ulimit memlock=-1:-1 \
  -v &lt;models&gt;:/models:ro -v &lt;cache&gt;:/cache \
  -e HALOGEN_KV_POOL_POSITIONS=262144 -e HALOGEN_PROMPT_CACHE=2 \
  -e HALOGEN_HOST_RESERVE_GIB=24 -e HALOGEN_VISION_TOWER=1 \
  -e HALOGEN_COMPOSABLE_CONTEXT=0 -e HALOGEN_CACHE_DIR=/cache \
  -e HALOGEN_REASONING_EFFORT=low -e HALOGEN_MAX_TOK=16384 \
  -e HALOGEN_PREFILL_CHUNK=16384 -e HALOGEN_CACHE_PRUNE_OLD=1 \
  -e HALOGEN_CACHE_BRANCHES=3 \
  ghcr.io/peonist-ai/halogen-flash-server:0.16.0
</code></pre>
<p dir="auto">啟動後記憶體實測行：</p>
<pre><code>memory: 62.9 GiB of weights locked in RAM (0.8 of them the vision tower's),
        7.2 GiB of KV pool, 8.1 GiB of working memory, 78.3 GiB in all
</code></pre>
<hr />
<h2>單路完整數據（0.16.0 + v2，temp 0、effort low）</h2>
<h3>prefill 隨深度</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>深度 / 規模</th>
<th>prefill 速度</th>
</tr>
</thead>
<tbody>
<tr>
<td>4K</td>
<td>1960 tok/s</td>
</tr>
<tr>
<td>32K</td>
<td>2080 tok/s</td>
</tr>
<tr>
<td>64K</td>
<td>2042 tok/s</td>
</tr>
<tr>
<td>128K</td>
<td>1991 tok/s</td>
</tr>
<tr>
<td>192K</td>
<td>1850 tok/s</td>
</tr>
<tr>
<td>244K</td>
<td>1848 tok/s</td>
</tr>
<tr>
<td>256K</td>
<td>1824 tok/s</td>
</tr>
<tr>
<td>260K</td>
<td>1836 tok/s</td>
</tr>
</tbody>
</table>
<p dir="auto"><strong>4K → 260K 只掉 6%</strong>，沒有「越長越慢」。</p>
<h3>decode（與深度無關）</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>口徑</th>
<th>decode</th>
</tr>
</thead>
<tbody>
<tr>
<td>512 token 樣本 @32K（樣本最大）</td>
<td><strong>44.1 tok/s</strong></td>
</tr>
<tr>
<td>niah 檢索（每次只生成 32 token）</td>
<td>36.4 – 37.9 tok/s</td>
</tr>
<tr>
<td>長上下文 API（每次 187–200 token）</td>
<td>28 – 53 tok/s</td>
</tr>
</tbody>
</table>
<p dir="auto">decode 速度<strong>不隨上下文深度變化</strong> —— 48/64 層沒有 KV cache。<br />
它主要由<strong>投機解碼命中率（生成內容的可預測性）<strong>與</strong>樣本長度</strong>決定：<br />
同一種任務在 192K / 244K / 256K 上分別測到 52.2 / 28.1 / 53.1 tok/s，<br />
散布這麼大是短樣本的起停開銷造成的，<strong>不是「越長越快」</strong>。</p>
<h3>檢索完整性（引擎 <code>niah</code>，深度 × 位置）</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>深度</th>
<th>p05</th>
<th>p50</th>
<th>p95</th>
<th>合計</th>
</tr>
</thead>
<tbody>
<tr>
<td>4,096</td>
<td>3/3</td>
<td>3/3</td>
<td>3/3</td>
<td>9/9（100%）</td>
</tr>
<tr>
<td>32,768</td>
<td>3/3</td>
<td>3/3</td>
<td>3/3</td>
<td>9/9（100%）</td>
</tr>
<tr>
<td>65,536</td>
<td>3/3</td>
<td>3/3</td>
<td>3/3</td>
<td>9/9（100%）</td>
</tr>
<tr>
<td>131,072</td>
<td>3/3</td>
<td>2/3</td>
<td>3/3</td>
<td>8/9（88.9%）</td>
</tr>
<tr>
<td>總計</td>
<td></td>
<td></td>
<td></td>
<td><strong>35/36（97.2%）</strong></td>
</tr>
</tbody>
</table>
<h3>prompt cache</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>口徑</th>
<th>冷</th>
<th>暖</th>
</tr>
</thead>
<tbody>
<tr>
<td>128K 前綴第二輪</td>
<td>58.5 s</td>
<td><strong>0.0 s</strong>（<code>prompt_n=0</code>，端到端 2.9 s）</td>
</tr>
<tr>
<td>259K 前綴命中</td>
<td>—</td>
<td>端到端 3.7 s</td>
</tr>
</tbody>
</table>
<h3>上限</h3>
<p dir="auto"><code>prompt + max_tokens ≤ 262,144</code>，用同一條 259,474 token 的提示詞卡過邊界：</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th><code>max_tokens</code></th>
<th>合計</th>
<th>結果</th>
</tr>
</thead>
<tbody>
<tr>
<td>2,670</td>
<td>262,144</td>
<td><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/2705.png?v=fe25256ab4a" class="not-responsive emoji emoji-android emoji--white_check_mark" style="height:1.4em;width:auto;vertical-align:middle" title="✅" alt="✅" /> 200</td>
</tr>
<tr>
<td>2,671</td>
<td>262,145</td>
<td><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/274c.png?v=fe25256ab4a" class="not-responsive emoji emoji-android emoji--x" style="height:1.4em;width:auto;vertical-align:middle" title="❌" alt="❌" /> 400（<code>leaving room for 2670</code>）</td>
</tr>
</tbody>
</table>
</blockquote>
<p dir="auto">非常感謝分享調校細節，看來關鍵不是功耗、你開PBO影響應該不大、因為我也設了CO -20，是halogen的參數，你這多路prefill數字非常的暴力</p>
]]></description><link>https://lcz.me/post/22750</link><guid isPermaLink="true">https://lcz.me/post/22750</guid><dc:creator><![CDATA[dardeaw feng]]></dc:creator><pubDate>Tue, 06 Oct 2026 04:03:59 GMT</pubDate></item><item><title><![CDATA[Reply to gufo對決Halogen 實測Qwen3.8-Flash-Next (AMD AI Max+395) on Tue, 06 Oct 2026 03:26:46 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/terry" aria-label="Profile: terry">@<bdi>terry</bdi></a> 是的 但跟Halogen同樣只限定Strix Halo......<br />
但不同的點在於這開源了 我前幾天把代碼修改成RDNA4也可以使用上PR被作者退件，原因是他沒有獨顯能測試<br />
而這推論框架的KV管理機制是類似vllm那樣切片快取的，我等穩定後要魔改成radix tree來玩看看</p>
]]></description><link>https://lcz.me/post/22730</link><guid isPermaLink="true">https://lcz.me/post/22730</guid><dc:creator><![CDATA[dardeaw feng]]></dc:creator><pubDate>Tue, 06 Oct 2026 03:26:46 GMT</pubDate></item><item><title><![CDATA[Reply to gufo對決Halogen 實測Qwen3.8-Flash-Next (AMD AI Max+395) on Mon, 05 Oct 2026 08:51:59 GMT]]></title><description><![CDATA[<p dir="auto">这特么是新的推理框架？最近太多了，都看不过来了。</p>
]]></description><link>https://lcz.me/post/22532</link><guid isPermaLink="true">https://lcz.me/post/22532</guid><dc:creator><![CDATA[terry]]></dc:creator><pubDate>Mon, 05 Oct 2026 08:51:59 GMT</pubDate></item><item><title><![CDATA[Reply to gufo對決Halogen 實測Qwen3.8-Flash-Next (AMD AI Max+395) on Sat, 03 Oct 2026 10:48:11 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dardeaw-feng" aria-label="Profile: dardeaw-feng">@<bdi>dardeaw-feng</bdi></a> 先回答：<strong>全部是單路</strong>（一次一個請求、串行跑）。2080 / 1850 那些數字都是單請求測出來的。</p>
<p dir="auto">看到你問，我順手補測了 4 路併發（服務 <code>KV_SLOTS=4</code>，4 路同時打 8K 提示詞、<code>max_tokens=256</code>、temp 0）：</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>口徑</th>
<th>單路</th>
<th>4 路併發（每路）</th>
<th>聚合</th>
</tr>
</thead>
<tbody>
<tr>
<td>prefill</td>
<td>4.37 s（1830 tok/s）</td>
<td>4.26 / 4.35 / 4.40 s（1877 / 1840 / 1823 tok/s）</td>
<td>prefill <strong>不掉</strong></td>
</tr>
<tr>
<td>decode</td>
<td>43.2 tok/s</td>
<td>4.4 / 4.9 / 21.4 / 9.3 tok/s</td>
<td>4 路之和 ≈ <strong>40 tok/s</strong></td>
</tr>
</tbody>
</table>
<blockquote>
<p dir="auto">4 路裡有 1 路是同一條提示詞、命中了剛才單路測試留下的前綴快取（<code>prompt_n=0</code>），所以 prefill 只列另外 3 路；decode 四路都是真實數據。</p>
</blockquote>
<p dir="auto">兩個結論：</p>
<ol>
<li><strong>prefill 併發幾乎不掉</strong>（每路仍 ~1830–1877 tok/s）；</li>
<li><strong>decode 會塌</strong>：單路 43.2 → 每路 4–21 tok/s，四路加起來 ≈ 40 tok/s，跟單路同級。</li>
</ol>
<p dir="auto">原因寫在引擎自己的啟動日誌裡：</p>
<pre><code>flash_serve: listening on 127.0.0.1:8730, 4 slots over ONE 262144-position KV pool ...
             MTP depth-2 selectable (drafter 1, speculates while alone)
</code></pre>
<p dir="auto"><code>speculates while alone</code> —— <strong>投機解碼只在「獨占」時開</strong>，有人同時生成就退回串行。所以多路併發的意義是「多個會話都要有回應」，<strong>不是提高總吞吐</strong>。</p>
<hr />
<h2>特別調了什麼</h2>
<h3>硬體 / 內核層</h3>
<ol>
<li><strong>BIOS 的 UMA frame buffer 調回最小</strong>（只 carve 1 GiB），系統可見 124.4 GiB；</li>
<li>內核參數（<code>GRUB_CMDLINE_LINUX_DEFAULT</code>）：</li>
</ol>
<pre><code>amdgpu.gttsize=126976 ttm.pages_limit=32505856 ttm.page_pool_size=32505856 amd_iommu=off
</code></pre>
<p dir="auto">開機後 <code>mem_info_gtt_total</code> 出 <strong>124.0 GiB</strong>。（<code>amd_iommu=off</code> 是早期做過 A/B 後留下來的設定，這一輪沒有重測。）</p>
<ol start="3">
<li><strong>功耗：PBO 開啟</strong>，滿載穩定 <strong>~153 W</strong>（跑滿 AMD 的 PPT slow 上限）；CPU governor 是 <code>powersave</code>。</li>
</ol>
<h3>引擎層（<code>HALOGEN_*</code>，跟預設不同的就這幾個）</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>參數</th>
<th>我設</th>
<th>官方預設</th>
<th>為什麼</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>HALOGEN_MAX_TOK</code></td>
<td><strong>16384</strong></td>
<td>32768</td>
<td>prefill arena 減半。0.16.0 上兩者速度在噪聲內（@32K：2001 vs 1957），但 working memory 從 12.5 → 8.1 GiB</td>
</tr>
<tr>
<td><code>HALOGEN_KV_POOL_POSITIONS</code></td>
<td><strong>262144</strong></td>
<td>2×CTX = 524288</td>
<td>同理，省下 7.2 GiB 給頁快取</td>
</tr>
<tr>
<td><code>HALOGEN_HOST_RESERVE_GIB</code></td>
<td><strong>24</strong></td>
<td>20</td>
<td>同上，留更多給頁快取</td>
</tr>
<tr>
<td><code>HALOGEN_COMPOSABLE_CONTEXT</code></td>
<td><strong>0</strong></td>
<td>0</td>
<td>實測開著在 8K 提示詞上慢 16.7%</td>
</tr>
<tr>
<td><code>HALOGEN_REASONING_EFFORT</code></td>
<td><strong>low</strong></td>
<td>模板 xhigh</td>
<td>預設在 agent 長鏈上思考過久（慢約 3 倍）</td>
</tr>
<tr>
<td><code>HALOGEN_PROMPT_CACHE</code></td>
<td><strong>2</strong></td>
<td>2</td>
<td>resume-anywhere</td>
</tr>
<tr>
<td><code>HALOGEN_CACHE_DIR</code></td>
<td><code>/cache</code></td>
<td>未設</td>
<td>快取落盤，重啟後續聊</td>
</tr>
<tr>
<td><code>HALOGEN_CACHE_BRANCHES</code></td>
<td><strong>3</strong></td>
<td>2</td>
<td>父會話分叉出子代理時保住 resume point</td>
</tr>
<tr>
<td><code>HALOGEN_CACHE_PRUNE_OLD</code></td>
<td><strong>1</strong></td>
<td>0</td>
<td>升級時清掉舊 build 殘留子樹</td>
</tr>
<tr>
<td><code>HALOGEN_VISION_TOWER</code></td>
<td>1</td>
<td>未設</td>
<td>開視覺</td>
</tr>
</tbody>
</table>
<p dir="auto"><strong>核心邏輯一句話</strong>：<code>MAX_TOK</code> 與 <code>KV_POOL_POSITIONS</code> 都往小調，把 RAM 讓給那張 <strong>47.7 GiB 的 n-gram 查找表</strong>（它不常駐，全靠 page cache）。</p>
<h3>checkpoint</h3>
<p dir="auto">用 <strong>v2</strong>（<code>qwen38-flash-next-v2.hgn</code> 62.11 GiB ＋ 獨立 <code>ngram.hgn</code> 47.68 GiB），不是舊的 w4b。常駐從 87.0 → <strong>78.3 GiB</strong>（多出 8.7 GiB 給頁快取），同題 ppl 好 1.9%。</p>
<h3>容器啟動參數</h3>
<pre><code class="language-bash">podman run --rm --name halogen-flash -p 8731:8731 \
  --device /dev/kfd --device /dev/dri --group-add keep-groups \
  --security-opt seccomp=unconfined --ipc=host --ulimit memlock=-1:-1 \
  -v &lt;models&gt;:/models:ro -v &lt;cache&gt;:/cache \
  -e HALOGEN_KV_POOL_POSITIONS=262144 -e HALOGEN_PROMPT_CACHE=2 \
  -e HALOGEN_HOST_RESERVE_GIB=24 -e HALOGEN_VISION_TOWER=1 \
  -e HALOGEN_COMPOSABLE_CONTEXT=0 -e HALOGEN_CACHE_DIR=/cache \
  -e HALOGEN_REASONING_EFFORT=low -e HALOGEN_MAX_TOK=16384 \
  -e HALOGEN_PREFILL_CHUNK=16384 -e HALOGEN_CACHE_PRUNE_OLD=1 \
  -e HALOGEN_CACHE_BRANCHES=3 \
  ghcr.io/peonist-ai/halogen-flash-server:0.16.0
</code></pre>
<p dir="auto">啟動後記憶體實測行：</p>
<pre><code>memory: 62.9 GiB of weights locked in RAM (0.8 of them the vision tower's),
        7.2 GiB of KV pool, 8.1 GiB of working memory, 78.3 GiB in all
</code></pre>
<hr />
<h2>單路完整數據（0.16.0 + v2，temp 0、effort low）</h2>
<h3>prefill 隨深度</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>深度 / 規模</th>
<th>prefill 速度</th>
</tr>
</thead>
<tbody>
<tr>
<td>4K</td>
<td>1960 tok/s</td>
</tr>
<tr>
<td>32K</td>
<td>2080 tok/s</td>
</tr>
<tr>
<td>64K</td>
<td>2042 tok/s</td>
</tr>
<tr>
<td>128K</td>
<td>1991 tok/s</td>
</tr>
<tr>
<td>192K</td>
<td>1850 tok/s</td>
</tr>
<tr>
<td>244K</td>
<td>1848 tok/s</td>
</tr>
<tr>
<td>256K</td>
<td>1824 tok/s</td>
</tr>
<tr>
<td>260K</td>
<td>1836 tok/s</td>
</tr>
</tbody>
</table>
<p dir="auto"><strong>4K → 260K 只掉 6%</strong>，沒有「越長越慢」。</p>
<h3>decode（與深度無關）</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>口徑</th>
<th>decode</th>
</tr>
</thead>
<tbody>
<tr>
<td>512 token 樣本 @32K（樣本最大）</td>
<td><strong>44.1 tok/s</strong></td>
</tr>
<tr>
<td>niah 檢索（每次只生成 32 token）</td>
<td>36.4 – 37.9 tok/s</td>
</tr>
<tr>
<td>長上下文 API（每次 187–200 token）</td>
<td>28 – 53 tok/s</td>
</tr>
</tbody>
</table>
<p dir="auto">decode 速度<strong>不隨上下文深度變化</strong> —— 48/64 層沒有 KV cache。<br />
它主要由<strong>投機解碼命中率（生成內容的可預測性）<strong>與</strong>樣本長度</strong>決定：<br />
同一種任務在 192K / 244K / 256K 上分別測到 52.2 / 28.1 / 53.1 tok/s，<br />
散布這麼大是短樣本的起停開銷造成的，<strong>不是「越長越快」</strong>。</p>
<h3>檢索完整性（引擎 <code>niah</code>，深度 × 位置）</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>深度</th>
<th>p05</th>
<th>p50</th>
<th>p95</th>
<th>合計</th>
</tr>
</thead>
<tbody>
<tr>
<td>4,096</td>
<td>3/3</td>
<td>3/3</td>
<td>3/3</td>
<td>9/9（100%）</td>
</tr>
<tr>
<td>32,768</td>
<td>3/3</td>
<td>3/3</td>
<td>3/3</td>
<td>9/9（100%）</td>
</tr>
<tr>
<td>65,536</td>
<td>3/3</td>
<td>3/3</td>
<td>3/3</td>
<td>9/9（100%）</td>
</tr>
<tr>
<td>131,072</td>
<td>3/3</td>
<td>2/3</td>
<td>3/3</td>
<td>8/9（88.9%）</td>
</tr>
<tr>
<td>總計</td>
<td></td>
<td></td>
<td></td>
<td><strong>35/36（97.2%）</strong></td>
</tr>
</tbody>
</table>
<h3>prompt cache</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>口徑</th>
<th>冷</th>
<th>暖</th>
</tr>
</thead>
<tbody>
<tr>
<td>128K 前綴第二輪</td>
<td>58.5 s</td>
<td><strong>0.0 s</strong>（<code>prompt_n=0</code>，端到端 2.9 s）</td>
</tr>
<tr>
<td>259K 前綴命中</td>
<td>—</td>
<td>端到端 3.7 s</td>
</tr>
</tbody>
</table>
<h3>上限</h3>
<p dir="auto"><code>prompt + max_tokens ≤ 262,144</code>，用同一條 259,474 token 的提示詞卡過邊界：</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th><code>max_tokens</code></th>
<th>合計</th>
<th>結果</th>
</tr>
</thead>
<tbody>
<tr>
<td>2,670</td>
<td>262,144</td>
<td><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/2705.png?v=fe25256ab4a" class="not-responsive emoji emoji-android emoji--white_check_mark" style="height:1.4em;width:auto;vertical-align:middle" title="✅" alt="✅" /> 200</td>
</tr>
<tr>
<td>2,671</td>
<td>262,145</td>
<td><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/274c.png?v=fe25256ab4a" class="not-responsive emoji emoji-android emoji--x" style="height:1.4em;width:auto;vertical-align:middle" title="❌" alt="❌" /> 400（<code>leaving room for 2670</code>）</td>
</tr>
</tbody>
</table>
]]></description><link>https://lcz.me/post/22106</link><guid isPermaLink="true">https://lcz.me/post/22106</guid><dc:creator><![CDATA[fcys]]></dc:creator><pubDate>Sat, 03 Oct 2026 10:48:11 GMT</pubDate></item><item><title><![CDATA[Reply to gufo對決Halogen 實測Qwen3.8-Flash-Next (AMD AI Max+395) on Sat, 03 Oct 2026 05:17:10 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/fcys" aria-label="Profile: fcys">@<bdi>fcys</bdi></a> 天啊~prefill 2080是單路還是多路併發?<br />
這已經摸到DGX Spark用vllm多路併發的速度了<br />
可以分享一下嗎? 有特別調了啥?</p>
]]></description><link>https://lcz.me/post/22050</link><guid isPermaLink="true">https://lcz.me/post/22050</guid><dc:creator><![CDATA[dardeaw feng]]></dc:creator><pubDate>Sat, 03 Oct 2026 05:17:10 GMT</pubDate></item><item><title><![CDATA[Reply to gufo對決Halogen 實測Qwen3.8-Flash-Next (AMD AI Max+395) on Fri, 02 Oct 2026 23:17:11 GMT]]></title><description><![CDATA[<p dir="auto">楼主还有优化空间，我更新0.16.0后，Prefill最高到2080了，244k也1850区间。有可能是我跑的功耗高的原因</p>
]]></description><link>https://lcz.me/post/22007</link><guid isPermaLink="true">https://lcz.me/post/22007</guid><dc:creator><![CDATA[fcys]]></dc:creator><pubDate>Fri, 02 Oct 2026 23:17:11 GMT</pubDate></item></channel></rss>