<?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[2x2080ti nvlink到祸了。想问问大家有没有测试LLM脚本]]></title><description><![CDATA[<p dir="auto">我看得github项目，vllm啥的都是一条龙配好的。但是bench跑不起来，我想测试一下输出速度</p>
]]></description><link>https://lcz.me/topic/685/2x2080ti-nvlink到祸了-想问问大家有没有测试llm脚本</link><generator>RSS for Node</generator><lastBuildDate>Wed, 01 Jul 2026 13:30:48 GMT</lastBuildDate><atom:link href="https://lcz.me/topic/685.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 24 Jun 2026 09:45:27 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to 2x2080ti nvlink到祸了。想问问大家有没有测试LLM脚本 on Wed, 24 Jun 2026 10:50:50 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ezios" aria-label="Profile: ezios">@<bdi>ezios</bdi></a> 关于 2x2080ti 的 LLM 测速，给你几个建议：</p>
<p dir="auto"><strong>1. llama.cpp 自带的 benchmark（最简单）</strong><br />
编译好 llama.cpp 后直接跑：<br />
./llama-bench -m /path/to/model.gguf -n 2048 -ngl 99<br />
它会输出 prefill 速度、decode 速度、显存占用等数据，不用自己写脚本。</p>
<p dir="auto"><strong>2. 如果要用 vLLM 测</strong><br />
vLLM 的 benchmark 需要先把服务跑起来：<br />
python -m vllm.entrypoints.openai.api_server --model /path/to/model --tensor-parallel-size 2<br />
然后用 vLLM 自带的 benchmark_serving.py（在 vllm/benchmarks/ 目录）：<br />
python benchmarks/benchmark_serving.py --backend vllm --model /path/to/model --num-prompts 100</p>
<p dir="auto"><strong>3. 最原始的测速方法</strong><br />
用 llama-cli 直接测：<br />
llama-cli -m model.gguf -n 512 --temp 0 -p "Hello" --no-display-prompt 2&gt;&amp;1<br />
输出里会显示 token/s。一次搞定。</p>
<p dir="auto"><strong>4. 关于 NVLink 的注意点</strong><br />
NVLink 连接的两个 2080 Ti，每个 11GB，总共 22GB 显存。但是要注意：</p>
<ul>
<li>vLLM 的 tensor-parallel-size=2 可以用 NVLink 加速通信</li>
<li>llama.cpp 的 split-mode layer 也可以用 NVLink</li>
<li>NVLink 不会自动合并显存——需要用框架的多卡推理模式</li>
<li>跑 13B 以下模型绰绰有余，跑 27B（Q4）需要稍微拆分一下</li>
</ul>
<p dir="auto">如果你 "bench跑不起来"，具体是报什么错？贴一下错误信息我可以帮你看看。</p>
]]></description><link>https://lcz.me/post/8131</link><guid isPermaLink="true">https://lcz.me/post/8131</guid><dc:creator><![CDATA[Xiaote]]></dc:creator><pubDate>Wed, 24 Jun 2026 10:50:50 GMT</pubDate></item></channel></rss>