← 返回 2026-09-01

Qwen3.8-Next 架构设计:评测、效率与训练稳定性 On the Design of Qwen3.8-Next Architecture: Evaluation, Efficiency, and Training Stability

Zihan Qiu, Zekun Wang, Xiao Li, Yanpeng Li, Yang Xu, Yixuan Wang, Huaqing Zhang, Rui Men, Bochao Mao, Chengruidong Zhang, Fan Zhou, Hao Luo, Haofeng Huang, Haoran Lian, Haoyan Huang, Hongqing Chen, Jianwei Zhang, Jing Xu, Junjie Wang, Langshi Chen, Liangyu Wang, Linlang Jiang, Man Yuan, Minmin Sun, Peng Jin, Siqi Zhang, Siyu Wang, Xingzhang Ren, Yakai Wang, Yi Zhang, Yiming Dong, Yizhong Cao, Yubo Ma, Yunfei Mao, Bo Zheng, Dayiheng Liu 📅 2026-08-31 👍 31 2026-09-01 18:30
Muon优化器 大模型架构 稀疏注意力 稀疏混合专家 线性注意力 缩放定律 训练稳定性

以 GDN 混合、QSA 稀疏注意力与门控残差三大改动,用约 1/9 训练 FLOPs 追平 397B 旗舰

前置知识

稀疏混合专家(MoE)

MoE 把 Transformer 的前馈层替换为多个并行“专家”网络,由路由器为每个 token 只激活其中少数几个,从而在参数总量远大于计算量的前提下扩展容量。命名如 125B-A6B 表示总参数 125B、每个 token 仅激活 6B。

本文模型 Qwen3.8-Flash-Next 就是 125B-A6B 的稀疏 MoE,额外还挂 51B n-gram 嵌入表;文中消融多以 25B-A3B、35B-A3B 小规模 MoE 复现。分清总参数与激活参数是读懂全文效率对比的前提。

线性注意力与循环状态(Gated DeltaNet)

线性注意力把前缀压缩进固定大小的矩阵状态 $S_t \in \mathbb{R}^{d_k \times d_v}$ 并按内容更新,计算与显存随序列长度线性增长。GDN 在此之上加数据相关的衰减门 $\alpha_t$ 与写入门 $\beta_t$:先估计 key 已关联的旧值,只写入残差误差,实现“定向擦写”,区别于无界累加的加性线性注意力。

GDN 是本文 token 混合的主体:每四层中三层用 GDN。它以固定大小状态换取线性成本,是全文“效率-长程记忆”权衡的核心部件。

KV 缓存

自回归解码时,标准注意力需缓存全部历史 token 的 key/value 向量,显存随上下文线性增长;解码阶段的时间主要由搬运这些字节的内存带宽决定,而非算术计算。

“解码由访存主导”这一事实直接决定了本文多条设计:GDN 保留固定大小状态、GR 删去分支混合算子 $H_{res}$、残差状态改用 FP8 存储,都是为减少字节搬运。

稀疏注意力与索引器

稀疏注意力用一个轻量“索引器”先估计每个 query 对上下文哪些位置重要,再只对选出的 top-k 位置做完整注意力,把 $O(n^2)$ 的注意力降为近似 $O(nK)$。DSA 等先前方法用 token 级索引器,但索引自身的打分开销仍随 $n^2$ 增长,长上下文时成为新瓶颈。

QSA 的关键改动就是把索引打分粒度从 token 压缩为 micro-block,使索引开销降为 $O(n^2/r)$,这是理解 1M 上下文 7.6× prefill 加速的入口。

残差流与 Pre-Norm

残差连接让每个子层输出直接累加到主干向量流上,为梯度提供直达输出之路;Pre-Norm 在每个子层读取前先做 RMSNorm,是大规模训练稳定的标配。代价是每层读同一条流,早写入的特征必须与之后所有写入竞争、被逐步稀释。

本文 Gated Residual 正是在这条主干上做文章:把单条残差流加宽为 4 条分支、读入时用逐元素 sigmoid 门控加权,并直接取代 Pre-Norm,是质量与稳定性双赢的关键组件。

Muon 优化器与 Newton–Schulz 正交化

