<?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[RX 7900 XTX 24GB 跑 125B MoE：X99 舊平台的 Strata 實測（prefill 934–1,483 t/s、decode 60–81 t/s，含失敗與回滾）]]></title><description><![CDATA[<h1>RX 7900 XTX 24GB 跑 125B MoE：X99 舊平台的 Strata 實測（prefill 934–1,483 t/s、decode 60–81 t/s，含失敗與回滾）</h1>
<p dir="auto"><strong>硬件</strong>：Xeon E5-2686 v4（36 threads，無 AVX-512）＋ RX 7900 XTX 24GB ＋ 62 GiB DDR3-1866 ECC REG<br />
<strong>底板</strong>：HUANANZHI X99-CD3 GAMING V2.1（<code>dmidecode</code> 實測，最大 128GB）<br />
<strong>引擎</strong>：Strata 0.1.45.3｜<strong>模型</strong>：Qwen3.8-Flash-Next（125B MoE，IQ3_XXS）<br />
<strong>測試日期</strong>：2026-10-20 至 10-21｜全部數字為本機實測；引用社群數據逐項標來源</p>
<hr />
<h2>0. TL;DR</h2>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>項目</th>
<th>開始</th>
<th>調完</th>
</tr>
</thead>
<tbody>
<tr>
<td>Prefill（32K prompt）</td>
<td>506 t/s（<code>--prefill auto</code>）</td>
<td><strong>1,483 t/s</strong></td>
</tr>
<tr>
<td>Prefill（12K prompt）</td>
<td>~850</td>
<td><strong>934–952 t/s</strong></td>
</tr>
<tr>
<td>Decode（暖機）</td>
<td>34.2 t/s</td>
<td><strong>59.9–81 t/s</strong></td>
</tr>
<tr>
<td>專家駐留槽（IQ3_XXS）</td>
<td>9,549</td>
<td><strong>10,325</strong></td>
</tr>
<tr>
<td>量化</td>
<td>Q2_0（權重 37.6GB）</td>
<td><strong>IQ3_XXS（權重 47.0GB）</strong></td>
</tr>
</tbody>
</table>
<p dir="auto"><strong>最有效</strong>：<code>--prefill auto:32768</code>（506→878，+73%）、<code>STRATA_ROUTE_TAIL_SKIP=7</code>（冷啟 decode 34.8→51.3）、五個 prefill-path env（19K +50%）、<code>--short-read 512</code> ＋ <code>--pool-affinity auto</code>（32K +20%）。<br />
<strong>最反直覺</strong>：<code>--resident-experts</code> 在 Q2_0 完全無效，換 IQ3_XXS 後 +46%。<br />
<strong>總花費</strong>：零採購，全部用現有硬件。</p>
<blockquote>
<p dir="auto"><strong>數字口徑</strong>：本機實測。短期冷啟與暖機差異可達 ±10–20%，所以每個數字都是同條件跑兩次以上；「+X%」指同條件 A/B，不是跨 prompt 長度的比較（第 6 節分開兩張表）。</p>
</blockquote>
<hr />
<h2>1. 為什麼要試 125B MoE</h2>
<p dir="auto">原本跑 llama.cpp 的 27B dense：prefill 807 t/s、decode 57.9 t/s，質素夠用但已到頂。</p>
<p dir="auto">Strata 的做法是<strong>專家串流</strong>：只常駐熱門專家於 VRAM，其餘留在 RAM／SSD，按 routing 即時搬。所以 VRAM 需求由「整個模型」降到「熱專家集合」。</p>
<p dir="auto">官方門檻（實測對得上）：VRAM ≥12GB、RAM ≥32GB、磁碟 ~80GB、CPU 要 AVX2。我這部機剛好卡在門檻：24GB VRAM、62 GiB RAM、2016 年的 Xeon。</p>
<hr />
<h2>2. 硬件（含查證方法）</h2>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>項目</th>
<th>實測值</th>
<th>來源</th>
</tr>
</thead>
<tbody>
<tr>
<td>CPU</td>
<td>Intel Xeon E5-2686 v4 @2.30GHz，36 threads／1 socket</td>
<td><code>lscpu</code></td>
</tr>
<tr>
<td>AVX-512</td>
<td><strong>無</strong>（<code>/proc/cpuinfo</code> 冇任何 <code>avx512*</code>）</td>
<td><code>grep</code></td>
</tr>
<tr>
<td>RAM</td>
<td>62 GiB（可用 ~15 GiB、buff/cache 51 GiB）</td>
<td><code>free -g</code></td>
</tr>
<tr>
<td>RAM 模組</td>
<td>32GB DDR3 1867 MT/s，Hynix <code>HMT84GL7AMR4C-RD</code>，<strong>4Rx4</strong> ×2</td>
<td><code>dmidecode -t 17</code></td>
</tr>
<tr>
<td>底板</td>
<td>HUANANZHI X99-CD3 GAMING V2.1，最大 128GB</td>
<td><code>dmidecode -t 2/16</code></td>
</tr>
<tr>
<td>GPU</td>
<td>RX 7900 XTX 24GB，<code>0000:09:00.0</code> 16.0 GT/s ×16（Gen4，無降速）</td>
<td>sysfs</td>
</tr>
</tbody>
</table>
<p dir="auto"><strong>兩個實測陷阱</strong>：</p>
<ol>
<li>DMI 只報到 <strong>1 條</strong> RAM，OS 實見 62 GiB（即實際 2×32GB）——這塊 Huananzhi 板韌體描述不全，<code>dmidecode</code> 要同 <code>free</code> 對照。</li>
<li>prefill 不是純 GPU 工作，是 <strong>CPU＋GPU 混合</strong>（專家搬運、routing、冷專家在 CPU 上算）。所以本機天花板主要由 CPU 單核決定。</li>
</ol>
<hr />
<h2>3. 模型檔案與口徑（先講清楚，免得數字對不上）</h2>
<p dir="auto">同一量化有兩個「大小」，網上文章經常混用：</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>量化</th>
<th style="text-align:right">shard1（transformer 權重）</th>
<th style="text-align:right">shard2（n-gram 表）</th>
<th style="text-align:right">合計下載</th>
</tr>
</thead>
<tbody>
<tr>
<td>Q2_0</td>
<td style="text-align:right"><strong>37.62 GB</strong></td>
<td style="text-align:right">28.80 GB</td>
<td style="text-align:right"><strong>66.42 GB</strong></td>
</tr>
<tr>
<td>IQ3_XXS</td>
<td style="text-align:right"><strong>47.04 GB</strong></td>
<td style="text-align:right">28.80 GB</td>
<td style="text-align:right"><strong>75.84 GB</strong></td>
</tr>
<tr>
<td>IQ3_S</td>
<td style="text-align:right"><strong>54.80 GB</strong>（官方）</td>
<td style="text-align:right">28.80 GB</td>
<td style="text-align:right"><strong>83.60 GB</strong></td>
</tr>
</tbody>
</table>
<p dir="auto">以上 shard1／shard2 為本機 <code>du -b</code> 實測（Q2_0、IQ3_XXS），IQ3_S 取官方 <code>docs/MODELS.md</code>。</p>
<p dir="auto"><strong>對購買 RAM 的意義</strong>：</p>
<ul>
<li>佔 RAM＋VRAM 的主要部分是 <strong>shard1</strong>（37.6／47.0／54.8 GB）</li>
<li>shard2 是 28.8 GB 的 n-gram 表，可以放 SSD 用 mmap 讀，不需要全部駐留</li>
<li>所以「62 GB RAM 夠不夠」要看你講的是哪個數：以 shard1 計 IQ3_XXS 47.0GB 很寬鬆；以合計 75.8GB 計就要靠 mmap</li>
</ul>
<p dir="auto">本機實測：跑 IQ3_XXS 時 OS 層 RAM 使用 41–43GB（Q2_0 同樣 41–43GB），與「shard1 ＋ cache」相符。</p>
<hr />
<h2>4. 安裝：六個會撞到的坑</h2>
<p dir="auto">按官方流程 <code>setup.sh --backend hip --model &lt;quant&gt; --data-dir &lt;dir&gt; --port &lt;port&gt;</code>，實測撞到以下六個。</p>
<h3>坑 1：cmake 連結失敗（strata-vision）</h3>
<pre><code>relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object
</code></pre>
<p dir="auto"><code>setup.sh</code> 跑到 275/275 步死在 <code>strata-vision</code> 連結階段。<br />
<strong>解法</strong>：在該 build 目錄的 <code>CMakeCache.txt</code> 設 <code>CMAKE_EXE_LINKER_FLAGS:STRING=-no-pie</code>，再單獨 <code>cmake --build . --target strata-vision -j 18</code>，然後重跑 <code>setup.sh</code>。</p>
<h3>坑 2：系統 ROCm 太舊，且會靜靜回落</h3>
<p dir="auto">系統只有 ROCm 7.2.4，<code>hipBLASLt</code> 冇 fallback path，部分 GEMM 直接失敗。</p>
<p dir="auto"><strong>做法</strong>：裝 TheRock preview（<code>rocm 7.10.0a20251120</code>）入 venv，不覆蓋系統：</p>
<pre><code class="language-bash">export LD_LIBRARY_PATH=$VENV/lib/python3.12/site-packages/_rocm_sdk_libraries_gfx110X_dgpu/lib:$LD_LIBRARY_PATH
</code></pre>
<p dir="auto"><code>ROCM_PATH</code> 指向不存在的路徑（<code>/opt/rocm-nonexistent</code>）強制使用 venv wheels；<code>export HIP_PLATFORM=amd</code> 否則 cmake 報 <code>Unexpected HIP_PLATFORM</code>。</p>
<p dir="auto"><strong>最陰險的一點</strong>：不帶 <code>LD_LIBRARY_PATH</code> 直接跑 <code>server.py</code>，引擎會<strong>無聲無息</strong>用回 <code>/opt/rocm-7.2.4</code>——不報錯、不 crash，只是慢。所以驗證要看 runtime，不是 build log：</p>
<pre><code class="language-bash">grep -o '/[^ ]*libhipblaslt[^ ]*' /proc/$(pgrep -f serve/server.py)/maps | sort -u
</code></pre>
<p dir="auto">見到 venv 內那條路徑才算成功。這一步實測令 prefill 由 400–475 升到 502–504 t/s。</p>
<blockquote>
<p dir="auto">注意：這證明「載入了哪個函式庫」，不等於證明所有速度改善都由它造成。跨版本要有受控測試（本機只做了單向驗證）。</p>
</blockquote>
<h3>坑 3：綁 0.0.0.0 被拒絕</h3>
<pre><code>[strata] a non-loopback bind requires an inference API key
</code></pre>
<p dir="auto">只綁 <code>127.0.0.1</code> 不需要 key；要給區網用就要在 config 加 32 hex <code>api_key</code>。</p>
<h3>坑 4：<code>--vision</code> 食 2–3GB VRAM</h3>
<p dir="auto">純文字用途直接刪走 <code>--vision</code>（<code>--vision no</code> 不支援）。另外開 vision build 會撞同一個 PIE 連結錯誤，修法同坑 1。</p>
<h3>坑 5：一張卡只可以有一個引擎</h3>
<p dir="auto">舊 llama.cpp 未停會撞：</p>
<pre><code>cudaMalloc(...) for the weight arena failed (out of memory): 1238 MiB of 24560 MiB VRAM free
</code></pre>
<p dir="auto">本機用兩支腳本處理：<code>start-strata.sh &lt;port&gt;</code>、<code>stop-strata.sh --restore</code>（後者會起回 llama.cpp 並等 <code>/health</code>）。</p>
<h3>坑 6：模型下載與 config 陷阱</h3>
<p dir="auto"><code>setup.sh</code> 只認 <code>~/Strata-data/models/&lt;MODEL&gt;/</code> 內的原始檔名；已下載過的模型要先 <code>ln -f</code> hardlink 進去，否則會重新下載 60–70GB。另外新 config 不繼承舊設定，換模型要重新加齊 <code>host</code>、<code>reasoning_effort</code>、<code>reasoning_budget_tokens</code>。</p>
<hr />
<h2>5. 量化怎麼揀：升量化反而更快</h2>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>量化</th>
<th style="text-align:right">權重（shard1）</th>
<th>官方評級</th>
<th>我的實測</th>
</tr>
</thead>
<tbody>
<tr>
<td>Q2_0</td>
<td style="text-align:right">37.6GB</td>
<td>良好／最快</td>
<td>prefill 400–475（3.2K）、decode 40（冷）–100（熱）、RAM 41–43GB、六題 6/6</td>
</tr>
<tr>
<td>IQ2_XS</td>
<td style="text-align:right">39.2GB</td>
<td>更好</td>
<td>未測</td>
</tr>
<tr>
<td>IQ3_XXS</td>
<td style="text-align:right">47.0GB</td>
<td>很好</td>
<td>prefill 502–1,483、decode 59.9–81、六題 6/6</td>
</tr>
<tr>
<td>IQ3_S</td>
<td style="text-align:right">54.8GB</td>
<td>最好（≈原模型）</td>
<td>未上（本機 62 GiB 會緊）</td>
</tr>
</tbody>
</table>
<p dir="auto">Q2_0 六題全對，但 prefill 只有 400–475 t/s，<strong>比 27B dense 的 807 更慢</strong>。<br />
原因不是「細模型快」這種直覺，而是 <strong>2-bit 專家在 AVX2 CPU 上 dequantize 效率差</strong>：熱專家上 GPU，冷專家要在 CPU 解包。</p>
<p dir="auto">換 IQ3_XXS 之後：prefill 502–504、短答 decode 85–94（暖），RAM 需求仍然是 41–43GB。</p>
<p dir="auto"><strong>結論</strong>：24GB VRAM 直接由 IQ3_XXS 起步；Q2_0 只適合 RAM 真的很緊（&lt;48GB）。64GB+ RAM 可以考慮 IQ3_S，但<strong>質素差距我未實測</strong>（社群說只比最輕檔慢約 10%）。</p>
<hr />
<h2>6. 量測方法（唔講方法，數字冇意義）</h2>
<ul>
<li><strong>Prefill 一定要連 prompt 長度</strong>：<code>32K → 1,483</code> 與 <code>7.5K → 611</code> 是同一個引擎，短 prompt 天生慢（expert cache 冷、只跑一兩 chunk）</li>
<li><strong>Decode 分冷啟／暖機</strong>：冷啟（引擎剛起）與暖機（同 session 第二次之後）可以差一倍</li>
<li><strong>短答／長答分開</strong>：短答看 tok/s，長答看完成時間</li>
<li><strong>質素</strong>：固定題組，每次改設定都重跑；PF flags 會改 rounding，輸出不再 byte-identical，所以質素題不是可選項</li>
<li><strong>每項至少兩跑</strong>：同一設定兩次冷啟實測可差 44.6 vs 54.6 t/s（±10%），單跑差異 &lt;25% 一律當噪音</li>
</ul>
<p dir="auto">工具：streaming Python bench（量 TTFT 與 tok/s）＋ <code>curl /v1/chat/completions</code> 讀 <code>timings</code>。</p>
<hr />
<h2>7. 調優（A/B 與整體歷程分開）</h2>
<h3>7.1 同條件 A/B（每次只改一項，重啟後測）</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>改動</th>
<th>前</th>
<th>後</th>
<th>判定</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>--prefill auto:32768</code></td>
<td>506</td>
<td><strong>878</strong>（+73%）</td>
<td>保留</td>
</tr>
<tr>
<td><code>STRATA_ROUTE_TAIL_SKIP=7</code></td>
<td>冷啟 decode 34.8</td>
<td><strong>51.3</strong></td>
<td>保留（剔除測試：暖機 51.0→48.1，效果確認）</td>
</tr>
<tr>
<td>五個 prefill-path env</td>
<td>19K ~850／39K ~850</td>
<td><strong>1,275</strong>（+50%）／<strong>1,192</strong>（+40%）</td>
<td>保留</td>
</tr>
<tr>
<td><code>--short-read 512</code> ＋ <code>--pool-affinity auto</code></td>
<td>32K 1,192／12K 847</td>
<td><strong>1,436</strong>（+20%）／934–952</td>
<td>保留</td>
</tr>
<tr>
<td><code>--kv-resident 32768</code></td>
<td>槽 9,549、命中 87.3%</td>
<td><strong>10,325</strong>、96.2%（暖 decode 69.2）</td>
<td>保留</td>
</tr>
<tr>
<td><code>--resident-experts</code>（IQ3_XXS）</td>
<td>暖 decode 35、命中 74.8%</td>
<td><strong>51</strong>（+46%）、87.8%</td>
<td>保留</td>
</tr>
<tr>
<td><code>--vram-reserve-mib 1536</code>（原 700）</td>
<td>VRAM 餘 650MiB，觸發 paging、速度掉到個位數</td>
<td>1,432MiB，穩定</td>
<td>保留</td>
</tr>
<tr>
<td><code>--spec-min-p 0.7</code>、<code>--adapt-async 1</code></td>
<td>—</td>
<td>+4%／adapt 2.84→0.38 ms/window</td>
<td>保留（社群數據，本機未獨立 A/B）</td>
</tr>
</tbody>
</table>
<p dir="auto">五個 prefill-path env（來源：GitHub issue #2274 ＋ PR #3436）：</p>
<pre><code>STRATA_PF_FUSED=1            # prefill 融合 kernel
STRATA_PF_GEMM=1             # prefill 走 GEMM
STRATA_PF_SWITCH_MIN_T=4096  # &lt;4096 token 不走新路徑
STRATA_HIP_WMMA=1            # HIP WMMA 指令
STRATA_PA_FAST=1             # paged-attention 快速路徑
</code></pre>
<p dir="auto">驗證 env 真的進了引擎進程：</p>
<pre><code class="language-bash">tr '\0' '\n' &lt; /proc/$(pgrep -f serve/server.py)/environ | grep STRATA_
</code></pre>
<h3>7.2 噪音（測過，差異在量測漂移內）</h3>
<ul>
<li><code>--pool-workers</code> 16 vs 9：暖機 69.2 vs 65.2／78.8；同一設定兩次冷啟已差 ±10%，判定為漂移，保留 9</li>
<li>關 vision：prefill 878 → 879、decode 無變化</li>
<li><code>--spec 3</code>（社群量到 −3.8%）／<code>--kv k8v4</code>（社群報不穩）：我未獨立測</li>
</ul>
<h3>7.3 穩定後整體基線（現用配置，非單項 A/B）</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>prompt</th>
<th style="text-align:right">prefill（t/s）</th>
<th style="text-align:right">decode 暖機（t/s）</th>
</tr>
</thead>
<tbody>
<tr>
<td>7.5K（session 第一發）</td>
<td style="text-align:right">611</td>
<td style="text-align:right">44.7</td>
</tr>
<tr>
<td>12K</td>
<td style="text-align:right">934–952</td>
<td style="text-align:right">59.8</td>
</tr>
<tr>
<td>15K</td>
<td style="text-align:right">1,169</td>
<td style="text-align:right">62.2</td>
</tr>
<tr>
<td>24K</td>
<td style="text-align:right">1,436</td>
<td style="text-align:right">77.2</td>
</tr>
<tr>
<td>32K</td>
<td style="text-align:right">1,483</td>
<td style="text-align:right">59.9</td>
</tr>
</tbody>
</table>
<blockquote>
<p dir="auto">這張表是「累積調優後」的整體表現，<strong>不能當成單一參數的效果</strong>。單項效果看 7.1。<br />
短 prompt 天生慢（expert cache 未熱），所以 611 與 1,483 不可直接比較。</p>
</blockquote>
<p dir="auto">專家駐留槽 10,325；arena 33,650 MiB、expert cache 17,145 MiB（<code>/metrics</code> 實測）。</p>
<hr />
<h2>8. 失敗與回滾（本節最有參考價值）</h2>
<h3>8.1 <code>--ple-io ram</code>：prefill 暴升，decode 死</h3>
<p dir="auto">把 PLE 表（27GB）搬入 RAM：冷 prefill <strong>3,453 t/s</strong>，但冷 decode <strong>15.3 t/s</strong>。對話式使用會等到死，已回滾。<br />
適合場景：一次性讀大量文件、不追求回覆速度。（參數出處：社群 topic/2224，配合 128GB RAM 用出 22→65 t/s）</p>
<h3>8.2 <code>--resident-experts</code>：Q2_0 無效，IQ3_XXS 有效</h3>
<p dir="auto">Q2_0：prefill 502（零改善）、暖機 decode 34.6 → 回滾。<br />
IQ3_XXS：暖機 decode 35 → 51（+46%）、命中率 74.8% → 87.8% → 保留。<br />
<strong>教訓</strong>：參數效果依量化而變，換量化之後之前否決過的 flag 要重測。</p>
<h3>8.3 <code>--kv-resident 131072</code>（全 KV 駐留）：專家槽被搶</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>設定</th>
<th style="text-align:right">專家槽</th>
<th style="text-align:right">32K prefill</th>
<th style="text-align:right">冷啟 decode</th>
</tr>
</thead>
<tbody>
<tr>
<td>32768</td>
<td style="text-align:right"><strong>10,325</strong></td>
<td style="text-align:right">1,436</td>
<td style="text-align:right">59.8</td>
</tr>
<tr>
<td>131072</td>
<td style="text-align:right">9,612</td>
<td style="text-align:right">1,423</td>
<td style="text-align:right"><strong>50.9</strong></td>
</tr>
</tbody>
</table>
<p dir="auto">→ 回滾 32768。KV 全駐留換走 713 個專家槽，得不償失。（社群 issue #3383 用 131072 只得 7,831 槽，方向一致）</p>
<h3>8.4 專家槽數字要講清楚是哪個量化</h3>
<p dir="auto">本機 Q2_0 時期可放 <strong>14,042</strong> 個專家槽；IQ3_XXS ＋ <code>--kv-resident 32768</code> 是 <strong>10,325</strong>（加 kv-resident 前為 9,549）。<br />
同一篇文章出現兩個數不是矛盾，但<strong>必須標明時期與配置</strong>，否則讀者無法比較。</p>
<h3>8.5 社群實測過的負面結果（引用社群：issue #2523）</h3>
<p dir="auto"><code>--kv k8v4</code> 不穩、<code>--spec 3</code> 比預設 −3.8%、<code>--adapt-every/decay/swaps</code> 無額外增益。</p>
<h3>8.6 其他兩個會浪費時間的坑</h3>
<ul>
<li><strong>vision build 連結失敗</strong>：同坑 1，<code>-no-pie</code> 解決</li>
<li><strong>靜默回落舊 ROCm</strong>：見坑 2，調完參冇反應先 <code>ldd</code>／<code>/proc/*/maps</code> 確認</li>
</ul>
<hr />
<h2>9. 與同型號社群對照</h2>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>對照對象</th>
<th>硬件</th>
<th>Prefill</th>
<th>Decode</th>
</tr>
</thead>
<tbody>
<tr>
<td>社群 R9700 32GB（引用社群）</td>
<td>32GB ＋ 12700K／7900X3D</td>
<td><strong>1,158–1,191</strong></td>
<td>61.7</td>
</tr>
<tr>
<td>社群 issue #2274（7900XTX）</td>
<td>24GB ＋ 較新 CPU ＋ PF env</td>
<td>16K <strong>1,848</strong>／32K <strong>2,093</strong></td>
<td>未報</td>
</tr>
<tr>
<td>社群 topic/2298（7900XTX 單卡）</td>
<td>24GB</td>
<td>—</td>
<td>中位 <strong>117</strong></td>
</tr>
<tr>
<td><strong>我（7900XTX 24GB）</strong></td>
<td>24GB ＋ E5-2686 v4</td>
<td>19K <strong>1,275</strong>／39K <strong>1,192</strong></td>
<td>59.9–81</td>
</tr>
</tbody>
</table>
<p dir="auto"><strong>目前結果支持的解釋</strong>（不是已被證實的定論）：</p>
<ol>
<li><strong>VRAM 容量限制專家駐留</strong>：24GB 只放得落 10,325 槽（Q2_0 時期為 14,042），3.2K prompt 時約 18% 專家工作要交 AVX2 CPU（Q2_0 時期量測）</li>
<li><strong>CPU 單核較慢</strong>：12700K／7900X3D 單核約 E5-2686 v4 兩倍以上，而 prefill 是 CPU＋GPU 混合負載</li>
</ol>
<p dir="auto"><strong>未做的對照</strong>（要講清楚，否則就是過度推論）：</p>
<ul>
<li>同一部機、同一腳本、只換 VRAM 駐留策略的受控測試</li>
<li>同一模型同一引擎、跨 CPU 平台的對照</li>
</ul>
<p dir="auto"><strong>可以肯定的部分</strong>：加 RAM 不會提升 prefill 上限（本機 Q2_0 與 IQ3_XXS 的 RAM 使用都是 41–43GB，速度差異來自量化與參數，不是 RAM 總量）。</p>
<hr />
<h2>10. 質素實測（範圍與限制）</h2>
<p dir="auto">每次改配置都重跑同一組題：</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>題型</th>
<th>答案</th>
<th>結果</th>
</tr>
</thead>
<tbody>
<tr>
<td>時鐘 3:15 夾角</td>
<td>7.5°</td>
<td><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/2705.png?v=ec85ec55bc1" 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>3 紅 2 藍抽兩紅</td>
<td>3/10</td>
<td><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/2705.png?v=ec85ec55bc1" 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>17×23</td>
<td>391</td>
<td><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/2705.png?v=ec85ec55bc1" 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>86.5K 字文件＋「正式 vs 二手報價」陷阱（6 題）</td>
<td>全中</td>
<td><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/2705.png?v=ec85ec55bc1" class="not-responsive emoji emoji-android emoji--white_check_mark" style="height:1.4em;width:auto;vertical-align:middle" title="✅" alt="✅" /> 6/6</td>
</tr>
</tbody>
</table>
<p dir="auto">IQ3_XXS 跑 86.5K 字：6/6、單次 call 111 秒、prefill 544 t/s（6.2K prompt）、decode 42–61。</p>
<p dir="auto"><strong>這組測試的局限（老實講）</strong>：</p>
<ul>
<li>只覆蓋數學、概率、長文引用，未覆蓋程式碼生成、指令遵從、多輪一致性</li>
<li>PF flags 會改 rounding，輸出不再 byte-identical，所以「六題過」只代表基本能力未退化，不代表整體質素等同</li>
<li>要比較兩個量化，應該同題目、同生成參數、多次重複，再比整體結果</li>
</ul>
<p dir="auto">另外（27B 上的實測，非 Strata）：<code>reasoning_effort</code> 由 xhigh 降到 medium，token 少三成而質素不變；關掉思考反而答錯邊界題（時鐘題答 75 而非 7.5）。</p>
<hr />
<h2>11. 結論</h2>
<p dir="auto"><strong>適合</strong></p>
<ul>
<li>有 24GB 卡 ＋ ≥64GB RAM，想用 125B 級質素</li>
<li>主要做長文件／長對話（prefill 1,200–1,483 很夠用）</li>
<li>接受 decode 60–80、短對話第一發慢</li>
<li>願意花一兩晚調參、自己 build</li>
</ul>
<p dir="auto"><strong>不適合</strong></p>
<ul>
<li>追求 1,000+ 穩定 prefill（要 32GB VRAM 或更快 CPU）</li>
<li>要 vision（食 2–3GB VRAM，專家槽直接縮）</li>
<li>同時要出片／跑其他 GPU 工作（一張卡一個引擎）</li>
<li>只要「裝完即用」</li>
</ul>
<p dir="auto"><strong>下一步（未做，屬推論）</strong></p>
<ol>
<li>加 RAM 到 128GB → 上 IQ3_S（質素優先），速度不會提升</li>
<li>換 CPU 平台（12700K／7900X3D）→ prefill 有機會翻倍，但我未做同機對照</li>
<li>加第二張 24GB 卡 → 專家槽翻倍，decode 受惠（要先解決 RAM）</li>
</ol>
<hr />
<h2>附錄 A：現用設定</h2>
<pre><code>--prefill auto:32768
--spec 4  --spec-min-p 0.7
--kv int8  --kv-resident 32768
--max-context 131072
--vram-reserve-mib 1536
--conversation-cache-mib 4096  --conversation-cache-slots 4
--expert-cache auto
--resident-experts
--adapt-async 1
--pool-workers 9
--short-read 512
--pool-affinity auto
（無 vision）
</code></pre>
<p dir="auto">env（7 個）：</p>
<pre><code>STRATA_HIPBLASLT_TUNING=&lt;hipblaslt tuning txt&gt;
STRATA_ROUTE_TAIL_SKIP=7
STRATA_PF_FUSED=1
STRATA_PF_GEMM=1
STRATA_PF_SWITCH_MIN_T=4096
STRATA_HIP_WMMA=1
STRATA_PA_FAST=1
</code></pre>
<h2>附錄 B：啟動／回滾紀律</h2>
<ol>
<li><code>LD_LIBRARY_PATH</code> 指向 venv 內 ROCm 子目錄；起機前 <code>ldd engine/strata | grep /opt/rocm</code> 自檢</li>
<li>停機腳本要順手起回原本的 llama.cpp 並等 <code>/health</code></li>
<li>升級前保留舊引擎：<code>mv</code> 不要 <code>rm</code>，回滾就是 <code>mv</code> 返</li>
<li>只綁 <code>127.0.0.1</code> 不需要 api_key；綁 <code>0.0.0.0</code> 要自己生成 32 hex key</li>
</ol>
<h2>參考</h2>
<ul>
<li>Strata repo（Niko1221/Strata）；官方 <code>DETAILS.md</code>／<code>MODELS.md</code>／<code>INSTALL.md</code></li>
<li>GitHub issue <strong>#2523</strong>（7900XTX、IQ3_S 調優）</li>
<li>GitHub issue <strong>#2274</strong> ＋ PR <strong>#3436</strong>（prefill-path env）</li>
<li>lcz topic/2032、2189、2224（安裝與極致優化）、topic/2046（同款 CPU）、topic/2084（IQ3_S vs IQ3_XXS）、topic/2298（7900XTX 單卡 decode）</li>
</ul>
<hr />
<p dir="auto"><strong>後記</strong>：最花時間的不是調參，是量測紀律——同一設定跑兩次可以差 20%，所有比較都要固定 prompt、固定題組、分冷啟暖機，每次只改一個變量。文中每個本機數字至少跑兩次；引用社群數據一律標明來源，未做的對照也明寫未做。</p>
]]></description><link>https://lcz.me/topic/2562</link><generator>RSS for Node</generator><lastBuildDate>Sun, 25 Oct 2026 00:03:47 GMT</lastBuildDate><atom:link href="https://lcz.me/topic/2562.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 24 Oct 2026 17:57:54 GMT</pubDate><ttl>60</ttl></channel></rss>