<?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[# 双卡 RTX 2080 Ti + vLLM 跑 Qwen3.8-27B-FP8 实测分享]]></title><description><![CDATA[<p dir="auto">备注：搞了两张2080 22g，遇到了很多坑，回头如果你也玩双2080可以把这个帖子丢给你的hermes，减少踩坑。目前是能正常跑起来了，再优化就要等官方的qwen3.8 27b的int4版本了。</p>
<p dir="auto">以下是AI总结：</p>
<h2>硬件</h2>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>项目</th>
<th>配置</th>
</tr>
</thead>
<tbody>
<tr>
<td>GPU</td>
<td>2× NVIDIA RTX 2080 Ti 22GB（Consumer，Turing SM75）</td>
</tr>
<tr>
<td>NVLink</td>
<td>有桥，2 link，每 link 25.78 GB/s，实测 P2P copy 40 GB/s、NCCL all_reduce 72.6 GB/s</td>
</tr>
<tr>
<td>CPU</td>
<td>Intel i5-7500（4C4T，老古董，但推理瓶颈在 GPU）</td>
</tr>
<tr>
<td>内存</td>
<td>32GB DDR4</td>
</tr>
<tr>
<td>系统</td>
<td>Ubuntu 24.04 LTS，内核 7.0.0</td>
</tr>
<tr>
<td>驱动</td>
<td>595.84，CUDA 13.2</td>
</tr>
</tbody>
</table>
<h2>软件栈</h2>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>项目</th>
<th>版本</th>
</tr>
</thead>
<tbody>
<tr>
<td>vLLM</td>
<td><strong>vLLM 2080 Ti Definitive Edition v0.1.15</strong>（社区 fork，基于 vLLM 0.21.0，作者 <a href="http://github.com/weicj" rel="nofollow ugc">github.com/weicj</a></td>
</tr>
<tr>
<td>运行时</td>
<td>CUDA 12.8 / PyTorch 2.11.0+cu128</td>
</tr>
<tr>
<td>模型</td>
<td>Qwen3.8-27B-FP8（W8A16，FP8 权重，FP16 KV cache）</td>
</tr>
<tr>
<td>量化</td>
<td>FP8（SM75 原生不支持 FP8，该 fork 通过 kernel 适配实现）</td>
</tr>
</tbody>
</table>
<h3>为什么用这个 fork</h3>
<p dir="auto">RTX 2080 Ti 是 Turing 架构（SM75），官方 vLLM 的 FP8 kernel 只支持 SM89+（Ada Lovelace）。<code>vLLM-2080Ti-Definitive</code> 是社区维护的 fork，专门适配了 Turing 的 FP8 量化推理，同时支持 MTP（Multi-Token Prediction）投机解码、GDN（Gated DeltaNet）混合架构等 Qwen3.8 的特性。</p>
<h2>启动命令</h2>
<pre><code class="language-bash">python -m vllm.entrypoints.openai.api_server \
  --host 0.0.0.0 \
  --port 8000 \
  --model /path/to/models/Qwen3.8-27B-FP8 \
  --served-model-name qwen38-27b \
  --dtype half \
  --tensor-parallel-size 2 \
  --generation-config vllm \
  --max-model-len 131072 \
  --enable-chunked-prefill \
  --max-num-seqs 1 \
  --max-num-batched-tokens 2048 \
  --override-generation-config '{"temperature":0.1}' \
  --quantization fp8 \
  --gpu-memory-utilization 0.92 \
  --mamba-cache-mode align \
  --enable-prefix-caching \
  --reasoning-parser qwen3 \
  --tool-call-parser qwen3_xml \
  --enable-auto-tool-choice \
  --additional-config '{"gdn_prefill_backend":"flashqla_legacy"}' \
  --speculative-config '{"method":"mtp","num_speculative_tokens":3}' \
  --compilation-config '{"cudagraph_mode":"PIECEWISE","cudagraph_capture_sizes":[4],"max_cudagraph_capture_size":4}'
</code></pre>
<h3>关键参数说明</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>参数</th>
<th>值</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>--tensor-parallel-size</code></td>
<td>2</td>
<td>双卡 TP，权重平分到两张卡</td>
</tr>
<tr>
<td><code>--speculative-config</code></td>
<td>MTP, 3 tokens</td>
<td>Qwen3.8 的 Multi-Token Prediction 投机解码，是提速的核心</td>
</tr>
<tr>
<td><code>--max-model-len</code></td>
<td>131072</td>
<td>128K 上下文</td>
</tr>
<tr>
<td><code>--gpu-memory-utilization</code></td>
<td>0.92</td>
<td>预分配显存比例，留了 8% 给 CUDA overhead</td>
</tr>
<tr>
<td><code>--max-num-seqs</code></td>
<td>1</td>
<td>单并发（显卡 VRAM 有限，只能同时跑一条请求）</td>
</tr>
<tr>
<td><code>--max-num-batched-tokens</code></td>
<td>2048</td>
<td>单步最大 token 数，MTP3 推荐值</td>
</tr>
<tr>
<td><code>--cudagraph_mode</code></td>
<td>PIECEWISE</td>
<td>分段 CUDA Graph，MTP 投机解码必须用 PIECEWISE 不能用 FULL</td>
</tr>
<tr>
<td><code>--enable-prefix-caching</code></td>
<td>true</td>
<td>开启前缀缓存，相同系统提示词不重复计算</td>
</tr>
</tbody>
</table>
<h2>显存分布</h2>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>组成</th>
<th>每卡占用</th>
</tr>
</thead>
<tbody>
<tr>
<td>模型权重（FP8, TP=2）</td>
<td>~13.5 GB</td>
</tr>
<tr>
<td>CUDA Graph + 激活值</td>
<td>~3 GB</td>
</tr>
<tr>
<td>KV Cache（FP16）</td>
<td>~5.12 GB</td>
</tr>
<tr>
<td>合计</td>
<td>~21.6 / 22.5 GB</td>
</tr>
</tbody>
</table>
<p dir="auto">KV cache 总容量：<strong>144,252 tokens</strong>。单条 128K 请求占 91%，并发上限 1.10x——放得下一条完整的 128K 请求，但没有余量给第二条。</p>
<h2>性能实测</h2>
<p dir="auto">数据来源：vLLM 日志 <code>Avg generation throughput</code>（10 秒窗口平均），2026-08-19 实测。</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>上下文长度</th>
<th>decode 吞吐</th>
<th>备注</th>
</tr>
</thead>
<tbody>
<tr>
<td>短上下文（&lt;1K）</td>
<td><strong>75–81 tok/s</strong></td>
<td>首次回复，无前缀缓存</td>
</tr>
<tr>
<td>16K</td>
<td><strong>34–38 tok/s</strong></td>
<td>长上下文降速，但仍可用</td>
</tr>
<tr>
<td>40K（真实对话）</td>
<td><strong>55–75 tok/s</strong></td>
<td>前缀缓存命中 83%，有缓存加持速度回升</td>
</tr>
</tbody>
</table>
<p dir="auto">Prefill 吞吐（prompt 处理）：短 prompt 约 200–400 tok/s，长 prompt 有前缀缓存时可达 2000–3000 tok/s。</p>
<h2>踩坑记录</h2>
<h3>1. MTP 是刚需，不能关</h3>
<p dir="auto">Qwen3.8-27B 是 GDN（Gated DeltaNet）混合架构，<strong>不开 MTP 推理会出问题</strong>：</p>
<ul>
<li><code>MTP_K=0</code>（无投机解码）：输出退化（反复输出 <code>!!!!</code>、乱码），benchmark 看着正常但实际不可用</li>
<li><code>FULL cudagraph</code>（不开 PIECEWISE）：输出同样退化</li>
<li><code>eager mode</code>（不开 cudagraph）：能用但速度极慢</li>
</ul>
<p dir="auto"><strong>结论</strong>：这个模型在 Turing 双卡上<strong>必须开 MTP + PIECEWISE cudagraph</strong>，三者缺一不可。</p>
<h3>2. INT8 KV + MTP3 长上下文崩溃</h3>
<p dir="auto">曾经试过 INT8 KV cache（压缩 KV cache 省显存），短上下文正常（~48 tok/s），但 16K 上下文直接崩到 12 tok/s——MTP 接受率从正常水平暴跌到接近 0。</p>
<p dir="auto"><strong>结论</strong>：FP16 KV 是必须的，INT8 KV + MTP3 在 Turing 上有兼容性问题。</p>
<h3>3. no-MTP 的三种死法</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>模式</th>
<th>结果</th>
</tr>
</thead>
<tbody>
<tr>
<td>FULL cudagraph</td>
<td>输出退化（反复 <code>!!!!</code>）</td>
</tr>
<tr>
<td>PIECEWISE cudagraph</td>
<td>长上下文崩溃</td>
</tr>
<tr>
<td>eager mode（不开 cudagraph）</td>
<td>能用但极慢，不实际</td>
</tr>
</tbody>
</table>
<h3>4. NVLink 的坑</h3>
<p dir="auto"><code>nvidia-smi -q</code> 输出里的 <code>Bridge Chip: N/A</code> 是 <strong>PCIe 桥字段</strong>，不代表没有 NVLink！验证 NVLink 是否正常要看：</p>
<pre><code class="language-bash">nvidia-smi nvlink -s          # 看链路数
nvidia-smi nvlink -g          # 看带宽
</code></pre>
<p dir="auto">或者跑 P2P bandwidth test（p2pBandwidthLatencyTest）看实际带宽。2080 Ti + NVLink bridge 实测 P2P copy 40 GB/s、NCCL all_reduce 72.6 GB/s，NCCL 自动走桥，零配置。</p>
<h3>5. 首次请求 0 tok/s 是假象</h3>
<p dir="auto">vLLM 首次推理会触发 Triton JIT 编译（日志里会看到 <code>torch.compile took Xs</code>），第一次请求的延迟不代表真实性能。等 Triton 编译完成后（几十秒），后续请求才是正常速度。</p>
<h3>6. 测速方法</h3>
<ul>
<li><strong>日志 Avg throughput</strong>：10 秒窗口平均值，会混入 prefill 阶段（prompt 吞吐高、generation 吞吐低）和空闲期，偏低</li>
<li><strong>墙钟时间</strong>：发一个固定长度 prompt，计时从请求发出到收到完整回复，最准</li>
<li><strong>增量法（数 token / 时间差）</strong>：会被前缀缓存污染，虚高到 200+ tok/s，不靠谱</li>
</ul>
<p dir="auto"><strong>推荐</strong>：用 vLLM 的 <code>/metrics</code> Prometheus 端点或日志里的 <code>Avg generation throughput</code>，取纯 decode 阶段的值。</p>
<h2>和其他方案的对比（个人体感）</h2>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>方案</th>
<th>速度</th>
<th>备注</th>
</tr>
</thead>
<tbody>
<tr>
<td>DeepSeek V4-Flash (API)</td>
<td>~146 tok/s</td>
<td>云端大集群，但 8/17 涨价</td>
</tr>
<tr>
<td>MiMo V2.5 (API)</td>
<td>~80-100 tok/s</td>
<td>便宜（¥1/¥2），但功能受限</td>
</tr>
<tr>
<td><strong>本方案（vLLM + 2080 Ti）</strong></td>
<td><strong>35–81 tok/s</strong></td>
<td>免费、本地、零延迟、128K 上下文</td>
</tr>
</tbody>
</table>
<h2>小结</h2>
<p dir="auto">双卡 2080 Ti 跑 27B FP8 模型，关键在于：</p>
<ol>
<li><strong>用社区 fork</strong>（官方 vLLM 不支持 Turing FP8）</li>
<li><strong>必须开 MTP + PIECEWISE cudagraph</strong>（Qwen3.8 GDN 架构的硬性要求）</li>
<li><strong>用 FP16 KV</strong>（INT8 KV + MTP3 在 Turing 上有 bug）</li>
<li><strong>max-num-seqs=1</strong>（显存只够单并发，但这对个人/agent 用途完全够用）</li>
</ol>
<p dir="auto">128K 上下文能跑，但 KV cache 余量薄（91%）。实际使用中 20-60K 上下文是常态，速度 35-75 tok/s，足够日常对话和 agent 任务。</p>
<p dir="auto">硬件成本约 ¥4300（二手 2080 Ti × 2 + NVLink bridge），日均电费约 ¥1.5-2（175W 限制功耗），零 API 费用，性价比拉满。</p>
]]></description><link>https://lcz.me/topic/1195/双卡-rtx-2080-ti-vllm-跑-qwen3.8-27b-fp8-实测分享</link><generator>RSS for Node</generator><lastBuildDate>Fri, 21 Aug 2026 23:02:14 GMT</lastBuildDate><atom:link href="https://lcz.me/topic/1195.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 19 Aug 2026 06:53:25 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to # 双卡 RTX 2080 Ti + vLLM 跑 Qwen3.8-27B-FP8 实测分享 on Fri, 21 Aug 2026 13:53:48 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> 40-60tok/s</p>
]]></description><link>https://lcz.me/post/13339</link><guid isPermaLink="true">https://lcz.me/post/13339</guid><dc:creator><![CDATA[rock shi]]></dc:creator><pubDate>Fri, 21 Aug 2026 13:53:48 GMT</pubDate></item><item><title><![CDATA[Reply to # 双卡 RTX 2080 Ti + vLLM 跑 Qwen3.8-27B-FP8 实测分享 on Fri, 21 Aug 2026 06:09:26 GMT]]></title><description><![CDATA[<p dir="auto">我也在用, 不過我用的是 AWQ Q4 再加 FP16 KV 有 256k 已經用了2星期左右. 現在再買多一台</p>
]]></description><link>https://lcz.me/post/13240</link><guid isPermaLink="true">https://lcz.me/post/13240</guid><dc:creator><![CDATA[franklee006]]></dc:creator><pubDate>Fri, 21 Aug 2026 06:09:26 GMT</pubDate></item><item><title><![CDATA[Reply to # 双卡 RTX 2080 Ti + vLLM 跑 Qwen3.8-27B-FP8 实测分享 on Fri, 21 Aug 2026 05:53:57 GMT]]></title><description><![CDATA[<p dir="auto">温度0.1？ 那96K上下文时的速度还有多少呢？</p>
]]></description><link>https://lcz.me/post/13236</link><guid isPermaLink="true">https://lcz.me/post/13236</guid><dc:creator><![CDATA[stxpnet]]></dc:creator><pubDate>Fri, 21 Aug 2026 05:53:57 GMT</pubDate></item><item><title><![CDATA[Reply to # 双卡 RTX 2080 Ti + vLLM 跑 Qwen3.8-27B-FP8 实测分享 on Fri, 21 Aug 2026 05:34:51 GMT]]></title><description><![CDATA[<p dir="auto">长代码任务、复杂任务依然不推荐纯本地算力当做主力，不是qwen3.8做不了，是效率低，基本上卡知识储备和上下文这两点，迂回几下大概率也能回来。</p>
<p dir="auto">这套副电脑适合喜欢折腾的，把AI当做玩具而不是生产力工具的。他只能跑llm，并且恰恰好，视频模型跑不了，所以说性价比需要个人衡量。</p>
]]></description><link>https://lcz.me/post/13235</link><guid isPermaLink="true">https://lcz.me/post/13235</guid><dc:creator><![CDATA[rock shi]]></dc:creator><pubDate>Fri, 21 Aug 2026 05:34:51 GMT</pubDate></item><item><title><![CDATA[Reply to # 双卡 RTX 2080 Ti + vLLM 跑 Qwen3.8-27B-FP8 实测分享 on Fri, 21 Aug 2026 05:28:51 GMT]]></title><description><![CDATA[<p dir="auto">话外：这台副电脑，因deepseek涨价购置，整机价格约6500左右。</p>
<p dir="auto">24/7开机，显卡限制功耗170w（甜点功耗：声音小+损失很低），算上外包的上下文压缩和维护，平均每天2.5元左右。按照现在依然用deepseek的话平均得一天30块钱。综合算8个月回本。</p>
<p dir="auto">副电脑配置刚刚好跑fp8 kv16 128k上下文，用了三五天感觉质量非常高。网上说的工具调用出错的情况确实有、但是很少很少，昨天顺便让它自己修复了一下，即便调用空了会返回来继续。</p>
]]></description><link>https://lcz.me/post/13233</link><guid isPermaLink="true">https://lcz.me/post/13233</guid><dc:creator><![CDATA[rock shi]]></dc:creator><pubDate>Fri, 21 Aug 2026 05:28:51 GMT</pubDate></item><item><title><![CDATA[Reply to # 双卡 RTX 2080 Ti + vLLM 跑 Qwen3.8-27B-FP8 实测分享 on Wed, 19 Aug 2026 06:53:56 GMT]]></title><description><![CDATA[<p dir="auto"><img src="https://upload.lcz.me/uploads/08001fdf-193f-4e01-ad56-1fb11b05ae46.jpeg" alt="88b08447-af82-4106-a8d7-3eef5ebf9213-image.jpeg" class=" img-fluid img-markdown" /></p>
]]></description><link>https://lcz.me/post/12873</link><guid isPermaLink="true">https://lcz.me/post/12873</guid><dc:creator><![CDATA[rock shi]]></dc:creator><pubDate>Wed, 19 Aug 2026 06:53:56 GMT</pubDate></item></channel></rss>