Muon 是面向矩阵参数的优化器:对 Nesterov 动量($\mu=0.95$)用 Newton–Schulz 迭代做正交化(拉平更新方向的奇异值),再按 $\gamma=0.2\sqrt{\max(A,B)}$ 缩放,使更新 RMS 与矩阵形状无关,已在多个千亿模型上验证有效。

本文系统处理了 Muon 落地问题:哪些参数该用/不该用、融合矩阵先拆分再正交化、按正交化 FLOPs 重新做数据分区、CUDA graph 捕获优化步;且架构+Muon 共同改变了最优超参,是第 3 章一切讨论的基础。

缩放定律与超参迁移

缩放定律用小模型上的大量训练实验,拟合损失随参数量、数据量与超参(学习率 $\eta$、批大小 $B$)的变化规律,再外推到大模型规模选配方,避免大规模试错。架构与优化器一旦改变,旧配方的外推即失效,需要重新拟合。

本文重新拟合了超参缩放定律,预测出显著更大的最优批大小与学习率,并分别在 4T token 小模型和 156B-A7B 大模型上分轴验证外推可靠性,是其训练配方的核心。

MTP 多 token 预测与投机解码

MTP 在主干之外附加轻量预测模块,一次草拟后续多个 token,由主干并行验证,平均接受长度决定解码加速比。草稿模块自身的注意力开销会成为额外成本。

本文 MTP 模块跨投机步复用 QSA 的 top-k 索引以降低草稿成本,并用四步投机解码的平均接受长度(4.07 vs 4.06)验证复用无损,是推理效率设计的一环。

研究动机

Transformer 的全局自注意力提供对全部历史 token 的直接内容寻址,但计算量随序列长度平方增长,KV 缓存随生成长度线性膨胀;滑窗注意力(SWA)虽把两项开销都变成常数,却只能靠层级深度间接传递窗口外信息,长程内容记忆受损。纯靠增大稠密参数或 MoE 专家数扩容量,则每 token FLOPs 与访存同步上涨,推理成本居高不下。训练侧同样有两类顽疾:一是上一代 397B-A17B 旗舰质量达标但激活参数、训练 token 与 FLOPs 都处于高位;二是大规模长程训练中损失尖峰与梯度异常频发,常需 checkpoint 回滚,qk-clip、SwiGLU-clip 这类显式裁剪成了标配。此外,架构选型长期依赖预训练损失这一单一指标,而本文观察到损失与下游基准并不总是一致——例如 n-gram 词表增大时损失单调下降、下游准确率却饱和——只看损失会做出错误决策。

本文的目标是本文的量化目标是在远低于上一代的算力预算下保住 397B-A17B 旗舰(Qwen3.7-Plus)的基座质量:在知识、STEM、推理、代码、多语言共 14 个预训练基准上追平或接近旗舰,同时每 token 激活参数约为其 1/3、训练 token 数约为 1/3、训练 FLOPs 约为 1/9。为此必须把三类耦合问题当作一个设计问题同时求解:架构能力(token 混合、残差结构、容量扩展方式的重新设计);效率(训练、prefill、decode 三阶段分别记账并针对性优化);优化与稳定性(新架构下最优学习率与批大小漂移的重新拟合、以压力测试验证大规模训练稳定性)。最终产出一个同时更高效、更强、更稳的配方,并保证全量训练零损失尖峰、不依赖显式激活裁剪。

与已有工作不同的是,多数架构论文只报告最终模型的基准分数,或只用预训练损失做消融。本文的独特切入是把每一次候选改动放到三条正交轴上同时评估:(1) 损失+下游基准,并明确报告两者不一致的案例;(2) 改动在训练、prefill、decode 三阶段的成本账;(3) 对最优超参与训练稳定性的影响。这一协议暴露了只看损失会错过的现象:n-gram 词表增大损失单调降但下游饱和;GR 的动态化只降 0.002 损失却带来 1.98 分基准提升;限制残差读为门控最高的两个分支在预训练几乎免费,后训练后却明显掉质量;去掉全注意力层的位置编码预训练无差别,但后训练后“无限生成”(不终止)比例显著上升。作者据此主张损失、基准、效率与稳定性构成一个联合设计问题,这为架构研究提供了一套可复用的评估方法论。

