Skip to content
AI.info

Research

On the Design of Qwen3.8-Next Architecture: Evaluation, Efficiency, and Training Stability

Overview Research area: Natural Language Processing / large language model architecture design, specifically sparse mixture-of-experts (MoE) transformers, efficient attention, residual-stream design,

On the Design of Qwen3.8-Next Architecture: Evaluation, Efficiency, and Training Stability
arXiv
2608.30320
Published
2026-08-31
Authors
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

AI summary

Overview

  • Research area: Natural Language Processing / large language model architecture design, specifically sparse mixture-of-experts (MoE) transformers, efficient attention, residual-stream design, optimizers, and training stability.
  • Technical level: Advanced. The paper assumes familiarity with MoE routing, linear attention, delta rules, KV caching, orthogonalized optimizers (Muon), and hyperparameter scaling laws.
  • Scope: A joint design and ablation report for the Qwen3.8-Flash-Next architecture, evaluating every candidate change simultaneously along three axes: loss and downstream benchmarks, training/prefill/decode cost, and training stability plus optimal hyperparameters.

What This Paper Is About

The authors want a smaller, cheaper language model that matches the capability of their previous 397B-A17B flagship. They design Qwen3.8-Flash-Next — a sparse MoE model with 125B total parameters, 6B activated per token, and an additional 51B parameters of n-gram embedding tables stored off the accelerator — and evaluate each architectural decision not just by loss or accuracy, but also by its compute cost and its effect on training stability. The central claim is that loss, benchmarks, efficiency and stability form a single design problem, and that solving them jointly yields a recipe that is simultaneously more efficient, more capable and more stable.

Key Contributions

  1. A four-component architecture. Token mixing via a layer-wise hybrid of Gated DeltaNet (GDN) and global attention with one full-attention layer in every four; Gated Residual (GR), which widens the residual stream to four branches read through an elementwise gate; a Qwen Sparse Attention (QSA) replacement for the full-attention layers at continued-pretraining time; and a single n-gram embedding layer whose tables are prefetched from host memory.
  2. A three-axis evaluation protocol. Every candidate change is measured on (a) loss together with downstream benchmarks, (b) training, prefill and decode cost, and (c) its effect on optimal hyperparameters and training stability. The paper explicitly reports where the three axes disagree.
  3. QSA, a micro-block sparse attention with a compressed indexer. Rather than token-level sparse masking, QSA scores context at micro-block granularity with an MQA indexer that has four query heads and one shared key head, reducing indexer cost from O(n²) to O(n²/r).
  4. An optimizer and scaling-law refit. Muon is applied selectively to two-dimensional weights acting as linear maps, with the data-parallel gradient buffer repartitioned by estimated orthogonalization cost and the step captured in a CUDA graph; the scaling law from the Qwen3.5 series is refit, predicting a larger batch size and learning rate, both of which are separately verified.

