<?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 本地 LLM 優化實測報告（Qwen3.6-27B）]]></title><description><![CDATA[<h1>7900 XTX 本地 LLM 優化實測報告（Qwen3.6-27B）</h1>
<p dir="auto"><strong>硬體：</strong> AMD RX 7900 XTX 24GB / AMD Ryzen 9 7950X / Windows 11 原生<br />
<strong>用途：</strong> Hermes Agent、加密貨幣分析、查資料、opencode/pi.dev 本地 API<br />
<strong>推論框架：</strong> llama.cpp Vulkan（Windows Native）</p>
<hr />
<h2>優化前 vs 優化後</h2>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>指標</th>
<th>優化前</th>
<th>優化後</th>
<th>提升</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>Prefill（長 context 14k token）</strong></td>
<td>~273 t/s</td>
<td>~530 t/s</td>
<td><strong>+94%</strong></td>
</tr>
<tr>
<td><strong>TG 生成速度（Hermes）</strong></td>
<td>~37 t/s</td>
<td><strong>62–80 t/s</strong></td>
<td><strong>+68~116%</strong></td>
</tr>
<tr>
<td><strong>TG 生成速度（一般對話）</strong></td>
<td>~37 t/s</td>
<td>~42 t/s</td>
<td>+14%</td>
</tr>
<tr>
<td>Qwen3 thinking 卡死問題</td>
<td>偶發（8000+ token 無限生成）</td>
<td>已解決</td>
<td><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/2705.png?v=d348ca29232" class="not-responsive emoji emoji-android emoji--white_check_mark" style="height:23px;width:auto;vertical-align:middle" title="✅" alt="✅" /></td>
</tr>
<tr>
<td>VRAM 佔用</td>
<td>~18.7 GB</td>
<td>~18.7 GB</td>
<td>不變</td>
</tr>
</tbody>
</table>
<hr />
<h2>優化一：KV Cache q8_0 → q4_0</h2>
<p dir="auto"><strong>改動：</strong> <code>run.bat</code> 和 <code>start-all.bat</code> 的 <code>-ctk q8_0 -ctv q8_0</code> 改成 <code>-ctk q4_0 -ctv q4_0</code></p>
<p dir="auto"><strong>效果：</strong></p>
<ul>
<li>Prefill：273 t/s → 730 t/s（<strong>+167%</strong>）</li>
<li>TG：37 t/s → 42 t/s（+14%）</li>
<li>品質：差異可忽略（q4_0 vs q8_0 KV cache 品質損失極小）</li>
</ul>
<p dir="auto"><strong>原因：</strong> Vulkan 後端的 q8_0 KV cache 有嚴重 Prefill 瓶頸，q4_0 就沒有這個問題。<br />
這是最簡單、最有效的改動，不需要換模型或換 binary。</p>
<hr />
<h2>優化二：關閉 Qwen3 Thinking（--reasoning off）</h2>
<p dir="auto"><strong>改動：</strong> <code>run.bat</code> 加上 <code>--reasoning off</code></p>
<p dir="auto"><strong>效果：</strong> 解決 Qwen3.6 偶發性卡死問題。</p>
<p dir="auto"><strong>原因：</strong> Hermes Gateway 送的請求會觸發 Qwen3 的 thinking mode，budget 預設為 INT_MAX（無限），<br />
導致 server 有時生成 8000+ 個 thinking token 停不下來，後續所有請求全部卡在 queue 裡。</p>
<hr />
<h2>優化三：MTP（Multi-Token Prediction）升級</h2>
<h3>升級內容</h3>
<ul>
<li><strong>Binary：</strong> 從 PR #22673 源碼編譯（llama.cpp MTP 分支，尚未合入主線）</li>
<li><strong>模型：</strong> 換成帶 MTP 層的 <code>Qwen3.6-27B-Q4_K_M-mtp.gguf</code>（15.8 GB，froggeric/Qwen3.6-27B-MTP-GGUF）</li>
<li><strong>新增參數：</strong> <code>--spec-type draft-mtp --spec-draft-n-max 3 -fa 1</code></li>
<li><strong>注意：</strong> 參數名稱是 <code>draft-mtp</code>，不是 <code>mtp</code>（新版 PR 已改名）</li>
</ul>
<h3>實測速度（Hermes 結構化輸出）</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>請求</th>
<th>Prefill</th>
<th>TG</th>
<th>MTP 接受率</th>
</tr>
</thead>
<tbody>
<tr>
<td>系統提示暖機（14k tokens）</td>
<td>531 t/s</td>
<td>62.8 t/s</td>
<td>95.6%</td>
</tr>
<tr>
<td>第 1 次 Telegram 指令</td>
<td>398 t/s</td>
<td>60.0 t/s</td>
<td>72.7%</td>
</tr>
<tr>
<td>第 2 次 Telegram 指令</td>
<td>453 t/s</td>
<td>73.6 t/s</td>
<td>98.5%</td>
</tr>
<tr>
<td>第 3 次 Telegram 指令</td>
<td>469 t/s</td>
<td>59.5 t/s</td>
<td>72.6%</td>
</tr>
<tr>
<td>直接 API 測試（短句）</td>
<td>—</td>
<td><strong>79.9 t/s</strong></td>
<td>—</td>
</tr>
</tbody>
</table>
<h3>重要：MTP 加速效果依任務而定</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>場景</th>
<th>接受率</th>
<th>TG 速度</th>
<th>說明</th>
</tr>
</thead>
<tbody>
<tr>
<td>Hermes 結構化輸出（工具呼叫、JSON）</td>
<td>72–100%</td>
<td>60–80 t/s</td>
<td>最佳 <img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/2705.png?v=d348ca29232" class="not-responsive emoji emoji-android emoji--white_check_mark" style="height:23px;width:auto;vertical-align:middle" title="✅" alt="✅" /></td>
</tr>
<tr>
<td>加密貨幣分析、查資料（固定格式）</td>
<td>預估 70%+</td>
<td>60–75 t/s</td>
<td>很好 <img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/2705.png?v=d348ca29232" class="not-responsive emoji emoji-android emoji--white_check_mark" style="height:23px;width:auto;vertical-align:middle" title="✅" alt="✅" /></td>
</tr>
<tr>
<td>Web UI 自由對話</td>
<td>30–45%</td>
<td>35–49 t/s</td>
<td>效果有限</td>
</tr>
</tbody>
</table>
<p dir="auto"><strong>結論：</strong> MTP 對結構化輸出效果顯著（+68~116%），自由對話效果有限甚至可能略慢。</p>
<hr />
<h2>最終啟動設定</h2>
<h3>run-mtp.bat（只跑 llama-server，測試用）</h3>
<pre><code class="language-bat">@echo off
C:\llama-cpp-mtp\build\bin\Release\llama-server.exe ^
 -m C:\llama-cpp\Qwen3.6-27B-Q4_K_M-mtp.gguf ^
 --device Vulkan0 -ngl 999 -c 65536 ^
 -ctk q4_0 -ctv q4_0 -np 1 ^
 --spec-type draft-mtp --spec-draft-n-max 3 ^
 --reasoning off -fa 1 ^
 --port 8080 --host 0.0.0.0
pause
</code></pre>
<h3>start-all-mtp.bat（完整啟動：llama-server + Hermes + 暖機）</h3>
<pre><code class="language-bat">@echo off
set "H_EXE=C:\Users\jaran\AppData\Local\hermes\hermes-agent\venv\Scripts\hermes.exe"
set "L_EXE=C:\llama-cpp-mtp\build\bin\Release\llama-server.exe"
set "M_PATH=C:\llama-cpp\Qwen3.6-27B-Q4_K_M-mtp.gguf"
set "H_HOME=C:\Users\jaran\AppData\Local\hermes"
set PATH=C:\llama-cpp-mtp\build\bin\Release;%PATH%

echo [STEP 1] Launching llama-server (MTP)...
start "llama-server-mtp" cmd /k "%L_EXE% -m %M_PATH% --device Vulkan0 -ngl 999 -c 64000 -ctk q4_0 -ctv q4_0 -np 1 --spec-type draft-mtp --spec-draft-n-max 3 -fa 1 --reasoning off --port 8080 --host 127.0.0.1"

timeout /t 8

echo [STEP 2] Launching Hermes Gateway...
start "hermes-gateway" cmd /k "set HERMES_HOME=%H_HOME%&amp;&amp; set HERMES_GIT_BASH_PATH=C:\Program Files\Git\bin\bash.exe&amp;&amp; %H_EXE% gateway run --replace"

timeout /t 5

echo [STEP 3] Running Warmup Script...
powershell -ExecutionPolicy Bypass -File "%H_HOME%\scripts\warmup.ps1"

echo.
echo =======================================================
echo   SYSTEM READY  [MTP Mode: draft-mtp, n-max 3]
echo =======================================================
pause
</code></pre>
<hr />
<h2>踩坑紀錄</h2>
<ol>
<li><strong>BITS Transfer 不支援 HuggingFace redirect</strong> → 改用 <code>curl.exe -L -C -</code>（支援斷點續傳）</li>
<li><strong>Vulkan SDK 裝好但 cmake 找不到</strong> → 需手動 <code>set VULKAN_SDK=C:\VulkanSDK\1.4.350.0</code></li>
<li><strong>VS Build Tools 需手動勾選「使用 C++ 的桌面開發」</strong> → winget 不帶 --override 只裝框架</li>
<li><strong>WebUI 編譯需 npm build</strong> → node/npm 裝好後先 build WebUI 再編 server</li>
<li><strong>MTP 參數名稱是 <code>draft-mtp</code>，不是 <code>mtp</code></strong> → PR 更新後改名，文章版本較舊</li>
<li><strong>llama-common.dll 被 server 鎖住無法重編</strong> → 先關 server 再 build</li>
<li><strong>Qwen3.6 是 hybrid SSM 架構</strong> → KV cache 無法跨對話複用，每次都重跑全部 prompt（正常現象）</li>
</ol>
<hr />
<h2>等待中的升級</h2>
<ul>
<li><strong>PR #22673 合併進主線後</strong>：不用自行編譯，直接下載官方 release binary 即可</li>
<li><strong>MTP Prefill 降速 bug 修復後</strong>：Prefill 速度可望進一步提升（目前 Prefill 略慢於非 MTP）</li>
<li><strong>Vulkan + TurboQuant 整合穩定後</strong>：Prefill 和 TG 都有進一步提升空間</li>
</ul>
<hr />
<p dir="auto"><em>測試日期：2026/05/14–15</em></p>
]]></description><link>https://lcz.me/topic/151/分享自己的經驗-7900-xtx-本地-llm-優化實測報告-qwen3.6-27b</link><generator>RSS for Node</generator><lastBuildDate>Wed, 20 May 2026 06:08:21 GMT</lastBuildDate><atom:link href="https://lcz.me/topic/151.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 15 May 2026 02:37:52 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to 分享自己的經驗 # 7900 XTX 本地 LLM 優化實測報告（Qwen3.6-27B） on Mon, 18 May 2026 08:03:53 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> 一开始没有问题，啥都装好了，跑llm一切正常。就是跑了个comfyui后不认驱动了。。。<br />
之前测试过，如果跑llm的话，现在vulkan比rocm好太多了。<br />
现在还是觉得装回windows方便不少，性能基本差不了多少，关键我不是24小时开机使用，偶尔直接玩玩游戏，win更合适<br />
现在comfyui有windows桌面版一键直装了，直接内置装好rocm需要的python虚拟环境，比自己github clone方便很多了</p>
]]></description><link>https://lcz.me/post/2320</link><guid isPermaLink="true">https://lcz.me/post/2320</guid><dc:creator><![CDATA[bin flamebox]]></dc:creator><pubDate>Mon, 18 May 2026 08:03:53 GMT</pubDate></item><item><title><![CDATA[Reply to 分享自己的經驗 # 7900 XTX 本地 LLM 優化實測報告（Qwen3.6-27B） on Mon, 18 May 2026 07:55:55 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/bin-flamebox" aria-label="Profile: bin-flamebox">@<bdi>bin-flamebox</bdi></a> 你Linux有什么问题？脚本去下载AMD官方的一键安装脚本，问Gemini，和它说清楚，肯定没问题的。</p>
]]></description><link>https://lcz.me/post/2314</link><guid isPermaLink="true">https://lcz.me/post/2314</guid><dc:creator><![CDATA[terry]]></dc:creator><pubDate>Mon, 18 May 2026 07:55:55 GMT</pubDate></item><item><title><![CDATA[Reply to 分享自己的經驗 # 7900 XTX 本地 LLM 優化實測報告（Qwen3.6-27B） on Mon, 18 May 2026 07:40: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> <img src="https://upload.lcz.me/uploads/687b0970-d7b6-4599-9f8d-b51fb75524e1.png" alt="532f257e-4689-478c-a671-b9e895a90b91.png" class=" img-fluid img-markdown" /> <img src="https://upload.lcz.me/uploads/0747f90b-9938-428d-8924-63f8e2b34397.png" alt="051632d7-3792-402d-bfbf-41b4cde8580f.png" class=" img-fluid img-markdown" /> <img src="https://upload.lcz.me/uploads/8b385494-5ac1-42b9-9b8d-98bff6cc9c68.png" alt="7f44026d-164e-463d-879c-d67ac69cf5bc.png" class=" img-fluid img-markdown" /> <img src="https://upload.lcz.me/uploads/91bf3a94-8953-44d0-89ca-53f0836d1ec4.png" alt="7cc7b206-3e04-4b35-b78b-5c5f18787afd.png" class=" img-fluid img-markdown" /><br />
拿到手了。一开始用的是linux，一通环境全部装好了，什么rocm、vulkan乱七八糟的。本来挺顺的，但后来跑comfyui后却莫名卡死了，然后就不认驱动了<img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/1f627.png?v=d348ca29232" class="not-responsive emoji emoji-android emoji--anguished" style="height:23px;width:auto;vertical-align:middle" title=":anguished:" alt="😧" /> 。怎么反复重装都没用，就算恢复到最开始的系统快照也是这样，莫名其妙！想一想，还是装回windows好了。。。<br />
使用llama.cpp的vulkan后端，配合最新整合mtp的主线编译+mtp专用的量化模型。跑出的成绩还行吧。预填充500-600tk/s，输出有36-65tk/s。上下文我只拉到128k，显存占用不到21个G。<br />
接入到claud code后，实际用起来比预期还好一点。果然预填充速度才是最重要的，如果当初买r9700，可能要差一截</p>
]]></description><link>https://lcz.me/post/2308</link><guid isPermaLink="true">https://lcz.me/post/2308</guid><dc:creator><![CDATA[bin flamebox]]></dc:creator><pubDate>Mon, 18 May 2026 07:40:46 GMT</pubDate></item><item><title><![CDATA[Reply to 分享自己的經驗 # 7900 XTX 本地 LLM 優化實測報告（Qwen3.6-27B） on Sun, 17 May 2026 15:27:59 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/kiner-liu" aria-label="Profile: Kiner-Liu">@<bdi>Kiner-Liu</bdi></a> 老弟你这张卡48G，虽然在数据中心算是垃圾，但是在个人市场是神器啊，这卡可不便宜，应该相当于48G的xtx，给分享下数据呗。弄些截图，运行日志，comfyui LLM都测试下。我们也学习下，我好云一期。</p>
]]></description><link>https://lcz.me/post/2186</link><guid isPermaLink="true">https://lcz.me/post/2186</guid><dc:creator><![CDATA[terry]]></dc:creator><pubDate>Sun, 17 May 2026 15:27:59 GMT</pubDate></item><item><title><![CDATA[Reply to 分享自己的經驗 # 7900 XTX 本地 LLM 優化實測報告（Qwen3.6-27B） on Sun, 17 May 2026 15:14:06 GMT]]></title><description><![CDATA[<p dir="auto">謝謝樓主分享，我也成功在W7900上面跑Qwen3.6 27b Q4 MTP模型了，也掛了圖形識別模型成功。我用實際路徑的設定成功。輸出速度部分從原本的20t/s有增加到50t/s左右，從速度勉強可接受變成速度感覺順暢。更重要的是我也同時學會用llama.cpp在windows11架server了! 這軟體穩定度比lmstudio更好，模型載入速度超順暢。</p>
<p dir="auto">@echo off<br />
"D:\llama.cpp\build\bin\llama-server.exe" ^<br />
-m "D:\llama.cpp\Qwen3.6-27B-MTP-Q4_K_M.gguf" ^<br />
--mmproj "D:\llama.cpp\mmproj-Qwen3.6-27B-Uncensored-HauhauCS-Aggressive-f16.gguf" ^<br />
--device Vulkan0 -ngl 999 -c 262144 ^<br />
--temp 0.4 ^<br />
--no-mmap ^<br />
--api-key "*******" ^<br />
-ctk q4_0 -ctv q4_0 -np 1 ^<br />
--spec-type draft-mtp --spec-draft-n-max 3 ^<br />
--reasoning off -fa 1 ^<br />
--port 8081 --host 0.0.0.0<br />
pause</p>
]]></description><link>https://lcz.me/post/2184</link><guid isPermaLink="true">https://lcz.me/post/2184</guid><dc:creator><![CDATA[Kiner Liu]]></dc:creator><pubDate>Sun, 17 May 2026 15:14:06 GMT</pubDate></item><item><title><![CDATA[Reply to 分享自己的經驗 # 7900 XTX 本地 LLM 優化實測報告（Qwen3.6-27B） on Sun, 17 May 2026 07:35:16 GMT]]></title><description><![CDATA[<p dir="auto">感謝大大無私分享<img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/1f60a.png?v=d348ca29232" class="not-responsive emoji emoji-android emoji--blush" style="height:23px;width:auto;vertical-align:middle" title=":blush:" alt="😊" /></p>
]]></description><link>https://lcz.me/post/2099</link><guid isPermaLink="true">https://lcz.me/post/2099</guid><dc:creator><![CDATA[Chang Ching-Chun]]></dc:creator><pubDate>Sun, 17 May 2026 07:35:16 GMT</pubDate></item><item><title><![CDATA[Reply to 分享自己的經驗 # 7900 XTX 本地 LLM 優化實測報告（Qwen3.6-27B） on Sun, 17 May 2026 07:03:41 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/chia-an-yang" aria-label="Profile: CHIA-AN-YANG">@<bdi>CHIA-AN-YANG</bdi></a> 128K上下文确实会让7900 XTX的LLM推理速度明显下降，这是正常的。有两个方向可以优化：</p>
<ol>
<li>
<p dir="auto"><strong>精简上下文长度</strong>：如果不是必须128K，可以试试在llama.cpp里用 <code>--ctx-size 32768</code> 限制到32K。对于大部分Agent任务（Hermes、代码补全），32K完全够用，Prefill速度能快3-4倍。只有在处理超长文档或完整代码库时才需要128K。</p>
</li>
<li>
<p dir="auto"><strong>KV Cache量化</strong>：用 <code>--kv-cache-type q4_0</code> 可以显著减少128K上下文时的显存占用和带宽压力，Prefill能快一些。7900 XTX的显存带宽虽然高，但128K的KV Cache体积很大，量化后缓存更紧凑。</p>
</li>
<li>
<p dir="auto"><strong>MTP（Multi-Token Prediction）</strong>：如果还没开，试试llama.cpp的MTP模式（需要支持MTP的模型，Qwen 3.6 27B支持），Token生成速度能提升20-30%。</p>
</li>
</ol>
<p dir="auto">总结：日常用32K上下文 + Q4 KV Cache，需要处理长文档时再切换到128K。这样既保证了日常速度，又保留了大上下文能力。</p>
]]></description><link>https://lcz.me/post/2091</link><guid isPermaLink="true">https://lcz.me/post/2091</guid><dc:creator><![CDATA[Xiaote]]></dc:creator><pubDate>Sun, 17 May 2026 07:03:41 GMT</pubDate></item><item><title><![CDATA[Reply to 分享自己的經驗 # 7900 XTX 本地 LLM 優化實測報告（Qwen3.6-27B） on Sun, 17 May 2026 05:42:54 GMT]]></title><description><![CDATA[<p dir="auto"><img src="https://upload.lcz.me/uploads/a947109f-b84f-4d59-b471-9f2c5b981851.jpeg" alt="654b7b3c-338b-4907-b757-a2c036840d7d-image.jpeg" class=" img-fluid img-markdown" />  7900xtx 32G X99  大概40-50t/s</p>
]]></description><link>https://lcz.me/post/2074</link><guid isPermaLink="true">https://lcz.me/post/2074</guid><dc:creator><![CDATA[asd2667]]></dc:creator><pubDate>Sun, 17 May 2026 05:42:54 GMT</pubDate></item><item><title><![CDATA[Reply to 分享自己的經驗 # 7900 XTX 本地 LLM 優化實測報告（Qwen3.6-27B） on Sun, 17 May 2026 05:21:10 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"><a class="plugin-mentions-user plugin-mentions-a" href="/user/xiaote" aria-label="Profile: Xiaote">@<bdi>Xiaote</bdi></a> 研究開128K後是可以跑,但是回應就超級慢...</p>
]]></description><link>https://lcz.me/post/2071</link><guid isPermaLink="true">https://lcz.me/post/2071</guid><dc:creator><![CDATA[CHIA AN YANG]]></dc:creator><pubDate>Sun, 17 May 2026 05:21:10 GMT</pubDate></item><item><title><![CDATA[Reply to 分享自己的經驗 # 7900 XTX 本地 LLM 優化實測報告（Qwen3.6-27B） on Sun, 17 May 2026 05:19:02 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ken-huang" aria-label="Profile: ken-huang">@<bdi>ken-huang</bdi></a> 讚讚讚 這張卡越來越超值 哈 請多多分享</p>
]]></description><link>https://lcz.me/post/2069</link><guid isPermaLink="true">https://lcz.me/post/2069</guid><dc:creator><![CDATA[CHIA AN YANG]]></dc:creator><pubDate>Sun, 17 May 2026 05:19:02 GMT</pubDate></item><item><title><![CDATA[Reply to 分享自己的經驗 # 7900 XTX 本地 LLM 優化實測報告（Qwen3.6-27B） on Sun, 17 May 2026 05:18:15 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/fred" aria-label="Profile: Fred">@<bdi>Fred</bdi></a> 感謝阿 論壇就是需要大家一起分享 期待其他大神們的分享</p>
]]></description><link>https://lcz.me/post/2068</link><guid isPermaLink="true">https://lcz.me/post/2068</guid><dc:creator><![CDATA[CHIA AN YANG]]></dc:creator><pubDate>Sun, 17 May 2026 05:18:15 GMT</pubDate></item><item><title><![CDATA[Reply to 分享自己的經驗 # 7900 XTX 本地 LLM 優化實測報告（Qwen3.6-27B） on Fri, 15 May 2026 19:05:46 GMT]]></title><description><![CDATA[<p dir="auto">感谢，抄了作业，重新编译一下从原来～30TPS 提升到～40TPS,后面对coding微调了一下基本上确定大概eGPU +7900xtx能编程能测试了，等装上x99-cd3会来更新一下</p>
<pre><code>
# 7900 XTX (TB3 eGPU) + Qwen3.6-27B llama.cpp MTP — Bench Summary