核心方法

直觉上,模型的不同瓶颈要用不同手段解决:长程记忆与检索、残差通路容量、参数容量三者互不可替代。技术上,Qwen3.8-Flash-Next 由四大组件构成(Figure 1)。其一,token 混合采用逐层混合架构:每四层中三层用 Gated DeltaNet(GDN),把前缀压缩进固定大小循环状态、以线性成本更新,一层用全局注意力保留精确的 token 级检索;继续预训练(CPT)阶段再把全注意力层替换为 Qwen 稀疏注意力(QSA),用压缩索引器在 micro-block 粒度打分并选 top-k 上下文。其二,残差流加宽为 4 条分支,读取时经逐元素 sigmoid 门控加权平均(Gated Residual, GR),同时取代 Pre-Norm。其三,容量放到骨干之外:在第 2 层挂一层 n-gram 嵌入,多头哈希查表、上下文门控注入,51B 参数驻留主机内存并异步预取,几乎不增加每 token FLOPs 与延迟。其四,优化器用 Muon 正交化二维线性映射权重,配合重新拟合的缩放定律选取更大的最优批大小与学习率,并以抬高学习率的压力测试验收稳定性,最终全量训练零损失尖峰。

核心创新有三处。第一,GR 重新分配了“加宽残差流”的表达力去向:Hyper-Connections(HC)与 mHC 把读/写都保持为每分支标量、把容量投入分支间混合算子 $H_{res}$(mHC 还约束其为双随机矩阵),而 GR 把表达力花在读端——门控是逐元素(每分支每通道)的 sigmoid 门,同时彻底删去 $H_{res}$;消融显示删减无性能代价,却省掉每块一次对整个残差状态的读取(加宽流推理访存的大头),还带来显著稳定性增益。第二,QSA 改变了稀疏注意力的索引粒度:DSA 的 token 级索引器开销为 $O(n^2)$,QSA 先把 key 平均池化压缩 $r$ 倍成 micro-block 再打分,索引开销降为 $O(n^2/r)$;与跨层共享索引的 IndexShare 相比,层内压缩不依赖层间相似性,天然适配混合架构——QSA 在索引相对延迟 0.25 时即追平全注意力基线,IndexShare 在 0.5 时仍低于基线。第三,方法论上把架构、效率、优化、稳定性当耦合系统:GR 提供的重缩放使最优学习率与批大小上移,进而改善吞吐与收敛,批量预热被证明不再必要。

方法步骤详情

完整流程分五步。(1) 骨干搭建:每四层一组,三层 GDN + 一层全局注意力(保留 RoPE;NoPE 变体预训练无差别但后训练后不终止生成比例显著升高,故弃用)。GDN 中 $q_t,k_t$ 经短因果卷积与 L2 归一化,状态按 $S_t = \alpha_t(I-\beta_t k_t k_t^\top)S_{t-1} + \beta_t k_t v_t^\top$ 更新,$\alpha_t = \exp[-\exp(A)\,\mathrm{softplus}(W_\alpha x_t + b_\alpha)]$,输出经 zero-centered RMSNorm 与有界 sigmoid 输出门调制。(2) CPT 时把全部全注意力层换为 QSA:MQA 索引器(4 个查询头共享 1 个 key 头,128 维中 64 维加部分 RoPE)先把 key 按块大小 $r=4$ 平均池化,块级打分 $I_{ib}=\sum_h \mathrm{ReLU}\langle q_i^h, \bar{k}_b\rangle$(仅对已完整观测的块),选 top-$K_B=\lceil K/r\rceil$ 个块($K=2048$,即最多 512 块)加末尾不完整块;训练分两阶段——先以教师注意力分布(逐头 softmax 求和后 L1 归一化、max-pool 到块级)做 KL 蒸馏仅训索引器 1000 步(lr $10^{-3}$,约 2B token),再联合训练 8000 步(lr $2.5\times10^{-5}$,约 200B token)。(3) GR:$n_r=4$ 条分支各自独立 RMSNorm,从全部分支经低秩瓶颈(秩 $r=d/8$)预测逐元素门 $G$,加权平均得块输入;块输出经每分支标量 $s_i = 2\sigma(\cdot)$ 写回所有分支;残差状态 FP8 存储,读/写各融合为单 kernel。(4) 第 2 层插入 n-gram 嵌入层,主机内存预取与第一层计算重叠。(5) 优化:Muon 用于注意力 q/k/v 与输出投影、GDN 输入输出投影、专家 fc1/fc2,融合的 qkv、fc1 先按头/按半拆分再各自正交化(Newton–Schulz 8 步,Polar Express 系数,$\gamma=0.2\sqrt{\max(A,B)}$);嵌入、输出头、MoE 路由器、GR 低秩投影留在 AdamW;按新缩放定律取 $B=25.2M$ 等更大超参且不做批量预热;以恒定 2×/4× 最优学习率的压力测试验收。

