<?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[【分享】N卡 fork - 给 sergqwer/strata-nvfp4 加上 DP 双卡预填充：2×3090 @350W 长 prompt prefill 4.7K–5.7K tok/s（附 GitHub 分支）]]></title><description><![CDATA[<p dir="auto">之前我分享过 nicejunjie/Strata-rdna3 的 DP 双卡预填充（STRATA_DP_PREFILL）在 CUDA 上的编译。这次我把这套 DP 移植到了 sergqwer 的 NVIDIA 分支 strata-nvfp4 0.1.44.1-nvfp4.2 上。sergqwer 的提示词处理本来就比较快，两者合在一起，是我在 2×3090 上测到最快的 Strata。</p>
<p dir="auto">代码在这里（非官方）：<strong><a href="https://github.com/strata-dp/strata-nvfp4/tree/dp-prompt-path" rel="nofollow ugc">https://github.com/strata-dp/strata-nvfp4/tree/dp-prompt-path</a></strong> (分支 dp-prompt-path）</p>
<h3>改了什么</h3>
<ul>
<li>基于 sergqwer/strata-nvfp4 <code>v0.1.44.1-nvfp4.2</code>。</li>
<li>移植了 nicejunjie 的 4 个 DP 提交（保留原作者）：DP 主体、<code>STRATA_DP_MIN</code> 默认 8000、DP 计划拒绝的段落改用流水线 chunk、DP 计划的最后一个 chunk 检查。主体有 5 处冲突，我手动合并：prefill.cpp 用 nicejunjie 的 chunk 遍历；generate.cpp 保留 sergqwer 自己的流水线 chunk 大小，再加上 DP 的覆盖。</li>
<li>我自己补了一个小提交：chunk 循环的步长和最后一行的位置改成跟随 <code>step_at</code>（来自 nicejunjie 另一个没移植的提交，不补的话 DP 的 chunk 计划和循环会对不上）。</li>
<li>没有移植：<code>STRATA_DP_SHARE</code>（我测过没有提升）、提前/延后回填（依赖他的张量并行代码）、张量并行相关的提交。</li>
</ul>
<h3>DP 预填充是什么</h3>
<ul>
<li>原版双卡是<strong>层切分</strong>：卡 0 跑 0–23 层，卡 1 跑 24–47 层，prompt 的每个 chunk 先过卡 0 再过卡 1。</li>
<li>DP 模式下<strong>每张卡都放全部 dense 权重</strong>，两张卡<strong>轮流拿 chunk</strong>，各自跑完全部 48 层，每层的状态在两卡之间同步。</li>
<li>只对 ≥8,000 token 的 prompt 生效，decode 不受影响。</li>
</ul>
<h3>测试环境</h3>
<ul>
<li>2× RTX 3090 24 GB，各 PCIe 4.0 x16，P2P 开启（引擎日志两个方向都是 <code>peer access on</code>），两卡都限 350 W</li>
<li>32 核 EPYC（AVX2，无 AVX-512），256 GB DDR4 八通道，Ubuntu 24.04，CUDA 13 镜像，<code>CUDA_ARCHITECTURES=86</code></li>
<li>模型：Swift 1.5 Qwen3.8-Flash-Next <strong>IQ4_XS</strong>（UkisAI GGUF），512K 上下文（YaRN ×2），int8 KV，<code>--kv-resident 32768</code>，<code>--pipeline-windows 2</code>，<code>--pcie-frac 0</code>，<code>--spec 4</code> + MTP</li>
<li>DP 设置：<code>STRATA_DP_PREFILL=1 STRATA_KV_HOST_DMA=1 STRATA_PREFILL_AUTO_MAX=16384</code>，不用 <code>--trim-stage-weights</code></li>
<li>所有引擎用同一份配置和同一个专家 profile，只换引擎</li>
</ul>
<h3>Prefill（tok/s，350 W，每个 prompt 加随机前缀避免缓存命中，max_tokens 1）</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>引擎</th>
<th>19K</th>
<th>43K</th>
<th>89K</th>
<th>123K</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>本分支（sergqwer + DP）</strong></td>
<td><strong>4,719</strong></td>
<td><strong>5,354</strong></td>
<td><strong>5,705</strong></td>
<td><strong>5,592</strong></td>
</tr>
<tr>
<td>nicejunjie/Strata-rdna3 + DP（CUDA 编译）</td>
<td>4,493</td>
<td>5,046</td>
<td>5,481</td>
<td>5,418</td>
</tr>
<tr>
<td>上游 Niko1221/Strata <code>main</code>（10-28，引擎 0.1.53），无 DP</td>
<td>2,567</td>
<td>3,885</td>
<td>4,611</td>
<td>4,737</td>
</tr>
</tbody>
</table>
<ul>
<li>比 nicejunjie 的 DP 分支快 <strong>3~6%</strong>。</li>
<li>比上游最新版快 <strong>18~84%</strong>，prompt 越短差距越大。</li>
</ul>
<h3>Decode（tok/s，350 W，greedy，关思考）</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>引擎</th>
<th>中文散文</th>
<th>中文聊天</th>
<th>英文技术</th>
<th>代码</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>本分支</strong></td>
<td>118</td>
<td>130</td>
<td>127</td>
<td>209</td>
</tr>
<tr>
<td>nicejunjie + DP</td>
<td>121</td>
<td>125</td>
<td>118</td>
<td>199</td>
</tr>
<tr>
<td>上游 <code>main</code></td>
<td>127</td>
<td>131</td>
<td>126</td>
<td>188</td>
</tr>
</tbody>
</table>
<p dir="auto">DP 不改 decode 路径。上游最新版的中文散文 decode 更好一点，代码则是本分支最好。</p>
<h3>单卡参考（1× 3090，350 W）</h3>
<p dir="auto">单卡时 DP 不会生效，本分支就等于 sergqwer 原版引擎：</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th></th>
<th>19K</th>
<th>43K</th>
<th>89K</th>
<th>123K</th>
<th>decode（散文 / 聊天 / 英文 / 代码）</th>
</tr>
</thead>
<tbody>
<tr>
<td>1× 3090</td>
<td>2,414</td>
<td>2,966</td>
<td>2,921</td>
<td>2,864</td>
<td>110 / 113 / 109 / 163</td>
</tr>
</tbody>
</table>
<p dir="auto">单卡的 prefill 大约是双卡 DP 的一半，decode 慢 7~22%。</p>
<h3>注意</h3>
<ul>
<li><strong>只支持正好两张卡的层切分。</strong> 不能和 <code>--batch</code>、<code>--peer-device</code>、<code>--trim-stage-weights</code> 一起用。</li>
<li><strong>需要 KV streaming</strong>（配置里有 <code>--kv-resident</code>）。上下文 ≥ 65536 且内存够时 setup 会自动打开；WSL 下是关的，所以 DP 也开不了。</li>
<li><strong>显存：</strong> DP 每张卡多放一份 dense 权重，所以每张卡缓存的专家比 nicejunjie 分支少约 300 个。我在一次图片请求后见过一条 "only 435 MiB of VRAM free" 的警告，没有出错，但长上下文加图片时要留意。</li>
<li><strong>P2P：</strong> 我的卡开了 P2P。GeForce 官方驱动一般没有 P2P，DP 照样能跑，只是卡间同步要经过内存中转，速度我没测。</li>
<li><strong>350 W：</strong> 两张 3090 跑 350 W 时整机功耗接近 1 kW，电源要够。</li>
<li>这是非官方移植，基于 sergqwer 的 0.1.44.1-nvfp4.2，不是他最新的 0.2.0 版本。</li>
<li>这个分支 p2p/nvlink 帮助不大</li>
</ul>
<p dir="auto">感谢 nicejunjie 的 DP 实现，也感谢 sergqwer 的 NVIDIA 分支。</p>
]]></description><link>https://lcz.me/topic/2691</link><generator>RSS for Node</generator><lastBuildDate>Mon, 09 Nov 2026 10:58:45 GMT</lastBuildDate><atom:link href="https://lcz.me/topic/2691.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 29 Oct 2026 13:18:40 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to 【分享】N卡 fork - 给 sergqwer/strata-nvfp4 加上 DP 双卡预填充：2×3090 @350W 长 prompt prefill 4.7K–5.7K tok/s（附 GitHub 分支） on Fri, 30 Oct 2026 19:28:26 GMT]]></title><description><![CDATA[<p dir="auto">感謝分享 來試試看</p>
]]></description><link>https://lcz.me/post/29606</link><guid isPermaLink="true">https://lcz.me/post/29606</guid><dc:creator><![CDATA[starryskyknight]]></dc:creator><pubDate>Fri, 30 Oct 2026 19:28:26 GMT</pubDate></item><item><title><![CDATA[Reply to 【分享】N卡 fork - 给 sergqwer/strata-nvfp4 加上 DP 双卡预填充：2×3090 @350W 长 prompt prefill 4.7K–5.7K tok/s（附 GitHub 分支） on Thu, 29 Oct 2026 19:29:46 GMT]]></title><description><![CDATA[<p dir="auto">mark一下，我用的是SWIFT IQ 3 S</p>
]]></description><link>https://lcz.me/post/29263</link><guid isPermaLink="true">https://lcz.me/post/29263</guid><dc:creator><![CDATA[stxpnet]]></dc:creator><pubDate>Thu, 29 Oct 2026 19:29:46 GMT</pubDate></item><item><title><![CDATA[Reply to 【分享】N卡 fork - 给 sergqwer/strata-nvfp4 加上 DP 双卡预填充：2×3090 @350W 长 prompt prefill 4.7K–5.7K tok/s（附 GitHub 分支） on Thu, 29 Oct 2026 13:24:09 GMT]]></title><description><![CDATA[<p dir="auto">因为我没用iq3_s 所以就没测了<br />
有兴趣的网友可以试试</p>
<p dir="auto">我自己用的时候都是在250w</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Engine / setting</th>
<th>Power</th>
<th>19K</th>
<th>43K</th>
<th>89K</th>
<th>123K</th>
</tr>
</thead>
<tbody>
<tr>
<td>**Port, DP **</td>
<td>250 W</td>
<td><strong>4,226</strong></td>
<td><strong>4,644</strong></td>
<td><strong>4,812</strong></td>
<td><strong>4,713</strong></td>
</tr>
</tbody>
</table>
<p dir="auto">这已经是strata 刚出来的时候 我觉得可以用的 差不多两倍了</p>
]]></description><link>https://lcz.me/post/29190</link><guid isPermaLink="true">https://lcz.me/post/29190</guid><dc:creator><![CDATA[applejuice]]></dc:creator><pubDate>Thu, 29 Oct 2026 13:24:09 GMT</pubDate></item></channel></rss>