<?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[倒反天罡？Ubuntu24.04虚拟机+AMD AI Pro R9700部署vLLM 服务器检查与速度实测报告]]></title><description><![CDATA[<h1>vLLM 服务器检查与速度实测报告</h1>
<hr />
<ul>
<li><strong>部署模型</strong>：<code>qwen3.8-27b-int4</code>（Qwen 3.8 27B，INT4 量化）</li>
<li><strong>上下文上限</strong>：131,072 tokens</li>
<li><strong>检查方式</strong>：全程只读——仅调用状态接口与发送推理请求。</li>
</ul>
<hr />
<h2>一、服务器状态</h2>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>检查项</th>
<th>结果</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>/health</code></td>
<td>200 OK</td>
</tr>
<tr>
<td>模型</td>
<td><code>qwen3.8-27b-int4</code>，挂载路径 <code>/model</code></td>
</tr>
<tr>
<td>max_model_len</td>
<td>131,072</td>
</tr>
<tr>
<td>reasoning parser</td>
<td>已启用（思考内容以独立 <code>reasoning</code> 字段返回，与 <code>content</code> 分离）</td>
</tr>
</tbody>
</table>
<hr />
<h2>二、思考模式检查结果： 已开启（默认开启）</h2>
<p dir="auto">Qwen3.8 的 chat template 默认 <code>enable_thinking=true</code>，<strong>不传任何参数时所有 chat 请求都会先思考再回答</strong>。</p>
<h3>行为验证（同一条测试消息「1+1等于几？」）</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>请求方式</th>
<th>返回内容</th>
<th>completion tokens</th>
</tr>
</thead>
<tbody>
<tr>
<td>默认请求（不带参数）</td>
<td><code>reasoning</code> = <em>"We need answer user's Chinese: … Need final just 2."</em>，<code>content</code> = "2"</td>
<td>55（约 53 思考 token + 2 答案 token）</td>
</tr>
<tr>
<td>带 <code>chat_template_kwargs: {"enable_thinking": false}</code></td>
<td>无 <code>reasoning</code>，<code>content</code> = "2"</td>
<td>2</td>
</tr>
</tbody>
</table>
<h3>客户端按需关闭思考</h3>
<pre><code class="language-json">{
  "model": "qwen3.8-27b-int4",
  "messages": [{"role": "user", "content": "..."}],
  "chat_template_kwargs": {"enable_thinking": false}
}
</code></pre>
<blockquote>
<p dir="auto">思考 token 会计入 completion tokens，涉及计费/限流时需留意。</p>
</blockquote>
<hr />
<h2>三、真实 Token 输出速度实测</h2>
<h3>结果总览</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>模式</th>
<th>TTFT（首 token 延迟）</th>
<th><strong>decode 输出速度</strong></th>
<th>每轮输出 token</th>
<th>稳定性</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>思考模式 ON</strong>（服务器默认）</td>
<td>154 ms</td>
<td><strong>45.8 tok/s</strong></td>
<td>1024（撞 max_tokens 上限）</td>
<td>±0.03 tok/s</td>
</tr>
<tr>
<td>思考模式 OFF</td>
<td>97 ms</td>
<td><strong>36.7 tok/s</strong></td>
<td>522（自然结束）</td>
<td>±0.01 tok/s</td>
</tr>
</tbody>
</table>
<h3>测试方法</h3>
<ul>
<li>固定 prompt：「请写一篇700字左右的散文，主题是秋天的城市街道，要求文笔优美、有画面感和细节描写。」</li>
<li>流式请求（SSE）逐 token 计时；<code>decode 速度 = (总 token − 1) ÷ (首 token → 末 token 耗时)</code></li>
<li>每模式 1 次预热 + 3 次正式测量，另做一组顺序反转复测（排除温度/顺序因素）</li>
<li>共 8 次正式运行，速度全部落在上表区间内，波动可忽略</li>
<li>测试脚本：<code>/tmp/vllm_bench.py</code></li>
</ul>
<h3>关键数据明细</h3>
<p dir="auto"><strong>思考模式 ON（4 轮）</strong></p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>轮次</th>
<th>TTFT (s)</th>
<th>decode (tok/s)</th>
<th>completion</th>
<th>墙钟 (s)</th>
</tr>
</thead>
<tbody>
<tr>
<td>warmup</td>
<td>0.161</td>
<td>45.74</td>
<td>1024</td>
<td>22.53</td>
</tr>
<tr>
<td>run1</td>
<td>0.154</td>
<td>45.80</td>
<td>1024</td>
<td>22.49</td>
</tr>
<tr>
<td>run2</td>
<td>0.154</td>
<td>45.76</td>
<td>1024</td>
<td>22.51</td>
</tr>
<tr>
<td>run3</td>
<td>0.154</td>
<td>45.81</td>
<td>1024</td>
<td>22.48</td>
</tr>
<tr>
<td>复测</td>
<td>0.154</td>
<td>45.84</td>
<td>1024</td>
<td>—</td>
</tr>
</tbody>
</table>
<p dir="auto"><strong>思考模式 OFF（4 轮）</strong></p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>轮次</th>
<th>TTFT (s)</th>
<th>decode (tok/s)</th>
<th>completion</th>
<th>墙钟 (s)</th>
</tr>
</thead>
<tbody>
<tr>
<td>warmup</td>
<td>0.102</td>
<td>36.61</td>
<td>522</td>
<td>14.33</td>
</tr>
<tr>
<td>run1</td>
<td>0.097</td>
<td>36.67</td>
<td>522</td>
<td>14.31</td>
</tr>
<tr>
<td>run2</td>
<td>0.097</td>
<td>36.65</td>
<td>522</td>
<td>14.31</td>
</tr>
<tr>
<td>run3</td>
<td>0.098</td>
<td>36.66</td>
<td>522</td>
<td>14.31</td>
</tr>
<tr>
<td>复测</td>
<td>0.097</td>
<td>36.67</td>
<td>522</td>
<td>—</td>
</tr>
</tbody>
</table>
<hr />
<h2>四、解读</h2>
<ol>
<li>
<p dir="auto"><strong>日常体感速度 = ~45.8 tok/s</strong>（思考模式默认开）。对照 AMD 官方公布的单张 Radeon AI PRO R9700 跑 Qwen3.8 27B（llama.cpp Vulkan + MTP=2）最高 51.8 tok/s，本服务器 vLLM INT4 的 45.8 tok/s 处于合理区间，单卡性能正常。</p>
</li>
<li>
<p dir="auto"><strong>思考模式反而更快（45.8 vs 36.7）</strong>：两种模式的 prompt 长度不同（模板 76 vs 36 tokens）、生成序列长度约 2 倍差异（~1100 vs ~558 tokens）。该 vLLM/ROCm 构建下不同序列长度走了不同的 kernel/attention 路径，长序列每 token 吞吐反而更高。8 轮全部稳定复现，非测量噪声。</p>
</li>
<li>
<p dir="auto"><strong>TTFT 很低（~100–150 ms）</strong>：prefill 不是瓶颈；短问答（如 55 token 的回复）实际耗时约 1.2 秒，思考模式对短回复的额外开销约 1 秒。</p>
</li>
<li>
<p dir="auto"><strong>并发注意</strong>：以上均为单并发流速度，多请求并发时会共享 GPU，单流速度会下降。</p>
</li>
<li>
<p dir="auto"><strong>负载建议</strong>：INT4 量化 + 思考模式会拉长输出 token 数、增加显存与延迟占用。以短问答为主的负载可在客户端默认关闭思考、需要深度推理时按请求开启。</p>
</li>
</ol>
<hr />
<h2>五：复测方法</h2>
<pre><code class="language-bash"># 思考模式 ON（服务器默认）
python3 /tmp/vllm_bench.py default

# 思考模式 OFF
python3 /tmp/vllm_bench.py nothink
</code></pre>
]]></description><link>https://lcz.me/topic/1755</link><generator>RSS for Node</generator><lastBuildDate>Sat, 24 Oct 2026 16:14:31 GMT</lastBuildDate><atom:link href="https://lcz.me/topic/1755.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 16 Sep 2026 12:58:20 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to 倒反天罡？Ubuntu24.04虚拟机+AMD AI Pro R9700部署vLLM 服务器检查与速度实测报告 on Wed, 16 Sep 2026 23:45:25 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> 跑Agent多轮对话已做，我还在继续研究结果含义及调优策略，目前有点懵逼。</p>
]]></description><link>https://lcz.me/post/18728</link><guid isPermaLink="true">https://lcz.me/post/18728</guid><dc:creator><![CDATA[Magic629]]></dc:creator><pubDate>Wed, 16 Sep 2026 23:45:25 GMT</pubDate></item><item><title><![CDATA[Reply to 倒反天罡？Ubuntu24.04虚拟机+AMD AI Pro R9700部署vLLM 服务器检查与速度实测报告 on Wed, 16 Sep 2026 21:04:07 GMT]]></title><description><![CDATA[<p dir="auto">上下文长度呢？没看出来啊，我问的是长上下文多轮测试，这个才是跑Agent最重要的，就是看它长沙下文下的prefill速度，体感如何。你给的数字太复杂了。 弄个简单的结论，新人看起来容易懂。</p>
]]></description><link>https://lcz.me/post/18713</link><guid isPermaLink="true">https://lcz.me/post/18713</guid><dc:creator><![CDATA[terry]]></dc:creator><pubDate>Wed, 16 Sep 2026 21:04:07 GMT</pubDate></item></channel></rss>