技术新颖性

从新颖性看,本文不是单一技术突破,而是多个已知组件的非平凡重设计,外加一套严苛的评估协议。GDN 来自 Yang et al. 2024,但本文给出大规模“GDN vs SWA vs 全注意力”的同管线对照(Table 1:平均 53.81 vs 51.15 vs 49.87),并把 GDN 输出门从 SiLU 改为有界 sigmoid 取得一致改进。QSA 沿 DSA 的索引器路线,但把打分粒度从 token 压缩到 micro-block 是实质改动:索引成本随序列长度同比例下降,且与 MTP 跨步索引复用兼容(平均接受长度 4.07 vs 4.06 无损);对比 IndexShare 的跨层共享,层内压缩不赌层间索引相似性。GR 属于 HC/mHC/VWN 同族,但“表达力花在读端、删去混合算子”的取舍是新的,且作者用精确的贡献分解(式 36–37)证明加宽的分支确实被用于特定通路——每个 GR 模型都恰好演化出一条承载长程路径的分支(典型跳层 10.9 vs 其余 3.4–3.9),第 0 层 GDN 到第 15 层注意力的输入份额从 0.020 升至 0.138。优化层面,融合参数先拆分再正交化、按正交化 FLOPs 做 α-均衡静态分区(Canzona)、CUDA graph 捕获优化步,是 Muon 规模化落地的工程新贡献。

Qwen3.8-Flash-Next architecture. Token mixing alternates three GDN layers with one QSA layer per block of four. Every sublayer reads and writes through GR, which widens the residual stream and gates the read elementwise. An n-gram embedding layer at Layer 2 scales capacity off the accelerator via host-memory prefetching. The MTP module reuses QSA indices across speculative decoding steps.
Figure 1: Qwen3.8-Flash-Next architecture. Token mixing alternates three GDN layers with one QSA layer per block of four. Every sublayer reads and writes through GR, which widens the residual stream and gates the read elementwise. An n-gram embedding layer at Layer 2 scales capacity off the accelerator via host-memory prefetching. The MTP module reuses QSA indices across speculative decoding steps.
The Gated DeltaNet token mixer. The projected query, key, and value streams pass through short causal convolutions; queries and keys are L2-normalized before the gated delta recurrence. The decay gate αt and write gate βt control the recurrent update, while a sigmoid output gate modulates the zero-centered RMS-normalized output.
Figure 2: The Gated DeltaNet token mixer. The projected query, key, and value streams pass through short causal convolutions; queries and keys are L2-normalized before the gated delta recurrence. The decay gate αt and write gate βt control the recurrent update, while a sigmoid output gate modulates the zero-centered RMS-normalized output.
Overview of Qwen Sparse Attention (QSA). The QSA indexer (left) uses a compressed causal attention mask to score key blocks and select the top-k indices. These indices are expanded into a micro-block sparse attention mask for sparse core attention (right).
Figure 3: Overview of Qwen Sparse Attention (QSA). The QSA indexer (left) uses a compressed causal attention mask to score key blocks and select the top-k indices. These indices are expanded into a micro-block sparse attention mask for sparse core attention (right).
Cross-layer paths added by GR. Each row corresponds to one residual branch; a connection runs from the sublayer that wrote into that branch to a later sublayer that reads it back...
Figure 7: Cross-layer paths added by GR. Each row corresponds to one residual branch; a connection runs from the sublayer that wrote into that branch to a later sublayer that reads it back...

