<?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[Qwen3.8-27B llama.cpp 部署实测与 Blackwell GSP 崩溃分析]]></title><description><![CDATA[<blockquote>
<p dir="auto">平台：Linux（Ubuntu）/ llama.cpp b10488 / NVIDIA RTX PRO 4500 Blackwell 32GB<br />
模型：Qwen3.8-27B-UD-Q4_K_XL（Unsloth Dynamic v3.0，17.92GB）<br />
用途：Hermes Agent 后端主力模型<br />
日期：2026-08-20（含 1 小时压力测试 + 社区崩溃根因调研）</p>
</blockquote>
<h2>一、先说结论</h2>
<ul>
<li><strong>32GB Blackwell 卡跑 Qwen3.8-27B UD-Q4_K_XL，128K 上下文 + MTP 投机解码，稳定可用</strong>。</li>
<li><strong>性能</strong>：正文吐词 <strong>67 t/s</strong>（1 小时压测 avg_tps=67.2）。</li>
<li><strong>崩溃根因已定位</strong>：不是量化问题、不是 llama.cpp 问题——是 <strong>NVIDIA Blackwell GSP 固件已知 bug</strong>（GB202 die 通病），社区多卡实证。</li>
<li><strong>128K 上下文是工程折中</strong>：200K 实测 59 分钟崩溃，128K 有长期零崩记录。降 ctx 缩短 kernel 耗时→降低 GSP watchdog 触发概率，非根因修复。</li>
<li><strong>根因修复等 NVIDIA</strong>：上游已跟踪（NVIDIA/open-gpu-kernel-modules #1080、#1111），无公开 ETA。595-open 是当前唯一可用驱动路径。</li>
</ul>
<h2>二、硬件 / 软件环境</h2>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>项</th>
<th>配置</th>
</tr>
</thead>
<tbody>
<tr>
<td>显卡</td>
<td>NVIDIA RTX PRO 4500 Blackwell，32 GB（32623 MiB），sm_120，GB202 die</td>
</tr>
<tr>
<td>CPU</td>
<td>AMD Ryzen 7 3700X（8C/16T）</td>
</tr>
<tr>
<td>内存</td>
<td>60 GB</td>
</tr>
<tr>
<td>系统</td>
<td>Ubuntu（Linux 7.0.0-29-generic）</td>
</tr>
<tr>
<td>推理框架</td>
<td>llama.cpp b10488（源码编译，CUDA 12.8+）</td>
</tr>
<tr>
<td>驱动</td>
<td>nvidia-open 595.91.07</td>
</tr>
<tr>
<td>服务方式</td>
<td>systemd 用户服务，8000 端口互斥，<a href="http://llm-switch.sh" rel="nofollow ugc">llm-switch.sh</a> 一键切换</td>
</tr>
</tbody>
</table>
<h2>三、模型来源</h2>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>项</th>
<th>值</th>
</tr>
</thead>
<tbody>
<tr>
<td>仓库</td>
<td><code>unsloth/Qwen3.8-27B-GGUF</code></td>
</tr>
<tr>
<td>文件</td>
<td><code>Qwen3.8-27B-UD-Q4_K_XL.gguf</code>（17.92 GB，4.97 BPW）</td>
</tr>
<tr>
<td>量化</td>
<td>Unsloth Dynamic v3.0，Q4_K 混合精度（359×Q4_K + 96×Q5_K + 43×Q6_K + 353×F32）</td>
</tr>
<tr>
<td>视觉塔</td>
<td><code>mmproj-F16.gguf</code>（885 MB）</td>
</tr>
<tr>
<td>特点</td>
<td><a href="http://kingy.ai" rel="nofollow ugc">kingy.ai</a> 首推量化源，同精度比其它 Q4 高 10%+；BPW 4.97（比 Q4_K_M 的 4.84 略高）</td>
</tr>
</tbody>
</table>
<p dir="auto">通过 <code>hf download</code> 直连 HuggingFace 下载，SHA256 校验通过。</p>
<h2>四、部署配置</h2>
<p dir="auto">systemd 用户服务 <code>~/.config/systemd/user/llama-qwen-27B.service</code>：</p>
<pre><code class="language-ini">[Unit]
Description=llama.cpp Qwen3.8-27B UD-Q4_K_XL Service (128K, effort=medium, MTP n-max 2)

[Service]
ExecStart=%h/llama.cpp/build/bin/llama-server \
  -m %h/models/Qwen3.8-27B/Qwen3.8-27B-UD-Q4_K_XL.gguf \
  --mmproj %h/models/Qwen3.8-27B/mmproj-F16.gguf \
  --alias qwen3.8-27B \
  --host 127.0.0.1 --port 8000 \
  --ctx-size 131072 \
  --n-gpu-layers 99 \
  --flash-attn on \
  --parallel 1 \
  --jinja \
  --no-mmap \
  --ubatch-size 512 \
  --cache-type-k q4_0 \
  --cache-type-v q4_0 \
  --cache-ram 32768 \
  --chat-template-kwargs '{"reasoning_effort": "medium", "preserve_thinking": true}' \
  --reasoning-preserve \
  --temp 0.6 --top-k 20 --top-p 0.95 --min-p 0.0 \
  --spec-type draft-mtp \
  --spec-draft-n-max 2

Environment=CUDA_VISIBLE_DEVICES=0
Restart=on-failure
RestartSec=10
</code></pre>
<p dir="auto">管理命令：</p>
<pre><code class="language-bash">systemctl --user start llama-qwen-27B    # 启动
systemctl --user stop llama-qwen-27B     # 停止
systemctl --user status llama-qwen-27B   # 查看状态
journalctl --user -u llama-qwen-27B -f   # 实时日志
</code></pre>
<h2>五、1 小时压力测试结果</h2>
<h3>测试配置</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>项</th>
<th>值</th>
</tr>
</thead>
<tbody>
<tr>
<td>模型</td>
<td>Qwen3.8-27B-UD-Q4_K_XL（标准版）</td>
</tr>
<tr>
<td>上下文</td>
<td>200K（204800），MTP n-max 2，K4V4 KV cache</td>
</tr>
<tr>
<td>压测方式</td>
<td>每轮 512 token 生成，连续 60 分钟，守护进程独立运行</td>
</tr>
<tr>
<td>总 token</td>
<td>226,816</td>
</tr>
</tbody>
</table>
<h3>结果</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>指标</th>
<th>值</th>
</tr>
</thead>
<tbody>
<tr>
<td>总轮数</td>
<td>446</td>
</tr>
<tr>
<td>成功</td>
<td>443</td>
</tr>
<tr>
<td>失败</td>
<td>3（均为第 444 轮崩溃后的连接拒绝，实为 1 次崩溃事件）</td>
</tr>
<tr>
<td>平均 t/s</td>
<td>67.2</td>
</tr>
<tr>
<td>最低 t/s</td>
<td>10.3（崩溃窗口期）</td>
</tr>
<tr>
<td>最高 t/s</td>
<td>74.2</td>
</tr>
<tr>
<td>崩溃时间</td>
<td>第 444 轮（约 18:38:42，59 分钟处）</td>
</tr>
</tbody>
</table>
<h3>崩溃现场</h3>
<pre><code>18:38:42 NVRM: krcWatchdog_IMPL: RC watchdog: GPU is probably locked! Notify Timeout Seconds: 7
18:38:42 NVRM: Xid (PCI:0000:09:00): 8, pid=25546, name=llama-server, channel 0x00000012
18:38:42 CUDA error: the launch timed out and was terminated
18:38:45 systemd: llama-qwen-27B.service: Main process exited, code=dumped, status=6/ABRT
</code></pre>
<p dir="auto">崩溃后 systemd 自动拉起新进程，服务自动恢复。</p>
<h2>六、崩溃根因：Blackwell GSP 固件 Bug</h2>
<h3>这不是什么</h3>
<ul>
<li><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/274c.png?v=60716d54ab2" class="not-responsive emoji emoji-android emoji--x" style="height:23px;width:auto;vertical-align:middle" title="❌" alt="❌" /> 不是量化模型的问题（Q4_K_M、UD-Q4_K_XL、Q4_K_P 均崩）</li>
<li><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/274c.png?v=60716d54ab2" class="not-responsive emoji emoji-android emoji--x" style="height:23px;width:auto;vertical-align:middle" title="❌" alt="❌" /> 不是 llama.cpp 的 bug（b8679 之前/之后均有报告）</li>
<li><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/274c.png?v=60716d54ab2" class="not-responsive emoji emoji-android emoji--x" style="height:23px;width:auto;vertical-align:middle" title="❌" alt="❌" /> 不是驱动版本问题（580/590/595 均复现）</li>
<li><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/274c.png?v=60716d54ab2" class="not-responsive emoji emoji-android emoji--x" style="height:23px;width:auto;vertical-align:middle" title="❌" alt="❌" /> 不是散热/供电问题（室温 28°C、1600W 铂金电源均有人复现）</li>
</ul>
<h3>这是什么</h3>
<p dir="auto"><strong>NVIDIA Blackwell 架构（GB202 die）的 GSP 固件心跳超时 bug</strong>。GSP（GPU System Processor）是 Blackwell 上强制启用的固件处理器，在持续高负载下会心跳超时死锁，导致 GPU 进入不可恢复状态。</p>
<h3>社区证据</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>来源</th>
<th>GPU</th>
<th>工作负载</th>
<th>结果</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="https://github.com/NVIDIA/open-gpu-kernel-modules/issues/1080" rel="nofollow ugc">NVIDIA/open-gpu-kernel-modules #1080</a></td>
<td>RTX 5090 (GB202)</td>
<td>Vulkan 游戏</td>
<td>GSP heartbeat timeout → Xid 8，与我们完全一致</td>
</tr>
<tr>
<td><a href="https://github.com/NVIDIA/open-gpu-kernel-modules/issues/1111" rel="nofollow ugc">NVIDIA/open-gpu-kernel-modules #1111</a></td>
<td>RTX PRO 6000 (GB202, sm_120)</td>
<td>llama.cpp 持续推理</td>
<td>45 分钟必崩；同机 RTX 3090（sm_86）跑 20+ 小时零崩</td>
</tr>
<tr>
<td><a href="https://github.com/NVIDIA/open-gpu-kernel-modules/issues/1247" rel="nofollow ugc">NVIDIA/open-gpu-kernel-modules #1247</a></td>
<td>RTX 5060 Ti (Blackwell)</td>
<td>Ollama/llama.cpp</td>
<td>CUDA 分配时硬锁</td>
</tr>
<tr>
<td><a href="https://forums.developer.nvidia.com/t/bug-xid-62-gsp-watchdog-timeout-on-rtx-5080-during-high-context-llm-inference/371272" rel="nofollow ugc">NVIDIA Forums #371272</a></td>
<td>RTX 5080 (Blackwell)</td>
<td>高上下文 LLM 推理</td>
<td>Xid 62 GSP Watchdog Timeout</td>
</tr>
<tr>
<td><a href="https://github.com/gengchaogit/blackwell-xid-wpr2-gsp-crash-recovery" rel="nofollow ugc">gengchaogit/blackwell-xid-wpr2-gsp-crash-recovery</a></td>
<td>多款 Blackwell</td>
<td>通用</td>
<td>专门为此 bug 写的恢复脚本</td>
</tr>
</tbody>
</table>
<p dir="auto"><strong>关键对比</strong>（#1111 报告者）：同机 RTX PRO 6000 Blackwell + RTX 3090×2，跑相同 llama.cpp 持续推理——Blackwell 45 分钟必崩，Ampere（sm_86）20+ 小时零崩。<strong>确认是 Blackwell 特有</strong>。</p>
<h3>崩溃链</h3>
<pre><code>decode kernel 执行（随上下文长度增长）
    ↓ 超过 ~7 秒
GSP watchdog 判定 GPU 锁死
    ↓
krcWatchdog_IMPL: RC watchdog: GPU is probably locked!
    ↓
Xid 8（launch timeout）→ CUDA error: the launch timed out
    ↓
驱动尝试恢复 → WPR2 安全区无法清除 → 恢复失败
    ↓
GPU 死锁，需要重启/Secondary Bus Reset
</code></pre>
<h3>为什么不同量化源崩溃频率不同</h3>
<p dir="auto">权重分布 → CUDA kernel 执行时间不同 → 超 7 秒看门狗阈值的概率不同：</p>
<ul>
<li>UD-Q4_K_XL 更稳定：权重分布让 kernel 执行时间更短，更不容易触发阈值</li>
<li>Q4_K_P 更频繁：权重分布导致 kernel 执行时间更接近阈值</li>
<li>128K 比 200K 更稳定：上下文更短→KV cache 更小→kernel 耗时更短</li>
</ul>
<h3>上游状态</h3>
<ul>
<li>NVIDIA 内部已跟踪（#1080 标记为 Open，#1111 标记为 Bug）</li>
<li>580-open / 595-open 是当前唯一可用驱动路径（Blackwell 不支持闭源驱动）</li>
<li>恢复路径在 Blackwell 上根本性损坏（WPR2 安全区无法清除）</li>
<li>无公开修复 ETA</li>
</ul>
<h2>七、为何选择 128K 上下文</h2>
<h3>背景</h3>
<p dir="auto">Qwen3.8-27B 模型支持 256K 上下文，最初我们也想用 200K（实用性与显存的平衡点）。但实测发现：</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>配置</th>
<th>压测结果</th>
</tr>
</thead>
<tbody>
<tr>
<td>256K + MTP</td>
<td>08-19 凌晨连崩 2 次（6万/11万 token 处）</td>
</tr>
<tr>
<td>200K + MTP</td>
<td>1 小时压测 59 分钟崩 1 次（22万 token 处）</td>
</tr>
<tr>
<td>128K + MTP</td>
<td>长期使用零崩（08-18/19 已验证）</td>
</tr>
</tbody>
</table>
<h3>原理</h3>
<p dir="auto">GSP 固件 bug 的触发条件是<strong>任何单次 CUDA kernel 超过 ~7 秒</strong>。上下文越长→KV cache 越大→attention kernel 扫描的数据量越多→执行时间越长→越容易超 7 秒阈值。</p>
<p dir="auto">降 ctx 不是根因修复（阈值不固定，6万 token 处也曾崩过），但能把概率压到工程可接受水平。</p>
<h3>关 MTP 的考量</h3>
<p dir="auto">MTP（Multi-Token Prediction）通过扩大单步 batch（draft n=2）提升吞吐，但也增大了 kernel 负载。关 MTP 可进一步降低崩溃概率，但代价：</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>配置</th>
<th>预估 t/s</th>
</tr>
</thead>
<tbody>
<tr>
<td>128K + MTP n-max 2</td>
<td>~67 t/s（已验证）</td>
</tr>
<tr>
<td>128K + 无 MTP</td>
<td>~30 t/s（推算，未实测）</td>
</tr>
<tr>
<td>256K + 无 MTP</td>
<td>~25 t/s（推算，未验证零崩）</td>
</tr>
</tbody>
</table>
<p dir="auto">最终选择 <strong>128K + MTP</strong>：性能与稳定性的工程最优解。等 NVIDIA 修 GSP 固件后再考虑升 ctx。</p>
<h2>八、踩坑与经验</h2>
<ol>
<li><strong>MTP 参数名</strong>：<code>--spec-type draft-mtp</code>（旧名 <code>mtp</code> 会启动失败），<code>--spec-draft-n-max 2</code>（推荐值，n=3+ 在 Blackwell 上收益递减）。</li>
<li><strong>KV cache 用 Q4</strong>：<code>--cache-type-k q4_0 --cache-type-v q4_0</code>，128K 上下文 KV 约 32GB RAM（<code>--cache-ram 32768</code>），显著降低显存占用。</li>
<li><strong><code>--no-mmap</code></strong>：Blackwell 上 mmap 有兼容性问题，关掉更稳。</li>
<li><strong><code>--flash-attn on</code></strong>：必须开启，关闭后 kernel 执行时间更长，更容易触发 GSP watchdog。</li>
<li><strong>崩溃后自动恢复</strong>：systemd <code>Restart=on-failure</code> + <code>RestartSec=10</code>，崩溃后 10 秒自动拉起。实际影响仅当轮请求丢失。</li>
<li><strong>量化源选择</strong>：UD-Q4_K_XL（Unsloth Dynamic）在 Blackwell 上比其它 Q4 量化源更稳定——不是量化质量差异，是权重分布→kernel timing 差异。</li>
<li><strong>Blackwell GSP bug 通用性</strong>：RTX 5090/5080/5070/5060Ti/PRO 6000/PRO 4500 均受影响（同一 GB202/G200 die），不是个例。社区已有恢复脚本（<code>sbr_recover.sh</code>）但需要 root 权限。</li>
</ol>
<hr />
]]></description><link>https://lcz.me/topic/1222/qwen3.8-27b-llama.cpp-部署实测与-blackwell-gsp-崩溃分析</link><generator>RSS for Node</generator><lastBuildDate>Sat, 22 Aug 2026 02:12:03 GMT</lastBuildDate><atom:link href="https://lcz.me/topic/1222.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 20 Aug 2026 11:18:05 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Qwen3.8-27B llama.cpp 部署实测与 Blackwell GSP 崩溃分析 on Fri, 21 Aug 2026 08:26:35 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/freeman-gemmy" aria-label="Profile: freeman-gemmy">@<bdi>freeman-gemmy</bdi></a> N卡使用Vulkan效果如何，平均速度多少？</p>
]]></description><link>https://lcz.me/post/13279</link><guid isPermaLink="true">https://lcz.me/post/13279</guid><dc:creator><![CDATA[清风明月]]></dc:creator><pubDate>Fri, 21 Aug 2026 08:26:35 GMT</pubDate></item><item><title><![CDATA[Reply to Qwen3.8-27B llama.cpp 部署实测与 Blackwell GSP 崩溃分析 on Fri, 21 Aug 2026 08:24:41 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/freeman-gemmy" aria-label="Profile: freeman-gemmy">@<bdi>freeman-gemmy</bdi></a> 我已经找到了更好的办法，测试到现在，已经没有崩溃的情况发生了，过会整理下，再发！</p>
]]></description><link>https://lcz.me/post/13277</link><guid isPermaLink="true">https://lcz.me/post/13277</guid><dc:creator><![CDATA[清风明月]]></dc:creator><pubDate>Fri, 21 Aug 2026 08:24:41 GMT</pubDate></item><item><title><![CDATA[Reply to Qwen3.8-27B llama.cpp 部署实测与 Blackwell GSP 崩溃分析 on Fri, 21 Aug 2026 07:50:43 GMT]]></title><description><![CDATA[<p dir="auto">我的模型是这个Qwen3.8-27B-UD-IQ4_XS，上下文32K 速度快且稳定，192k 慢但不崩溃（部分卸载到内存）。</p>
]]></description><link>https://lcz.me/post/13271</link><guid isPermaLink="true">https://lcz.me/post/13271</guid><dc:creator><![CDATA[freeman gemmy]]></dc:creator><pubDate>Fri, 21 Aug 2026 07:50:43 GMT</pubDate></item><item><title><![CDATA[Reply to Qwen3.8-27B llama.cpp 部署实测与 Blackwell GSP 崩溃分析 on Fri, 21 Aug 2026 07:47:00 GMT]]></title><description><![CDATA[<p dir="auto">可以试试llama.cpp+Vulkan看能不能绕开这个BUG，我的5070TI 16g也曾经遇到这个问题，用Vulkan暂时稳定</p>
]]></description><link>https://lcz.me/post/13268</link><guid isPermaLink="true">https://lcz.me/post/13268</guid><dc:creator><![CDATA[freeman gemmy]]></dc:creator><pubDate>Fri, 21 Aug 2026 07:47:00 GMT</pubDate></item></channel></rss>