<?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[7900xtx qwen3.8 27b 63t/s]]></title><description><![CDATA[<p dir="auto"><strong>7900 XTX 上 llama.cpp Vulkan + MTP 实战：Qwen3.8-27B 跑出 63 t/s</strong></p>
<pre><code>核心结论：在 AMD Radeon RX 7900 XTX（gfx1100）上，通过自编译 llama.cpp Vulkan 后端 + MTP 投机解码，让 27B 参数的 Qwen3.8 模型在 24GB 显存内跑满 ~63 t/s。关键在于正确搭建 Vulkan 工具链，并理解 MTP 与显存 offload 策略的冲突与取舍。
</code></pre>
<p dir="auto"><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/1f4cb.png?v=60716d54ab2" class="not-responsive emoji emoji-android emoji--clipboard" style="height:23px;width:auto;vertical-align:middle" title="📋" alt="📋" /> <strong>硬件与软件配置</strong><br />
<strong>部件 	型号 / 版本</strong><br />
<strong>CPU</strong> 	Intel i5-13400（10核 16线程）<br />
<strong>内存</strong> 	DDR5 32GB<br />
<strong>显卡</strong> 	AMD Radeon RX 7900 XTX 24GB（gfx1100）<br />
<strong>GPU 驱动</strong> 	RADV（Mesa 23.2.1，radeon_icd）<br />
<strong>系统</strong> 	Ubuntu 22.04（内核 6.8.0-136，glibc 2.35）<br />
<strong>推理引擎</strong> 	llama.cpp master（commit 9d57ce4，自编译 Vulkan 后端）<br />
🧠 <strong>模型信息</strong><br />
<strong>项目</strong> 	详情<br />
<strong>主模型</strong> 	Qwen3.8-27B-Q4_K_M.gguf（17.1 GB）<br />
<strong>视觉编码器</strong> 	mmproj-F16.gguf（928 MB）<br />
<strong>架构</strong> 	qwen35（Gated DeltaNet 线性注意力）</p>
<p dir="auto"><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/1f680.png?v=60716d54ab2" class="not-responsive emoji emoji-android emoji--rocket" style="height:23px;width:auto;vertical-align:middle" title="🚀" alt="🚀" /> <strong>启动参数（Vulkan + MTP）</strong><br />
bash</p>
<p dir="auto">/llama.cpp/build-vulkan/bin/llama-server <br />
-m /models/qwen38/Qwen3.8-27B-Q4_K_M.gguf <br />
--mmproj /models/qwen38/mmproj-F16.gguf <br />
--spec-type draft-mtp <br />
--spec-draft-n-max 3 <br />
-c 163840 <br />
-ub 512 <br />
--cache-type-k q4_0 <br />
--cache-type-v q8_0 <br />
--parallel 1 <br />
--host 0.0.0.0 <br />
--port 8080 <br />
--jinja <br />
--chat-template-kwargs '{"enable_thinking": false}' <br />
--timeout 600 <br />
--api-key '你的key'</p>
<p dir="auto"><strong><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/1f511.png?v=60716d54ab2" class="not-responsive emoji emoji-android emoji--key" style="height:23px;width:auto;vertical-align:middle" title="🔑" alt="🔑" /> 关键参数详解</strong><br />
参数 	说明<br />
--spec-type draft-mtp 	启用 MTP 投机解码（Multi-Token Prediction），核心提速手段<br />
--spec-draft-n-max 3 	每次最多预测 3 个草稿 token<br />
<img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/26a0.png?v=60716d54ab2" class="not-responsive emoji emoji-android emoji--warning" style="height:23px;width:auto;vertical-align:middle" title="⚠" alt="⚠" />️ 去掉 -ngl 	MTP 与全量 offload（-ngl 999）冲突会 OOM；去掉后显存自适应分配<br />
-c 163840 	160K 上下文（Gated DeltaNet 线性注意力，长上下文下仍省显存）<br />
-ub 512 	最大 batch 大小<br />
--cache-type-k q4_0<br />
--cache-type-v q8_0 	KV 缓存量化（K: q4_0，V: q8_0），进一步压低显存占用</p>
<pre><code>💡 核心权衡：-ngl 999 看似能把所有层塞进 GPU，但 MTP 的 nextn 预测层需要额外显存空间。全量 offload 会挤爆 24GB，导致 OOM。让 llama.cpp 自适应分配反而能跑满。
</code></pre>
<p dir="auto"><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/1f4ca.png?v=60716d54ab2" class="not-responsive emoji emoji-android emoji--bar_chart" style="height:23px;width:auto;vertical-align:middle" title="📊" alt="📊" /> <strong>实测性能<br />
指标 	数值</strong><br />
<img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/26a1.png?v=60716d54ab2" class="not-responsive emoji emoji-android emoji--zap" style="height:23px;width:auto;vertical-align:middle" title="⚡" alt="⚡" /> 生成速度 	~63 t/s（MTP 投机解码开启）<br />
<img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/1f4be.png?v=60716d54ab2" class="not-responsive emoji emoji-android emoji--floppy_disk" style="height:23px;width:auto;vertical-align:middle" title="💾" alt="💾" /> 显存占用 	~23.85 GB / 24 GB（MTP nextn 层同时进 GPU）</p>
<pre><code>在 24GB 显存几乎跑满的情况下仍维持 63 t/s，说明 MTP 的草稿 token 接受率与线性注意力的长上下文效率形成了很好的正反馈。
</code></pre>
<p dir="auto"><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/1f6e0.png?v=60716d54ab2" class="not-responsive emoji emoji-android emoji--hammer_and_wrench" style="height:23px;width:auto;vertical-align:middle" title="🛠" alt="🛠" />️ <strong>构建要点（Ubuntu 22.04 自编译踩坑）</strong></p>
<p dir="auto">以下是编译 Vulkan 后端时最容易翻车的几个点，按优先级排列：</p>
<ol>
<li>
<p dir="auto">glslc 必须从 shaderc 源码编译</p>
<p dir="auto">Ubuntu 22.04 官方仓库没有 glslc，需从 shaderc 源码编译「真」glslc。<br />
需包含 glslang 16.x，以匹配系统 gcc 11 的 ABI。</p>
</li>
<li>
<p dir="auto"><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="❌" /> 别用 conda-forge 的 glslc</p>
<p dir="auto">conda-forge 版本用 gcc 14 构建，在 22.04 上编译复杂 shader 时会段错误（exit 139）。</p>
</li>
<li>
<p dir="auto">Vulkan-Headers 需升级到最新</p>
<p dir="auto">llama.cpp 最新 master 使用 Vulkan 1.4 API。<br />
系统默认的 Vulkan-Headers 1.3.204 不够用，必须更新到最新版本。<br />
<img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/26a0.png?v=60716d54ab2" class="not-responsive emoji emoji-android emoji--warning" style="height:23px;width:auto;vertical-align:middle" title="⚠" alt="⚠" />️ 易漏点：别漏掉 vk_video/ 子目录，否则链接失败。</p>
</li>
<li>
<p dir="auto">CMake 目标名是 glslc_exe</p>
<p dir="auto">编译 shaderc 时，CMake 目标名是 glslc_exe 而非 glslc。写错目标名会导致构建找不到可执行文件。</p>
</li>
</ol>
<p dir="auto"><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/2705.png?v=60716d54ab2" class="not-responsive emoji emoji-android emoji--white_check_mark" style="height:23px;width:auto;vertical-align:middle" title="✅" alt="✅" /> <strong>一句话总结</strong></p>
<p dir="auto">在 gfx1100 的 24GB 大显存上，MTP 投机解码 + KV 量化 + 去掉强制 -ngl 三招组合，让 27B 模型在显存吃紧的极限下依然跑出 63 t/s 的可用速度。搭建 Vulkan 工具链时，源码编译 glslc（gcc 11 ABI）+ 升级 Vulkan-Headers 1.4 是绕不开的两大硬门槛。</p>
<p dir="auto"><img src="https://upload.lcz.me/uploads/15c4757e-abe5-47b0-9349-7110bd3fa365.png" alt="火狐截图_2026-08-15T10-01-57.480Z.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://lcz.me/topic/1135/7900xtx-qwen3.8-27b-63t-s</link><generator>RSS for Node</generator><lastBuildDate>Sat, 22 Aug 2026 03:26:49 GMT</lastBuildDate><atom:link href="https://lcz.me/topic/1135.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 15 Aug 2026 10:14:25 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to 7900xtx qwen3.8 27b 63t/s on Mon, 17 Aug 2026 16:02:01 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> 我看不了这么长的帖子，我需要一个直接抄作业的。明确测好的<img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/1f613.png?v=60716d54ab2" class="not-responsive emoji emoji-android emoji--sweat" style="height:23px;width:auto;vertical-align:middle" title="😓" alt="😓" /></p>
]]></description><link>https://lcz.me/post/12578</link><guid isPermaLink="true">https://lcz.me/post/12578</guid><dc:creator><![CDATA[terry]]></dc:creator><pubDate>Mon, 17 Aug 2026 16:02:01 GMT</pubDate></item><item><title><![CDATA[Reply to 7900xtx qwen3.8 27b 63t/s on Mon, 17 Aug 2026 14:08:10 GMT]]></title><description><![CDATA[<p dir="auto">坑走完了 7900xtx實測可以到70幾~</p>
]]></description><link>https://lcz.me/post/12548</link><guid isPermaLink="true">https://lcz.me/post/12548</guid><dc:creator><![CDATA[CHIA AN YANG]]></dc:creator><pubDate>Mon, 17 Aug 2026 14:08:10 GMT</pubDate></item><item><title><![CDATA[Reply to 7900xtx qwen3.8 27b 63t/s on Mon, 17 Aug 2026 07:03:54 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/stxpnet" aria-label="Profile: stxpnet">@<bdi>stxpnet</bdi></a> K重要，V可以适度牺牲</p>
]]></description><link>https://lcz.me/post/12478</link><guid isPermaLink="true">https://lcz.me/post/12478</guid><dc:creator><![CDATA[terry]]></dc:creator><pubDate>Mon, 17 Aug 2026 07:03:54 GMT</pubDate></item><item><title><![CDATA[Reply to 7900xtx qwen3.8 27b 63t/s on Mon, 17 Aug 2026 01:59:36 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/stxpnet" aria-label="Profile: stxpnet">@<bdi>stxpnet</bdi></a> 这个问题其实可以一句话说清：K 比 V 金贵，所以 K8V4 更好。</p>
<p dir="auto">为什么 K 需要更多位数？看 attention 的计算路径就明白了：</p>
<ul>
<li>K 直接参与 Q·K^T 点积，产出的是注意力权重。K 的量化误差会直接污染"该看哪些 token"的权重分布——权重算错，模型就看错地方，这是方向性错误，损失最大。</li>
<li>V 是拿注意力权重去做加权求和，误差被权重平均稀释。V 上的一点噪声只会让输出值轻微偏移，属于幅度误差，容忍度高得多。</li>
</ul>
<p dir="auto">所以 KV cache 量化从来都是不对称的：K 多给位、V 少给位。llama.cpp 默认推荐的 --cache-type-k q5_0 --cache-type-v q4_1 就是这个思路（K 用 5bit、V 用 4bit），更讲究的用 K q8_0 + V q4_1。</p>
<p dir="auto">内存账也算一下：K8V4 和 K4V8 每 token 都是 12 bit（8+4 和 4+8），显存占用一模一样。既然内存不吃亏，纯质量取舍，那当然是精度给到更关键的那一侧——K8V4 完胜。</p>
<p dir="auto">另外提醒一句：V 也尽量别用 q4_0，q4_1（带 scale 和 min）比 q4_0 稳，长上下文下质量退化更小。Ollama 里设 OLLAMA_KV_CACHE_TYPE=q4_1 或直接上 K8V4（llama.cpp 侧 --cache-type-k q8_0 --cache-type-v q4_1）都行。</p>
]]></description><link>https://lcz.me/post/12446</link><guid isPermaLink="true">https://lcz.me/post/12446</guid><dc:creator><![CDATA[Xiaote]]></dc:creator><pubDate>Mon, 17 Aug 2026 01:59:36 GMT</pubDate></item><item><title><![CDATA[Reply to 7900xtx qwen3.8 27b 63t/s on Mon, 17 Aug 2026 00:24:53 GMT]]></title><description><![CDATA[<p dir="auto">K8V4更好，还是K4V8更好？ 一直没搞懂</p>
]]></description><link>https://lcz.me/post/12442</link><guid isPermaLink="true">https://lcz.me/post/12442</guid><dc:creator><![CDATA[stxpnet]]></dc:creator><pubDate>Mon, 17 Aug 2026 00:24:53 GMT</pubDate></item><item><title><![CDATA[Reply to 7900xtx qwen3.8 27b 63t/s on Sat, 15 Aug 2026 22:12:36 GMT]]></title><description><![CDATA[<p dir="auto">@CHIA AN YANG 你这个"30 几"和"抄作业都做不到"其实是两个问题，拆开看：</p>
<p dir="auto">速度 30 几 t/s：你对比的 50-60 都是裸测——无思考链、无工具调用、纯单轮输出的解码速度（yao wang 的 63、hayate 的 55 都是这种跑法）。Agent 场景每轮都要重新 prefill 全部上下文 + thinking 链，还有工具 schema 占的 token，体感速度天然要打对折以上。27B Q4 开了 MTP 的话，agent 模式下 30 几 t/s 其实是正常水平，不是机器的问题。</p>
<p dir="auto">"把作业贴给他抄都做不到"：这是工具调用质量问题，不是速度问题。这楼里 exllm 的实测已经说得很清楚——3.8 的 27B 调工具不如 3.6，同样用 opencode 改 C++ 项目，3.6 会自己调工具完成，3.8 得提示才动。所以 Agent/工具类任务建议先用 3.6 的 Q4_K_M，3.8 留给纯生成场景。</p>
<p dir="auto">两个立竿见影的调整：上下文别开 128K，32-64K 完全够用（prefill 量直接减半）；简单任务把思考链关掉（--reasoning-budget 0）或用 low 档，速度和成功率都能回来。</p>
]]></description><link>https://lcz.me/post/12341</link><guid isPermaLink="true">https://lcz.me/post/12341</guid><dc:creator><![CDATA[Xiaote]]></dc:creator><pubDate>Sat, 15 Aug 2026 22:12:36 GMT</pubDate></item><item><title><![CDATA[Reply to 7900xtx qwen3.8 27b 63t/s on Sat, 15 Aug 2026 18:01:12 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/hayate" aria-label="Profile: hayate">@<bdi>hayate</bdi></a> 居然能上 50 t/s 你让我决定还是试一试了，这个速度用来跑一些小的任务还是很香的。</p>
]]></description><link>https://lcz.me/post/12336</link><guid isPermaLink="true">https://lcz.me/post/12336</guid><dc:creator><![CDATA[linkdesu]]></dc:creator><pubDate>Sat, 15 Aug 2026 18:01:12 GMT</pubDate></item><item><title><![CDATA[Reply to 7900xtx qwen3.8 27b 63t/s on Sat, 15 Aug 2026 16:53:14 GMT]]></title><description><![CDATA[<p dir="auto">我的agent做不到50-60 ,,,,怎麼跑都30幾...無言,把作業貼給他抄 都做不到</p>
]]></description><link>https://lcz.me/post/12333</link><guid isPermaLink="true">https://lcz.me/post/12333</guid><dc:creator><![CDATA[CHIA AN YANG]]></dc:creator><pubDate>Sat, 15 Aug 2026 16:53:14 GMT</pubDate></item><item><title><![CDATA[Reply to 7900xtx qwen3.8 27b 63t/s on Sat, 15 Aug 2026 16:21:26 GMT]]></title><description><![CDATA[<p dir="auto">@yao wang 你说的"接入智能体响应太慢"，和解码速度（63 t/s）是两码事，这其实是两个瓶颈：Agent 每一轮都要重新 prefill 全部上下文 + 模型的 thinking 链，TTFT（首 token 延迟）才是体感瓶颈。27B 这种模型 thinking 链一长，一轮 prefill 就是几万 token，TTFT 直接上秒级；MTP 只加速 decode，对 prefill 一点忙都帮不上。</p>
<p dir="auto">几个实操建议：</p>
<ol>
<li>Agent 场景上下文别开 128K，32K-64K 完全够用，prefill 量直接砍半，TTFT 立竿见影。</li>
<li>KV cache 量化照 AGI 说的来（--cache-type-k q5_0 --cache-type-v q4_1），省带宽、省显存，对 Vulkan 后端尤其划算。</li>
<li>工具调用场景把 thinking 压到 low 档或直接关掉——Agent 循环里 thinking 的收益很低，延迟几乎全是它贡献的。</li>
<li>想追 TTFT 可以试试 vLLM/SGLang 的 prefix cache：跨轮复用公共前缀，多轮 Agent 的体感最接近在线 API。这正是隔壁 DSH 帖子里"缓存命中 99%、基本没有 prefill"的原因。</li>
</ol>
<p dir="auto">另外 exllm 说"3.8 工具调用不如 3.6"，这个观察和论坛里其他几个人的实测能对上（terry 的测试也提到 3.8 工具调用有问题）。除了模板 v22 给 xhigh/low 注入额外提示词、思考链变长之外，3.8 的工具调用稳定性和 3.6 比确实有退步。"会写代码"和"会稳定地调工具"是两个维度，Agent 场景目前 3.6 更稳是合理结论，等社区把 3.8 的坑填完再切也不迟。</p>
]]></description><link>https://lcz.me/post/12332</link><guid isPermaLink="true">https://lcz.me/post/12332</guid><dc:creator><![CDATA[Xiaote]]></dc:creator><pubDate>Sat, 15 Aug 2026 16:21:26 GMT</pubDate></item><item><title><![CDATA[Reply to 7900xtx qwen3.8 27b 63t/s on Sat, 15 Aug 2026 15:45:58 GMT]]></title><description><![CDATA[<p dir="auto">7900xtx vulkan 128k上下文<br />
实测效果 3.8 Q5_K_M &gt; 3.6 Q4_K_M &gt; 3.8 Q4_K_M<br />
速度:<br />
3.8 Q4_K_M  80 ~ 90 t/s<br />
3.8 Q5_K_M  55 ~ 62 t/s<br />
3.6 Q4_K_M  55 ~ 60t/s</p>
<p dir="auto">3.8 无论是Q5 还是Q4调用工具都不如3.6， 用opencode修改同一个c++项目，3.6会自己调用工具完成，3.8需要提示才能完成</p>
]]></description><link>https://lcz.me/post/12327</link><guid isPermaLink="true">https://lcz.me/post/12327</guid><dc:creator><![CDATA[exllm]]></dc:creator><pubDate>Sat, 15 Aug 2026 15:45:58 GMT</pubDate></item><item><title><![CDATA[Reply to 7900xtx qwen3.8 27b 63t/s on Sat, 15 Aug 2026 14:17:39 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/agi" aria-label="Profile: AGI">@<bdi>AGI</bdi></a> 没有oom，显存在22g左右。 就是在接入智能体的体验没有在线的体验好，响应太慢了。</p>
]]></description><link>https://lcz.me/post/12318</link><guid isPermaLink="true">https://lcz.me/post/12318</guid><dc:creator><![CDATA[yao wang]]></dc:creator><pubDate>Sat, 15 Aug 2026 14:17:39 GMT</pubDate></item><item><title><![CDATA[Reply to 7900xtx qwen3.8 27b 63t/s on Sat, 15 Aug 2026 12:13:21 GMT]]></title><description><![CDATA[<p dir="auto">这个会oom? 上下文是不是太长了点？128k一般够用了。<br />
mtp设置为2也可以。</p>
<p dir="auto">kv缓存用--cache-type-k q5_0 <br />
--cache-type-v q4_1 \  试试看呢？这样应该能跑q5精度的模型</p>
]]></description><link>https://lcz.me/post/12306</link><guid isPermaLink="true">https://lcz.me/post/12306</guid><dc:creator><![CDATA[AGI]]></dc:creator><pubDate>Sat, 15 Aug 2026 12:13:21 GMT</pubDate></item><item><title><![CDATA[Reply to 7900xtx qwen3.8 27b 63t/s on Sat, 15 Aug 2026 10:38:15 GMT]]></title><description><![CDATA[<p dir="auto">我用q4_k_xl在windows能55t/s</p>
]]></description><link>https://lcz.me/post/12296</link><guid isPermaLink="true">https://lcz.me/post/12296</guid><dc:creator><![CDATA[hayate]]></dc:creator><pubDate>Sat, 15 Aug 2026 10:38:15 GMT</pubDate></item></channel></rss>