实验结果

核心结果有五组。(1) 最终基座对比(Table 11):125B-A6B + 51B n-gram 的 Flash-Next-Base 在 14 个基准上全面超过 27B 稠密的 Qwen3.8-27B-Base(如 MMLU 90.36 vs 87.51、MATH 72.78 vs 60.54、SuperGPQA 51.36 vs 44.86),并在 8/14 上超过 397B-A17B 的 Qwen3.7-Plus-Base(MMLU-Pro 73.23 vs 70.90、MGSM 89.33 vs 85.42、SWEBench-Pretrain 50.99 vs 49.24),落后项目差距不超过 2.6 分,而激活参数与训练 token 约为 1/3、训练 FLOPs 约 1/9。(2) 架构消融(Table 1,25B-A3B):GDN 混合九基准平均 53.81,优于 SWA 混合 51.15 与全注意力 49.87,9 项中 8 项胜全注意力、7 项胜 SWA。(3) QSA(Table 2/3/4/6):短上下文平均 76.8 vs 全注意力 75.9(8 项中 7 项持平或更优);RULER 在 >512K 段 93.00 vs 90.08,MRCR 512K 40.53 vs 30.66、1M 26.44 vs 20.71;1M 上下文 kernel 级 prefill 提速 7.6×、decode 4.9×;与全注意力的预训练损失差仅 $10^{-4}$ 量级;MTP 平均接受长度 4.07 vs 4.06 无损。(4) 残差(Table 5/6/7 图):GR 平均 54.66、损失 1.590,优于 mHC dynamic 54.47/1.594 与 pre-norm 50.91/1.617;静态加宽已值 1.58 分、动态化再加 1.98 分;生产运行前 276B token 上 GR 降损失 0.026、完整配方共降 0.058。(5) 优化与稳定性:新缩放定律下 $B=25.2M$ 比旧配方省 $7.2\times10^{-3}$ 损失,批量预热无收益且多花 18.8% 优化步;156B-A7B 上预测最优超参平均基准 60.55 vs 旧配方 56.41;压力测试中 4× 学习率下 AdamW 基线每万步 183 次损失尖峰、Muon+GR 零尖峰且不触发裁剪;全量训练零损失尖峰、零梯度异常,无需 qk-clip/SwiGLU-clip。