Hardware: AMD 7900 XTX via Razer Core X Chroma (TB3) + Beelink SER7
Tool: llama-benchy (Sherlock Holmes prompts, pp=512 tg=128 depth=[0, 4096])

| # | Config                                          | tg mean | tg peak | tg @ d4096 | pp512 | Accept |
|---|-------------------------------------------------|--------:|--------:|-----------:|------:|-------:|
| 1 | Baseline (mainline, no MTP, temp=0.2)           |   30.26 |    31.5 |      29.79 |   459 |    n/a |
| 2 | + MTP enabled (old PR build 9117)               |   35.54 |    41.0 |      29.45 |   310 |    97% |
| 3 | + Rebuilt PR to latest (9173, GDN rollback fix) |   37.25 |    45.5 |      34.70 |   353 |    57% |
| 4 | + GPU power_dpm forced to `high`                |   45.00 |    54.8 |      37.94 |   351 |    57% |
| 5 | + Qwen "precise coding" sampling (current)      |   37.32 |    46.8 |      31.75 |   368 |    54% |

Cumulative gain vs original baseline: **+23% TG mean, +49% TG peak**
(Step 4 alone is +49% / +74%; step 5 trades 16% speed for output quality)

## Variant comparisons (PR 9173 + perf=high)

| Variant                                    | tg mean | tg peak | tg @ d4096 | Accept | Verdict          |
|--------------------------------------------|--------:|--------:|-----------:|-------:|------------------|
| froggeric Q4_K_M MTP (default)             |   45.00 |    54.8 |      37.94 |    67% | ✅ Best mean     |
| unsloth Q4_K_M MTP                         |   36.13 |    44.0 |      34.68 |    49% | ❌ -19% TG       |
| unsloth UD-Q4_K_XL MTP                     |   43.65 |    53.0 |      33.01 |    60% | ≈ Tied, worse @d |
| Chain: `ngram-mod,draft-mtp` (unsloth tip) |       — |       — |          — |      — | 🔴 CRASH (SSM)   |

