TL;DR
The Qwen Team introduces Qwen3.8-Flash-Next, a 125B sparse Mixture-of-Experts (MoE) model that matches or exceeds the performance of its massive 397B predecessor while using only 1/3 of the activated parameters and roughly 1/9 of the training FLOPs. This massive efficiency leap is achieved by co-designing a hybrid token-mixing architecture, a widened gated residual stream, off-accelerator $n$-gram embeddings, and the hardware-efficient Muon optimizer.
What Problem Does This Paper Address?
As large language models (LLMs) scale to hundreds of billions of parameters, the computational cost of training and inference becomes unsustainable. Standard Transformers suffer from quadratic complexity with sequence length due to global self-attention, and traditional residual streams can bottleneck information flow.
Furthermore, architectural changes are rarely isolated; a tweak that improves downstream accuracy might destabilize training at scale or drastically slow down inference. The authors address this multi-dimensional challenge by treating loss, downstream benchmarks, efficiency, and training stability as a single, coupled design problem.
Methods
The Qwen3.8-Flash-Next architecture departs from the standard Transformer design through four key components:
- GDN Hybrid Token Mixing: The model alternates three Gated DeltaNet (GDN) layers—a linear attention mechanism acting as a fast-weight memory—with one global attention layer per block of four.
- Qwen Sparse Attention (QSA): During continued pre-training, the global attention layers are replaced by QSA. QSA utilizes a compressed lightweight indexer that scores context at a micro-block granularity, reducing the indexing overhead from $O(n^2)$ to $O(n^2/r)$, where $r$ is the compression ratio.
- Gated Residual (GR): The residual stream is widened to four parallel branches. Instead of standard addition, the model reads from these branches using an elementwise sigmoid gate (GatedNorm) and writes via data-dependent scalars, completely removing the costly branch-mixing operator $H_{res}$ to save memory traffic. The residual states are stored in FP8 format.
- Off-Accelerator $n$-gram Embeddings: To scale parameter capacity without increasing per-token FLOPs, a 51B parameter $n$-gram embedding table is placed at Layer 2. These tables are hosted in CPU memory and prefetched asynchronously to overlap with the computation of the first layer.
Optimization: The model is trained using the matrix-based Muon optimizer for 2D linear weights, while embeddings, routers, and low-rank projections stick to AdamW.
Datasets
The model was evaluated across 14 pre-training and downstream benchmarks spanning multiple capabilities:
- General Knowledge & Reasoning: MMLU, MMLU-Pro, MMLU-Redux, BBH, SuperGPQA.
- Math & STEM: GPQA, GSM8K, MATH.
- Coding: EvalPlus (HumanEval, MBPP, HumanEval+, MBPP+), MultiPL-E, SWEBench-Pretrain.
- Multilingual: MGSM, MMMLU, INCLUDE.
- Long-Context Retrieval: RULER and 8-needle MRCR.
Key Insights and Ideas
- Loss and Accuracy Disagreement: A lower pre-training loss does not always guarantee better downstream performance. For instance, expanding the $n$-gram vocabulary monotonically decreases training loss, but downstream accuracy quickly saturates. Conversely, dynamic residual gating yields minimal loss reduction but provides substantial benchmark gains.
- The Gated Residual as a Stabilizer: Widening the residual stream and applying an elementwise gate provides an implicit rescaling mechanism. This allows the model to tolerate much higher learning rates and eliminates the need for explicit clipping techniques like
qk-clip. - Rethinking Batch-Size Warmup: While traditional training recipes slowly ramp up the batch size to maintain stability, the authors found that the Muon optimizer preserves data efficiency at large batch sizes from the very beginning. Skipping batch-size warmup saved them 18.8% more optimizer steps without sacrificing stability.
- Intra-Layer vs. Cross-Layer Compression: For hybrid architectures, compressing sequences within a layer (as QSA does) outperforms sharing sparse indices across different layers (like IndexShare), because cross-layer token similarity is surprisingly low.
Key Results
Downstream Performance
Qwen3.8-Flash-Next-Base consistently outperforms the dense Qwen3.8-27B-Base. More impressively, it beats the much larger Qwen3.7-Plus-Base flagship on 8 out of 14 benchmarks, despite using a fraction of the compute budget.
Efficiency Gains
- Inference Speedups: Thanks to QSA's micro-block compression, the attention module achieves a 7.6× speedup in prefill and a 4.9× speedup in decode at a 1M context length compared to dense Grouped-Query Attention (GQA).
- Kernel Optimization: The custom FlashQLA kernel library delivers a 2–3× forward and ~2× backward speedup over standard Triton linear-attention baselines.
Long-Context Retrieval
As shown in the evaluation metrics, QSA maintains high retrieval accuracy even as context lengths scale up to 1M tokens, outperforming full attention at extreme lengths.
Limitations and Future Work
The authors note that the primary bottleneck in modern architectural exploration is evaluation throughput. While pre-training metrics can be tracked easily, late-stage post-training degradation (such as the endless generation loops observed when removing position embeddings) is hard to catch early. The team emphasizes the need for a cheaper, mid-scale probe that can reliably predict post-training performance to accelerate future architecture design.
Summary updated