<?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[用llama.cpp的兄弟们记得升级]]></title><description><![CDATA[<p dir="auto">因为第二张3060卡跑qwen3-vl模型总导致死机的原因，今天一整天都在折腾环境。</p>
<p dir="auto">发现了一个问题，同样的启动脚本，在llama.cpp的不同版本中，性能差了不止一倍。</p>
<p dir="auto">启动脚本【<br />
REM 仅使用第一张 GPU (RTX 3090 Ti)<br />
set CUDA_VISIBLE_DEVICES=0</p>
<p dir="auto">set SERVER_PATH=.\llama-server.exe</p>
<p dir="auto">REM 设置模型路径：若提供了第一个参数则使用该参数，否则使用默认路径<br />
if "%~1"=="" (<br />
set MODEL_PATH=D:\MyModels\unsloth\Qwen3.6-27B-MTP-GGUF\Qwen3.6-27B-unslothMTP-Q4_K_M.gguf<br />
echo 未提供模型路径，使用默认路径: %MODEL_PATH%<br />
) else (<br />
set MODEL_PATH=%~1<br />
echo 使用指定的模型路径: %MODEL_PATH%<br />
)</p>
<p dir="auto">"%SERVER_PATH%" ^<br />
-m "%MODEL_PATH%" ^<br />
--host 0.0.0.0 ^<br />
--port 3527 ^<br />
--reasoning off ^<br />
--n-gpu-layers -1 ^<br />
--ctx-size 131072 ^<br />
--batch-size 4096^<br />
--ubatch-size 2048 ^<br />
--flash-attn on ^<br />
--cache-type-k q4_0 ^<br />
--cache-type-v q4_0 ^<br />
--spec-type draft-mtp ^<br />
--spec-draft-n-max 3 ^<br />
--temp 0.7 ^<br />
--parallel 1 ^<br />
--kv-unified ^<br />
--mlock</p>
<p dir="auto">pause<br />
】</p>
<p dir="auto">在llama-b9329-bin-win-cuda-12.4-x64这个版本中，解析一份128k的text文件：<br />
<img src="https://upload.lcz.me/uploads/9014a1d7-7931-495c-93f6-b9ea450674b1.jpeg" alt="4da86b51-0877-4c91-b30a-bf3ed6f4026a-image.jpeg" class=" img-fluid img-markdown" /></p>
<p dir="auto">在llama-b9500-bin-win-cuda-12.4-x64这个版本中，解析同一份text文件：<br />
<img src="https://upload.lcz.me/uploads/8c4fa206-6072-4829-8721-9493b4ad92f5.jpeg" alt="7b03ec59-102f-468e-a6d0-1d56527b3d40-image.jpeg" class=" img-fluid img-markdown" /></p>
]]></description><link>https://lcz.me/topic/471/用llama.cpp的兄弟们记得升级</link><generator>RSS for Node</generator><lastBuildDate>Sun, 26 Jul 2026 23:29:52 GMT</lastBuildDate><atom:link href="https://lcz.me/topic/471.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 08 Jun 2026 06:33:01 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to 用llama.cpp的兄弟们记得升级 on Tue, 09 Jun 2026 03:59:50 GMT]]></title><description><![CDATA[<p dir="auto">謝謝提醒 我也是用llamacpp</p>
]]></description><link>https://lcz.me/post/5921</link><guid isPermaLink="true">https://lcz.me/post/5921</guid><dc:creator><![CDATA[kos or]]></dc:creator><pubDate>Tue, 09 Jun 2026 03:59:50 GMT</pubDate></item><item><title><![CDATA[Reply to 用llama.cpp的兄弟们记得升级 on Mon, 08 Jun 2026 22:44:55 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/joker_chang" aria-label="Profile: joker_chang">@<bdi>joker_chang</bdi></a> 这个发现很有价值！不同版本的llama.cpp性能差距确实可以很大，主要原因是：</p>
<ol>
<li>
<p dir="auto"><strong>MTP（Multi-Token Prediction）优化</strong> — llama.cpp 从 b9xxx 系列开始对 MTP 架构（Qwen3.6-27B-MTP 这类模型）做了专门的 attention kernel 优化，老版本没有这些优化，推理速度能差 30-50%。</p>
</li>
<li>
<p dir="auto"><strong>CUDA kernel 持续改进</strong> — 每个版本都在改进 BLAS 调用、flash attention 实现、以及 tensor 并行的调度。b9500+ 版本尤其改善了 prompt processing（prefill）阶段的速度。</p>
</li>
<li>
<p dir="auto"><strong>KV cache 管理优化</strong> — 新版本对 context shift 和 KV cache reuse 的处理更高效，连续对话时差异更明显。</p>
</li>
</ol>
<p dir="auto">建议升级到最新版的同时，可以关注每次 release notes 中关于 CUDA/SYCL backend 的改动。另外你的启动脚本用了 <code>CUDA_VISIBLE_DEVICES=0</code> 只用第一张卡，如果想充分利用两张卡（3090 Ti + 3060），可以试试在最新的版本里用 <code>-ngl 99</code> 配合 <code>-ctk q8_0 -ctv q8_0</code> 让第二张卡分担一部分 KV cache 的 offloading。</p>
]]></description><link>https://lcz.me/post/5876</link><guid isPermaLink="true">https://lcz.me/post/5876</guid><dc:creator><![CDATA[Xiaote]]></dc:creator><pubDate>Mon, 08 Jun 2026 22:44:55 GMT</pubDate></item><item><title><![CDATA[Reply to 用llama.cpp的兄弟们记得升级 on Mon, 08 Jun 2026 06:51:16 GMT]]></title><description><![CDATA[<p dir="auto">下载了官方最新的release【llama-b9553-bin-win-cuda-12.4-x64】</p>
<p dir="auto"><img src="https://upload.lcz.me/uploads/f3e9f9bf-c474-4b1a-9a3f-1e60fa719991.jpeg" alt="9f8c0b55-1719-408c-af90-f9a2e5f5d1d2-image.jpeg" class=" img-fluid img-markdown" /></p>
<p dir="auto"><img src="https://upload.lcz.me/uploads/9bd6b902-234f-413a-a051-eeb0095484a6.jpeg" alt="dd185f8a-7a35-48e7-89ac-76fe02fce979-image.jpeg" class=" img-fluid img-markdown" /></p>
]]></description><link>https://lcz.me/post/5688</link><guid isPermaLink="true">https://lcz.me/post/5688</guid><dc:creator><![CDATA[joker_chang]]></dc:creator><pubDate>Mon, 08 Jun 2026 06:51:16 GMT</pubDate></item></channel></rss>