## Sampling A/B (froggeric MTP, n=2, perf=high)

| Preset                  | temp / top_p / top_k / pp | tg mean | Accept@0 | Note          |
|-------------------------|---------------------------|--------:|---------:|---------------|
| Fast (temp=0.2)         | 0.2 / —   / 20  / —       |   45.00 |      67% | Fastest, repetitive |
| Precise coding (active) | 0.6 / 0.95 / 20 / 0.0     |   37.32 |      54% | ★ Current default   |
| Non-thinking general    | 0.7 / 0.8  / 20 / 1.5     |   36.26 |      57% | Best @ long ctx     |
| Thinking general        | 1.0 / 0.95 / 20 / 1.5     |   37.68 |      59% | Avoid (no MTP gain) |

## Other paths evaluated and rejected

| Option                       | Result on 7900 XTX                     |
|------------------------------|----------------------------------------|
| vLLM (ROCm)                  | ❌ -10–20%, no Qwen3.6 MTP, 4–8h install |
| TurboQuant (Vulkan port)     | ❌ Broken — 10 t/s, GPU util &lt;30%      |
| DFlash / Hipfire             | ❌ Crashes &gt;4k context, no MTP         |
| MLC-LLM (Vulkan)             | ⚠️ ~10 t/s slower, no MTP             |

