<?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[SGLang 和 Strata 怎么选？从短对话到大型代码库]]></title><description><![CDATA[<p dir="auto">之前发过不少跑分和测试帖，这次想聊聊 SGLang 和 Strata 的原理和使用场景，欢迎大家补充。</p>
<p dir="auto">日常聊天、解释一个函数，我会先用 SGLang。遇到需要反复阅读同一批代码和日志的大项目，我会再比较 Strata。这里的区别，得从模型怎么处理输入说起。</p>
<h2>SGLang 和 Strata 是什么关系？</h2>
<p dir="auto"><strong>Strata 基于 SGLang。</strong> SGLang 是通用推理引擎，负责运行模型和处理请求。Strata 在这个基础上优化长上下文的 KV 缓存搬运和请求调度。SGLang 自己也有 HiCache，可以把缓存分层放在显存、主机内存和外部存储中，因此比较分层缓存时，可以把 SGLang + HiCache 当作基线。<a href="https://arxiv.org/abs/2508.18572" rel="nofollow ugc">Strata 论文</a> · <a href="https://www.sglang.io/blog/hicache" rel="nofollow ugc">SGLang HiCache</a></p>
<p dir="auto"><img src="https://upload.lcz.me/uploads/f586813e-f715-4c8b-8ec9-50fcfa399a81.png" alt="relationship.png" class="img-markdown  img-fluid" /></p>
<p dir="auto"><strong>模型权重和 KV 缓存是两笔开销。</strong> 拿 Qwen 27B 举例，27B 是模型参数规模，量化会影响权重占多少空间。代码、文档和对话历史则会产生 KV 缓存。Strata 优化的是这些上下文缓存怎么保存和复用。如果某个同名工具宣传能把模型权重放进主机内存，那项功能要按该工具的实现单独看。</p>
<h2>Prefill 几千对不到 1000，能直接比吗？</h2>
<p dir="auto">第一次把长文档交给模型，它要先处理输入，这一步叫 <strong>prefill</strong>。第二次保留相同的文档前缀来追问，如果缓存还在，模型就能复用先前算过的部分。两次都可能报输入 tokens/s，但实际做的工作量不同。并发总吞吐和单请求吞吐也要分开看。</p>
<p dir="auto">我会用同一模型、量化、硬件和输入分别测两次。第一次测冷缓存，看看模型从头读材料要多久。第二次测热缓存，看看围绕同一份材料追问能省多少时间。想比较使用体感，就记下<strong>从发出请求到看到首个 token 的时间</strong>，包括排队时间。回答很长时，再看后续生成速度。</p>
<h2>放到个人电脑上，怎么选？</h2>
<p dir="auto"><img src="https://upload.lcz.me/uploads/86d44924-6664-4dd5-abd1-42c141dea95a.png" alt="scenarios.png" class="img-markdown  img-fluid" /></p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>我在做什么</th>
<th>我会怎么选</th>
<th>主要看什么</th>
</tr>
</thead>
<tbody>
<tr>
<td>短聊天、写一段说明、查局部 bug</td>
<td>先试 SGLang</td>
<td>首字等待和生成速度</td>
</tr>
<tr>
<td>第一次让模型读大量源码、文档或日志</td>
<td>对比 SGLang 和 Strata 的冷缓存表现</td>
<td>同一份材料谁更早开始回答</td>
</tr>
<tr>
<td>围绕同一批项目材料连续追问</td>
<td>对比 SGLang + HiCache 与 Strata</td>
<td>前缀能否复用，缓存加载要多久</td>
</tr>
<tr>
<td>同时跑多个聊天或代码任务</td>
<td>先用 SGLang 测实际并发，再按需要对比</td>
<td>整体吞吐和单请求排队时间</td>
</tr>
</tbody>
</table>
<p dir="auto">跑分可以参考，真要看哪个用起来更顺手，还是拿自己平时的任务试一遍：点发送后等多久才出第一个字，开始回答后出字跟不跟得上。把这两段分开看，差别就清楚了。</p>
]]></description><link>https://lcz.me/topic/2951</link><generator>RSS for Node</generator><lastBuildDate>Sun, 29 Nov 2026 03:22:26 GMT</lastBuildDate><atom:link href="https://lcz.me/topic/2951.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 10 Nov 2026 03:07:41 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to SGLang 和 Strata 怎么选？从短对话到大型代码库 on Tue, 10 Nov 2026 12:59:32 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/enigma" aria-label="Profile: Enigma">@<bdi>Enigma</bdi></a> 大任务双卡TP，日常应用双卡拆分专卡专用。这是我的解法。不知道有没有更好的思路。</p>
]]></description><link>https://lcz.me/post/32432</link><guid isPermaLink="true">https://lcz.me/post/32432</guid><dc:creator><![CDATA[xiongjie gao]]></dc:creator><pubDate>Tue, 10 Nov 2026 12:59:32 GMT</pubDate></item><item><title><![CDATA[Reply to SGLang 和 Strata 怎么选？从短对话到大型代码库 on Tue, 10 Nov 2026 12:43:22 GMT]]></title><description><![CDATA[<p dir="auto">我也用社区的魔改版跑过一个多并发的任务，并发短会话速度是真的快。原来单流要6-7个小时的任务，用这个跑了2小时搞定。但27B会有些错误，我把结果喂给125B-FQN，它找出好几处错误。现在基本用双卡双路跑，但有个问题经常会几个任务抢一张卡，让DS调试过，还是不理想。不知道你们有没碰到过，是怎么处理的？</p>
]]></description><link>https://lcz.me/post/32429</link><guid isPermaLink="true">https://lcz.me/post/32429</guid><dc:creator><![CDATA[Enigma]]></dc:creator><pubDate>Tue, 10 Nov 2026 12:43:22 GMT</pubDate></item><item><title><![CDATA[Reply to SGLang 和 Strata 怎么选？从短对话到大型代码库 on Tue, 10 Nov 2026 07:29:48 GMT]]></title><description><![CDATA[<p dir="auto"><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/2705.png?v=2bf455356c3" class="not-responsive emoji emoji-android emoji--white_check_mark" style="height:1.4em;width:auto;vertical-align:middle" title="✅" alt="✅" /> 版主审定：本帖设为<strong>优秀</strong>，作者 <strong>+3 积分</strong>奖励，继续加油！</p>
<blockquote>
<p dir="auto">奖励凭证：优秀 +3 分 · 编号 e2951-1927-1</p>
</blockquote>
]]></description><link>https://lcz.me/post/32383</link><guid isPermaLink="true">https://lcz.me/post/32383</guid><dc:creator><![CDATA[Xiaote]]></dc:creator><pubDate>Tue, 10 Nov 2026 07:29:48 GMT</pubDate></item><item><title><![CDATA[Reply to SGLang 和 Strata 怎么选？从短对话到大型代码库 on Tue, 10 Nov 2026 06:30:35 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/xiongjie-gao" aria-label="Profile: xiongjie-gao">@<bdi>xiongjie-gao</bdi></a> 对，我现在用得就是我们社区魔改版SGLang</p>
]]></description><link>https://lcz.me/post/32368</link><guid isPermaLink="true">https://lcz.me/post/32368</guid><dc:creator><![CDATA[懒人烘培]]></dc:creator><pubDate>Tue, 10 Nov 2026 06:30:35 GMT</pubDate></item><item><title><![CDATA[Reply to SGLang 和 Strata 怎么选？从短对话到大型代码库 on Tue, 10 Nov 2026 03:32:38 GMT]]></title><description><![CDATA[<p dir="auto">补充一点，SGlang原生不支持RDNA3，我们社区有大神开发魔改SGlang可以成功跑起来。速度上有提升空间，KV优化更多支持跨对话跨任务。</p>
<p dir="auto">你跑的是哪个版本</p>
]]></description><link>https://lcz.me/post/32347</link><guid isPermaLink="true">https://lcz.me/post/32347</guid><dc:creator><![CDATA[xiongjie gao]]></dc:creator><pubDate>Tue, 10 Nov 2026 03:32:38 GMT</pubDate></item></channel></rss>