Main Findings

  • Capability at reduced budget. On fourteen pre-training benchmarks spanning knowledge, STEM, reasoning, coding and multilingual ability, Qwen3.8-Flash-Next leads the 397B-A17B predecessor on eight and trails on the remaining six by at most 2.6 points, at roughly one third the activated parameters, one third the training tokens, and about one ninth the training FLOPs.
  • Loss and benchmarks disagree in both directions. Enlarging the n-gram vocabulary lowers loss monotonically while downstream accuracy saturates, and under a fixed parameter budget the loss optimum diverges from the accuracy optimum. Conversely, predicting the residual read and write weights from the residual state yields only a marginal loss reduction but a clear benchmark gain: 1.98 points from static to dynamic against 1.58 from the pre-norm baseline to static.
  • GDN hybrid beats both baselines in the token-mixing ablation. In Table 1, the GDN hybrid reaches an average of 53.81 across nine benchmarks, versus 51.15 for the SWA hybrid and 49.87 for full attention. It improves over the full-attention Transformer on eight of nine benchmarks and exceeds the SWA hybrid on seven, achieving the best result on seven benchmarks. The SWA hybrid is marginally higher on MMLU (66.30 vs 66.26) and stronger on EvalPlus (52.12 vs 49.71).
  • Late-emerging effects invisible at pre-training time. Restricting each block to the two highest-gated residual branches is almost free in pre-training loss yet degrades with further training. Removing positional encoding from the full-attention layers is indistinguishable during pre-training, but the NoPE variant shows a substantially higher rate of endless generation after post-training, making it more likely to fail to terminate.
  • QSA preserves general capability. Across knowledge, STEM, reasoning, multilingual and coding benchmarks, QSA matches or outperforms the full-attention baseline on seven of eight benchmarks, improving the average from 75.9 to 76.8. In the Stage 2 sparse training run, the LM-loss difference from full attention is on the order of 10⁻⁴.
  • QSA improves long-context retrieval. On RULER, QSA scores 93.00 versus 90.08 for full attention beyond 512K, and 98.95 versus 97.65 in the 256–512K range. On 8-needle MRCR, QSA scores 40.53 versus 30.66 at 512K and 26.44 versus 20.71 at 1M. Macro-average across the two benchmarks rises from 78.76 to 80.93.
  • QSA does not hurt speculative decoding. Mean MTP accepted length under four-step speculative decoding stays essentially unchanged (4.07 with QSA versus 4.06 for full attention).
  • Intra-layer compression beats cross-layer sharing in a hybrid. At 35B-A3B scale, QSA matches the full-attention baseline at a relative indexer latency of 0.25, whereas the training-aware IndexShare baseline remains below the baseline at 0.5 as measured on RULER.
  • Kernel-level efficiency. FlashQLA achieves a 2–3× forward and roughly 2× backward speedup over the FLA Triton kernel. At a context length of 1M, QSA is 7.6× faster than dense attention in prefill and 4.9× faster in decode at the kernel level, with speedups appearing from a context length of 64K.
  • Widening the residual stream is nearly free in compute. The simplified widened variant adds n_r parameters per block and no matrix multiplication, lowering the training loss of a 25B-A3B MoE trained on 400B tokens by roughly 0.01. In Table 5, the static mHC variant reaches a loss of 1.596 versus 1.617 for pre-norm, with MMLU 64.62 versus 64.29 and MMLU-Pro 43.69 versus 38.40.
  • Design rules from the residual ablation. Sigmoid gates beat tanh in both loss and stability; read granularity (one weight per branch and channel) matters more than write granularity (which stays a per-branch scalar); predicting operators from all branches, with a group RMSNorm over the widened stream, is best; and the n_r × n_r mixing operator H_res adds little once read and write are expressive enough.
  • Hyperparameter shift. The new architecture and optimizer shift the optimal learning rate and batch size upwards. Ramping the batch size over early training ends no better than starting at the target and costs 18.8% more optimizer steps, so it is not used.
  • Stability. Under stress tests that raise the learning rate or hold it constant, the new recipe is required to be at least as stable as the generation it replaces under equal stress. At four times the optimal learning rate, the previous structure spikes frequently whereas the new recipe remains stable throughout. Isolating the gate in GR on a single-variable pair confirms it as a key contributor to the stability margin over the Qwen3.5 architecture. Full-scale training proceeded without a single loss spike or anomalous gradient-norm fluctuation, without qk-clip or SwiGLU-clip.
  • Two-stage QSA training. Stage 1 dense distillation trains only the indexer for 1,000 steps at a learning rate of 1×10⁻³, with 8 sequences of 256K tokens per step, amounting to approximately 2B training tokens. Stage 2 sparse training jointly trains the backbone and indexer for 8,000 steps at 2.5×10⁻⁵, with 96 sequences of 256K tokens per step, totaling roughly 200B training tokens.

Methodology in Plain English

The authors treat architecture design as a multi-objective problem rather than a search for the lowest loss. They take a candidate change — say, swapping sliding-window attention for Gated DeltaNet — and measure three things: how it scores on downstream benchmarks, what it costs to train and to serve, and whether it makes hyperparameters harder to tune or training less stable.

For token mixing they combine two mechanisms. Gated DeltaNet compresses everything the model has seen into a fixed-size state at linear cost, updating that state with a decay gate and a "delta" write that erases the old association for a key before writing the new value. Because a finite state cannot exactly reproduce direct lookup, they keep one ordinary full-attention layer in every four layers. At continued-pretraining time they replace those full-attention layers with Qwen Sparse Attention, which groups keys into blocks of r tokens, compresses them by average pooling, and uses a small multi-query indexer to pick only the highest-scoring blocks for each query. The indexer is first distilled from the dense attention distribution (Stage 1) and then trained jointly with the backbone under the sparse pattern (Stage 2).

For the residual path they widen the single residual vector into four parallel branches and read them through a data-dependent gate, so the network can decide how much of the widened capacity to use — and the gate also supplies the rescaling that keeps training stable. Extra capacity is added outside the backbone by an n-gram embedding layer whose tables sit in host memory and are prefetched, so parameter count grows without meaningfully increasing per-token FLOPs or latency.

