<?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 5090 跑 321B MoE：GLM-5.3-Flash 分层推理验证记【转载】]]></title><description><![CDATA[<p dir="auto">GLM-5.3-Flash 有 3,210 亿参数，一张 RTX 5090 加 96GB 内存就能跑到 30 tok/s 以上。做法是把 MoE 专家按冷热分到显存、内存、SSD 三层：常用的放显卡，不常用的放远一点。本文经 CBS 调研逐条核对了原始出处，数字以官方仓库为准。</p>
<h2>一、为什么专家可以拆开放</h2>
<p dir="auto">以下直接取自 zai-org/GLM-5.3-Flash 的 config.json：</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>项目</th>
<th>数值</th>
</tr>
</thead>
<tbody>
<tr>
<td>层数</td>
<td>45（前 3 层 dense FFN）</td>
</tr>
<tr>
<td>MoE 层</td>
<td>42 层，每层 288 个路由专家 + 1 个共享专家</td>
</tr>
<tr>
<td>每 token 激活</td>
<td>8 / 288 个路由专家（不到 3%）</td>
</tr>
<tr>
<td>单专家体积</td>
<td>3 × 4096 × 2048 ≈ 2,520 万参数</td>
</tr>
<tr>
<td>路由专家总量</td>
<td>42 × 288 × 25.2M ≈ 3,048 亿（占总量 95%）</td>
</tr>
<tr>
<td>总参数 / 激活</td>
<td>321B / 约 18B</td>
</tr>
<tr>
<td>原生上下文</td>
<td>1M（1,048,576）</td>
</tr>
</tbody>
</table>
<p dir="auto">每个 token 每层只碰 288 个里的 8 个，GPU 不必同时装下全部专家，只要用到时能及时拿到。</p>
<h2>二、三层存储，速度差几十倍</h2>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>层级</th>
<th>容量</th>
<th>带宽</th>
</tr>
</thead>
<tbody>
<tr>
<td>RTX 5090 显存</td>
<td>32 GB</td>
<td>1,792 GB/s</td>
</tr>
<tr>
<td>内存 → 显存（PCIe 5.0 x16）</td>
<td>96 GB</td>
<td>单向约 64 GB/s</td>
</tr>
<tr>
<td>PCIe 4.0 NVMe</td>
<td>TB 级</td>
<td>顺序读约 7 GB/s</td>
</tr>
</tbody>
</table>
<p dir="auto">Maya-S 平均约 2.4 bit/参数（96.5 GB 反推），每 token 用到的路由专家约 2.5 GB。若一半不在显存，要从内存搬 1.27 GB，按 PCIe 理论带宽约 20 毫秒，上限约 50 tok/s；这一半若落 SSD，一个 token 要 0.18 秒，只剩约 5 tok/s。</p>
<h2>三、速度看命中率</h2>
<p dir="auto">Project Maya（<a href="http://github.com/mw00/project-maya%EF%BC%89%E6%8A%8A%E5%AF%B9%E8%AF%9D%E4%B8%AD%E6%9C%80%E5%B8%B8%E7%94%A8%E7%9A%84%E4%B8%93%E5%AE%B6%E6%94%BE%E6%98%BE%E5%AD%98%E3%80%81%E6%AC%A1%E5%B8%B8%E7%94%A8%E7%9A%84%E6%94%BE%E5%86%85%E5%AD%98%E3%80%81%E5%85%B6%E4%BD%99%E6%94%BE" rel="nofollow ugc">github.com/mw00/project-maya）把对话中最常用的专家放显存、次常用的放内存、其余放</a> NVMe，边聊边换。可行性依据是专家使用不均匀、相邻 token 常用同一批专家——2023 年 arXiv 2312.17238（Mixtral offloading，LRU 缓存 + 预取，Colab 上验证）就是这个思路。</p>
<p dir="auto">官方 README 与实测一致：启动时最慢（缓存未热）；SSD 持续忙 = 内存不够放专家；启动会锁住几乎所有空闲内存，只留约 6 GB 给别的程序；32 GB 内存即可跑，越多越快。官方实测表节选：</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>硬件</th>
<th>量化</th>
<th>decode</th>
<th>prefill</th>
</tr>
</thead>
<tbody>
<tr>
<td>4× RTX 4090</td>
<td>Maya-S24</td>
<td>118 t/s</td>
<td>4,129 t/s</td>
</tr>
<tr>
<td>RTX 5090 32GB + 96GB DDR5</td>
<td>Maya-M</td>
<td>30+ t/s</td>
<td>~2,000 t/s</td>
</tr>
<tr>
<td>2× Tesla V100 32GB + 30GB RAM</td>
<td>Maya-S</td>
<td>~40 t/s</td>
<td>~670 t/s</td>
</tr>
<tr>
<td>单卡 RTX 3090（社区实测）</td>
<td>Maya-S</td>
<td>17 t/s</td>
<td>377 t/s</td>
</tr>
</tbody>
</table>
<p dir="auto">量化档位与 FP8 原版对比（官方模型卡）：</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>档位</th>
<th>体积</th>
<th>zero-shot 保持</th>
<th>与 FP8 同 token</th>
</tr>
</thead>
<tbody>
<tr>
<td>Maya-S（默认）</td>
<td>96.5 GB</td>
<td>97.9%</td>
<td>83.3%</td>
</tr>
<tr>
<td>Maya-S24（24GB 卡）</td>
<td>94.7 GB</td>
<td>97.7%</td>
<td>83.1%</td>
</tr>
<tr>
<td>Maya-M</td>
<td>116 GB</td>
<td>97.9%</td>
<td>86.2%</td>
</tr>
<tr>
<td>Maya-L</td>
<td>156.3 GB</td>
<td>99.2%</td>
<td>90.0%</td>
</tr>
</tbody>
</table>
<h2>四、更激进：不在显存里的专家干脆不算</h2>
<p dir="auto">Maya 引擎改自 Strata（官方致谢明说"started from Strata's"）。Strata 0.1.42（2026-10-10）在 CUDA 上默认开启 <code>STRATA_ROUTE_TAIL_SKIP=7</code>：MTP 验证窗口内，一个不在显存、且窗口中每个 token 都把它排在第 7 名以后的专家，不搬也不算，其余专家保留路由权重。</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>机器</th>
<th>decode 提升</th>
<th>top-1 一致率</th>
</tr>
</thead>
<tbody>
<tr>
<td>RTX 3060 12GB, IQ3_XXS</td>
<td>+15.6%（5/5 轮）</td>
<td>97.7%</td>
</tr>
<tr>
<td>RTX A4000 16GB, Q2_0</td>
<td>+12.9%（5/5 轮）</td>
<td>98.2%</td>
</tr>
<tr>
<td>2× A4000（99.7% 专家常驻）</td>
<td>−0.2%（无提升）</td>
<td>—</td>
</tr>
</tbody>
</table>
<p dir="auto">KL 散度均值仅 0.003–0.006（作为参照，IQ3_XXS 与 Q2_0 之差约 0.10）；设 <code>=0</code> 可完全还原。验证窗口本身也在帮忙：草稿一次猜多个 token，验证时一起算，搬进来的专家服务窗口内所有 token。注意 0.1.43（10-11）已再提速 5–38%（按卡而异）。</p>
<h2>五、两台 DGX Spark：另一条路</h2>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th></th>
<th>RTX 5090</th>
<th>2× DGX Spark</th>
</tr>
</thead>
<tbody>
<tr>
<td>内存</td>
<td>32 GB 显存 + 96 GB RAM</td>
<td>128 GB×2 统一内存</td>
</tr>
<tr>
<td>带宽</td>
<td>显存 1,792 GB/s，卡在 PCIe 64 GB/s</td>
<td>273 GB/s 统一内存，卡在带宽</td>
</tr>
<tr>
<td>模型</td>
<td>Maya-S/M 96.5–116 GB，三层摆放</td>
<td>EXL3 4bpw 175.7 GB 全常驻</td>
</tr>
</tbody>
</table>
<p dir="auto">5090 显存带宽是 Spark 的 6.5 倍但装不下；Spark 慢在带宽但全装得下。Mia-AiLab 官方模型卡实测：双 Spark 跑 EXL3 4bpw（TensorFold），单路 prose decode 61.8 t/s（4 路并发 103 t/s），131K prefill 1,824 t/s——原文的 62.2 t/s 量级一致。</p>
<h2>六、实用判断</h2>
<ol>
<li>跑大 MoE，内存容量往往比显卡更关键；32 GB 能跑，越多越快。</li>
<li>NVMe 只放冷专家；热专家落 SSD，速度掉一个数量级。</li>
<li>llama.cpp 手动分：<code>--cpu-moe</code> 全部专家进内存，<code>--n-cpu-moe N</code> 只放前 N 层（官方 server 文档确认）。</li>
<li>量化越低越装得下：Maya-S 与 FP8 同 token 83%，Maya-L 达 90%。</li>
<li>新坑（<a href="http://lcz.me" rel="nofollow ugc">lcz.me</a> 实测）：MTP 接受率对温度敏感，T=1.0 时仅 6%，降到 0.3 + top_p 0.9 后跳到 70%，差近 10 倍。</li>
</ol>
<p dir="auto">一句话：消费级显卡能跑多大的 MoE，取决于热专家放进显存多少，以及内存和 PCIe 有多快。</p>
<hr />
<p dir="auto"><strong>来源</strong>：zai-org/GLM-5.3-Flash config.json；mw00/project-maya README；peasantsmith/GLM-5.3-Flash-Maya-GGUF 模型卡；Niko1221/Strata v0.1.42 release notes（PR #1668）；Mia-AiLab/GLM-5.3-Flash-EXL3-4bpw-TensorFold 模型卡；arXiv 2312.17238；llama.cpp server README；<a href="http://lcz.me" rel="nofollow ugc">lcz.me</a> topic/2195。检索：CBS Google/Bing 4+2 组 × 15-20 条，2026-10-12。</p>
<p dir="auto">纯转载，在X上面看到一篇推文，觉得可能有用，就让HERMES上网调研了一下，然后写成的这个文章。</p>
]]></description><link>https://lcz.me/topic/2286</link><generator>RSS for Node</generator><lastBuildDate>Fri, 23 Oct 2026 05:41:42 GMT</lastBuildDate><atom:link href="https://lcz.me/topic/2286.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 12 Oct 2026 13:06:36 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to 一张 RTX 5090 跑 321B MoE：GLM-5.3-Flash 分层推理验证记【转载】 on Mon, 12 Oct 2026 14:16:47 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/johnnybegood" aria-label="Profile: johnnybegood">@<bdi>johnnybegood</bdi></a> <a href="/post/24292">said</a>:</p>
<p dir="auto">当然会明显强， 我用 20多 tok/s 跑了几个场景， 明显要更聪明</p>
</blockquote>
<p dir="auto">這樣子 GLM-5.3-Flash可用呀<br />
睡覺前讓GLM 先寫一個計畫(Planner) 接著換QFN and Qwen3.8-27B (Workers)上場照計畫執行<br />
然後GLM再回來檢查(Auditor/Verifier)</p>
<p dir="auto">過程中大概需要一張 RTX 5060 Ti 16G(Operation Manager) 一直都是醒著的 幫忙切換這三個LLMs</p>
<p dir="auto">或著讓 LLM自動切換 應該也行 執行script 就好了</p>
]]></description><link>https://lcz.me/post/24303</link><guid isPermaLink="true">https://lcz.me/post/24303</guid><dc:creator><![CDATA[kos or]]></dc:creator><pubDate>Mon, 12 Oct 2026 14:16:47 GMT</pubDate></item><item><title><![CDATA[Reply to 一张 RTX 5090 跑 321B MoE：GLM-5.3-Flash 分层推理验证记【转载】 on Mon, 12 Oct 2026 13:39:14 GMT]]></title><description><![CDATA[<p dir="auto">5090才 30tok/s , 那我自己3090能搞到 28tok/s 也是很欣慰了。帖子： <a href="https://lcz.me/topic/2195">https://lcz.me/topic/2195</a></p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/kos-or" aria-label="Profile: kos-or">@<bdi>kos-or</bdi></a>  当然会明显强， 我用 20多 tok/s 跑了几个场景， 明显要更聪明， 就好像 QFN跟 27B 的区别一样明显。但是QFN 能跑到 90-100tok/s  ， 这个差距还是有点明显的。</p>
]]></description><link>https://lcz.me/post/24292</link><guid isPermaLink="true">https://lcz.me/post/24292</guid><dc:creator><![CDATA[johnnybegood]]></dc:creator><pubDate>Mon, 12 Oct 2026 13:39:14 GMT</pubDate></item><item><title><![CDATA[Reply to 一张 RTX 5090 跑 321B MoE：GLM-5.3-Flash 分层推理验证记【转载】 on Mon, 12 Oct 2026 13:25:11 GMT]]></title><description><![CDATA[<p dir="auto">GLM-5.3-Flash 會明顯比 Qwen3.8-Flash-Next 強嗎？ 如果差異很大就值得期待了</p>
]]></description><link>https://lcz.me/post/24288</link><guid isPermaLink="true">https://lcz.me/post/24288</guid><dc:creator><![CDATA[kos or]]></dc:creator><pubDate>Mon, 12 Oct 2026 13:25:11 GMT</pubDate></item></channel></rss>