---
格式版本: 2
标题: "Qwen3.8-Flash-Next: A New Architecture, Towards Ultimate Cost-Efficiency"
原文链接: "https://www.alibabacloud.com/blog/qwen3-8-flash-next-a-new-architecture-towards-ultimate-cost-efficiency_603501"
发布日期: "2026-08-27"
发布时间校准状态: "found"
发布时间需复核: "否"
发布时间来源: "rule:configured_publication_date_rule"
发布时间证据: "alibaba-cloud-news-publication-date html:original: Alibaba Cloud Community August 27, 2026"
发布时间校准原因: "信源发布日期识别规则直接确认发布时间"
发布时间校准置信度: "high"
发布时间候选数量: 2
发布时间严格候选数量: 2
发布时间原页读取状态: "source template page reused from URL open"
发布时间未找到原因: ""
发布时间校准时间: "2026-08-28T01:11:31+08:00"
发布时间仲裁状态: "skipped"
发布时间仲裁尝试次数: 0
发布时间仲裁耗时毫秒: 0
发现时间: "2026-08-28T01:07:53+08:00"
入库时间: "2026-08-27T17:14:09.703Z"
来源平台: "固定入口"
搜索渠道: "fixed_url"
搜索词: "https://www.alibabacloud.com/blog"
匹配关键词:
  - "GPU"
  - "performance"
  - "latency"
  - "throughput"
  - "AI"
相关厂家:
  - "阿里"
  - "OpenAI"
相关专家:
  []
内容类型: "网页"
抓取工具: "Free Fetch + Defuddle"
清洗工具: "Defuddle Markdown + Defuddle/Readability 正文提取"
原始附件:
  []
AI优质: "否"
AI打分: 54
AI分档: "非优质"
AI质检状态: "不通过"
AI打分理由: "正文主线是Qwen3.8-Flash-Next模型架构、训练优化及API使用，并非机架级AI基础设施。来源为阿里云官方博客，新增QSA、四分支Gated Residual、51B N-gram Embedding、Muon训练方案、1M上下文实测及开放权重和云端定价；固定历史证据仅涉及Qwen3.7，未见这些具体内容，但Top 5不足以证明首次出现。技术数据主要服务模型效率，未形成可独立复用的机架级通信、网络、RAS、供电或液冷机制；云API上线也不是超节点部署信号。命中“应用与模型效率”硬否决项，最高54分。"
AI质检模型: "gpt-5.6-sol"
AI质检时间: "2026-08-28T01:14:22+08:00"
AI主题相关性: 3
AI来源权威性: 14
AI新颖性: 17
AI技术细节: 6
AI商业部署信号: 4
AI完整性: 10
AI评分提示词版本: "v17-精简生产版"
AI评分提示词SHA256: "48fb9777f386026761b4873eaff30807694fb11e9b352d7c69bf2dfde750cc7d"
AI评分知识库版本: "knowledge_base_v1-20260819+runtime.14"
AI评分知识库SHA256: "da252a8e80bb6f67d5d3464dce82a2da6f260de290a9266154c37ce20774eb0b"
AI评分知识库检索词: "[\"阿里\",\"https://www.alibabacloud.com/blog\",\"RAS\",\"NPU\",\"GPU\",\"Qwen3.8-Flash-Next\",\"Qwen4\",\"Qwen3-Next\",\"Qwen3.5\",\"Qwen3.6\",\"Qwen3.7\",\"Qwen3.8\"]"
AI评分知识库命中: "[{\"id\":\"historical-may-072\",\"title\":\"《大行》招商證券：阿里雲自研芯片進展超預期 AI雲收入高增趨勢確定性增強\",\"sourceType\":\"curated_item\",\"time\":\"2026-05\",\"matchedTerms\":[\"阿里\",\"Qwen3.7\"],\"rank\":-8.437743724984852},{\"id\":\"july-correct-0001\",\"title\":\"全球首颗2nm GPU来了！苏姿丰甩出“最强AI机架”，CPU性能干翻英伟达 - 智东西\",\"sourceType\":\"labeled_article\",\"time\":\"2026-07\",\"matchedTerms\":[\"阿里\",\"RAS\",\"NPU\",\"GPU\"],\"rank\":-8.41125144255388},{\"id\":\"historical-may-078\",\"title\":\"《大行》招商證券：阿里雲自研芯片進展超預期 AI雲收入高增趨勢確定性增強財經新聞 Financial News\",\"sourceType\":\"curated_item\",\"time\":\"2026-05\",\"matchedTerms\":[\"阿里\",\"Qwen3.7\"],\"rank\":-8.410056985956242},{\"id\":\"historical-jun-025\",\"title\":\"英伟达、谷歌与国产超节点的三种网络选择\",\"sourceType\":\"curated_item\",\"time\":\"2026-06\",\"matchedTerms\":[\"NPU\",\"GPU\"],\"rank\":-6.80344534600184},{\"id\":\"july-correct-0088\",\"title\":\"StrataCL: Fabric-Native Communication Library for Production Supernodes - 智源社区论文\",\"sourceType\":\"labeled_article\",\"time\":\"2026-07\",\"matchedTerms\":[\"NPU\"],\"rank\":-5.6422272704330485}]"
AI摘要: "阿里云开源 Qwen3.8-Flash-Next，这是一个多模态 MoE 模型，也是 Qwen4 架构的早期预览，采用 GDN+QSA 混合注意力、Gated Residual、N-gram Embedding 和 Muon 优化器。"
AI摘要模型: "ali-deepseek-v4-flash"
AI摘要时间: "2026-08-27T18:59:15.827Z"
采集批次: "2026年8月28日0点58分02秒"
采集批次ID: "20260828-005802-203"
去重键: "https://www.alibabacloud.com/blog/qwen3-8-flash-next-a-new-architecture-towards-ultimate-cost-efficiency_603501"
---