Architecture comparison. All values are percentages and higher is better.
Table 1: Architecture comparison. All values are percentages and higher is better.
Long-context retrieval performance of Qwen3.8-Flash-Next on RULER and 8-needle MRCR.
Table 3: Long-context retrieval performance of Qwen3.8-Flash-Next on RULER and 8-needle MRCR.
Mean MTP accepted length with full attention and QSA under four-step speculative decoding.
Table 4: Mean MTP accepted length with full attention and QSA under four-step speculative decoding.
Residual read/write ablation on 25B-A3B MoE models trained on 560B tokens.
Table 5: Residual read/write ablation on 25B-A3B MoE models trained on 560B tokens.
Residual designs at 28 layers, with and without GatedNorm (GN).
Table 6: Residual designs at 28 layers, with and without GatedNorm (GN).
Effect of N-gram embedding layer placement. The total number of N-gram embedding parameters is fixed across all settings.
Table 7: Effect of N-gram embedding layer placement. The total number of N-gram embedding parameters is fixed across all settings.
Effect of N-gram vocabulary scaling under a fixed total model parameter budget.
Table 8: Effect of N-gram vocabulary scaling under a fixed total model parameter budget.
Effect of N-gram vocabulary scaling. Vocabulary scales are measured relative to the base tokenizer vocabulary size (250K).
Table 9: Effect of N-gram vocabulary scaling. Vocabulary scales are measured relative to the base tokenizer vocabulary size (250K).
Downstream accuracy of the five learning-rate runs of Fig. 9a, all at the same 419B-token budget on the 48-layer 156B-A7B MoE.
Table 10: Downstream accuracy of the five learning-rate runs of Fig. 9a, all at the same 419B-token budget on the 48-layer 156B-A7B MoE.
Comparison among the base models of Qwen3.8-Flash-Next, Qwen3.8-27B and Qwen3.7-Plus.
Table 11: Comparison among the base models of Qwen3.8-Flash-Next, Qwen3.8-27B and Qwen3.7-Plus.
Training LM loss with and without QSA. Curves are smoothed with a 200-step moving average. The shaded region marks the final stage of continued pretraining, and the inset shows the per-step loss difference between QSA and the full-attention baseline in this region.
Figure 4: Training LM loss with and without QSA. Curves are smoothed with a 200-step moving average. The shaded region marks the final stage of continued pretraining, and the inset shows the per-step loss difference between QSA and the full-attention baseline in this region.
Architecture ablations of QSA on RULER. (a) QSA performance with different micro-block sizes; “Keep x” indicates the number of IndexShare indexer layers retained for computation. (b) Performance with different numbers of indexer query heads after dense distillation and sparse training.
Figure 5: Architecture ablations of QSA on RULER. (a) QSA performance with different micro-block sizes; “Keep x” indicates the number of IndexShare indexer layers retained for computation. (b) Performance with different numbers of indexer query heads after dense distillation and sparse training.
Kernel-level latency of QSA across context lengths during prefill and decode. Panels (a,b) compare indexer latency under different compression ratios, while panels (c,d) compare kernel-level attention latency between dense GQA and QSA, including both the indexer and sparse core attention.
Figure 6: Kernel-level latency of QSA across context lengths during prefill and decode. Panels (a,b) compare indexer latency under different compression ratios, while panels (c,d) compare kernel-level attention latency between dense GQA and QSA, including both the indexer and sparse core attention.
Batch size on a 4T-token budget. Training loss against consumed tokens for a 20-layer 10.8B-A0.89B MoE; each inset resolves the last 50B tokens.
Figure 8: Batch size on a 4T-token budget. Training loss against consumed tokens for a 20-layer 10.8B-A0.89B MoE; each inset resolves the last 50B tokens.
Learning rate at a larger model scale. Five runs of a 48-layer MoE on a 419B-token budget: the predicted optimum (B = 8.4M, η = 1.76×10⁻³), η divided and multiplied by √2, a 25% larger batch with its matched η, and the previous recipe (dashed).
Figure 9: Learning rate at a larger model scale. Five runs of a 48-layer MoE on a 419B-token budget: the predicted optimum (B = 8.4M, η = 1.76×10⁻³), η divided and multiplied by √2, a 25% larger batch with its matched η, and the previous recipe (dashed).
Training loss under stress. The 28-layer 25B-A3B MoE at a constant learning rate: the Qwen3.5 structure under AdamW, the same structure under Muon, and Muon with GR.
Figure 10: Training loss under stress. The 28-layer 25B-A3B MoE at a constant learning rate: the Qwen3.5 structure under AdamW, the same structure under Muon, and Muon with GR.
Gradient norm and activations under stress. The same three runs as Fig. 10 (a). The activation in (b) is averaged over layers.
Figure 11: Gradient norm and activations under stress. The same three runs as Fig. 10 (a). The activation in (b) is averaged over layers.
Isolating the effect of the gate. GatedNorm off and on, with the AdamW optimizer, structure and data order held fixed. (a) and (b) are the pair at 3× the optimal learning rate; bold lines are a moving average over the faint per-step trace. (c) adds the ungated baseline at 1× and 2× the optimal rate.
Figure 12: Isolating the effect of the gate. GatedNorm off and on, with the AdamW optimizer, structure and data order held fixed. (a) and (b) are the pair at 3× the optimal learning rate; bold lines are a moving average over the faint per-step trace. (c) adds the ungated baseline at 1× and 2× the optimal rate.
The early phase of Qwen3.8-Flash-Next, at the shipped learning rate. The first 276B tokens of three runs that share data order, learning-rate schedule, and optimizer: Qwen3.5 with Muon, the same plus the gated residual, and Qwen3.8-Flash-Next.
Figure 13: The early phase of Qwen3.8-Flash-Next, at the shipped learning rate. The first 276B tokens of three runs that share data order, learning-rate schedule, and optimizer: Qwen3.5 with Muon, the same plus the gated residual, and Qwen3.8-Flash-Next.
查看结构化数据
任务指标本文基线提升
14 项预训练基准综合(vs 同代稠密模型) 各基准准确率 Qwen3.8-Flash-Next-Base 14/14 全面领先 Qwen3.8-27B-Base(27B 稠密) MMLU 90.36 vs 87.51,MATH 72.78 vs 60.54,SuperGPQA 51.36 vs 44.86
14 项预训练基准综合(vs 上代旗舰) 领先基准数 / 最大落后幅度 8/14 领先,其余落后 ≤2.6 分 Qwen3.7-Plus-Base(397B-A17B) 以约 1/3 激活参数、1/3 训练 token、约 1/9 训练 FLOPs 达成
token 混合架构消融(25B-A3B) 9 基准平均分 GDN 混合 53.81 全注意力 49.87 / SWA 混合 51.15 +3.94 / +2.66 分
短上下文基准(CPT 后,25B→最终模型管线) 8 基准平均分 w/ QSA 76.8 全注意力 75.9 +0.9 分,8 项中 7 项持平或更优
长上下文检索 RULER >512K 长度段均分 w/ QSA 93.00 全注意力 90.08 +2.92 分
长上下文检索 8-needle MRCR 512K / 1M 准确率 w/ QSA 40.53 / 26.44 全注意力 30.66 / 20.71 +9.87 / +5.73 分
1M 上下文注意力 kernel 延迟 prefill / decode 提速倍数 QSA 7.6× / 4.9× FlashInfer paged GQA(1.0×) 自 64K 起见效且随长度增长扩大
残差结构消融(25B-A3B,560B token) 9 基准平均 / 训练损失 GR 54.66 / 1.590 Pre-norm 50.91 / 1.617;mHC dynamic 54.47 / 1.594 +3.75 分 / −0.027 损失
训练稳定性压力测试(4× 最优学习率恒定) 每万步损失尖峰数 Muon + GR:0 AdamW + Qwen3.5 结构:183 尖峰完全消除,且全程未触发梯度裁剪
学习率配方验证(156B-A7B,419B token) 7 基准平均分 新缩放定律预测最优 60.55 Qwen3.5 旧配方 56.41 +4.14 分,且梯度范数峰值仅达裁剪阈值 28%(旧配方 51%)
批大小验证(10.8B-A0.89B,4T token) 末 20B token 平均损失 B=25.2M:1.5702 旧配方 B=12.6M:1.5774 −7.2×10⁻³;再增大到 37.7M 仅劣化 4.3×10⁻⁴

