<?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[4090 48G + NInfer + Qwen3.8-27B 的折腾记录]]></title><description><![CDATA[<p dir="auto">折腾了一天，给大家分享点经验。</p>
<h4>1、仓库地址：<a href="https://github.com/sergiuszm/ninfer-4090" rel="nofollow ugc">https://github.com/sergiuszm/ninfer-4090</a></h4>
<p dir="auto">先让AI修复一个5ms的bug，然后再编译。<br />
还要注意模型不要下载最新的，下载这个兼容的。<br />
<a href="https://huggingface.co/neroued/Qwen3.8-27B-NInfer/resolve/3526913004b1cf552cb57b88d6a5c6f5e4a89a70/qwen3_8_27b.ninfer" rel="nofollow ugc">https://huggingface.co/neroued/Qwen3.8-27B-NInfer/resolve/3526913004b1cf552cb57b88d6a5c6f5e4a89a70/qwen3_8_27b.ninfer</a></p>
<h4>2、我的启动参数：</h4>
<p dir="auto">docker run -d <br />
--name ninfer-qwen38-27b <br />
--restart unless-stopped <br />
--gpus all <br />
--ipc=host <br />
-p 30000:8080 <br />
-e TZ=Asia/Shanghai <br />
-v "$PWD/models:/workspace/models:ro" <br />
-v "$PWD/logs:/workspace/logs" <br />
ninfer-4090:sm89 <br />
ninfer-serve models/qwen3_8_27b.ninfer <br />
--host 0.0.0.0 <br />
--port 8080 <br />
--max-context 262144 <br />
--kv-capacity auto <br />
--max-concurrency 3 <br />
--max-pending-requests 16 <br />
--pending-timeout-ms 600000 <br />
--prefill-chunk 1024 <br />
--kv-dtype fp8 <br />
--host-kv-mib 24576 <br />
--max-private-continuations 12 <br />
--max-shared-prefixes 8 <br />
--host-state-slots 72 <br />
--auto-long-anchors 4 <br />
--max-long-anchors-per-continuation 4 <br />
--spec mtp <br />
--draft-tokens 3 <br />
--lm-head-draft <br />
--vision <br />
--device-state-slots 6 <br />
--model-id Qwen3.8-27B-AWQ-INT4</p>
<h4>3、实际情况</h4>
<p dir="auto">单路 Decode：普通文本约 112 tok/s，代码约 150 tok/s。<br />
3 路 Decode：聚合约 198.5 tok/s。<br />
Cold Prefill：短板，128K 约 1500 tok/s。<br />
多路 Cold Prefill：基本串行，这是最大缺点。<br />
GPU FP8 KV：786,432 tokens。<br />
Host KV：24 GiB，而且已经实测发生 D2H spill / H2D restore。<br />
长会话恢复：可以从分钟级 Cold Prefill 降到几百毫秒。<br />
Vision：可以开启，不损失 786K GPU KV。<br />
MTP3：比 MTP4 更适合你的综合负载。<br />
12 private continuations：目前比 10 明显更合适。<br />
250ms planner patch：压力下实测有效。<br />
（继续增大prefill-chunk和mtp并没有好的效果）</p>
<h4>4、尚未解决的问题</h4>
<p dir="auto">虽然prefill比较慢，但是首token延迟很小，decode也很快，kv比sglang和vllm都多，用着非常舒服。但是使用openclaw的时候，同一个对话会挤占好几个槽位，搞的12个槽位会很快用完，造成重新prefill。AI说要等openclaw支持supportsResponsesContinuation（开发版已经支持了，但是懒得折腾，目前用vllm也还行）</p>
]]></description><link>https://lcz.me/topic/1803</link><generator>RSS for Node</generator><lastBuildDate>Fri, 25 Sep 2026 22:14:43 GMT</lastBuildDate><atom:link href="https://lcz.me/topic/1803.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 18 Sep 2026 13:09:07 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to 4090 48G + NInfer + Qwen3.8-27B 的折腾记录 on Mon, 21 Sep 2026 12:47:15 GMT]]></title><description><![CDATA[<p dir="auto">挺好的，我正在准备开机搞这玩意，我评估下是否值得。</p>
]]></description><link>https://lcz.me/post/19778</link><guid isPermaLink="true">https://lcz.me/post/19778</guid><dc:creator><![CDATA[terry]]></dc:creator><pubDate>Mon, 21 Sep 2026 12:47:15 GMT</pubDate></item><item><title><![CDATA[Reply to 4090 48G + NInfer + Qwen3.8-27B 的折腾记录 on Fri, 18 Sep 2026 16:02:39 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mydy2008" aria-label="Profile: mydy2008">@<bdi>mydy2008</bdi></a> 数据挺全。johnnybegood 说偏弱，先把天花板摆出来再决定救不救：</p>
<p dir="auto">单卡 48G、带宽约 1008GB/s，27B AWQ INT4 权重约 14–15GB，dense 等价的 decode 上限约 65–70 t/s。你实测 112（文本）/150（代码），说明 MTP3 已经把它抬到理论值的 1.6–2.2 倍，decode 这条路基本到头，别为它加预算。</p>
<p dir="auto">真正该动的是你指出的两点：</p>
<ol>
<li>冷 prefill 和多路 prefill 串行。128K 冷预填 1500 t/s，单条就要 80 多秒，几条 agent 链一起来就排队。能动的只有减少重算：把 openclaw 的会话固定住（一个会话别拆成多个 continuation），把前缀缓存共享、长锚点这些参数用满；prefill-chunk 加大没用，说明瓶颈在算力而不是调度。</li>
<li>Host KV 的 D2H/H2D 换页。一旦 spill，restore 会和 prefill 抢 PCIe 带宽。既然 fp8 KV 已有 786K token 容量，先把单会话 context 压到 64–128K（agent 用不到 256K），盯 host-kv-mib 的实际占用，把 spill 消掉比多塞长上下文划算。</li>
</ol>
<p dir="auto">MTP3 好于 MTP4 合理：k 越大 draft 前缀越容易落空，有效接受长度上不去，还多花验证 FLOPs。建议记一下每档 k 的接受长度和 draft 头耗时占比，确认 3 是最优点。12 个 private continuations 同理——先堵住一个会话占多槽这个漏，比继续加槽位有效。</p>
]]></description><link>https://lcz.me/post/19196</link><guid isPermaLink="true">https://lcz.me/post/19196</guid><dc:creator><![CDATA[Xiaote]]></dc:creator><pubDate>Fri, 18 Sep 2026 16:02:39 GMT</pubDate></item><item><title><![CDATA[Reply to 4090 48G + NInfer + Qwen3.8-27B 的折腾记录 on Fri, 18 Sep 2026 13:42:06 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mydy2008" aria-label="Profile: mydy2008">@<bdi>mydy2008</bdi></a> 偏弱， 还可以继续优化</p>
]]></description><link>https://lcz.me/post/19175</link><guid isPermaLink="true">https://lcz.me/post/19175</guid><dc:creator><![CDATA[johnnybegood]]></dc:creator><pubDate>Fri, 18 Sep 2026 13:42:06 GMT</pubDate></item></channel></rss>