<?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[4卡V100 32G跑Qwen 3.8 Flash Next]]></title><description><![CDATA[<p dir="auto">最近又入手了一組雙卡V100 32G 擴展塢, 帶NVLINK, 用PEX8749 PCIe Switch接到PC. 這台PC原本有兩張V100 32G無NVLINK PCIE, 把它插在一起組成4卡128G, 兩張無nvlink, 兩張有nvlink的奇怪組合. 128G目前能裝的大概只有qwen 3.8 flash next, 於是就動手把它裝起來, 步驟如下:</p>
<ol>
<li>打開chatgpt web, 讓他去找目前網路上的最佳組合, 然後出個prompt給我</li>
<li>用Antigravity cli + gemini 3.8 flash照prompt安裝, 約三小時裝好, 無須介入</li>
<li>叫gemini寫報告, 給chatgpt看. chatgpt提出一些調整建議與測試驗證</li>
<li>Gemini又花了約兩小時做完, 結論是不用調, 測試全數通過, 一樣無須介入<br />
以下是最終報告:</li>
</ol>
<h2>一、目前模型與服務核心配置 (Production Baseline)</h2>
<h3>1. 核心模型參數</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th style="text-align:left">參數名稱</th>
<th style="text-align:left">數值 / 設定</th>
<th style="text-align:left">備註說明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><strong>Model API ID</strong></td>
<td style="text-align:left"><code>qwen-3.8-flash-next</code></td>
<td style="text-align:left">OpenAI 相容調用模型名稱</td>
</tr>
<tr>
<td style="text-align:left"><strong>Base Checkpoint</strong></td>
<td style="text-align:left"><code>RadixArk/Qwen3.8-Flash-Next-NVFP4</code></td>
<td style="text-align:left">官方原版非 abliterated 量化權重（commit <code>7b71922</code>）</td>
</tr>
<tr>
<td style="text-align:left"><strong>模型權重總量</strong></td>
<td style="text-align:left">~125.9 GiB（206 safetensors shards）</td>
<td style="text-align:left">存放於 <code>/opt/llm-qwen3.8-flash-next/models/</code></td>
</tr>
<tr>
<td style="text-align:left"><strong>Context Size (ctx size)</strong></td>
<td style="text-align:left"><strong>200,000 tokens (200K)</strong></td>
<td style="text-align:left"><code>--max-model-len 200000</code>（實測驗證穩定上限）</td>
</tr>
<tr>
<td style="text-align:left"><strong>Max Sequence Num</strong></td>
<td style="text-align:left"><strong>4</strong></td>
<td style="text-align:left"><code>--max-num-seqs 4</code></td>
</tr>
<tr>
<td style="text-align:left"><strong>Max Batched Tokens</strong></td>
<td style="text-align:left"><strong>4,096</strong></td>
<td style="text-align:left"><code>--max-num-batched-tokens 4096</code>（嚴格 A/B 評測勝出者）</td>
</tr>
<tr>
<td style="text-align:left"><strong>GPU 利用率上限</strong></td>
<td style="text-align:left"><strong>0.92 (92%)</strong></td>
<td style="text-align:left"><code>--gpu-memory-utilization 0.92</code></td>
</tr>
<tr>
<td style="text-align:left"><strong>Parallelism</strong></td>
<td style="text-align:left"><strong>TP=4, PP=1</strong></td>
<td style="text-align:left">跨 4 張 V100 進行張量平行，流水線平行設為 1</td>
</tr>
<tr>
<td style="text-align:left"><strong>MTP / 投機解碼</strong></td>
<td style="text-align:left"><strong>關閉 (OFF)</strong></td>
<td style="text-align:left">實測證實 MTP k=1 吞吐倒退 14% 且破壞 200K 容量規範</td>
</tr>
<tr>
<td style="text-align:left"><strong>通訊優化</strong></td>
<td style="text-align:left"><code>--disable-custom-all-reduce</code></td>
<td style="text-align:left">關閉 PCIe 自訂算子，依賴 PyNCCL 混合 NVLink/PCIe 環</td>
</tr>
</tbody>
</table>
<h3>2. KV Cache 與顯存資源配置</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th style="text-align:left">項目</th>
<th style="text-align:left">數值 / 配置</th>
<th style="text-align:left">詳細說明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><strong>KV Cache Dtype</strong></td>
<td style="text-align:left"><strong>FP16</strong> (<code>float16</code>)</td>
<td style="text-align:left">SM70 專屬原生浮點精度，無量化損耗</td>
</tr>
<tr>
<td style="text-align:left"><strong>單卡可用 KV Cache</strong></td>
<td style="text-align:left"><strong>6.48 GiB / 卡</strong></td>
<td style="text-align:left">TP4 總計 <strong>25.92 GiB</strong> 專供 KV 快取</td>
</tr>
<tr>
<td style="text-align:left"><strong>GPU KV Cache 總容量</strong></td>
<td style="text-align:left"><strong>513,207 tokens</strong></td>
<td style="text-align:left">充裕空間保障高並發與長上下文</td>
</tr>
<tr>
<td style="text-align:left"><strong>200K 最大並行度</strong></td>
<td style="text-align:left"><strong>2.57×</strong></td>
<td style="text-align:left">滿載 200K 上下文下保障 <strong>2.57 條並發</strong>（滿足 $\ge 2.0\times$ 生產硬指標）</td>
</tr>
<tr>
<td style="text-align:left"><strong>Block Size</strong></td>
<td style="text-align:left"><strong>784 tokens</strong></td>
<td style="text-align:left"><code>--mamba-cache-mode align</code> 自動對齊 Mamba 狀態頁</td>
</tr>
<tr>
<td style="text-align:left"><strong>Prefix Caching</strong></td>
<td style="text-align:left"><strong>啟用 (ON)</strong></td>
<td style="text-align:left">提示詞命中後 TTFT 提升達 4.0× ~ 14.7×</td>
</tr>
<tr>
<td style="text-align:left"><strong>PLE / N-gram Offload</strong></td>
<td style="text-align:left"><strong>45.7 GiB 釘選於主機 RAM</strong></td>
<td style="text-align:left"><code>VLLM_PLE_CPU_OFFLOAD=1</code>，釋放 ~46 GB GPU 顯存</td>
</tr>
<tr>
<td style="text-align:left"><strong>靜態顯存佔用</strong></td>
<td style="text-align:left">~30,500 MiB / 32,768 MiB (93%)</td>
<td style="text-align:left">每張卡預留約 2.26 GiB 安全餘裕，無 OOM 風險</td>
</tr>
</tbody>
</table>
<hr />
<h2>二、執行的驗證項目與結果</h2>
<h3>1. API 功能與正確性測試（8/8 全數通過）</h3>
<ul>
<li><strong>模型枚舉 (<code>/v1/models</code>)</strong>：正確枚舉 <code>qwen-3.8-flash-next</code>。</li>
<li><strong>基本問答 (Non-streaming)</strong>：基礎問答正常，耗時 &lt; 1s。</li>
<li><strong>串流輸出 (Streaming)</strong>：SSE 逐 Token 平滑輸出。</li>
<li><strong>程式碼生成 (Coding)</strong>：生成正確的 Python Fibonacci 迴圈實作。</li>
<li><strong>多步驟推理 (Reasoning)</strong>：清晰輸出多步驟思考鏈（CoT）。</li>
<li><strong>工具呼叫 (Tool / Function Calling)</strong>：精準解析 <code>get_weather(location="Tokyo")</code>。</li>
<li><strong>結構化輸出 (Structured JSON)</strong>：輸出符合 Schema 的 3 筆 JSON 資料並成功解析。</li>
<li><strong>長文本檢索 (Long Context 2K)</strong>：於 2,022 tokens 上下文中正確檢索目標並總結。</li>
</ul>
<h3>2. Prefix Caching 驗證</h3>
<ul>
<li><strong>重播一致性</strong>：Cold 與 Warm 輸出為 <strong>100% 精確相符 (Exact Match)</strong>。</li>
<li><strong>1.8K 前綴</strong>：TTFT 從 1.210s 降低至 0.302s，達到 <strong>4.01× 加速</strong>。</li>
<li><strong>7.5K 前綴</strong>：TTFT 從 6.828s 降低至 0.464s，達到 <strong>14.71× 加速</strong>。</li>
</ul>
<hr />
<h2>三、各項基準測試數據摘要 (Phase 2 Benchmarks)</h2>
<p dir="auto">所有評測均使用模型專屬 Tokenizer 校準實際 tokens，每項測試重複 3 輪取中位數（Median）：</p>
<h3>1. Prefill 效能 (PP 8K ~ 190K tokens)</h3>
<p dir="auto">Flash-Next 混合線性注意力架構展現線性擴展性，Prefill 速度恆定維持在 ~1,810–1,890 tok/s：</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th style="text-align:left">測試情境</th>
<th style="text-align:left">實際 Prompt Tokens</th>
<th style="text-align:left">首字延遲 (TTFT)</th>
<th style="text-align:left">Prefill 速度</th>
<th style="text-align:left">峰值顯存佔用</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><strong>PP 8K</strong></td>
<td style="text-align:left">8,019</td>
<td style="text-align:left">4.311 s</td>
<td style="text-align:left"><strong>1,860.0 tok/s</strong></td>
<td style="text-align:left">31,248 MiB</td>
</tr>
<tr>
<td style="text-align:left"><strong>PP 32K</strong></td>
<td style="text-align:left">32,019</td>
<td style="text-align:left">16.953 s</td>
<td style="text-align:left"><strong>1,888.7 tok/s</strong></td>
<td style="text-align:left">31,248 MiB</td>
</tr>
<tr>
<td style="text-align:left"><strong>PP 64K</strong></td>
<td style="text-align:left">64,019</td>
<td style="text-align:left">33.960 s</td>
<td style="text-align:left"><strong>1,885.1 tok/s</strong></td>
<td style="text-align:left">31,248 MiB</td>
</tr>
<tr>
<td style="text-align:left"><strong>PP 128K</strong></td>
<td style="text-align:left">128,019</td>
<td style="text-align:left">69.259 s</td>
<td style="text-align:left"><strong>1,848.4 tok/s</strong></td>
<td style="text-align:left">31,248 MiB</td>
</tr>
<tr>
<td style="text-align:left"><strong>PP 190K</strong></td>
<td style="text-align:left">190,019</td>
<td style="text-align:left">104.796 s</td>
<td style="text-align:left"><strong>1,813.2 tok/s</strong></td>
<td style="text-align:left">31,248 MiB</td>
</tr>
</tbody>
</table>
<h3>2. Decode 效能 (短長上下文解碼)</h3>
<p dir="auto">單序列解碼速度極為平穩，190K 極長上下文下僅微幅下降 9.2%：</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th style="text-align:left">上下文長度</th>
<th style="text-align:left">輸出長度</th>
<th style="text-align:left">解碼速度</th>
<th style="text-align:left">平均 ITL (單字延遲)</th>
<th style="text-align:left">TTFT</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><strong>2K (短文本)</strong></td>
<td style="text-align:left">128 tokens</td>
<td style="text-align:left"><strong>57.46 tok/s</strong></td>
<td style="text-align:left">17.40 ms</td>
<td style="text-align:left">1.100 s</td>
</tr>
<tr>
<td style="text-align:left"><strong>2K (短文本)</strong></td>
<td style="text-align:left">512 tokens</td>
<td style="text-align:left"><strong>57.33 tok/s</strong></td>
<td style="text-align:left">17.44 ms</td>
<td style="text-align:left">1.103 s</td>
</tr>
<tr>
<td style="text-align:left"><strong>32K (中長文本)</strong></td>
<td style="text-align:left">128 tokens</td>
<td style="text-align:left"><strong>56.95 tok/s</strong></td>
<td style="text-align:left">17.56 ms</td>
<td style="text-align:left">16.830 s</td>
</tr>
<tr>
<td style="text-align:left"><strong>128K (長文本)</strong></td>
<td style="text-align:left">128 tokens</td>
<td style="text-align:left"><strong>54.06 tok/s</strong></td>
<td style="text-align:left">18.82 ms</td>
<td style="text-align:left">68.924 s</td>
</tr>
<tr>
<td style="text-align:left"><strong>190K (極長文本)</strong></td>
<td style="text-align:left">128 tokens</td>
<td style="text-align:left"><strong>52.17 tok/s</strong></td>
<td style="text-align:left">19.64 ms</td>
<td style="text-align:left">104.411 s</td>
</tr>
</tbody>
</table>
<h3>3. Concurrency 平行並發壓測 (~2K Prompt, 512 Output)</h3>
<p dir="auto">導入 <code>threading.Barrier</code> 同步屏障與獨立 Session 修復假性排隊後，並發擴展恢復正常：</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th style="text-align:left">並發數 (C)</th>
<th style="text-align:left">總體吞吐量 (Aggregate)</th>
<th style="text-align:left">單請求平均速度</th>
<th style="text-align:left">P50 TTFT</th>
<th style="text-align:left">P50 ITL</th>
<th style="text-align:left">說明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><strong>C = 1</strong></td>
<td style="text-align:left"><strong>50.46 tok/s</strong></td>
<td style="text-align:left">57.42 tok/s</td>
<td style="text-align:left">1.120 s</td>
<td style="text-align:left">17.38 ms</td>
<td style="text-align:left">基準單序列</td>
</tr>
<tr>
<td style="text-align:left"><strong>C = 2</strong></td>
<td style="text-align:left"><strong>63.86 tok/s</strong> (+26.6%)</td>
<td style="text-align:left">37.31 tok/s</td>
<td style="text-align:left">1.978 s</td>
<td style="text-align:left">25.86 ms</td>
<td style="text-align:left"><strong>正常超越 C1</strong>（C2 異常徹底修復）</td>
</tr>
<tr>
<td style="text-align:left"><strong>C = 4</strong></td>
<td style="text-align:left"><strong>93.67 tok/s</strong> (+85.6%)</td>
<td style="text-align:left">34.25 tok/s</td>
<td style="text-align:left">4.014 s</td>
<td style="text-align:left">28.53 ms</td>
<td style="text-align:left">達到 TP4 伺服極限吞吐</td>
</tr>
</tbody>
</table>
<h3>4. 混合負載干擾 (Mixed Prefill/Decode Interference)</h3>
<ul>
<li><strong>Test A (32K decode + 64K prefill)</strong>：
<ul>
<li>解碼中動態注入 64K 預填，Req B 預填耗時 55.59s (1,151.6 tok/s)。</li>
<li>Req A 解碼受到突發干擾時之最大單字停頓（Max Stall）：<strong>2,615.4 ms</strong>。</li>
</ul>
</li>
<li><strong>Test B (128K decode + 64K prefill)</strong>：
<ul>
<li>Req B 預填耗時 77.24s (828.8 tok/s)。</li>
<li>由於 128K 解碼在 64K 預填中途即提早完成，未出現額外卡頓。</li>
</ul>
</li>
</ul>
<hr />
<p dir="auto">跑llama-benchy測試:<br />
<img src="https://upload.lcz.me/uploads/019b5a01-6945-49ac-9f87-e4f62b3ca961.png" alt="螢幕擷取畫面 2026-09-21 201430.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">實際測試心得: 速度很快, 比單DGX spark快很多, 剛雙DGX spark插不多. 品質方面RadixArk的NVFP4是優於兩組DGX spark( Local-Lab NVFP4/NVIDIA NVFP4) , chatgpt說的, 還沒長時間實測.<br />
Qwen 3.8 flash next我在DGX spark上面用了一段時間了, 同時單台跟兩台都有在用, 同時也在使用glm 5.3 flash跟Deepseek v4.1 flash. 就我的心得而言, Qwen 3.8 flash next是超越Deepseek的.<br />
以下同時提供兩個DGX spark的llama-benchy測試數據:<br />
單DGX spark:<br />
<img src="https://upload.lcz.me/uploads/f3a360fe-fa6a-4038-ae4e-80f0d77a518b.png" alt="螢幕擷取畫面 2026-09-18 204047.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">雙DGX spark:<br />
<img src="https://upload.lcz.me/uploads/d9f22e66-e2e6-4f82-b33d-520e0cf84398.png" alt="螢幕擷取畫面 2026-09-21 202239.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">雙DGX spark經過修復後實際工作使用可以跑約50~70, 單DGX spark約3X, 4xV100 32G跑了一陣約5x-6x.</p>
<p dir="auto">橫向對比另外一組雙v100 32G x 2 nvlink的 雙卡擴展塢, 跑Qwen 3.8 27B Q8, 速度約4x-5x, 數據如下:<br />
<img src="https://upload.lcz.me/uploads/b8759913-31db-4aec-9d09-e6dfad1590c2.png" alt="螢幕擷取畫面 2026-09-21 202830.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">不過能力上27B相較之下還是稍弱了, prefill也略低.</p>
]]></description><link>https://lcz.me/topic/1863</link><generator>RSS for Node</generator><lastBuildDate>Fri, 25 Sep 2026 21:27:18 GMT</lastBuildDate><atom:link href="https://lcz.me/topic/1863.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 21 Sep 2026 12:29:55 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to 4卡V100 32G跑Qwen 3.8 Flash Next on Tue, 22 Sep 2026 02:01:20 GMT]]></title><description><![CDATA[<p dir="auto">这个速度已经完全实用了。</p>
]]></description><link>https://lcz.me/post/19900</link><guid isPermaLink="true">https://lcz.me/post/19900</guid><dc:creator><![CDATA[张光璞]]></dc:creator><pubDate>Tue, 22 Sep 2026 02:01:20 GMT</pubDate></item><item><title><![CDATA[Reply to 4卡V100 32G跑Qwen 3.8 Flash Next on Mon, 21 Sep 2026 13:59:59 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> 機器太吵, 已經被我關進lab小房間, 不太容易拍照. 補一張四卡nvidia-smi圖<br />
<img src="https://upload.lcz.me/uploads/cf8346e4-f799-4e92-9467-61b5bab6166e.png" alt="螢幕擷取畫面 2026-09-21 215836.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://lcz.me/post/19801</link><guid isPermaLink="true">https://lcz.me/post/19801</guid><dc:creator><![CDATA[soop ladios]]></dc:creator><pubDate>Mon, 21 Sep 2026 13:59:59 GMT</pubDate></item><item><title><![CDATA[Reply to 4卡V100 32G跑Qwen 3.8 Flash Next on Mon, 21 Sep 2026 13:02:58 GMT]]></title><description><![CDATA[<p dir="auto">4×V100 128G 能跑起 200K 很不容易，补一个拓扑上的坑：你这套是「两对 NVLink + PEX8749 switch」的异构组合，TP=4 会把 all-reduce 里<strong>最慢的那一跳</strong>放进每条路径。NVLink 对内是 ~300GB/s 双向，跨对/过 switch 只能走 PCIe，两者差一个数量级，所以瓶颈大概率不在算力也不在 HBM，而在跨对通信。</p>
<p dir="auto">建议先量再调：</p>
<ol>
<li><code>nvidia-smi topo -m</code> + <code>NCCL_DEBUG=INFO</code> 确认 all-reduce 实际走的是 P2P、SHM 还是 host-staged。<code>--disable-custom-all-reduce</code> 交给 NCCL 自己组环是对的，但要亲眼确认它没退化成走 host。</li>
<li>用 <code>nccl-tests</code> 的 <code>all_reduce_perf</code> 打 busbw，看 4 卡的有效带宽是不是被跨对那一段压到 PCIe 档。如果是，TP=4 的每步都在付这个税。</li>
</ol>
<p dir="auto">如果确认跨对拖累明显，两个替代布局值得试：</p>
<ul>
<li><strong>2×TP=2 两个副本</strong>（各自落在有 NVLink 的一对上）：单请求吞吐不变，但两个独立请求近似翻倍，跨对通信直接消失。</li>
<li><strong>PP=2×TP=2</strong>：把跨对通信压到 stage 边界，代价是流水线气泡和显存分配更紧。</li>
</ul>
<p dir="auto">另外两点口径：V100 是 SM70，没有 BF16/FP8/FP4 张量核，NVFP4 权重最终仍要反量化到 FP16 跑 matmul，所以你选 FP16 KV、关 MTP 是符合硬件的；<code>--max-num-seqs 4</code> 配 200K 时 4×200K=800K 已超过 513K 的 KV 总量，满上下文并发实际只能到 2 左右，这点建议在文档里写清，免得被当成 4 路满并发。</p>
<p dir="auto">方便的话把 topo 图和 all_reduce busbw 贴出来，大家能帮你判断该不该拆布局。</p>
]]></description><link>https://lcz.me/post/19788</link><guid isPermaLink="true">https://lcz.me/post/19788</guid><dc:creator><![CDATA[Xiaote]]></dc:creator><pubDate>Mon, 21 Sep 2026 13:02:58 GMT</pubDate></item><item><title><![CDATA[Reply to 4卡V100 32G跑Qwen 3.8 Flash Next on Mon, 21 Sep 2026 12:41:23 GMT]]></title><description><![CDATA[<p dir="auto">已经是非常精品的测试帖子了，再来一点实拍图，非常好的测试。卡是洋垃圾，但是测试本身很有价值，能把千问3.8 flash跑起来就很成功了。</p>
]]></description><link>https://lcz.me/post/19775</link><guid isPermaLink="true">https://lcz.me/post/19775</guid><dc:creator><![CDATA[terry]]></dc:creator><pubDate>Mon, 21 Sep 2026 12:41:23 GMT</pubDate></item></channel></rss>