<?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[预热 Qwen4：跨品牌混插 PD 分离跑通——NVIDIA 单卡 + AMD 双卡混跑 Qwen3.8-27B]]></title><description><![CDATA[<p dir="auto">依靠FCCL又折腾了一天，终于把横跨两个厂商的LLM推理跑通了。写下来给同样想折腾异构的人参考，顺便也算是给 Qwen4 27B 的预热。</p>
<p dir="auto">硬件是 RTX PRO 5000（Blackwell，48G）+ 双 W7900（RDNA3，各 48G），跑 Qwen3.8-27B。</p>
<p dir="auto">思路很直接：N 卡有 FP8 单元，让它做 prefill 啃 prompt；A 卡显存大带宽高，让它们做 decode 吐 token。中间就传 KV cache。</p>
<hr />
<h2>一、prefill：PRO5000 单卡 + FP8 权重</h2>
<p dir="auto">每次都先 <code>/flush_cache</code> 冷启动，输入 token 取服务端返回的真实值，不是估的。</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Context</th>
<th>prompt token</th>
<th>TTFT</th>
<th>Prefill tok/s</th>
</tr>
</thead>
<tbody>
<tr>
<td>4K</td>
<td>4,149</td>
<td>0.73s</td>
<td><strong>5,657</strong></td>
</tr>
<tr>
<td>8K</td>
<td>8,253</td>
<td>1.51s</td>
<td><strong>5,451</strong></td>
</tr>
<tr>
<td>16K</td>
<td>16,443</td>
<td>3.53s</td>
<td>4,653</td>
</tr>
<tr>
<td>32K</td>
<td>32,823</td>
<td>7.27s</td>
<td>4,515</td>
</tr>
<tr>
<td>64K</td>
<td>65,583</td>
<td>17.93s</td>
<td>3,658</td>
</tr>
<tr>
<td>128K</td>
<td>131,121</td>
<td>49.61s</td>
<td>2,643</td>
</tr>
<tr>
<td>192K</td>
<td>196,659</td>
<td>94.99s</td>
<td>2,070</td>
</tr>
<tr>
<td><strong>256K</strong></td>
<td><strong>250,047</strong></td>
<td><strong>142.31s</strong></td>
<td><strong>1,757</strong></td>
</tr>
</tbody>
</table>
<p dir="auto">几个点：</p>
<ul>
<li>8K 到 32K 只从 5451 掉到 4515，衰减很平——因为这个模型 64 层里 48 层是 GDN 线性注意力，不是纯 full attention，所以长上下文不会像常规模型那样往死里掉</li>
<li>换 FP8 之前是 3446 tok/s（8K），换完 5451，<strong>+58%</strong>，代价是权重从 15G 涨到 29G</li>
</ul>
<hr />
<h2>二、decode：双 W7900 TP2 + DFlash2 投机</h2>
<p dir="auto">单请求，<code>max_tokens=300</code>，同样先 flush 缓存。</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>任务</th>
<th>tok/s</th>
</tr>
</thead>
<tbody>
<tr>
<td>数学（12345×6789 长推理）</td>
<td><strong>199.0</strong></td>
</tr>
<tr>
<td>数数（数到 300）</td>
<td>129.0</td>
</tr>
<tr>
<td>写代码（快排+注释）</td>
<td>87.5</td>
</tr>
<tr>
<td>中文问答</td>
<td>62.9 ~ 156.7（波动太大，别当基准）</td>
</tr>
</tbody>
</table>
<p dir="auto">中文那项波动为什么这么大：每轮生成的 thinking 长度不一样，投机接受率差异很大，同一条 prompt 测三次能出 156 / 92 / 63 三个数。所以我现在只用数学题当基准。</p>
<hr />
<h2>三、并发：这里有个反直觉的坑</h2>
<p dir="auto">短 prompt（数数题，256 输出）：</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>并发</th>
<th>吞吐 tok/s</th>
<th>TTFT 均值</th>
<th>单请求耗时</th>
<th>成功</th>
</tr>
</thead>
<tbody>
<tr>
<td>C1</td>
<td>121.8</td>
<td>92ms</td>
<td>2.10s</td>
<td>1/1</td>
</tr>
<tr>
<td>C2</td>
<td>176.2</td>
<td>178ms</td>
<td>2.85s</td>
<td>2/2</td>
</tr>
<tr>
<td>C4</td>
<td>222.1</td>
<td>329ms</td>
<td>4.39s</td>
<td>4/4</td>
</tr>
<tr>
<td><strong>C8</strong></td>
<td><strong>352.2</strong></td>
<td><strong>497ms</strong></td>
<td>5.23s</td>
<td>8/8</td>
</tr>
<tr>
<td>C12</td>
<td>317.7 <img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/26a0.png?v=2bf455356c3" class="not-responsive emoji emoji-android emoji--warning" style="height:1.4em;width:auto;vertical-align:middle" title="⚠" alt="⚠" />️</td>
<td>2,109ms</td>
<td>6.72s</td>
<td>12/12</td>
</tr>
<tr>
<td>C16</td>
<td>382.5</td>
<td>3,071ms</td>
<td>7.89s</td>
<td>16/16</td>
</tr>
<tr>
<td><strong>C24</strong></td>
<td><strong>403.8</strong></td>
<td>5,341ms</td>
<td>10.03s</td>
<td>24/24</td>
</tr>
<tr>
<td>C32</td>
<td>400.4</td>
<td>7,958ms</td>
<td>12.71s</td>
<td>32/32</td>
</tr>
</tbody>
</table>
<p dir="auto">注意 <strong>C12 是 317，反而比 C8 的 352 低</strong>。</p>
<p dir="auto">原因：<code>max-running-requests=8</code>，12 个请求会拆成 8+4 两批，第二批只跑 4 个，GPU 吃不满。C16 正好 8+8，效率又回来了。</p>
<p dir="auto"><strong>所以并发吞吐不是单调上升的，峰值出现在 max-running-requests 的整数倍。</strong></p>
<p dir="auto">8K context 的并发（每请求 8253 token 输入）：</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>并发</th>
<th>吞吐 tok/s</th>
<th>TTFT 均值</th>
</tr>
</thead>
<tbody>
<tr>
<td>C1</td>
<td>66.1</td>
<td>1.54s</td>
</tr>
<tr>
<td>C2</td>
<td>68.3</td>
<td>3.08s</td>
</tr>
<tr>
<td>C4</td>
<td>110.3</td>
<td>4.97s</td>
</tr>
<tr>
<td>C8</td>
<td>154.6</td>
<td>5.75s</td>
</tr>
<tr>
<td>C16</td>
<td><strong>203.1</strong></td>
<td>8.69s</td>
</tr>
</tbody>
</table>
<p dir="auto">长上下文场景到 C16 还没饱和，因为每个请求 prefill 要 1.5 秒，并发反而能把这段摊薄。</p>
<hr />
<h2>四、传输：自己写的跨品牌 CCL</h2>
<p dir="auto"><code>FCCL</code> 中转，不走 P2P。</p>
<p dir="auto">8K 请求的原始日志：</p>
<pre><code>prefill 侧: [fccl] prefill D2H 8253 页 (chunks=1) 15.7ms
decode 侧:  [fccl] decode KV=788336640B aux=25600B
            [fccl] decode H2D 8253 页 25.2ms（TP0/TP1 并行）
</code></pre>
<ul>
<li>D2H：788 MB / 15.7 ms ≈ <strong>50 GB/s</strong>，接近 PRO5000 Gen5 单向上限（57 GB/s）的 88%</li>
<li>H2D：每 rank 25.2 ms，双卡并行</li>
<li><strong>整个传输占 TTFT 只有 2.7%</strong>（41ms / 1533ms）</li>
</ul>
<p dir="auto">所以瓶颈从来不在通信上。H2D 比 D2H 慢一截是因为 W7900 只有 Gen4 x16。</p>
<hr />
<h2>五、最有用的一条发现：PD 两端可以用不同精度</h2>
<p dir="auto">我原来以为两端必须用同一份权重，后来去翻 SGLang 的 <code>conn.py</code> 才发现，bootstrap 校验只查这四项：</p>
<pre><code>page_size / kv_cache_dtype / attn_tp_size / dcp_size
</code></pre>
<p dir="auto"><strong>不校验 model_path，也不校验 quantization。</strong></p>
<p dir="auto">所以现在是 N 卡吃 FP8、A 卡吃 W4A16——各用各擅长的。prefill 从 3446 提到 5451，decode 一点没掉。</p>
<p dir="auto">（前提是两端 <code>--kv-cache-dtype</code> 必须逐字一致，这个会直接硬报错。）</p>
<hr />
<h2>六、踩的坑</h2>
<p dir="auto"><strong>1. 想提并发，三次全炸</strong></p>
<p dir="auto">mrr 从 8 提到 16：</p>
<ul>
<li>mamba cache 跟着翻倍 → OOM（只剩 120MB）</li>
<li>cuda-graph-bs 加 16 → OOM</li>
<li>mem-fraction 降到 0.75 → 能起来，但一跑请求就崩</li>
</ul>
<p dir="auto">400 tok/s 大概就是这两张卡的极限了。</p>
<p dir="auto"><strong>2. 长上下文必须用 fp8 KV</strong></p>
<p dir="auto">FP8 权重占 29GB，KV 池只剩一半。bf16 KV 时池子 116K token，128K 都勉强；换 fp8 KV 才到 252K，刚好够 256K。</p>
<p dir="auto"><strong>3. 两端 context-length 要一起改</strong></p>
<p dir="auto">decode 端一直写死 196608，prefill 是 262144。192K 的请求（196616 token）刚好超一点点，结果请求卡在 bootstrap 握手十分钟没反应，logs 里一行错误都没有。</p>
<hr />
<h2>七、这套方案的边界</h2>
<ul>
<li><strong>它不提升 prefill 绝对速度</strong>。8K 的 5451 tok/s 就是 PRO5000 单卡的能力，PD 买的是「decode 算力 ×2 + KV 容量 ×2 + prefill/decode 不互相阻塞」</li>
<li><strong>decode 端吃不到 FP8</strong>。gfx1100 没有 FP8 tensor core，所以 decode 只能用 W4A16</li>
<li><strong>并发天花板 ~400 tok/s</strong>，卡在 decode 端显存</li>
</ul>
<hr />
]]></description><link>https://lcz.me/topic/3287</link><generator>RSS for Node</generator><lastBuildDate>Sun, 29 Nov 2026 03:54:12 GMT</lastBuildDate><atom:link href="https://lcz.me/topic/3287.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 23 Nov 2026 04:04:56 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to 预热 Qwen4：跨品牌混插 PD 分离跑通——NVIDIA 单卡 + AMD 双卡混跑 Qwen3.8-27B on Mon, 23 Nov 2026 07:36:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/%E5%BC%A0%E5%85%89%E7%92%9E" aria-label="Profile: 张光璞">@<bdi>张光璞</bdi></a> 是的，同品牌的卡更好搞</p>
]]></description><link>https://lcz.me/post/35501</link><guid isPermaLink="true">https://lcz.me/post/35501</guid><dc:creator><![CDATA[fcys]]></dc:creator><pubDate>Mon, 23 Nov 2026 07:36:24 GMT</pubDate></item><item><title><![CDATA[Reply to 预热 Qwen4：跨品牌混插 PD 分离跑通——NVIDIA 单卡 + AMD 双卡混跑 Qwen3.8-27B on Mon, 23 Nov 2026 06:47:08 GMT]]></title><description><![CDATA[<p dir="auto">那R9700  跑 MXFP4 的Prefill  再让7900XTX Decode 也不是不能想象的了。</p>
]]></description><link>https://lcz.me/post/35490</link><guid isPermaLink="true">https://lcz.me/post/35490</guid><dc:creator><![CDATA[张光璞]]></dc:creator><pubDate>Mon, 23 Nov 2026 06:47:08 GMT</pubDate></item><item><title><![CDATA[Reply to 预热 Qwen4：跨品牌混插 PD 分离跑通——NVIDIA 单卡 + AMD 双卡混跑 Qwen3.8-27B on Mon, 23 Nov 2026 05:12:37 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>
]]></description><link>https://lcz.me/post/35461</link><guid isPermaLink="true">https://lcz.me/post/35461</guid><dc:creator><![CDATA[fcys]]></dc:creator><pubDate>Mon, 23 Nov 2026 05:12:37 GMT</pubDate></item><item><title><![CDATA[Reply to 预热 Qwen4：跨品牌混插 PD 分离跑通——NVIDIA 单卡 + AMD 双卡混跑 Qwen3.8-27B on Mon, 23 Nov 2026 05:08:46 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/fcys" aria-label="Profile: fcys">@<bdi>fcys</bdi></a> 好吧，这就是天赋了，老夫跟不上时代了。</p>
]]></description><link>https://lcz.me/post/35456</link><guid isPermaLink="true">https://lcz.me/post/35456</guid><dc:creator><![CDATA[terry]]></dc:creator><pubDate>Mon, 23 Nov 2026 05:08:46 GMT</pubDate></item><item><title><![CDATA[Reply to 预热 Qwen4：跨品牌混插 PD 分离跑通——NVIDIA 单卡 + AMD 双卡混跑 Qwen3.8-27B on Mon, 23 Nov 2026 05:06:18 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> 说实话，我折腾AI就是从看你的视频开始的<img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/1f60a.png?v=2bf455356c3" class="not-responsive emoji emoji-android emoji--blush" style="height:1.4em;width:auto;vertical-align:middle" title=":blush:" alt="😊" /> ，后面全靠在论坛学思路，然后再加上自己的硬件尝试</p>
]]></description><link>https://lcz.me/post/35451</link><guid isPermaLink="true">https://lcz.me/post/35451</guid><dc:creator><![CDATA[fcys]]></dc:creator><pubDate>Mon, 23 Nov 2026 05:06:18 GMT</pubDate></item><item><title><![CDATA[Reply to 预热 Qwen4：跨品牌混插 PD 分离跑通——NVIDIA 单卡 + AMD 双卡混跑 Qwen3.8-27B on Mon, 23 Nov 2026 04:56:14 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/fcys" aria-label="Profile: fcys">@<bdi>fcys</bdi></a> 我特么都还在筑基，你就打通飞升通道了。</p>
]]></description><link>https://lcz.me/post/35442</link><guid isPermaLink="true">https://lcz.me/post/35442</guid><dc:creator><![CDATA[terry]]></dc:creator><pubDate>Mon, 23 Nov 2026 04:56:14 GMT</pubDate></item><item><title><![CDATA[Reply to 预热 Qwen4：跨品牌混插 PD 分离跑通——NVIDIA 单卡 + AMD 双卡混跑 Qwen3.8-27B on Mon, 23 Nov 2026 04:53:54 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://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/1f632.png?v=2bf455356c3" class="not-responsive emoji emoji-android emoji--astonished" style="height:1.4em;width:auto;vertical-align:middle" title=":astonished:" alt="😲" /></p>
]]></description><link>https://lcz.me/post/35439</link><guid isPermaLink="true">https://lcz.me/post/35439</guid><dc:creator><![CDATA[fcys]]></dc:creator><pubDate>Mon, 23 Nov 2026 04:53:54 GMT</pubDate></item><item><title><![CDATA[Reply to 预热 Qwen4：跨品牌混插 PD 分离跑通——NVIDIA 单卡 + AMD 双卡混跑 Qwen3.8-27B on Mon, 23 Nov 2026 04:50:49 GMT]]></title><description><![CDATA[<p dir="auto">看了一下我弟的帖子，一开始装小白来问问题，然后持续输出，后续帖子不是优秀就是精华，是来装逼的。<img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/1f604.png?v=2bf455356c3" class="not-responsive emoji emoji-android emoji--smile" style="height:1.4em;width:auto;vertical-align:middle" title="😄" alt="😄" /></p>
]]></description><link>https://lcz.me/post/35435</link><guid isPermaLink="true">https://lcz.me/post/35435</guid><dc:creator><![CDATA[terry]]></dc:creator><pubDate>Mon, 23 Nov 2026 04:50:49 GMT</pubDate></item><item><title><![CDATA[Reply to 预热 Qwen4：跨品牌混插 PD 分离跑通——NVIDIA 单卡 + AMD 双卡混跑 Qwen3.8-27B on Mon, 23 Nov 2026 04:49:40 GMT]]></title><description><![CDATA[<p dir="auto"><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/2b50.png?v=2bf455356c3" class="not-responsive emoji emoji-android emoji--star" style="height:1.4em;width:auto;vertical-align:middle" title="⭐" alt="⭐" /> 版主审定：本帖设为<strong>精华</strong>，作者 <strong>+6 积分</strong>奖励，希望再接再厉！</p>
<blockquote>
<p dir="auto">奖励凭证：精华 +6 分 · 编号 f3287-1915-1</p>
</blockquote>
]]></description><link>https://lcz.me/post/35434</link><guid isPermaLink="true">https://lcz.me/post/35434</guid><dc:creator><![CDATA[Xiaote]]></dc:creator><pubDate>Mon, 23 Nov 2026 04:49:40 GMT</pubDate></item></channel></rss>