## Introduction

In this release we are opening the weights of **Qwen3.8-Flash-Next**, a multimodal MoE model that also serves as an early preview of the architecture used in **Qwen4**. It plays the same role that [Qwen3-Next](https://qwen.ai/blog?id=qwen3-next) played for Qwen3.5: the hybrid **Gated DeltaNet + Gated Attention** design introduced at that time has since been used across the Qwen3.5, Qwen3.6, Qwen3.7 and Qwen3.8 series. We are again releasing the architectural changes early, so that the community can examine them before the full Qwen4 model family is built on top of them.

Qwen3.8-Flash-Next upgrades the model systematically along four aspects — **attention, residual, embedding and optimization** — improving model capability while further optimizing computational efficiency, model capacity and training stability:

- **Attention**: A **GDN + QSA hybrid architecture**. Gated DeltaNet (GDN) compresses the history efficiently; **Qwen Sparse Attention (QSA)** uses a compressed lightweight indexer to select the important context at micro-block granularity, substantially reducing the cost of attention on long sequences.
- **Residual**: **Gated Residual (GR)** widens the residual stream into 4 branches and controls reads and writes with a dynamic gate, strengthening cross-layer information flow and training stability.
- **Embedding**: **N-gram Embedding** looks up a table using the local context to scale model capacity with very little extra computation; the embedding table can be offloaded to host memory and overlapped with model computation through asynchronous prefetching.
- **Optimization**: The **Muon optimizer** is used, refined around orthogonalization accuracy, the division of labour between Muon and AdamW, and the splitting of fused parameters, with the scaling law refitted for the new architecture.

Qwen3.8-Flash-Next features a **125B** -parameter main model, supplemented by an additional **51B** N-gram embeddings, with **6B** parameters activated per token. Compared with Qwen3.7-Plus, Qwen3.8-Flash-Next substantially reduces both training and inference cost — training takes only about 1/9 as much, yet it delivers superior capabilities in coding and office tasks.

It natively supports **262,144** tokens of context and is extensible to **1,000,000** tokens with YaRN. For more technical details on the architecture, training methodology, and experimental analysis of Qwen3.8-Flash-Next, please refer to the [technical report](https://github.com/QwenLM/Qwen3.8-Flash-Next/blob/main/tech_report.pdf) in our GitHub repository.

Qwen3.8-Flash-Next weights are now available on [Hugging Face](https://huggingface.co/Qwen/Qwen3.8-Flash-Next) and [ModelScope](https://modelscope.cn/models/Qwen/Qwen3.8-Flash-Next). The production version, with 1M context by default and official built-in tools, is served as **Qwen3.8-Flash** on [QwenCloud](https://www.qwencloud.com/models/qwen3.8-flash), **priced at 0.16 USD per million input tokens and 0.47 USD per million output tokens**.

## Performance

### Language

### Vision Language

## Model Architecture

### Attention: GDN + QSA for Efficient Memory and Precise Retrieval

Traditional Full Attention provides direct access to all previous tokens, but as the context grows longer, both computation and KV Cache memory-access costs increase substantially.

Following the architecture design introduced in Qwen3.5, Qwen3.8-Flash-Next adopts a **GDN** **\+ Attention Hybrid architecture**: three out of every four layers use Gated DeltaNet (GDN) to continuously compress historical information into a fixed-size state, while the remaining layer uses global Attention for precise retrieval of information across the full context.

For global Attention, we further introduce **Qwen Sparse Attention (QSA)**. Sparse Attention reduces long-sequence computation by attending only to important context. However, existing approaches such as DSA still rely on a token-level indexer to identify important positions; as the context grows, the indexer itself becomes a non-negligible source of computation.

QSA further compresses this process: a lightweight indexer first aggregates the sequence into **micro-blocks**, estimates context importance at the block level, and then selects the most relevant regions for Attention. This reduces not only the cost of Attention itself, but also the indexing overhead required to identify important context. Compared with approaches that share indices across layers , QSA performs sequence compression independently within each layer, reducing its dependence on cross-layer Attention similarity and making it particularly well suited to Hybrid architectures where GDN and Attention layers are interleaved.

Put simply: **GDN efficiently “remembers,” while QSA precisely “retrieves.”**

At **1M tokens**, QSA’s Attention Kernel achieves up to **7.6×** and **4.9×** speedups in Prefill and Decode, respectively. In an experimental setup representative of online serving scenarios with high cache reuse (a **90% Prefix Cache hit rate**), Qwen3.8-Flash-Next achieves **8.6×** the Prefill throughput of Qwen3.7-Plus at a **1M-token context length**.

### Gated Residual: More Paths for Information Flow

In a traditional Transformer, all layers continuously read from and write to the same Residual Stream. As the network becomes deeper, early features are repeatedly mixed with later information, making important signals more likely to be gradually diluted.

**Gated Residual (GR)** can be viewed as a combination of two ideas: it follows **Hyper-Connection** in widening the residual stream into multiple branches, while incorporating the element-wise dynamic gating of **GatedNorm** into the residual read. The original single residual stream is expanded into four parallel branches, allowing the model to dynamically determine how much information to read from each branch and how much to write back to each branch based on the current content.

This can be conceptualized as expanding a single information channel into multiple parallel pathways: some branches handle local information flow, while others preserve early information directly deep into the network layers. Empirical analysis also reveals that one of these branches naturally emerges as a long-range pathway connecting the first Attention layer to most of the middle and subsequent layers.

GR also further simplifies Hyper-Connection. Once the read and write operations are expressive enough, additional branch mixing yields no significant benefits and can thus be directly removed, thereby reducing memory access overhead and sources of instability. The Gate also effectively suppresses **activation outliers** and improves training stability. In addition, the Residual State supports **FP8** storage, further reducing memory-access overhead.

### N-gram Embedding: Expanding Model Capacity at Low Cost

Inspired by Per-Layer Embedding in Gemma 3n and works such as DeepSeek Engram , we further introduce **N-gram Embedding** to scale model capacity beyond the parameters of the Transformer backbone.

A standard Embedding performs a lookup based on a single token. N-gram Embedding instead performs lookups using the local context formed by the current token and several preceding tokens, providing additional representations for common phrases and local patterns.

Its key advantage is that it **can add a large number of parameters with almost no additional computation per token**.

Qwen3.8-Flash-Next introduces an additional **51B N-gram Embedding parameters**. Because lookup locations can be determined in advance, these parameters can be stored in Host Memory and asynchronously prefetched in parallel with model computation, without permanently occupying GPU memory.

The final model uses only a single N-gram Embedding layer near the beginning of the network, effectively adding a large-scale **“local-pattern memory”** at relatively low additional cost.

### Optimization: Co-designing Architecture and Optimization

Qwen3.8-Flash-Next is trained with the **Muon Optimizer** , with further improvements around three key aspects of applying Muon to large-scale model training: **orthogonalization accuracy, parameter assignment between Muon and AdamW, and splitting fused parameter matrices**.

For parameters that genuinely act as two-dimensional linear maps, such as the main weights in Attention, GDN, and MoE Experts, we use Muon. Embeddings, the MoE Router, and the low-rank parameters in GR continue to use AdamW. For QKV, SwiGLU, and GDN projections that are fused in the implementation, we first split them according to the independent linear transformations they represent, and then perform orthogonalization separately.

For the new architecture and Optimizer, we refit the Scaling Law. The results show that the model can stably use **larger Learning Rates and Batch Sizes**, further improving convergence efficiency and large-scale parallel training throughput.

We also find that **Batch Size Warmup**, a common practice in large-scale model training, is no longer necessary: gradually increasing from a small Batch to the target Batch does not improve the final result, but instead requires **18.8% more optimizer steps**. In the final training Recipe, we therefore start directly with the target Batch Size.

### Other Architecture Optimizations

The remaining components follow the design established in Qwen3-Next and refined through the Qwen3.5–Qwen3.8 series.

- **Ultra-sparse MoE**: With global load balancing , increasing total expert parameters while keeping the number of activated experts fixed steadily reduces training loss. Qwen3.8-Flash-Next therefore uses a large expert pool with a small number of routed experts per token, together with one shared expert.
- **Multi-Token Prediction**: The MTP module is trained with multiple steps, maintaining consistency between training and inference and thereby improving the acceptance rate of speculative decoding in real scenarios, while also enhancing the performance of the backbone. Its full-attention layers are replaced with QSA as well.
- **Training stability**: Zero-centered RMSNorm with weight decay applied to norm weights, the attention output gating mechanism , and normalized MoE router initialization are retained. These designs make small-scale ablations more reliable and help large-scale training run smoothly.

## Base Model Performance

We compare Qwen3.8-Flash-Next-Base with the base models of Qwen3.8-27B and Qwen3.7-Plus.

With 6B activated parameters, Qwen3.8-Flash-Next-Base achieves the best result on 8 of the 14 benchmarks, including MMLU-Pro, SuperGPQA, BBH, GSM8K, EvalPlus, SWEBench-Pretrain, MGSM and MMMLU, and remains close to Qwen3.7-Plus-Base on MMLU, MMLU-Redux, GPQA, MATH and MultiPL-E. The 51B N-gram embedding parameters are deterministically addressed and do not enter the per-token matrix-multiplication budget.

## Develop with Qwen3.8-Flash-Next

Qwen3.8-Flash-Next is available as an open-weight model on [HuggingFace](https://huggingface.co/collections/Qwen/qwen38-flash-next) and [ModelScope](https://www.modelscope.cn/collections/Qwen/Qwen38-Flash-Next), with official managed APIs on [QwenCloud](https://www.qwencloud.com/models/qwen3.8-flash). Designed to balance capability, latency, and cost, it is well suited for high-volume applications, tool-driven workflows, and coding & coworking assistants. In the following, you can explore how to call the QwenCloud API and integrate Qwen3.8-Flash-Next into agentic systems and coding assistants.

### API Usage

Qwen3.8-Flash-Next is available via API:

#### QwenCloud

On [QwenCloud](https://www.qwencloud.com/), the model is served under the name [qwen3.8-flash](https://www.qwencloud.com/models/qwen3.8-flash). QwenCloud supports industry-standard protocols, including OpenAI-compatible Chat Completions and Responses APIs, alongside an Anthropic-compatible interface.

```
"""
Environment variables:
  DASHSCOPE_API_KEY: Your API Key from https://home.qwencloud.com/
  DASHSCOPE_BASE_URL: (optional) Base URL for compatible-mode API.
    - Beijing: https://dashscope.aliyuncs.com/compatible-mode/v1
    - Singapore: https://dashscope-intl.aliyuncs.com/compatible-mode/v1
    - US (Virginia): https://dashscope-us.aliyuncs.com/compatible-mode/v1
"""
from openai import OpenAI
import os

api_key = os.environ.get("DASHSCOPE_API_KEY")
if not api_key:
    raise ValueError(
        "DASHSCOPE_API_KEY is required. "
        "Set it via: export DASHSCOPE_API_KEY='your-api-key'"
    )

client = OpenAI(
    api_key=api_key,
    base_url=os.environ.get(
        "DASHSCOPE_BASE_URL",
        "https://dashscope-intl.aliyuncs.com/compatible-mode/v1",
    ),
)

messages = [{"role": "user", "content": "Write a Python function to merge two sorted linked lists."}]

completion = client.chat.completions.create(
    model="qwen3.8-flash",
    messages=messages,
    extra_body={
        "enable_thinking": True,
        # "preserve_thinking": True,
    },
    reasoning_effort="xhigh",  # supported levels are xhigh, medium, and low
    stream=True,
)

reasoning_content = ""
answer_content = ""
is_answering = False
print("\n" + "=" * 20 + "Reasoning" + "=" * 20 + "\n")

for chunk in completion:
    if not chunk.choices:
        print("\nUsage:")
        print(chunk.usage)
        continue

    delta = chunk.choices[0].delta

    if hasattr(delta, "reasoning_content") and delta.reasoning_content is not None:
        if not is_answering:
            print(delta.reasoning_content, end="", flush=True)
        reasoning_content += delta.reasoning_content

    if hasattr(delta, "content") and delta.content:
        if not is_answering:
            print("\n" + "=" * 20 + "Answer" + "=" * 20 + "\n")
            is_answering = True
        print(delta.content, end="", flush=True)
        answer_content += delta.content
```

### Agent Frameworks & Coding Assistants

Qwen3.8-Flash-Next integrates seamlessly with popular agent frameworks and coding assistants:

#### QwenWork (Coming Soon)

[QwenWork](https://qwenwork.ai/) is Alibaba’s flagship AI productivity platform, designed to help individuals and enterprises automate daily tasks and accelerate operational efficiency.

We are excited to share that QwenWork has integrated **Qwen3.8-Flash-Next** to power its newly launched “Standard” mode, leveraging the model’s cutting-edge capabilities to deliver a seamless, cost-effective experience that sets a new standard for AI agents in the workplace.

Learn more in the [official documentation](https://docs.qwenwork.ai/product-introduction)!

#### Claude Code

Qwen APIs support the Anthropic API protocol, enabling direct use with **Claude Code**:

```
npm install -g @anthropic-ai/claude-code

export ANTHROPIC_MODEL="qwen3.8-flash"
export ANTHROPIC_SMALL_FAST_MODEL="qwen3.8-flash"
export ANTHROPIC_BASE_URL=https://dashscope-intl.aliyuncs.com/apps/anthropic
export ANTHROPIC_AUTH_TOKEN=<your_api_key>

claude
```

#### Codex

Qwen APIs support the OpenAI Responses protocol, enabling use with **Codex**:

In `~/.codex/model-catalog.local.json`

```
{
  "models": [
    {
      "slug": "qwen3.8-flash",
      "display_name": "qwen3.8-flash",
      "description": "QwenCloud: Qwen3.8-Flash",
      "default_reasoning_level": "xhigh",
      "supported_reasoning_levels": [
        {
          "effort": "low",
          "description": "Fast responses with lighter reasoning"
        },
        {
          "effort": "medium",
          "description": "Greater reasoning depth for complex problems"
        },
        {
          "effort": "xhigh",
          "description": "Extra high reasoning depth for complex problems"
        }
      ],
      "context_window": 1000000,
      "effective_context_window_percent": 95,
      "supports_parallel_tool_calls": true,
      "supports_image_detail_original": true,
      "input_modalities": ["text", "image"],
      "shell_type": "default",
      "visibility": "list",
      "supported_in_api": true,
      "priority": 1,
      "base_instructions": "",
      "support_verbosity": false,
      "supports_reasoning_summaries": false,
      "experimental_supported_tools": [],
      "truncation_policy": {
        "mode": "bytes",
        "limit": 10000
      }
    }
  ]
}
```

In `~/.codex/config.toml`

```
model_catalog_json = "~/.codex/model-catalog.local.json"

model_provider = "QwenCloud"
model = "qwen3.8-flash"

[model_providers.QwenCloud]
name = "QwenCloud"
base_url = "https://dashscope-intl.aliyuncs.com/compatible-mode/v1"
env_key = "OPENAI_API_KEY"
wire_api = "responses"
```
```
npm install -g @openai/codex

export OPENAI_API_KEY=<your_api_key>

codex
```

#### Qoder CLI

[Qoder](https://qoder.com/) co-evolves with Qwen for agentic coding:

```
curl -fsSL https://qoder.com/install | bash

qoder
```

#### Qwen Code

[Qwen Code](https://qwen.ai/qwencode) is deeply optimized for the Qwen series:

```
npm install -g @qwen-code/qwen-code@latest

qwen
```

#### OpenClaw

Connect to [OpenClaw](https://openclaw.ai/) via [QwenCloud](https://docs.qwencloud.com/developer-guides/clients-and-developer-tools/openclaw):

```
curl -fsSL https://openclaw.ai/install.sh | bash

export DASHSCOPE_API_KEY=<your_api_key>

openclaw dashboard
```

Configure `~/.openclaw/openclaw.json`:

```
{
  "models": {
    "mode": "merge",
    "providers": {
      "qwencloud": {
        "baseUrl": "https://dashscope-intl.aliyuncs.com/compatible-mode/v1",
        "apiKey": "DASHSCOPE_API_KEY",
        "api": "openai-completions",
        "models": [
          {
            "id": "qwen3.8-flash",
            "name": "qwen3.8-flash",
            "reasoning": true,
            "input": ["text", "image"],
            "contextWindow": 1000000,
            "maxTokens": 65536
          }
        ]
      }
    }
  },
  "agents": {
    "defaults": {
      "model": {
        "primary": "qwencloud/qwen3.8-flash"
      }
    }
  }
}
```

## Summary

Qwen3.8-Flash-Next extends the hybrid architecture introduced in Qwen3-Next along four directions: attention, residual, embedding and optimization. QSA compresses the sequence into micro-blocks within each layer, reducing both the attention cost and the indexing cost at long context while keeping precise retrieval. Gated Residual widens the residual stream into several parallel branches and controls reads and writes with an elementwise, data-dependent gate, improving cross-layer information flow and training stability at negligible arithmetic cost; the residual state can additionally be kept in FP8, which further reduces memory traffic. N-gram embedding scales capacity through deterministically addressed lookup memory, which can be scaled with negligible per-token computation and offloaded to host memory. On the optimization side, Muon is used as the main optimizer, with orthogonalization accuracy, parameter assignment and fused-matrix splitting as the decisive implementation choices, and the scaling law refitted for the new architecture.

We release these weights early so that the architecture can be evaluated independently by the community, as we did with Qwen3-Next, and we will continue to refine it towards Qwen4.

## Citation

```
@techreport{qwen2026design,
    title       = {On the Design of {Qwen3.8-Next} Architecture: Evaluation, Efficiency, and Training Stability},
    author      = {{Qwen Team}},
    institution = {Alibaba Group},
    month       = {August},
    year        = {2026}
}

@misc{qwen3.8flashnext,
    title  = {{Qwen3.8-Flash-Next}: A New Architecture, Towards Ultimate Cost-Efficiency},
    author = {{Qwen Team}},
    month  = {August},
    year   = {2026},
    url    = {https://qwen.ai/blog?id=qwen3.8-flash-next}
}
```

## References

\[1\] Gated Delta Networks: Improving Mamba2 with Delta Rule

\[2\] DeepSeek-V3.2: Pushing the Frontier of Open Large Language Models

\[3\] IndexCache: Accelerating Sparse Attention via Cross-Layer Index Reuse

\[4\] Hyper-Connections

\[5\] A Unified View of Attention and Residual Sinks: Outlier-Driven Rescaling is Essential for Transformer Training

\[6\] Conditional Memory via Scalable Lookup: A New Axis of Sparsity for Large Language Models

\[7\] Muon: An Optimizer for Hidden Layers in Neural Networks

\[8\] Demons in the Detail: On Implementing Load Balancing Loss for Training Specialized Mixture-of-Expert Models

\[9\] Gated Attention for Large Language Models: Non-linearity, Sparsity, and Attention-Sink-Free
