<?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[RTX PRO 5000（或其他48GB显存）的Qwen3.8-27B-FP8配置交流（prefill 5000+t/s，decode 60+t/s）]]></title><description><![CDATA[<p dir="auto">先上参数：</p>
<pre><code>python -m sglang.launch_server \
  --model-path Qwen3.8-27B-FP8 \
  --attention-backend flashinfer \
  --kv-cache-dtype fp8_e4m3 \
  --mamba-radix-cache-strategy extra_buffer_lazy \
  --mamba-full-memory-ratio 1.0 \
  --chunked-prefill-size 2048 \
  --context-length 262144 \
  --mem-fraction-static 0.90 \
  --reasoning-parser qwen3 \
  --tool-call-parser qwen3_coder \
  --mm-feature-transport cpu \
  --speculative-algorithm EAGLE \
  --speculative-num-steps 3 \
  --speculative-eagle-topk 1 \
  --speculative-num-draft-tokens 4 \
  --host 0.0.0.0 \
  --port 30000 \
 --enable-cache-report \
--mamba-full-memory-ratio 0.2 \
--mamba-ssm-dtype bfloat16
</code></pre>
<p dir="auto">介于ds-flash-0731大幅度涨价，导致MinimaxH3-Maker（我的开源视频提示词生成+视频生成导演台）进度放缓，也就有时间再研究研究本地LLM。</p>
<p dir="auto">结果可以说相当喜人，如果说当年的pp1500+tg40的qwen3.6-27B算是可用的话。<br />
Agent和工具能力与0731有来有回的qwen3.8-27B-FP8，就可以说是生产副手级别的LLM了。</p>
<p dir="auto">更令人惊喜的是，sg-lang架构的大幅度进步，在rtx-pro-5000上，226000上下文下，可以跑到如下的成绩（非MTP、bench_one_batch）：</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>batch</th>
<th>输入长度</th>
<th>Prefill 吞吐 (token/s)</th>
<th>Decode 吞吐 (token/s, 聚合)</th>
<th>Decode 单步时延</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>1024</td>
<td>5,322 → 5,449</td>
<td>31.3 → 31.8</td>
<td>31.5 ms / token</td>
</tr>
<tr>
<td>1</td>
<td>4096</td>
<td>5,006 → 5,089</td>
<td>31.3 → 31.5</td>
<td>31.8–32.0 ms</td>
</tr>
<tr>
<td>2</td>
<td>1024</td>
<td>5,097 → 5,185</td>
<td>60.8 → 61.3</td>
<td>32.6–32.9 ms</td>
</tr>
<tr>
<td>2</td>
<td>4096</td>
<td>3,286* → 4,988</td>
<td>54.3 → 60.5</td>
<td>33.1–36.9 ms</td>
</tr>
<tr>
<td>4</td>
<td>1024</td>
<td>4,408 → 5,190</td>
<td>109.8 → 120.6</td>
<td>33.2–36.4 ms</td>
</tr>
<tr>
<td>4</td>
<td>4096</td>
<td>593 → 443 <img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/26a0.png?v=301515bb865" class="not-responsive emoji emoji-android emoji--warning" style="height:23px;width:auto;vertical-align:middle" title="⚠" alt="⚠" />️</td>
<td>33 → 30 <img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/26a0.png?v=301515bb865" class="not-responsive emoji emoji-android emoji--warning" style="height:23px;width:auto;vertical-align:middle" title="⚠" alt="⚠" />️</td>
<td>121–132 ms <img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/26a0.png?v=301515bb865" class="not-responsive emoji emoji-android emoji--warning" style="height:23px;width:auto;vertical-align:middle" title="⚠" alt="⚠" />️</td>
</tr>
<tr>
<td>7</td>
<td>1024</td>
<td>974 → 989 <img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/26a0.png?v=301515bb865" class="not-responsive emoji emoji-android emoji--warning" style="height:23px;width:auto;vertical-align:middle" title="⚠" alt="⚠" />️</td>
<td>53 → 59 <img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/26a0.png?v=301515bb865" class="not-responsive emoji emoji-android emoji--warning" style="height:23px;width:auto;vertical-align:middle" title="⚠" alt="⚠" />️</td>
<td>119–132 ms <img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/26a0.png?v=301515bb865" class="not-responsive emoji emoji-android emoji--warning" style="height:23px;width:auto;vertical-align:middle" title="⚠" alt="⚠" />️</td>
</tr>
<tr>
<td>7</td>
<td>4096</td>
<td>329 → 184 <img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/26a0.png?v=301515bb865" class="not-responsive emoji emoji-android emoji--warning" style="height:23px;width:auto;vertical-align:middle" title="⚠" alt="⚠" />️</td>
<td>52 → 52 <img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/26a0.png?v=301515bb865" class="not-responsive emoji emoji-android emoji--warning" style="height:23px;width:auto;vertical-align:middle" title="⚠" alt="⚠" />️</td>
<td>~135 ms <img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/26a0.png?v=301515bb865" class="not-responsive emoji emoji-android emoji--warning" style="height:23px;width:auto;vertical-align:middle" title="⚠" alt="⚠" />️</td>
</tr>
</tbody>
</table>
<p dir="auto">这里面有几个核心决策点，要和大家讨论：<br />
<strong>1、如何释放最大的可用上下文长度</strong><br />
Qwen官方推荐的mamba-full-memory-ratio是1.0，这会导致mamba 层和kvcache平分剩下的显存。但如果你并非高并发场景（正常个人使用顶多2并发），如此分配mamba层是极度浪费的行为。所以我取的是0.2，也就是1比5的比例分配剩余显存。这也就使得总显存分配90%的情况下，48GB显存可以得到226000的上下文长度。</p>
<pre><code>注，上表格之所以4并发后的性能异常，就是因为mamba层不够用导致。
所以需要读者根据自身并发情况灵活控制占用配比。
</code></pre>
<p dir="auto"><strong>2、MTP参数的设定</strong><br />
根据官方信息，MTP=3是最大甜蜜点，可以单线程获得将近2倍的decode性能提升，prefill性能几乎不受到影响。</p>
<p dir="auto"><strong>3、测试环境</strong><br />
以官方说明为参考：<a href="https://docs.sglang.io/docs/developer_guide/benchmark_and_profiling" rel="nofollow ugc">https://docs.sglang.io/docs/developer_guide/benchmark_and_profiling</a><br />
采用bench_one_batch来测定。</p>
<p dir="auto"><strong>4、推荐的使用环境。</strong><br />
codex或dsh。如果使用dsh，可以通过我的dsh插件来解决改变思考强度导致error400的问题：<a href="https://github.com/kop1989/dsh-localqwen-rolefix" rel="nofollow ugc">https://github.com/kop1989/dsh-localqwen-rolefix</a></p>
]]></description><link>https://lcz.me/topic/1193</link><generator>RSS for Node</generator><lastBuildDate>Wed, 09 Sep 2026 23:52:02 GMT</lastBuildDate><atom:link href="https://lcz.me/topic/1193.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 19 Aug 2026 02:41:36 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to RTX PRO 5000（或其他48GB显存）的Qwen3.8-27B-FP8配置交流（prefill 5000+t/s，decode 60+t/s） on Sat, 22 Aug 2026 17:45:19 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> <img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/1f44f.png?v=301515bb865" class="not-responsive emoji emoji-android emoji--clap" style="height:23px;width:auto;vertical-align:middle" title=":clap:" alt="👏" /> <img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/1f44f.png?v=301515bb865" class="not-responsive emoji emoji-android emoji--clap" style="height:23px;width:auto;vertical-align:middle" title=":clap:" alt="👏" /> ，不过找到原因了，hermes 会自动总结技能就会打断sglang的 kvcache缓存。。</p>
]]></description><link>https://lcz.me/post/13500</link><guid isPermaLink="true">https://lcz.me/post/13500</guid><dc:creator><![CDATA[用户名违规]]></dc:creator><pubDate>Sat, 22 Aug 2026 17:45:19 GMT</pubDate></item><item><title><![CDATA[Reply to RTX PRO 5000（或其他48GB显存）的Qwen3.8-27B-FP8配置交流（prefill 5000+t/s，decode 60+t/s） on Sat, 22 Aug 2026 17:38:01 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/%E7%94%A8%E6%88%B7%E5%90%8D%E8%BF%9D%E8%A7%84" aria-label="Profile: 用户名违规">@<bdi>用户名违规</bdi></a> 我弟你发帖整理下格式，你的帖子怎么经常看不下去呢？你让AI整理下格式。我给你整理了下，下不为例。</p>
]]></description><link>https://lcz.me/post/13498</link><guid isPermaLink="true">https://lcz.me/post/13498</guid><dc:creator><![CDATA[terry]]></dc:creator><pubDate>Sat, 22 Aug 2026 17:38:01 GMT</pubDate></item><item><title><![CDATA[Reply to RTX PRO 5000（或其他48GB显存）的Qwen3.8-27B-FP8配置交流（prefill 5000+t/s，decode 60+t/s） on Sat, 22 Aug 2026 17:37:37 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/che" aria-label="Profile: Che">@<bdi>Che</bdi></a> 二级缓存我已经开了，但是从来不落盘到 RAM，我都 emo 了。</p>
<p dir="auto">你打开之后会正常落盘吗？我这边直接就是全量 Prefill，十分难受。</p>
<p dir="auto">目前的 Docker Compose 配置如下：</p>
<pre><code class="language-yaml">services:
  sglang:
    image: lmsysorg/sglang:dev
    container_name: sglang-server
    restart: unless-stopped
    runtime: nvidia

    cap_add:
      - SYS_NICE
      - SYS_PTRACE

    environment:
      - NVIDIA_VISIBLE_DEVICES=0
      - CUDA_DEVICE_ORDER=PCI_BUS_ID
      - SGLANG_USE_IPC_POOL_HANDLE_CACHE=0
      - PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True
      - TZ=Asia/Shanghai

    volumes:
      - /mnt/x8/Qmodels:/models:ro
      - /mnt/480/docker/sglang/cache/torch_compile:/root/.cache/torch_compile
      - /mnt/480/docker/sglang/cache/flash_attn_cute_cache:/root/.cache/flash_attn_cute_cache

    command: &gt;
      sglang serve
      --model-path /models/Qwen3.8-27B
      --host 0.0.0.0
      --port 30000
      --trust-remote-code
      --attention-backend flashinfer
      --mamba-backend flashinfer
      --max-mamba-cache-size 15
      --mamba-max-states-per-path 8
      --kv-cache-dtype fp8_e4m3
      --mem-fraction-static 0.94
      --max-running-requests 3
      --cuda-graph-bs-decode 1 2 3
      --num-continuous-decode-steps 4
      --prefill-max-requests 1
      --schedule-policy lpm
      --enable-session-radix-cache
      --tool-call-parser qwen3_coder
      --reasoning-parser qwen3
      --chunked-prefill-size 2048
      --max-prefill-tokens 2048
      --disable-prefill-cuda-graph
      --enable-fused-qk-norm-rope
      --enable-cudagraph-gc
      --log-level info
      --uvicorn-access-log-exclude-prefixes /
      --decode-log-interval 120
      --allow-auto-truncate
      --enable-cache-report

    # 删除 --linear-attn-backend triton
    # 其他参数保持不变

    shm_size: '16gb'
    network_mode: host

    logging:
      driver: json-file
      options:
        max-size: "100m"
        max-file: "3"

    # --enable-cache-report
    # --enable-hierarchical-cache
    # --hicache-ratio 2
    # --hicache-io-backend kernel
    # --hicache-mem-layout page_first
    # --hicache-write-policy write_through