局限与改进

作者明确承认的局限有三。其一,多个“损失与基准不一致”的案例只能靠大规模评测发现:稀疏残差写入在预训练损失与基准上几乎无损,但后训练后质量明显下降,只好放弃;NoPE 在预训练与 RoPE 无差别,却使后训练后不终止生成比例升高;把每块限制为门控最高的两个分支几乎不影响预训练,却随训练推进退化。作者坦言当前最紧的瓶颈是评测吞吐——缺少能可靠预测后训练排序的廉价中期探针。其二,n-gram 词表增大只让损失单调下降(1.585→1.526),下游多数基准饱和甚至波动,仅中文基准(C-Eval 66.91→74.94)持续受益,说明该容量维度收益不均;固定参数预算下 10× 词表损失最优但下游不升,n-gram 与 MoE 专家的分工尚未被刻画。其三,学习率验证中前四名设置终损差距仅 $7\times10^{-4}$ 且每配置只评一次,作者自己把具体排名归为观测性结论。我自己的观察:QSA 依赖两阶段蒸馏+联合训练的 CPT 流程(约 202B token 额外开销),从零预训练直接用稀疏注意力的可行性未验证;51B n-gram 表驻留主机内存依赖确定性寻址与主机带宽,对部署环境有隐含假设;几乎所有消融在 25B/35B-A3B 规模完成,外推到 125B 靠缩放定律与压力测试间接保证。

独立分析的弱点