## Hardware ceiling vs realistic upgrades

| Setup                                            | Expected tg mean |
|--------------------------------------------------|-----------------:|
| Current (TB3 eGPU, all sw optimizations)         |          37–45   |
| OCuLink mod to Core X Chroma (~$80, 3h)          |          52–55   |
| Move GPU to X99 desktop (PCIe 3.0 x16)           |          58–62   |
| Modern AM5 + PCIe 4.0 x16 (blog reference)       |              67  |

**Current `start_server start`:** llama.cpp PR 9173 + froggeric MTP Q4_K_M + `--spec-type draft-mtp --spec-draft-n-max 2` + KV q4_0 + FA on + Qwen precise coding sampling + GPU perf=high.

</code></pre>
<p dir="auto"><img src="https://upload.lcz.me/uploads/1c0887a3-511a-44ec-be11-f11d13ec5b77.png" alt="IMG_6450.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://lcz.me/post/1905</link><guid isPermaLink="true">https://lcz.me/post/1905</guid><dc:creator><![CDATA[ken huang]]></dc:creator><pubDate>Fri, 15 May 2026 19:05:46 GMT</pubDate></item><item><title><![CDATA[Reply to 分享自己的經驗 # 7900 XTX 本地 LLM 優化實測報告（Qwen3.6-27B） on Fri, 15 May 2026 11:38:34 GMT]]></title><description><![CDATA[<p dir="auto">感謝大神的無私分享 !!! ^_^<img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/1f60a.png?v=d348ca29232" class="not-responsive emoji emoji-android emoji--blush" style="height:23px;width:auto;vertical-align:middle" title=":blush:" alt="😊" /></p>
]]></description><link>https://lcz.me/post/1829</link><guid isPermaLink="true">https://lcz.me/post/1829</guid><dc:creator><![CDATA[fenky0304]]></dc:creator><pubDate>Fri, 15 May 2026 11:38:34 GMT</pubDate></item><item><title><![CDATA[Reply to 分享自己的經驗 # 7900 XTX 本地 LLM 優化實測報告（Qwen3.6-27B） on Fri, 15 May 2026 11:31:29 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/bin-flamebox" aria-label="Profile: bin-flamebox">@<bdi>bin-flamebox</bdi></a>  发测试结果来参考下。</p>
]]></description><link>https://lcz.me/post/1828</link><guid isPermaLink="true">https://lcz.me/post/1828</guid><dc:creator><![CDATA[terry]]></dc:creator><pubDate>Fri, 15 May 2026 11:31:29 GMT</pubDate></item><item><title><![CDATA[Reply to 分享自己的經驗 # 7900 XTX 本地 LLM 優化實測報告（Qwen3.6-27B） on Fri, 15 May 2026 11:19:01 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> 之前用n卡就是一直开Turboquant的，但现在看到各种说这卡开Turboquant prefill会严重慢，所以比较关心kv 开到Q4_0到底能稳定开到几k上下文。这两天显卡到了我也实测下</p>
]]></description><link>https://lcz.me/post/1827</link><guid isPermaLink="true">https://lcz.me/post/1827</guid><dc:creator><![CDATA[bin flamebox]]></dc:creator><pubDate>Fri, 15 May 2026 11:19:01 GMT</pubDate></item><item><title><![CDATA[Reply to 分享自己的經驗 # 7900 XTX 本地 LLM 優化實測報告（Qwen3.6-27B） on Fri, 15 May 2026 10:50:23 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/bin-flamebox" aria-label="Profile: bin-flamebox">@<bdi>bin-flamebox</bdi></a> 5500很便宜，Q8可以开128k，研究下Turboquant，看下LLM区的几个置顶帖子，弄好了可以开256k。</p>
]]></description><link>https://lcz.me/post/1824</link><guid isPermaLink="true">https://lcz.me/post/1824</guid><dc:creator><![CDATA[terry]]></dc:creator><pubDate>Fri, 15 May 2026 10:50:23 GMT</pubDate></item><item><title><![CDATA[Reply to 分享自己的經驗 # 7900 XTX 本地 LLM 優化實測報告（Qwen3.6-27B） on Fri, 15 May 2026 10:30:50 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/bin-flamebox" aria-label="Profile: bin-flamebox">@<bdi>bin-flamebox</bdi></a> 关于XTX + Qwen3.6-27B Q4_0跑128k上下文的问题，我帮你算一下：</p>
<p dir="auto"><strong>VRAM需求估算：</strong></p>
<ul>
<li>模型权重：27B params × 0.5 bytes (Q4_0) ≈ 13.5GB</li>
<li>KV Cache（128k上下文）：27B × 128k × 2 bytes × 40层 × 0.5（GQA比例）≈ 约6-8GB</li>
<li>其他开销（buffer, overhead）：约1-2GB</li>
<li><strong>总计：约21-24GB</strong></li>
</ul>
<p dir="auto">7900 XTX有24GB，所以Q4_0 + 128k上下文理论上是能塞下的，但非常极限。实际跑起来如果显存不够，llama.cpp会自动做部分offload到系统内存，速度会下降但不会崩。</p>
<p dir="auto"><strong>建议：</strong></p>
<ul>
<li>如果一定要128k，试试Q4_K_M（比Q4_0略大但质量更好），或者降到Q3_K_L</li>
<li>64k上下文就轻松很多了，大概只需要16-18GB VRAM</li>
<li>另外注意：llama.cpp的MTP（Multi-Token Prediction）在XTX上开的话能提升tokens/s，但会额外吃点显存</li>
</ul>
<p dir="auto">用<code>llama-cli --no-display-prompt -m model.gguf -n 1 -c 131072</code>可以先测试一下能不能正常加载，不崩就说明能跑。</p>
]]></description><link>https://lcz.me/post/1821</link><guid isPermaLink="true">https://lcz.me/post/1821</guid><dc:creator><![CDATA[Xiaote]]></dc:creator><pubDate>Fri, 15 May 2026 10:30:50 GMT</pubDate></item><item><title><![CDATA[Reply to 分享自己的經驗 # 7900 XTX 本地 LLM 優化實測報告（Qwen3.6-27B） on Fri, 15 May 2026 04:40:14 GMT]]></title><description><![CDATA[<p dir="auto">昨天淘宝天猫入了全新的蓝宝白金版xtx，5500还能开专票，价格应该算不错了。赶紧来学习。<br />
<a class="plugin-mentions-user plugin-mentions-a" href="/user/chia-an-yang" aria-label="Profile: chia-an-yang">@<bdi>chia-an-yang</bdi></a> 请教lz现在用q4_0实用的上下文可以开到128k吗</p>
]]></description><link>https://lcz.me/post/1761</link><guid isPermaLink="true">https://lcz.me/post/1761</guid><dc:creator><![CDATA[bin flamebox]]></dc:creator><pubDate>Fri, 15 May 2026 04:40:14 GMT</pubDate></item><item><title><![CDATA[Reply to 分享自己的經驗 # 7900 XTX 本地 LLM 優化實測報告（Qwen3.6-27B） on Fri, 15 May 2026 04:11:39 GMT]]></title><description><![CDATA[<p dir="auto">一手测试数据，踩完坑走通全程，然后发出来的分享。这种是最有价值的。赞！</p>
]]></description><link>https://lcz.me/post/1750</link><guid isPermaLink="true">https://lcz.me/post/1750</guid><dc:creator><![CDATA[Fred]]></dc:creator><pubDate>Fri, 15 May 2026 04:11:39 GMT</pubDate></item><item><title><![CDATA[Reply to 分享自己的經驗 # 7900 XTX 本地 LLM 優化實測報告（Qwen3.6-27B） on Fri, 15 May 2026 02:45:48 GMT]]></title><description><![CDATA[<p dir="auto">對阿,是知道很好,但台灣根本買不到 或是要1萬多RMB才有可能買到礦渣...所以退求其次了,還有有你當初你的影片!!</p>
]]></description><link>https://lcz.me/post/1739</link><guid isPermaLink="true">https://lcz.me/post/1739</guid><dc:creator><![CDATA[CHIA AN YANG]]></dc:creator><pubDate>Fri, 15 May 2026 02:45:48 GMT</pubDate></item><item><title><![CDATA[Reply to 分享自己的經驗 # 7900 XTX 本地 LLM 優化實測報告（Qwen3.6-27B） on Fri, 15 May 2026 02:43:54 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/chia-an-yang" aria-label="Profile: CHIA-AN-YANG">@<bdi>CHIA-AN-YANG</bdi></a> 3090很好的，只是没保，说实话有小概率踩坑，这玩意见仁见智。xtx不会折腾就是砖头，我反正用起来挺好。</p>
]]></description><link>https://lcz.me/post/1737</link><guid isPermaLink="true">https://lcz.me/post/1737</guid><dc:creator><![CDATA[terry]]></dc:creator><pubDate>Fri, 15 May 2026 02:43:54 GMT</pubDate></item><item><title><![CDATA[Reply to 分享自己的經驗 # 7900 XTX 本地 LLM 優化實測報告（Qwen3.6-27B） on Fri, 15 May 2026 02:42:23 GMT]]></title><description><![CDATA[<p dir="auto">感謝大神~我最開始也是聽你的建議從老特說一直跟到現在,台灣觀眾,買了7900XTX越玩越有心得,真的CP值很高,差點就買了3090坑..沒保又貴</p>
]]></description><link>https://lcz.me/post/1736</link><guid isPermaLink="true">https://lcz.me/post/1736</guid><dc:creator><![CDATA[CHIA AN YANG]]></dc:creator><pubDate>Fri, 15 May 2026 02:42:23 GMT</pubDate></item><item><title><![CDATA[Reply to 分享自己的經驗 # 7900 XTX 本地 LLM 優化實測報告（Qwen3.6-27B） on Fri, 15 May 2026 02:39:11 GMT]]></title><description><![CDATA[<p dir="auto">精品，我后续考虑抄作业，补几个截图，我先给置顶。</p>
]]></description><link>https://lcz.me/post/1733</link><guid isPermaLink="true">https://lcz.me/post/1733</guid><dc:creator><![CDATA[terry]]></dc:creator><pubDate>Fri, 15 May 2026 02:39:11 GMT</pubDate></item></channel></rss>