</code></pre>
<p dir="auto">之前尝试的二级缓存相关参数是：</p>
<pre><code class="language-bash">--enable-hierarchical-cache
--hicache-ratio 2
--hicache-io-backend kernel
--hicache-mem-layout page_first
--hicache-write-policy write_through
</code></pre>
<p dir="auto">但是实际运行时，二级缓存始终没有正常落到 RAM。再次请求时依然会进行全量 Prefill。</p>
<p dir="auto">我看了一遍这些参数，暂时也没发现明显的问题。不知道是当前 <code>sglang:dev</code> 的问题，还是 Qwen3.8-27B、Mamba/FlashInfer 这套组合存在兼容性问题。</p>
<p dir="auto">有正常使用 SGLang Hierarchical Cache 的朋友可以帮忙看看吗？尤其是开启之后，RAM 二级缓存是否能够正常命中？</p>
]]></description><link>https://lcz.me/post/13453</link><guid isPermaLink="true">https://lcz.me/post/13453</guid><dc:creator><![CDATA[用户名违规]]></dc:creator><pubDate>Sat, 22 Aug 2026 17:37:37 GMT</pubDate></item><item><title><![CDATA[Reply to RTX PRO 5000（或其他48GB显存）的Qwen3.8-27B-FP8配置交流（prefill 5000+t/s，decode 60+t/s） on Sat, 22 Aug 2026 07:59:00 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/%E7%94%A8%E6%88%B7%E5%90%8D%E8%BF%9D%E8%A7%84" aria-label="Profile: 用户名违规">@<bdi>用户名违规</bdi></a> 怎么会全量 prefill 呢？把三级缓存都打开试下？</p>
<pre><code class="language-zsh">export SGLANG_HICACHE_FILE_BACKEND_STORAGE_DIR="/path/to/kvcache/folder"
</code></pre>
<pre><code class="language-zsh">  --mamba-radix-cache-strategy extra_buffer \
  --enable-hierarchical-cache \
  --hicache-size 16 \
  --hicache-storage-backend file \
  --schedule-policy lpm \
  --enable-session-radix-cache \
  --enable-metrics \
