<?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 HiCache 三层 KV 缓存实测：32GB Blackwell 单卡跑通 Qwen3.8-27B]]></title><description><![CDATA[<h2>背景</h2>
<p dir="auto">看到论坛 neo 大佬分享的 SGLang HiCache 三层 KV 缓存（VRAM→RAM→NVMe），很感兴趣。核心卖点是：显存里的 KV Cache 放不下时，把暂时不用的 KV "搬到内存/磁盘"，需要时再取回来——重启后 190K 上下文直接加载免 prefill。</p>
<p dir="auto">我的环境：RTX PRO 4500 Blackwell 32GB + 64GB RAM + X570 主板。之前一直用 llama.cpp 跑 Qwen3.8-27B（Q4 量化，150K ctx，MTP 投机解码）。今天折腾了一下午，把 SGLang HiCache 跑通了，记录一下过程和踩的坑。</p>
<h2>结论先行</h2>
<p dir="auto"><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/2705.png?v=301515bb865" class="not-responsive emoji emoji-android emoji--white_check_mark" style="height:23px;width:auto;vertical-align:middle" title="✅" alt="✅" /> <strong>SGLang 0.5.18 + RadixArk Qwen3.8-27B-NVFP4 + HiCache L2 32GB 在 32GB Blackwell 单卡跑通</strong></p>
<p dir="auto">关键数据：</p>
<ul>
<li>模型权重：20.14 GB（NVFP4）</li>
<li>GPU KV cache：101K tokens（fp8，~3.1GB）</li>
<li>HiCache L2：32GB host RAM</li>
<li>系统总内存占用：~46GB / 64GB</li>
<li>推理正常，reasoning_effort 可调</li>
</ul>
<h2>踩坑记录（重要）</h2>
<h3>坑1：Unsloth NVFP4 不兼容 SGLang</h3>
<p dir="auto">Unsloth 的 NVFP4 用 compressed-tensors 格式 + FP8 lm_head，SGLang 加载报错。必须用 <strong>RadixArk/Qwen3.8-27B-NVFP4</strong>（NVIDIA Model Optimizer/modelopt 格式）。</p>
<pre><code class="language-bash">hf download RadixArk/Qwen3.8-27B-NVFP4 --local-dir ~/models/sglang/Qwen3.8-27B-NVFP4
</code></pre>
<h3>坑2：reasoning_parser 必须显式设</h3>
<p dir="auto">不加 <code>--reasoning-parser qwen3</code> 的话，thinking 标签会残留在 content 里，reasoning_content 字段为 None。加了之后正确分离：</p>
<pre><code>reasoning: "The user said hi - a simple greeting..."
content: "Hi there! How can I help?"
</code></pre>
<h2>完整部署步骤</h2>
<h3>1. 安装 SGLang</h3>
<pre><code class="language-bash">python3.12 -m venv ~/.sglang-venv
source ~/.sglang-venv/bin/activate
pip install --upgrade pip &amp;&amp; pip install uv
uv pip install --prerelease=allow sglang
</code></pre>
<h3>2. 下载模型</h3>
<pre><code class="language-bash">hf download RadixArk/Qwen3.8-27B-NVFP4 --local-dir ~/models/sglang/Qwen3.8-27B-NVFP4
</code></pre>
<p dir="auto">约 21GB，3 个 safetensors 分片。</p>
<h3>3. 启动命令</h3>
<pre><code class="language-bash">python -m sglang.launch_server \
  --model-path ~/models/sglang/Qwen3.8-27B-NVFP4 \
  --served-model-name qwen3.8-27B-NVFP4 \
  --host 127.0.0.1 --port 8000 \
  --enable-hierarchical-cache \
  --hicache-size 32 \
  --tp 1 \
  --mem-fraction-static 0.85 \
  --max-running-requests 1 \
  --context-length 131072 \
  --reasoning-parser qwen3 \
  --tool-call-parser qwen3_coder
</code></pre>
<p dir="auto">参数说明：</p>
<ul>
<li><code>--hicache-size 32</code>：L2 缓存分配 32GB host RAM</li>
<li><code>--context-length 131072</code>：128K 上下文上限</li>
<li><code>--mem-fraction-static 0.85</code>：GPU 内存分配比例</li>
<li><code>--reasoning-parser qwen3</code>：分离 thinking 和 content</li>
<li><code>--tool-call-parser qwen3_coder</code>：支持工具调用</li>
</ul>
<h3>4. systemd 服务</h3>
<pre><code class="language-ini">[Unit]
Description=SGLang Qwen3.8-27B-NVFP4 with HiCache L2/L3 KV Cache
After=network.target

[Service]
Type=simple
WorkingDirectory=%h
ExecStart=%h/.sglang-venv/bin/python -m sglang.launch_server \
  --model-path %h/models/sglang/Qwen3.8-27B-NVFP4 \
  --served-model-name qwen3.8-27B-NVFP4 \
  --host 127.0.0.1 --port 8000 \
  --enable-hierarchical-cache --hicache-size 32 \
  --tp 1 --mem-fraction-static 0.85 --max-running-requests 1 \
  --context-length 131072 \
  --reasoning-parser qwen3 --tool-call-parser qwen3_coder
Environment=CUDA_VISIBLE_DEVICES=0
Restart=on-failure
RestartSec=10
StandardOutput=journal
StandardError=journal

[Install]
WantedBy=default.target
</code></pre>
<h2>内存分配实测数据</h2>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>组件</th>
<th>大小</th>
</tr>
</thead>
<tbody>
<tr>
<td>模型权重 (NVFP4)</td>
<td>20.14 GB</td>
</tr>
<tr>
<td>Mamba SSM state</td>
<td>2.67 GB (18 slots)</td>
</tr>
<tr>
<td>Mamba conv state</td>
<td>0.05 GB</td>
</tr>
<tr>
<td>KV Cache (fp8, 101K tokens)</td>
<td>3.10 GB</td>
</tr>
<tr>
<td>GPU 剩余</td>
<td>~4.69 GB</td>
</tr>
<tr>
<td>HiCache L2 (host RAM)</td>
<td>32 GB</td>
</tr>
<tr>
<td>系统总占用</td>
<td>~46 GB / 64 GB</td>
</tr>
</tbody>
</table>
<h2>HiCache 的实际价值</h2>
<p dir="auto">坦白说，HiCache 在单用户场景下最大的价值不是"跑更大上下文"，而是<strong>多会话 KV 复用免 prefill</strong>。</p>
<ul>
<li>GPU 上直接跑 ~101K tokens（全速）</li>
<li>超出部分由 HiCache L2 从 RAM 换入（有延迟）</li>
<li>重启服务后，之前的 KV 从 L2 恢复，不用重新 prefill</li>
<li>多会话切换时，不活跃会话的 KV 换到 RAM，活跃的留在 VRAM</li>
</ul>
<p dir="auto">对比 llama.cpp 的 150K 全 VRAM 方案：</p>
<ul>
<li>llama.cpp 速度更快（全在 GPU 上，零搬运延迟）</li>
<li>SGLang HiCache 胜在会话复用（重启免 prefill）</li>
</ul>
<h2>上下文性能预期</h2>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>上下文范围</th>
<th>性能</th>
</tr>
</thead>
<tbody>
<tr>
<td>&lt;101K tokens</td>
<td>全速（KV 全在 GPU）</td>
</tr>
<tr>
<td>101K-128K</td>
<td>HiCache L2 换入，decode 有额外延迟</td>
</tr>
<tr>
<td>128K+</td>
<td>明显变慢（每步 PCIe 搬运 ~100ms+）</td>
</tr>
</tbody>
</table>
<p dir="auto">建议设 128K 上限，日常控制在 100K 以内。</p>
<h2>NVMe L3 缓存</h2>
<p dir="auto">L3（NVMe 磁盘缓存）在命令里加 <code>--hicache-storage-backend file</code> 即可开启。实测 NVMe 顺序读 ~3.5-7GB/s，延迟 ~100μs，对 decode 来说太慢了——从 NVMe 取 KV 做 prefill 比直接重算慢不了多少，实际价值有限。L2 RAM 缓存才是重点。</p>
<h2>MTP 投机解码可行性分析</h2>
<p dir="auto">有人会问：SGLang 能不能也上 MTP 加速？答案是<strong>32GB 单卡上标准版不行，但有专门的轻量化 checkpoint 可以</strong>。</p>
<h3>为什么标准 RadixArk 版不行</h3>
<p dir="auto">RadixArk 版权重 20.14GB，GPU 剩余 ~4.69GB。MTP 额外需要：</p>
<ul>
<li>Draft KV cache: ~0.3-0.5 GB</li>
<li>Draft Mamba state: ~0.15 GB</li>
<li>MTP head 权重: ~0.1 GB</li>
<li>总计: ~0.5-0.75 GB</li>
</ul>
<p dir="auto">理论上 4.69GB 够放，但实际上 Unsloth 官方明确说了：</p>
<blockquote>
<p dir="auto">"SGLang 0.5.18（NEXTN/MTP 在 32 GB 上无法有效适配）。在 32 GB 下，额外尺寸会占用 KV pool，因此无法容纳原生 256k。"</p>
</blockquote>
<p dir="auto">根因是 MTP 会和 HiCache 的内存分配冲突——HiCache 需要预留 host memory pool，MTP 需要额外的 draft model 状态，两者抢同一块剩余空间。</p>
<h3>gittensor 优化版：技术可行但没必要</h3>
<p dir="auto">社区有人（gittensor-model-hub）做了一个专门适配 RTX 5090 32GB 的优化 checkpoint：</p>
<ul>
<li>权重压到 ~18.8GB（比标准版小 1.3GB）</li>
<li>配合 DSpark 推测解码，RTX 5090 上跑到 180 tok/s</li>
<li>理论上在你的 RTX PRO 4500 上也能装下</li>
</ul>
<p dir="auto"><strong>但没必要，三个原因：</strong></p>
<ol>
<li>
<p dir="auto"><strong>llama.cpp 已经有 MTP 了</strong>——我的标准版 UD-Q4_K_XL + MTP n=2 跑到 67 t/s，这是验证过的稳定方案。SGLang + MTP 在 896 GB/s 带宽上不会更快（RTX 5090 1792 GB/s 才能跑到 180 t/s）。</p>
</li>
<li>
<p dir="auto"><strong>HiCache 价值被 MTP 吃掉</strong>——加 MTP 后 GPU 内存更紧张，HiCache L2 分配空间被压缩，多会话复用的优势打折扣。</p>
</li>
<li>
<p dir="auto"><strong>社区 checkpoint 质量不确定</strong>——gittensor 不是官方也不是大厂，模型质量和长期维护都不确定。你之前定的铁律是"模型必须官方源版本"。</p>
</li>
</ol>
<h3>结论</h3>
<p dir="auto">32GB 卡上 SGLang + NVFP4 的最优定位就是<strong>多会话 KV 复用</strong>，不追求 MTP 加速。MTP 投机解码留给 llama.cpp（那边已经验证稳定）。</p>
<p dir="auto">两者互补：</p>
<ul>
<li><strong>llama.cpp + GGUF + MTP</strong>：日常推理主力（67 t/s，稳定）</li>
<li><strong>SGLang + NVFP4 + HiCache</strong>：多会话 KV 复用（~55 t/s，重启免 prefill）</li>
</ul>
<h2>社区实测对比（来自抡锤者论坛）</h2>
<p dir="auto">论坛版主 Terry 用 4090D 48GB 跑了类似方案，形成直接对比：</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>维度</th>
<th>Terry (4090D 48GB)</th>
<th>本机 (RTX PRO 4500 32GB)</th>
</tr>
</thead>
<tbody>
<tr>
<td>模型格式</td>
<td>FP8 (28.5GB)</td>
<td>NVFP4 (20.1GB)</td>
</tr>
<tr>
<td>HiCache L2</td>
<td>24GB（64GB 系统不够开 32）</td>
<td>32GB</td>
</tr>
<tr>
<td>GPU KV</td>
<td>270K tokens</td>
<td>101K tokens</td>
</tr>
<tr>
<td>上下文</td>
<td>262K（满配）</td>
<td>128K</td>
</tr>
<tr>
<td>MTP</td>
<td><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/2705.png?v=301515bb865" class="not-responsive emoji emoji-android emoji--white_check_mark" style="height:23px;width:auto;vertical-align:middle" title="✅" alt="✅" /> NEXTN 5步/6draft</td>
<td><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/274c.png?v=301515bb865" class="not-responsive emoji emoji-android emoji--x" style="height:23px;width:auto;vertical-align:middle" title="❌" alt="❌" /> 无</td>
</tr>
<tr>
<td>性能</td>
<td>63-76 t/s (thinking-off)</td>
<td>~55 t/s</td>
</tr>
</tbody>
</table>
<p dir="auto">关键发现：</p>
<ul>
<li><strong>32GB 卡红利最大</strong>：Terry 原话"对于 32G 显存的卡，开内存缓存意义非常重大"——因为 FP8/NVFP4 权重加载后显存所剩无几，HiCache 让 KV 有地方放</li>
<li><strong>HiCache 有性能代价</strong>：论坛用户 <em>折騰</em> 实测开 <code>--hicache-size</code> 后 tok/s "掉得太厉害，直接打折"——RAM 换入延迟不是无感的</li>
<li><strong>48GB 可以 MTP + HiCache 全开</strong>：Terry 4090D 上 MTP accept len 3.8-4.2，同时 HiCache 24GB，但 32GB 卡两者只能二选一</li>
</ul>
<h2>总结</h2>
<p dir="auto">SGLang HiCache 是个不错的方案，但 32GB 单卡有几个硬约束：</p>
<ol>
<li>必须用 NVFP4（FP8 权重太大）</li>
<li>必须用 RadixArk 版（Unsloth 版不兼容）</li>
<li>GPU KV cache 只有 ~101K tokens，HiCache L2 是补充不是主力</li>
<li>reasoning_parser 必须显式设</li>
<li>MTP 投机解码不可用（标准 checkpoint 太大，轻量化版没必要）</li>
<li>HiCache 有实测性能代价（tok/s 会打折），核心价值在多会话复用而非速度</li>
</ol>
<p dir="auto">32GB 卡的最优组合：llama.cpp + GGUF + MTP 做日常推理（67 t/s），SGLang + NVFP4 + HiCache 做多会话 KV 复用（重启免 prefill）。两者互补，不互相替代。</p>
<p dir="auto">48GB 卡（4090D/RTX Pro 5000）可以全开：FP8 + MTP + HiCache + 262K 上下文，体验接近在线模型。</p>
<p dir="auto">如果你有 48GB+ 的卡，HiCache 的价值会更大——更多 KV 留在 GPU 上，L2 作为冷备，MTP 也能跑得动。32GB 单卡的话，这个组合已经够用了。</p>
]]></description><link>https://lcz.me/topic/1341</link><generator>RSS for Node</generator><lastBuildDate>Wed, 09 Sep 2026 22:53:29 GMT</lastBuildDate><atom:link href="https://lcz.me/topic/1341.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 26 Aug 2026 15:24:36 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to SGLang HiCache 三层 KV 缓存实测：32GB Blackwell 单卡跑通 Qwen3.8-27B on Tue, 01 Sep 2026 07:46:35 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/imbiplaza-asus" aria-label="Profile: imbiplaza-ASUS">@<bdi>imbiplaza-ASUS</bdi></a> 不客气！</p>
]]></description><link>https://lcz.me/post/15313</link><guid isPermaLink="true">https://lcz.me/post/15313</guid><dc:creator><![CDATA[清风明月]]></dc:creator><pubDate>Tue, 01 Sep 2026 07:46:35 GMT</pubDate></item><item><title><![CDATA[Reply to SGLang HiCache 三层 KV 缓存实测：32GB Blackwell 单卡跑通 Qwen3.8-27B on Tue, 01 Sep 2026 07:03:52 GMT]]></title><description><![CDATA[<p dir="auto">现在升级了llm46fan 大大的模型，win11 重度用户</p>
<p dir="auto"><img src="https://upload.lcz.me/uploads/d74f0a91-e86f-4113-93af-a671d99f7e7a.jpeg" alt="5555f1f7-2629-4693-8dce-068347cdee15-image.jpeg" class=" img-fluid img-markdown" /></p>
]]></description><link>https://lcz.me/post/15303</link><guid isPermaLink="true">https://lcz.me/post/15303</guid><dc:creator><![CDATA[imbiplaza ASUS]]></dc:creator><pubDate>Tue, 01 Sep 2026 07:03:52 GMT</pubDate></item><item><title><![CDATA[Reply to SGLang HiCache 三层 KV 缓存实测：32GB Blackwell 单卡跑通 Qwen3.8-27B on Tue, 01 Sep 2026 06:19:22 GMT]]></title><description><![CDATA[<p dir="auto">懂了，得换系统才能跑，目前win11+wsl2的方案看来还是白费。<br />
感谢楼主！<br />
<img src="https://upload.lcz.me/uploads/a88629b0-f03a-4ecf-89f8-bd261d0fc657.png" alt="屏幕截图 2026-09-01 141900.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://lcz.me/post/15298</link><guid isPermaLink="true">https://lcz.me/post/15298</guid><dc:creator><![CDATA[ran z]]></dc:creator><pubDate>Tue, 01 Sep 2026 06:19:22 GMT</pubDate></item><item><title><![CDATA[Reply to SGLang HiCache 三层 KV 缓存实测：32GB Blackwell 单卡跑通 Qwen3.8-27B on Tue, 01 Sep 2026 04:57:18 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ran-z" aria-label="Profile: ran-z">@<bdi>ran-z</bdi></a> ● 介绍下你自己<br />
Initializing agent...</p>
<p dir="auto">────────────────────────────────────────<br />
─  <img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/2695.png?v=301515bb865" class="not-responsive emoji emoji-android emoji--staff_of_aesculapius" style="height:23px;width:auto;vertical-align:middle" title="⚕" alt="⚕" /> Hermes  ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────</p>
<p dir="auto">我是你的个人 AI 助手，跑在本地 Qwen3.8-27B（llama.cpp，4500 显卡，67 t/s）。</p>
<p dir="auto">核心能力：</p>
<ul>
<li>日常事务：文件管理、系统运维、下载/安装、网络配置</li>
<li>代码工作：写/改/调试，复杂项目委托 OpenCode 执行</li>
<li>创作：小说（Dramatica-Flow 完整管线）、AI 视频（ComfyUI + H3）、AI 音乐</li>
<li>基础设施：两台 VPS 管理（cc/bwg，1Panel + 证书 + 部署）</li>
<li>记忆系统：Mnemosyne 本地持久记忆 + Upstash 云端备份，跨会话保持上下文</li>
</ul>
<p dir="auto">工作风格：你拍板我执行，不废话不绕弯，实测验证不猜。</p>
<p dir="auto">有什么要干的？<br />
────────────────────────────────────────<br />
● 显示本机软硬件环境<br />
────────────────────────────────────────</p>
<p dir="auto">┊ <img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/1f4bb.png?v=301515bb865" class="not-responsive emoji emoji-android emoji--computer" style="height:23px;width:auto;vertical-align:middle" title="💻" alt="💻" /> $         echo "=== CPU ===" + 26 commands  0.3s [exit 1]<br />
┊ <img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/1f4bb.png?v=301515bb865" class="not-responsive emoji emoji-android emoji--computer" style="height:23px;width:auto;vertical-align:middle" title="💻" alt="💻" /> $         lscpu | grep "型号名称" + 3 commands  0.1s<br />
─  <img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/2695.png?v=301515bb865" class="not-responsive emoji emoji-android emoji--staff_of_aesculapius" style="height:23px;width:auto;vertical-align:middle" title="⚕" alt="⚕" /> Hermes<br />
硬件</p>
<p dir="auto">CPU:     AMD Ryzen 7 3700X 8核 (3.6/4.4 GHz)<br />
内存:    64GB DDR4 (60Gi 可用) + 127Gi Swap<br />
GPU:     NVIDIA RTX PRO 4500 Blackwell 32GB GDDR7<br />
驱动 595.84, 当前占用 25.9GB, 93% 利用率, 51°C<br />
主板:    Gigabyte X570 GAMING X</p>
<p dir="auto">存储</p>
<p dir="auto">系统盘:   NVMe 1.8TB (LVM)    已用 261G / 1.5T 可用  15%<br />
数据盘:   NVMe 938GB /mnt/ssd1 已用 538G / 353G 可用  61%<br />
RAID:     md0 RAID1 1.8TB /mnt/raid1  已用 586M  1%</p>
<p dir="auto">系统</p>
<p dir="auto">OS:      Ubuntu 26.04.1 LTS, kernel 7.0.0-30-generic<br />
主机名:   aqbjqtd-X570-GAMING-X<br />
Python:   3.14.4<br />
Docker:   29.1.3<br />
CUDA:     12.9 (编译) + 13.3 (运行时, ComfyUI 用)</p>
]]></description><link>https://lcz.me/post/15284</link><guid isPermaLink="true">https://lcz.me/post/15284</guid><dc:creator><![CDATA[清风明月]]></dc:creator><pubDate>Tue, 01 Sep 2026 04:57:18 GMT</pubDate></item><item><title><![CDATA[Reply to SGLang HiCache 三层 KV 缓存实测：32GB Blackwell 单卡跑通 Qwen3.8-27B on Tue, 01 Sep 2026 04:56:04 GMT]]></title><description><![CDATA[<p dir="auto">我都是用非nvfp4,win11<br />
重度用家。。。</p>
<p dir="auto"><img src="https://upload.lcz.me/uploads/ce242ee3-0454-4f66-b31e-dcd1ce05afbf.jpeg" alt="f37f1667-7535-4e71-906f-d36394682c88-image.jpeg" class=" img-fluid img-markdown" /></p>
]]></description><link>https://lcz.me/post/15283</link><guid isPermaLink="true">https://lcz.me/post/15283</guid><dc:creator><![CDATA[imbiplaza ASUS]]></dc:creator><pubDate>Tue, 01 Sep 2026 04:56:04 GMT</pubDate></item><item><title><![CDATA[Reply to SGLang HiCache 三层 KV 缓存实测：32GB Blackwell 单卡跑通 Qwen3.8-27B on Tue, 01 Sep 2026 04:51:50 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ran-z" aria-label="Profile: ran-z">@<bdi>ran-z</bdi></a> 我之前也曾经在WIN11上试过，有各种限制，所以后来把操作系统换成桌面版ubuntu26.04 LTS了，这点属于环境不同，可能结果也不同，你可以换这个操作系统试，不用担心不会用，我在操作系统里的所有操作都可以让hermes给我完成。现在感觉比win11要好用多了。</p>
]]></description><link>https://lcz.me/post/15280</link><guid isPermaLink="true">https://lcz.me/post/15280</guid><dc:creator><![CDATA[清风明月]]></dc:creator><pubDate>Tue, 01 Sep 2026 04:51:50 GMT</pubDate></item><item><title><![CDATA[Reply to SGLang HiCache 三层 KV 缓存实测：32GB Blackwell 单卡跑通 Qwen3.8-27B on Tue, 01 Sep 2026 04:12:28 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ran-z" aria-label="Profile: ran-z">@<bdi>ran-z</bdi></a> 这个崩点我查了 SGLang 的 issue 库，属于<strong>已知 bug 类别，不是配置问题</strong>——你的排查方向没错，别再抠参数了。</p>
<p dir="auto">同类报告：</p>
<ul>
<li>sgl-project/sglang #13060：Qwen3-Omni 在 _compute_mrope_positions_decode 同点崩溃 = SGLang 解析 M-RoPE（3D 位置编码）配置的已知问题，纯文本也崩是正常的（跟视觉 token 无关）</li>
<li>#30055：Qwen3.5 + HiCache 触发 CUDA illegal memory access——你开着 --hicache-size 32，正好踩这个组合</li>
<li>#19383：Qwen3.5-397B-A17B-NVFP4 TopKTopPSampling 崩 = NVFP4 kernel 专属 bug 类别</li>
</ul>
<p dir="auto">按顺序二分定位（每次只动一个变量）：</p>
<ol>
<li><strong>先关 HiCache</strong>（去掉 --enable-hierarchical-cache 或 --hicache-size 0）——#30055 就是 HiCache 路径触发的；关了不崩 = 锁定 HiCache 与 mrope 的交互，等 SGLang 修复，别硬刚</li>
<li><strong>换 FP8 权重</strong>（RadixArk 有 FP8 版）——NVFP4 kernel 覆盖差（#19383 同族），FP8 稳得多，Qwen3.8 FP8 跑 SGLang 论坛里成功案例一堆</li>
<li><strong>升级 SGLang 到 main 分支或最新 release</strong>——PyPI/tuna 的 0.5.18 是"发帖时最新"，mrope/HiCache 修复基本都在 main 或 0.5.19+；用官方镜像 lmsysorg/sglang:latest 最省事</li>
<li>还崩就加 --disable-cuda-graph 试（WSL2 上 CUDA graph 捕获偶发 illegal access 是老坑）</li>
</ol>
<p dir="auto">最后提醒：楼主是在<strong>原生 Linux</strong> 跑通的，你在 WSL2——SGLang 这种服务端推理在 WSL2 上本身多一层兼容风险（共享内存、CUDA graph）。上面 4 步都不行，双系统/原生 Linux 跑同配置是终局验证：原生不崩 = 锁死 WSL2 环境问题，别在 WSL2 上继续耗。</p>
]]></description><link>https://lcz.me/post/15274</link><guid isPermaLink="true">https://lcz.me/post/15274</guid><dc:creator><![CDATA[Xiaote]]></dc:creator><pubDate>Tue, 01 Sep 2026 04:12:28 GMT</pubDate></item><item><title><![CDATA[Reply to SGLang HiCache 三层 KV 缓存实测：32GB Blackwell 单卡跑通 Qwen3.8-27B on Tue, 01 Sep 2026 01:55:30 GMT]]></title><description><![CDATA[<p dir="auto">期望27b看到10-32-64-90-128K下的prefill速度和nomtp速度。这样才有参考意义！这个单卡prefill应该击败双r9700，现在双r9700 FP8 VLLM 10k-3000 90K-2000+的速度了，跑agent的subgent已经很有生产力了。</p>
]]></description><link>https://lcz.me/post/15244</link><guid isPermaLink="true">https://lcz.me/post/15244</guid><dc:creator><![CDATA[iamvirus]]></dc:creator><pubDate>Tue, 01 Sep 2026 01:55:30 GMT</pubDate></item><item><title><![CDATA[Reply to SGLang HiCache 三层 KV 缓存实测：32GB Blackwell 单卡跑通 Qwen3.8-27B on Tue, 01 Sep 2026 01:26:31 GMT]]></title><description><![CDATA[<p dir="auto">【比着葫芦画葫芦失败】SGLang 0.5.18 + Qwen3.8-27B-NVFP4 在 WSL2 上 decode 崩溃（mrope CUDA illegal memory access），通过dsh由deepseek v4 flash处理，结果失败，请楼主指点<br />
环境<br />
项目	详情<br />
硬件：i9 14900k      192G ddr5  	RTX 5090<br />
系统	Windows 11 + WSL2，NVIDIA 驱动 610.74（WDDM 模式）<br />
框架	sglang 0.5.18（发帖时为最新版，PyPI / tuna 上无 0.5.19+）<br />
模型	RadixArk Qwen3.8-27B-NVFP4<br />
现象<br />
decode 阶段 CUDA illegal memory access，崩在 _compute_mrope_positions_decode（vision token 的 3D 位置编码路径）。纯文本输入也会崩，可稳定复现。</p>
<p dir="auto">已排除项（逐项对照过楼主参数）<br />
楼主（原生 Linux + systemd + RTX PRO 4500）的完整启动参数我已全套对齐复测，仍崩在同一位置：</p>
<p dir="auto">--hicache-size 32 --mem-fraction-static 0.85 --max-running-requests 1 --context-length 131072 --reasoning-parser qwen3 --tool-call-parser qwen3_coder<br />
参数逐项调过：hicache-size 96→32、mem-fraction-static 0.60 / 0.72 / 0.85，均无效<br />
进程保活（setsid）无关；缺 libssl（JIT 链接）无关<br />
--language-model-only：sglang 目前只支持 MuseGlimmer，对本模型不可用<br />
根因（已锁定）<br />
模型自带 README 写明：</p>
<p dir="auto">"Dense Multimodal … Input Type(s): Text, image, and video"<br />
"Attention weights use FP8, while MTP and vision tensors retain the source BF16"<br />
"Preferred Operating System(s): Linux"<br />
即 config 带 vision: true，sglang 0.5.18 将其按多模态模型处理，decode 走 mrope 路径。楼主原生 Linux 环境走这条路径不炸；WSL2 + WDDM 驱动下同一路径直接崩。这是环境差异，参数抄得再准也绕不过去。</p>
<p dir="auto">我看到的三条路<br />
升级 sglang（&gt;0.5.18）：修复多模态 mrope decode——目前不可行，0.5.18 就是已发布最新版（0.5.19 / 0.6.0 / 0.5.20 均不存在），只能等上游发版<br />
换纯语言版 checkpoint：找一个无 vision_config 的 Qwen3.8-27B NVFP4/FP8，sglang 就不会走多模态 mrope decode——当前 WSL2 上最可行<br />
原生 Linux 跑：README 官方支持的 OS，但成本高（需双系统或其他 Linux 机器）<br />
想请帮忙的<br />
有没有无 vision 的 Qwen3.8-27B NVFP4 / FP8 checkpoint？RadixArk 或社区是否出过纯语言版？<br />
有没有人在 WSL2 上跑多模态 sglang 踩过同样的 mrope 崩溃？有 workaround 吗（除了换环境）？<br />
上游 sglang 有没有已知计划修多模态 mrope decode？<br />
现状<br />
先用 llama.cpp 顶着：Q5_K_P + 262K ctx（llama-server 监听 8080），稳定可用；SGLang HiCache 方案等上述解法落地后再开。</p>
]]></description><link>https://lcz.me/post/15239</link><guid isPermaLink="true">https://lcz.me/post/15239</guid><dc:creator><![CDATA[ran z]]></dc:creator><pubDate>Tue, 01 Sep 2026 01:26:31 GMT</pubDate></item><item><title><![CDATA[Reply to SGLang HiCache 三层 KV 缓存实测：32GB Blackwell 单卡跑通 Qwen3.8-27B on Thu, 27 Aug 2026 08:05:02 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ran-z" aria-label="Profile: ran-z">@<bdi>ran-z</bdi></a> HiCache 的实际价值<br />
坦白说，HiCache 在单用户场景下最大的价值不是"跑更大上下文"，而是多会话 KV 复用免 prefill。</p>
<p dir="auto">GPU 上直接跑 ~101K tokens（全速）<br />
超出部分由 HiCache L2 从 RAM 换入（有延迟）<br />
重启服务后，之前的 KV 从 L2 恢复，不用重新 prefill<br />
多会话切换时，不活跃会话的 KV 换到 RAM，活跃的留在 VRAM<br />
对比 llama.cpp 的 150K 全 VRAM 方案：</p>
<p dir="auto">llama.cpp 速度更快（全在 GPU 上，零搬运延迟）<br />
SGLang HiCache 胜在会话复用（重启免 prefill）</p>
]]></description><link>https://lcz.me/post/14295</link><guid isPermaLink="true">https://lcz.me/post/14295</guid><dc:creator><![CDATA[清风明月]]></dc:creator><pubDate>Thu, 27 Aug 2026 08:05:02 GMT</pubDate></item><item><title><![CDATA[Reply to SGLang HiCache 三层 KV 缓存实测：32GB Blackwell 单卡跑通 Qwen3.8-27B on Thu, 27 Aug 2026 04:09:09 GMT]]></title><description><![CDATA[<p dir="auto">请教一下，20.14 GB（NVFP4）直接塞显存就行了，为啥还要搞HiCache呢？只是可用多会话吗？谢谢！</p>
]]></description><link>https://lcz.me/post/14257</link><guid isPermaLink="true">https://lcz.me/post/14257</guid><dc:creator><![CDATA[ran z]]></dc:creator><pubDate>Thu, 27 Aug 2026 04:09:09 GMT</pubDate></item><item><title><![CDATA[Reply to SGLang HiCache 三层 KV 缓存实测：32GB Blackwell 单卡跑通 Qwen3.8-27B on Wed, 26 Aug 2026 21:20:46 GMT]]></title><description><![CDATA[<p dir="auto">非常好的分享，我没加MTP，可以补上，50系列的卡有NVFP4，其实40系列跑4比特量化版本也很好。FP8还是有点不划算，但我搭配了Hicache用着也还行。</p>
]]></description><link>https://lcz.me/post/14195</link><guid isPermaLink="true">https://lcz.me/post/14195</guid><dc:creator><![CDATA[terry]]></dc:creator><pubDate>Wed, 26 Aug 2026 21:20:46 GMT</pubDate></item></channel></rss>