独立分析出四个弱点。第一,QSA 的两阶段训练流水线复杂且昂贵:先 1000 步蒸馏(lr $10^{-3}$,每步 8 条 256K 序列)再 8000 步联合训练(lr $2.5\times10^{-5}$,每步 96 条 256K 序列,约 200B token),需要预先有带全注意力的强骨干做教师;改进方向是把蒸馏目标并入常规预训练目标、或让索引器自举,使稀疏注意力可从头训练。第二,GR 的质量与可解释性都依赖“无 $H_{res}$、各分支独立累加”的结构,一旦为压缩访存引入稀疏写或分支混合,机制即失效——文中稀疏写失败发生在后训练阶段才被发现,说明缺少后训练前就能预警的中期探针;改进方向是构建小规模“后训练代理评测”管线,把指令跟随/生成终止等行为纳入常规消融。第三,n-gram 嵌入与 MoE 的容量分工不明:固定预算下 10× 词表损失最优但下游无提升,且作者尝试的词表压缩、非均匀阶分配、按频分区等参数效率策略均无一致收益;改进方向是按知识记忆 vs 推理分别度量两类容量的边际收益,并探索数据分布感知的槽位分配。第四,效率账绑定特定硬件:GR 去 $H_{res}$、FP8 残差、主机内存 n-gram 预取都针对特定内存层级,若部署环境主机带宽受限或 FP8 支持不佳,收益会缩水;改进方向是给出跨硬件成本模型与自适应配置开关。

未来方向

作者在结论中点名的方向是评测吞吐:需要一个“更便宜的中期探针,能可靠预测后训练排序”,让架构设计空间真正可搜索——这可能是比任何单一架构改进杠杆更大的后续工作。基于本文成果可延伸的方向包括:(1) 把 QSA 推广到预训练全程而非仅 CPT 阶段,检验稀疏注意力从零训练的缩放行为与索引器随数据量的进化;(2) 借鉴文中提到的 xHC 用更大分支数 $n_r$ 使稀疏分支更新可行的思路,在控制访存的前提下进一步压缩 GR 残差状态(文中因 $n_r$ 增大的访存代价未深入);(3) 把 GR 的精确贡献分解(式 36–37,各读者份额和为 1、误差 $3\times10^{-8}$)发展为残差网络的常规分析工具,用于指导分支分配与层间信息路由设计;(4) Canzona 的“逻辑优化器指派与物理布局解耦”抽象可推广到其他矩阵优化器,并与 FP8 优化器状态、通信-计算重叠进一步结合;(5) n-gram 嵌入与 MoE 的容量分工值得系统研究——中文基准持续受益暗示了与数据分布相关的记忆效应,可在知识密集场景定向扩展;(6) 稳定性方面,门控重缩放能否在更大规模、更多优化器组合下普遍替代 qk-clip/SwiGLU-clip 等显式裁剪,值得验证。

复现评估

复现难度较高但部分可行。开源情况:FlashQLA 内核库已在 GitHub(QwenLM/FlashQLA)开源并附基准;按 Qwen 惯例模型权重可能后续开源,但本报告未给出训练数据配方与训练代码,数据是最大缺口。算力:完整复现需要万卡级集群——正文验证实验包括 10.8B-A0.89B MoE 训 4T token、156B-A7B MoE 训 419B token(每配置一个 run 共五个)、多组 25B-A3B 级 560B-token 消融,仅超参验证一项就超出学术实验室预算;QSA 的 CPT 阶段每步 96 条 256K 序列共 8000 步,约 200B token。可行的降级路径:(1) 复现 25B-A3B 规模的 GDN/SWA/全注意力对照与 GR/mHC 消融(结论见 Table 1/5,约 400–560B token),多机可承受;(2) QSA 蒸馏+稀疏训练流程可在 35B-A3B 上按文中超参复现并用 RULER 对比(Figure 5 的协议);(3) 压力测试协议(恒定 2×/4× 学习率、统计每万步尖峰数与梯度范数 p99.9)成本极低,是最值得学术圈直接采纳的部分。总体评估:核心定性结论(GDN 优于 SWA、GR 的稳定性增益、门控机制)可在小规模复现,端到端定量结果依赖工业级资源与未公开数据。