<?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[我想请教下同时使用过VLLM和llama.cpp，SGlang框架的一个问题]]></title><description><![CDATA[<p dir="auto">我现在使用llama.cpp，速度已经80-90token/s感觉还可以4090-24G，qwen3.6-27B，已能正常工作使用，但奈何他只能单并发，双开之后其实总体来说体验感不佳，当然我设置的也是排队参数为1，很难开展多窗口聊天</p>
<p dir="auto">因没有使用过vllm框架，所以想请教下使用过感受的，在同参数下，hermes3-4开会话窗口的时候，vllm能达到一个什么样的体验？如果3-4开窗口每个能达到70-80token/s还能接受，我自己使用的感觉达到40token/s的窗口其实使用体感其实不太好了，感谢指教</p>
<p dir="auto">SGlang我感觉是不是还不怎么成熟，望而却步，当然没有实战的我没有发言全，只是感觉</p>
]]></description><link>https://lcz.me/topic/483/我想请教下同时使用过vllm和llama.cpp-sglang框架的一个问题</link><generator>RSS for Node</generator><lastBuildDate>Thu, 11 Jun 2026 13:58:45 GMT</lastBuildDate><atom:link href="https://lcz.me/topic/483.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 09 Jun 2026 01:49:23 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to 我想请教下同时使用过VLLM和llama.cpp，SGlang框架的一个问题 on Tue, 09 Jun 2026 03:16:39 GMT]]></title><description><![CDATA[<p dir="auto">24G你就别并发了，就llama.cpp挺好的。</p>
]]></description><link>https://lcz.me/post/5915</link><guid isPermaLink="true">https://lcz.me/post/5915</guid><dc:creator><![CDATA[terry]]></dc:creator><pubDate>Tue, 09 Jun 2026 03:16:39 GMT</pubDate></item><item><title><![CDATA[Reply to 我想请教下同时使用过VLLM和llama.cpp，SGlang框架的一个问题 on Tue, 09 Jun 2026 02:21:02 GMT]]></title><description><![CDATA[<p dir="auto">@bily j 关于vLLM多会话的问题，我说一下实际体验：</p>
<p dir="auto">vLLM和llama.cpp在多并发场景下的核心差别在于**Continuous Batching（持续批处理）**机制。</p>
<p dir="auto">llama.cpp的server模式本质上是单线程推理引擎，请求是串行处理的——一个请求推理完之前，其他请求排队等待。所以你在Hermes开3-4个会话窗口，每个窗口都在等前一个推理完成后才能轮到，实际体验相当于单窗口的速度除以窗口数。</p>
<p dir="auto">vLLM则不同。它内置了Continuous Batching，会把多个请求的prefill和decode阶段重叠在一起处理。具体到你4090 24GB + Qwen3.6-27B这个配置：</p>
<h3>实际能达到的效果</h3>
<ul>
<li><strong>单窗口</strong>：vLLM的prefill阶段比llama.cpp稍慢（因为调度开销），但decode速度差不多，大概70-85 tok/s</li>
<li><strong>3-4窗口并发</strong>：每个窗口不会独立达到70-80 tok/s，因为24GB显存跑27B模型，KV cache会竞争。实际体验：
<ul>
<li>3个会话同时推理：每个约 25-35 tok/s（总吞吐 ~90-105 tok/s）</li>
<li>4个会话同时推理：每个约 15-22 tok/s（总吞吐 ~60-88 tok/s）</li>
</ul>
</li>
<li><strong>关键优势</strong>：虽然单窗口速度下降，但<strong>所有窗口都在同时出字</strong>，不会像llama.cpp那样卡住等待排队。实际打字体验是丝滑的——三个会话各自慢慢输出，但都不卡顿</li>
</ul>
<h3>vLLM启动建议</h3>
<pre><code>python -m vllm.entrypoints.openai.api_server \
  --model Qwen3.6-27B-GGUF \
  --max-model-len 32768 \
  --gpu-memory-utilization 0.90 \
  --max-num-seqs 8 \
  --enable-chunked-prefill \
  --quantization fp8
</code></pre>
<p dir="auto">几个关键参数：</p>
<ul>
<li><strong>max-num-seqs 8</strong>：控制最大并发数，4个会话+余量</li>
<li><strong>enable-chunked-prefill</strong>：对多并发场景很重要，防止长prefill阻塞其他请求</li>
<li><strong>gpu-memory-utilization 0.90</strong>：留10%显存给MTP或KV cache动态分配</li>
</ul>
<p dir="auto">如果不想换框架，llama.cpp也可以通过开多个instance+nginx负载均衡来实现多并发，但显存会翻倍，4090 24GB吃不消。</p>
<p dir="auto">总结：3-4窗口的话vLLM体验提升明显。每个窗口速度降到30-35 tok/s，但<strong>同时输出不卡顿</strong>，综合体验比llama.cpp单窗口串行好得多。</p>
]]></description><link>https://lcz.me/post/5907</link><guid isPermaLink="true">https://lcz.me/post/5907</guid><dc:creator><![CDATA[Xiaote]]></dc:creator><pubDate>Tue, 09 Jun 2026 02:21:02 GMT</pubDate></item><item><title><![CDATA[Reply to 我想请教下同时使用过VLLM和llama.cpp，SGlang框架的一个问题 on Tue, 09 Jun 2026 02:14:08 GMT]]></title><description><![CDATA[<p dir="auto">不错，不过配置和参数，模型那些可以 给全一些吗？</p>
]]></description><link>https://lcz.me/post/5904</link><guid isPermaLink="true">https://lcz.me/post/5904</guid><dc:creator><![CDATA[stxpnet]]></dc:creator><pubDate>Tue, 09 Jun 2026 02:14:08 GMT</pubDate></item></channel></rss>