For optimization they use Muon on the two-dimensional weight matrices that act as linear maps, splitting fused parameters before orthogonalization because orthogonalizing a concatenated matrix mixes singular directions across unrelated sub-blocks. Embeddings, the output head, the MoE router and the low-rank projections of GR stay on AdamW. They then refit the scaling law to find the new optimal batch size and learning rate, and verify both predictions separately. Stability is checked with stress tests that deliberately raise or fix the learning rate to reproduce large-scale instabilities at moderate model scale.

Why This Matters

  • Design methodology. The paper makes the case that loss alone is a misleading selection signal, showing concrete cases where the loss and accuracy rankings reverse and where a change looks free early in training but degrades later. This argues for evaluating architectural changes on capability, cost and stability together.
  • Efficiency research. It reports a competitive model at roughly one third the activated parameters, one third the training tokens and about one ninth the training FLOPs of a 397B-A17B predecessor, alongside kernel-level speedups (2–3× forward and roughly 2× backward for FlashQLA; 7.6× prefill and 4.9× decode over dense attention at 1M context).
  • Stability engineering. Demonstrating full-scale training with no loss spike and no gradient-norm anomaly while avoiding explicit clipping methods such as qk-clip or SwiGLU-clip is a concrete, practical result for anyone running large training jobs.

Real-world applications:

  • Long-document analysis: QSA's RULER and MRCR results at 512K to 1M context support retrieval over very long inputs, with QSA scoring 93.00 on RULER beyond 512K and 26.44 on 1M MRCR.
  • Cost-sensitive inference serving: the 6B activated parameters per token and the off-accelerator 51B n-gram tables target deployment where accelerator memory and per-token FLOPs dominate cost.
  • Speculative decoding systems: reuse of QSA top-k indices across MTP steps keeps mean accepted length at 4.07 versus 4.06 under four-step speculative decoding, so long-context sparsity can be combined with draft-model acceleration.
  • Multilingual and coding assistants: the evaluation suite includes MMMLU (81.1 with QSA versus 81.8 for full attention), EvalPlus (72.3 versus 70.8) and MultiPL-E (79.8 versus 78.4).

Industry relevance: the paper describes engineering details that matter for production — repartitioning the data-parallel gradient buffer by estimated orthogonalization cost, capturing the Muon step in a CUDA graph, a fused QSA kernel that computes sparse attention outputs and the KL loss without materializing intermediates, and FP8 storage of the residual state to reduce decode memory traffic.

Future Directions

  • Explaining the loss–accuracy divergence. The paper documents that enlarging the n-gram vocabulary lowers loss monotonically while downstream accuracy saturates, and that under a fixed parameter budget the loss optimum diverges from the accuracy optimum, but the content provided does not report an explanation. Understanding when and why these signals decouple is an open question.
  • Earlier detection of late-emerging failures. Two failure modes appear only after further training or after post-training: pruning to the two highest-gated residual branches, and removing positional encoding from the full-attention layers (which raises the rate of endless generation). Screening procedures that surface these effects at pre-training scale would be a natural next step.
  • Pushing sparse attention further. The QSA ablation at 35B-A3B scale compares compression ratios and indexer head counts and settles on four query heads, and observes that QSA matches the full-attention baseline at a relative indexer latency of 0.25 while IndexShare remains below baseline at 0.5. Whether more

Authors’ abstract

We describe the architecture and ablations of Qwen3.8-Flash-Next, a sparse mixture-of-experts model with 125B parameters, 6B activated per token, and additional 51B parameters of n-gram embedding tables held off the accelerator. On fourteen pre-training benchmarks the model leads the 397B-A17B predecessor on eight and trails it on the rest by at most 2.6 points, at 1/3 the activated parameters, 1/3 the training tokens, and roughly 1/9 the training FLOPs. Token mixing uses a layer-wise hybrid of Gated DeltaNet (GDN) and global attention, with one full-attention layer in every four; at continued-pretraining time those full-attention layers are replaced by Qwen Sparse Attention (QSA), which scores context at micro-block granularity with a compressed lightweight indexer. The residual stream is widened to four branches and read through an elementwise gate, a design we call the Gated Residual (GR). Capacity is added outside the backbone by a single n-gram embedding layer whose tables are prefetched from host memory. We evaluate every candidate change along three axes: loss together with downstream benchmarks; the cost of the change in training, prefill and decode; and its effect on the optimal hyperparameters and training stability. Loss and downstream accuracy do not always move together: enlarging the n-gram vocabulary lowers loss monotonically while downstream accuracy saturates. The architecture and the Muon optimizer together shift the optimal learning rate and batch size upwards, render batch-size warmup unnecessary, and substantially improve stability under stress tests. Loss, benchmarks, efficiency and stability form one design problem. Solved jointly, they yield a recipe that is simultaneously more efficient, more capable and more stable.

Read the original paper