</code></pre>
<p dir="auto"><code>hicache-size</code> 根据内存大小设置，或者用 <code>hicache-ratio</code></p>
]]></description><link>https://lcz.me/post/13452</link><guid isPermaLink="true">https://lcz.me/post/13452</guid><dc:creator><![CDATA[Che]]></dc:creator><pubDate>Sat, 22 Aug 2026 07:59:00 GMT</pubDate></item><item><title><![CDATA[Reply to RTX PRO 5000（或其他48GB显存）的Qwen3.8-27B-FP8配置交流（prefill 5000+t/s，decode 60+t/s） on Sat, 22 Aug 2026 06:42:20 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/che" aria-label="Profile: Che">@<bdi>Che</bdi></a> 明白人。弱弱问一下prefill在单用户容易全量prefill 这个咋解决呢？</p>
]]></description><link>https://lcz.me/post/13444</link><guid isPermaLink="true">https://lcz.me/post/13444</guid><dc:creator><![CDATA[用户名违规]]></dc:creator><pubDate>Sat, 22 Aug 2026 06:42:20 GMT</pubDate></item><item><title><![CDATA[Reply to RTX PRO 5000（或其他48GB显存）的Qwen3.8-27B-FP8配置交流（prefill 5000+t/s，decode 60+t/s） on Sat, 22 Aug 2026 06:14:44 GMT]]></title><description><![CDATA[<p dir="auto">你的卡全量prefill频繁吗？</p>
]]></description><link>https://lcz.me/post/13441</link><guid isPermaLink="true">https://lcz.me/post/13441</guid><dc:creator><![CDATA[用户名违规]]></dc:creator><pubDate>Sat, 22 Aug 2026 06:14:44 GMT</pubDate></item><item><title><![CDATA[Reply to RTX PRO 5000（或其他48GB显存）的Qwen3.8-27B-FP8配置交流（prefill 5000+t/s，decode 60+t/s） on Thu, 20 Aug 2026 00:53:41 GMT]]></title><description><![CDATA[<p dir="auto"><img src="https://upload.lcz.me/uploads/403e04d7-30ea-4cb7-ae9f-72bcbf859bd0.jpeg" alt="ef3816fb-91f6-43aa-9166-4f0348b93872-image.jpeg" class=" img-fluid img-markdown" /><br />
3090 遗憾离场【注：该图由27B模型独立上网调研生成】</p>
]]></description><link>https://lcz.me/post/12991</link><guid isPermaLink="true">https://lcz.me/post/12991</guid><dc:creator><![CDATA[stxpnet]]></dc:creator><pubDate>Thu, 20 Aug 2026 00:53:41 GMT</pubDate></item><item><title><![CDATA[Reply to RTX PRO 5000（或其他48GB显存）的Qwen3.8-27B-FP8配置交流（prefill 5000+t/s，decode 60+t/s） on Wed, 19 Aug 2026 13:34:08 GMT]]></title><description><![CDATA[<p dir="auto">我感觉得好好研究下4比特量化版本了，多空出点显存，开几个会话用<img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/1f602.png?v=301515bb865" class="not-responsive emoji emoji-android emoji--joy" style="height:23px;width:auto;vertical-align:middle" title="😂" alt="😂" /></p>
]]></description><link>https://lcz.me/post/12922</link><guid isPermaLink="true">https://lcz.me/post/12922</guid><dc:creator><![CDATA[terry]]></dc:creator><pubDate>Wed, 19 Aug 2026 13:34:08 GMT</pubDate></item><item><title><![CDATA[Reply to RTX PRO 5000（或其他48GB显存）的Qwen3.8-27B-FP8配置交流（prefill 5000+t/s，decode 60+t/s） on Wed, 19 Aug 2026 07:39:23 GMT]]></title><description><![CDATA[<p dir="auto">不错的分享。关注下。准备抄作业。</p>
]]></description><link>https://lcz.me/post/12880</link><guid isPermaLink="true">https://lcz.me/post/12880</guid><dc:creator><![CDATA[williamlouis]]></dc:creator><pubDate>Wed, 19 Aug 2026 07:39:23 GMT</pubDate></item><item><title><![CDATA[Reply to RTX PRO 5000（或其他48GB显存）的Qwen3.8-27B-FP8配置交流（prefill 5000+t/s，decode 60+t/s） on Wed, 19 Aug 2026 05:15:17 GMT]]></title><description><![CDATA[<p dir="auto">并发数用 <code>--max-mamba-cache-size</code> 控制比 <code>--mamba-full-memory-ratio</code> 更好。</p>
<p dir="auto"><code>--mamba-radix-cache-strategy extra_buffer_lazy</code> 时，<code>--max-mamba-cache-size</code> = 并发数 x 4</p>
<p dir="auto">另外，<code>--speculative-num-steps</code> 对 MTP 的影响可能比 <code>--speculative-num-draft-tokens</code> 更大。</p>
]]></description><link>https://lcz.me/post/12859</link><guid isPermaLink="true">https://lcz.me/post/12859</guid><dc:creator><![CDATA[Che]]></dc:creator><pubDate>Wed, 19 Aug 2026 05:15:17 GMT</pubDate></item><item><title><![CDATA[Reply to RTX PRO 5000（或其他48GB显存）的Qwen3.8-27B-FP8配置交流（prefill 5000+t/s，decode 60+t/s） on Wed, 19 Aug 2026 04:18:00 GMT]]></title><description><![CDATA[<p dir="auto">先给参数纠个错：你贴的命令里 --mamba-full-memory-ratio 出现了两次（1.0 和 0.2），命令行后值覆盖前值，实际生效的是 0.2。1.0 应该是官方模板残留，建议删掉，免得抄作业的人复制了一串前后矛盾的参数。</p>
<p dir="auto">再补一个 decode 带宽账，解释"为什么单流 31.3 t/s 上不去了"：</p>
<ol>
<li>RTX PRO 5000 48G 是 384-bit GDDR7，带宽 1344GB/s（不是 1.8TB/s 那档，很多人记错成 5090 的规格）</li>
<li>FP8 27B 权重 ≈ 28.5GB → 纯权重上限 = 1344 ÷ 28.5 ≈ 47 t/s</li>
<li>但你在 226K 上下文跑：每 decode 一步，attention 要把全部 KV 读一遍。Qwen3.8-27B 是 64 层里只有 16 个 GatedAttn 层（其余 48 层是 GatedDeltaNet 线性注意力），KV ≈ 16 层 × 2 × 8 heads × 128 dim × 1B（fp8）≈ 32KB/token，226K 上下文就是 ≈ 7.4GB/步，直接吃掉约 1/4 的带宽</li>
<li>两者合计每步读 ≈ 36GB → 上限 ≈ 37 t/s，你实测 31.3 是它的 85%，基本贴满</li>
</ol>
<p dir="auto">所以两个推论：</p>
<ol>
<li>不需要 226K 的场景，把 context 降到 64K：KV 读从 7.4GB 降到 2.1GB，上限回到 ≈ 44 t/s，decode 白赚 15-20%</li>
<li>长上下文下 EAGLE 接受率会掉（论坛 TID:1131 那个 MTP 接受率崩的坑同款），"MTP=3 单线程近 2 倍 decode"是短上下文的结论；你可以用 --enable-cache-report 拉一下实际接受率，如果低于 0.6 就别指望投机解码的倍数了</li>
</ol>
<p dir="auto">结论：226K 下 31.3 t/s 已经是这台卡的实际极限附近，数字很扎实；想再快就砍上下文，没有免费午餐。</p>
]]></description><link>https://lcz.me/post/12852</link><guid isPermaLink="true">https://lcz.me/post/12852</guid><dc:creator><![CDATA[Xiaote]]></dc:creator><pubDate>Wed, 19 Aug 2026 04:18:00 GMT</pubDate></item></channel></rss>