{"id":227,"date":"2026-09-04T11:12:58","date_gmt":"2026-09-04T03:12:58","guid":{"rendered":"http:\/\/47.236.250.150\/?p=227"},"modified":"2026-09-04T20:59:41","modified_gmt":"2026-09-04T12:59:41","slug":"qwen3-8-flash-next-a-new-architecture-towards-ultimate-cost-efficiency","status":"publish","type":"post","link":"https:\/\/tongyi.ai\/?p=227","title":{"rendered":"Qwen3.8-Flash-Next: A New Architecture, Towards Ultimate Cost-Efficiency"},"content":{"rendered":"\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/qianwen-res.oss-accelerate.aliyuncs.com\/Qwen3.8-Flash-Next\/Qwen3.8-flash_banner_en.jpg#center\" alt=\"Qwen3.8-Flash-Next\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In this release we are opening the weights of&nbsp;<strong>Qwen3.8-Flash-Next<\/strong>, a multimodal MoE model that also serves as an early preview of the architecture used in&nbsp;<strong>Qwen4<\/strong>. It plays the same role that&nbsp;<a href=\"https:\/\/qwen.ai\/blog?id=qwen3-next\">Qwen3-Next<\/a>&nbsp;played for Qwen3.5: the hybrid&nbsp;<strong>Gated DeltaNet + Gated Attention<\/strong>&nbsp;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.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Qwen3.8-Flash-Next upgrades the model systematically along four aspects \u2014&nbsp;<strong>attention, residual, embedding and optimization<\/strong>&nbsp;\u2014 improving model capability while further optimizing computational efficiency, model capacity and training stability:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Attention<\/strong>: A&nbsp;<strong>GDN + QSA hybrid architecture<\/strong>. Gated DeltaNet (GDN) compresses the history efficiently;&nbsp;<strong>Qwen Sparse Attention (QSA)<\/strong>&nbsp;uses a compressed lightweight indexer to select the important context at micro-block granularity, substantially reducing the cost of attention on long sequences.<\/li>\n\n\n\n<li><strong>Residual<\/strong>:&nbsp;<strong>Gated Residual (GR)<\/strong>&nbsp;widens the residual stream into 4 branches and controls reads and writes with a dynamic gate, strengthening cross-layer information flow and training stability.<\/li>\n\n\n\n<li><strong>Embedding<\/strong>:&nbsp;<strong>N-gram Embedding<\/strong>&nbsp;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.<\/li>\n\n\n\n<li><strong>Optimization<\/strong>: The&nbsp;<strong>Muon optimizer<\/strong>&nbsp;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.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Qwen3.8-Flash-Next features a&nbsp;<strong>125B<\/strong>-parameter main model, supplemented by an additional&nbsp;<strong>51B<\/strong>&nbsp;N-gram embeddings, with&nbsp;<strong>6B<\/strong>&nbsp;parameters activated per token. Compared with Qwen3.7-Plus, Qwen3.8-Flash-Next substantially reduces both training and inference cost \u2014 training takes only about 1\/9 as much, yet it delivers superior capabilities in coding and office tasks.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It natively supports&nbsp;<strong>262,144<\/strong>&nbsp;tokens of context and is extensible to&nbsp;<strong>1,000,000<\/strong>&nbsp;tokens with YaRN. For more technical details on the architecture, training methodology, and experimental analysis of Qwen3.8-Flash-Next, please refer to the&nbsp;<a href=\"https:\/\/github.com\/QwenLM\/Qwen3.8-Flash-Next\/blob\/main\/tech_report.pdf\">technical report<\/a>&nbsp;in our GitHub repository.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Qwen3.8-Flash-Next weights are now available on&nbsp;<a href=\"https:\/\/huggingface.co\/Qwen\/Qwen3.8-Flash-Next\">Hugging Face<\/a>&nbsp;and&nbsp;<a href=\"https:\/\/modelscope.cn\/models\/Qwen\/Qwen3.8-Flash-Next\">ModelScope<\/a>. The production version, with 1M context by default and official built-in tools, is served as&nbsp;<strong>Qwen3.8-Flash<\/strong>&nbsp;on&nbsp;<a href=\"https:\/\/www.qwencloud.com\/models\/qwen3.8-flash\">QwenCloud<\/a>,&nbsp;<strong>priced at 0.15 USD per million input tokens and 0.47 USD per million output tokens<\/strong>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Performance<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Language<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th class=\"has-text-align-left\" data-align=\"left\"><\/th><th class=\"has-text-align-center\" data-align=\"center\">Qwen3.8-Flash-Next<\/th><th class=\"has-text-align-center\" data-align=\"center\">Qwen3.8-27B<\/th><th class=\"has-text-align-center\" data-align=\"center\">Qwen3.7-Plus<\/th><th class=\"has-text-align-center\" data-align=\"center\">DeepSeek-V4-Flash-0731<\/th><th class=\"has-text-align-center\" data-align=\"center\">Claude-Opus-4.6 (Max)<\/th><\/tr><\/thead><tbody><tr><td class=\"has-text-align-left\" data-align=\"left\"># Params<\/td><td class=\"has-text-align-center\" data-align=\"center\">125B<\/td><td class=\"has-text-align-center\" data-align=\"center\">27B<\/td><td class=\"has-text-align-center\" data-align=\"center\">397B<\/td><td class=\"has-text-align-center\" data-align=\"center\">284B<\/td><td class=\"has-text-align-center\" data-align=\"center\">&#8212;<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\"># Activated params<\/td><td class=\"has-text-align-center\" data-align=\"center\">6B<\/td><td class=\"has-text-align-center\" data-align=\"center\">27B<\/td><td class=\"has-text-align-center\" data-align=\"center\">17B<\/td><td class=\"has-text-align-center\" data-align=\"center\">13B<\/td><td class=\"has-text-align-center\" data-align=\"center\">&#8212;<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\"># N-gram embedding params<\/td><td class=\"has-text-align-center\" data-align=\"center\">51B<\/td><td class=\"has-text-align-center\" data-align=\"center\">&#8212;<\/td><td class=\"has-text-align-center\" data-align=\"center\">&#8212;<\/td><td class=\"has-text-align-center\" data-align=\"center\">&#8212;<\/td><td class=\"has-text-align-center\" data-align=\"center\">&#8212;<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\" colspan=\"6\">Coding<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">Agentic codingDeepSWE 1.1<\/td><td class=\"has-text-align-center\" data-align=\"center\"><strong>58.7<\/strong><\/td><td class=\"has-text-align-center\" data-align=\"center\">42.2<\/td><td class=\"has-text-align-center\" data-align=\"center\">16.5<\/td><td class=\"has-text-align-center\" data-align=\"center\">54.4<\/td><td class=\"has-text-align-center\" data-align=\"center\">&#8212;<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">Agentic codingSWE-bench Pro<\/td><td class=\"has-text-align-center\" data-align=\"center\"><strong>62.5<\/strong><\/td><td class=\"has-text-align-center\" data-align=\"center\">61.7<\/td><td class=\"has-text-align-center\" data-align=\"center\">55.8<\/td><td class=\"has-text-align-center\" data-align=\"center\">56.0<\/td><td class=\"has-text-align-center\" data-align=\"center\">53.4<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">Multilingual software engineeringSWE-bench Multilingual<\/td><td class=\"has-text-align-center\" data-align=\"center\"><strong>81.0<\/strong><\/td><td class=\"has-text-align-center\" data-align=\"center\">73.8<\/td><td class=\"has-text-align-center\" data-align=\"center\">75.8<\/td><td class=\"has-text-align-center\" data-align=\"center\">&#8212;<\/td><td class=\"has-text-align-center\" data-align=\"center\">77.5<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">Repo-level code generationNL2Repo-Bench<\/td><td class=\"has-text-align-center\" data-align=\"center\">48.1<\/td><td class=\"has-text-align-center\" data-align=\"center\">42.3<\/td><td class=\"has-text-align-center\" data-align=\"center\">41.1<\/td><td class=\"has-text-align-center\" data-align=\"center\"><strong>54.2<\/strong><\/td><td class=\"has-text-align-center\" data-align=\"center\">47.6<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\" colspan=\"6\">Agent<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">Long-horizon office workCoWorkBench<\/td><td class=\"has-text-align-center\" data-align=\"center\"><strong>73.9<\/strong><\/td><td class=\"has-text-align-center\" data-align=\"center\">70.7<\/td><td class=\"has-text-align-center\" data-align=\"center\">65.1<\/td><td class=\"has-text-align-center\" data-align=\"center\">45.1<\/td><td class=\"has-text-align-center\" data-align=\"center\">68.2<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">Professional job tasksJobBench<\/td><td class=\"has-text-align-center\" data-align=\"center\"><strong>55.7<\/strong><\/td><td class=\"has-text-align-center\" data-align=\"center\">33.4<\/td><td class=\"has-text-align-center\" data-align=\"center\">27.6<\/td><td class=\"has-text-align-center\" data-align=\"center\">41.3<\/td><td class=\"has-text-align-center\" data-align=\"center\">36.6<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">Frontier agentic tasksAgents&#8217; Last Exam<\/td><td class=\"has-text-align-center\" data-align=\"center\">Pass@124.3Score<strong>51.2<\/strong><\/td><td class=\"has-text-align-center\" data-align=\"center\">Pass@120.4Score42.9<\/td><td class=\"has-text-align-center\" data-align=\"center\">Pass@113.2Score33.6<\/td><td class=\"has-text-align-center\" data-align=\"center\">Pass@1<strong>25.2<\/strong>Score&#8211;<\/td><td class=\"has-text-align-center\" data-align=\"center\">&#8212;<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">Real-world tool useToolathlon Verified (Pass@1)<\/td><td class=\"has-text-align-center\" data-align=\"center\"><strong>73.5<\/strong><\/td><td class=\"has-text-align-center\" data-align=\"center\">67.1<\/td><td class=\"has-text-align-center\" data-align=\"center\">50.6<\/td><td class=\"has-text-align-center\" data-align=\"center\">70.3<\/td><td class=\"has-text-align-center\" data-align=\"center\">&#8212;<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\" colspan=\"6\">General<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">Instruction followingIFBench<\/td><td class=\"has-text-align-center\" data-align=\"center\"><strong>81.3<\/strong><\/td><td class=\"has-text-align-center\" data-align=\"center\">79.5<\/td><td class=\"has-text-align-center\" data-align=\"center\">79.1<\/td><td class=\"has-text-align-center\" data-align=\"center\">79.2<\/td><td class=\"has-text-align-center\" data-align=\"center\">62.5<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">Scientific reasoningGPQA Diamond<\/td><td class=\"has-text-align-center\" data-align=\"center\"><strong>91.7<\/strong><\/td><td class=\"has-text-align-center\" data-align=\"center\">89.2<\/td><td class=\"has-text-align-center\" data-align=\"center\">90.3<\/td><td class=\"has-text-align-center\" data-align=\"center\">90.8<\/td><td class=\"has-text-align-center\" data-align=\"center\">91.3<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">Multidisciplinary reasoningHLE<\/td><td class=\"has-text-align-center\" data-align=\"center\">35.9<\/td><td class=\"has-text-align-center\" data-align=\"center\">30.8<\/td><td class=\"has-text-align-center\" data-align=\"center\">34.7<\/td><td class=\"has-text-align-center\" data-align=\"center\">33.8<\/td><td class=\"has-text-align-center\" data-align=\"center\"><strong>40.0<\/strong><\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">Competitive codingLiveCodeBench v6<\/td><td class=\"has-text-align-center\" data-align=\"center\"><strong>91.9<\/strong><\/td><td class=\"has-text-align-center\" data-align=\"center\">90.3<\/td><td class=\"has-text-align-center\" data-align=\"center\">89.6<\/td><td class=\"has-text-align-center\" data-align=\"center\">90.6<\/td><td class=\"has-text-align-center\" data-align=\"center\">88.8<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">1. DeepSWE 1.1: evaluated with the Claude Code and mini-SWE-agent harnesses, temp=1.0, top_p=0.95, 256K context window. We report the highest score across the two harnesses; notably, Qwen3.8-Flash-Next performs best on mini-SWE-agent.<br>2. SWE-bench Pro: except for Claude-Opus-4.6 (Max), for which we report the officially published score, all models are evaluated with the Claude Code harness, temp=1.0, top_p=0.95, 256K context window. Problematic tasks were corrected and all baseline models were re-evaluated on the refined benchmark.<br>3. SWE-bench Multilingual: evaluated with the mini-SWE-agent harness, temp=1.0, top_p=0.95, 256K context window.<br>4. NL2Repo-Bench: evaluated with the Claude Code harness. To prevent reward hacking, we disable Bash commands that attempt to access the specific repository, such as pip download, pip install and git clone.<br>5. CoWorkBench: an in-house cowork benchmark for evaluating long-horizon office and productivity agent tasks across computer science, finance, law, medical and other productivity domains.<br>6. HLE: judged by GPT-4o.<br>7. The best result in each row is shown in bold.<br>8. Empty cells (&#8211;): scores are not yet available or are not applicable.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Vision Language<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th class=\"has-text-align-left\" data-align=\"left\"><\/th><th class=\"has-text-align-center\" data-align=\"center\">Qwen3.8-Flash-Next<\/th><th class=\"has-text-align-center\" data-align=\"center\">Qwen3.8-27B<\/th><th class=\"has-text-align-center\" data-align=\"center\">Qwen3.7-Plus<\/th><th class=\"has-text-align-center\" data-align=\"center\">Claude-Opus-4.6 (Max)<\/th><\/tr><\/thead><tbody><tr><td class=\"has-text-align-left\" data-align=\"left\" colspan=\"5\">Agentic Multimodal Intelligence<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">Multimodal tool useClawEval-MM<\/td><td class=\"has-text-align-center\" data-align=\"center\">Pass@3<strong>64.4<\/strong>Average<strong>60.4<\/strong><\/td><td class=\"has-text-align-center\" data-align=\"center\">Pass@357.4Average56.9<\/td><td class=\"has-text-align-center\" data-align=\"center\">Pass@357.4Average60.1<\/td><td class=\"has-text-align-center\" data-align=\"center\">Pass@352.5Average54.7<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">Application recreationRecreationBench<\/td><td class=\"has-text-align-center\" data-align=\"center\"><strong>49.9<\/strong><\/td><td class=\"has-text-align-center\" data-align=\"center\">47.1<\/td><td class=\"has-text-align-center\" data-align=\"center\">30.2<\/td><td class=\"has-text-align-center\" data-align=\"center\">&#8212;<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">Mobile useAndroidWorld<\/td><td class=\"has-text-align-center\" data-align=\"center\"><strong>84.5<\/strong><\/td><td class=\"has-text-align-center\" data-align=\"center\">81.9<\/td><td class=\"has-text-align-center\" data-align=\"center\">81.0<\/td><td class=\"has-text-align-center\" data-align=\"center\">62.0<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">Computer useOSWorld 2.0<\/td><td class=\"has-text-align-center\" data-align=\"center\">Binary<strong>19.4<\/strong>Partial<strong>52.3<\/strong><\/td><td class=\"has-text-align-center\" data-align=\"center\">Binary19.4Partial48.0<\/td><td class=\"has-text-align-center\" data-align=\"center\">Binary2.8Partial21.5<\/td><td class=\"has-text-align-center\" data-align=\"center\">&#8212;<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">Visual web developmentVision2Web<\/td><td class=\"has-text-align-center\" data-align=\"center\"><strong>64.0<\/strong><\/td><td class=\"has-text-align-center\" data-align=\"center\">62.9<\/td><td class=\"has-text-align-center\" data-align=\"center\">42.1<\/td><td class=\"has-text-align-center\" data-align=\"center\">&#8212;<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\" colspan=\"5\">General Multimodal Intelligence<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">Embodied intelligenceERQA<\/td><td class=\"has-text-align-center\" data-align=\"center\"><strong>72.3<\/strong><\/td><td class=\"has-text-align-center\" data-align=\"center\">65.5<\/td><td class=\"has-text-align-center\" data-align=\"center\">69.8<\/td><td class=\"has-text-align-center\" data-align=\"center\">40.8<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">Long video understandingLVBench<\/td><td class=\"has-text-align-center\" data-align=\"center\"><strong>76.6<\/strong><\/td><td class=\"has-text-align-center\" data-align=\"center\">72.4<\/td><td class=\"has-text-align-center\" data-align=\"center\">76.2<\/td><td class=\"has-text-align-center\" data-align=\"center\">63.0<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">Real-world perceptionRealWorldQA<\/td><td class=\"has-text-align-center\" data-align=\"center\"><strong>88.5<\/strong><\/td><td class=\"has-text-align-center\" data-align=\"center\">85.9<\/td><td class=\"has-text-align-center\" data-align=\"center\">86.9<\/td><td class=\"has-text-align-center\" data-align=\"center\">73.9<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">Visual math problem solvingMathVision<\/td><td class=\"has-text-align-center\" data-align=\"center\">Without CI<strong>90.6<\/strong>With CI<strong>95.7<\/strong><\/td><td class=\"has-text-align-center\" data-align=\"center\">Without CI90.0With CI94.6<\/td><td class=\"has-text-align-center\" data-align=\"center\">Without CI90.3With CI88.7<\/td><td class=\"has-text-align-center\" data-align=\"center\">Without CI65.5<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">Scientific chart analysisCharXiv (RQ)<\/td><td class=\"has-text-align-center\" data-align=\"center\">Without CI84.6With CI<strong>90.6<\/strong><\/td><td class=\"has-text-align-center\" data-align=\"center\">Without CI83.7With CI90.2<\/td><td class=\"has-text-align-center\" data-align=\"center\">Without CI<strong>85.8<\/strong>With CI85.9<\/td><td class=\"has-text-align-center\" data-align=\"center\">Without CI66.0<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">1. ClawEval-MM: scores are reported as &#8220;pass@3 \/ average score&#8221;. Pass@3 measures the percentage passed in at least one of three trials, and the average score is the mean score across the three trials.<br>2. RecreationBench: an in-house long-horizon application-recreation benchmark for evaluating hybrid-agent abilities spanning five platforms \u2014 desktop (Ubuntu, macOS, Windows), mobile (Android) and web.<br>3. OSWorld 2.0: scores are reported as &#8220;binary \/ partial&#8221;. The binary score is the percentage of tasks that receive the full task reward, while the partial score aggregates the partial rewards obtained across all tasks.<br>4. Vision2Web: scores are reported as the average over the frontend, webpage and website categories, using the Claude Code harness and judged by gpt-5.4-2026-03-05.<br>5. MathVision, CharXiv (RQ): scores are reported as &#8220;without CI \/ with CI&#8221;. A small number of incorrect ground-truth annotations in MathVision were corrected after manual verification. Our model&#8217;s score is evaluated using a fixed prompt, e.g. &#8220;Please reason step by step, and put your final answer within \\boxed{}.&#8221; For other models, we report the higher score between runs with and without the \\boxed{} formatting.<br>6. The best result in each row is shown in bold.<br>7. Empty cells (&#8211;) indicate scores not yet available or not applicable.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Model Architecture<\/h2>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/qianwen-res.oss-accelerate.aliyuncs.com\/Qwen3.8-Flash-Next\/architecture.png#center\" alt=\"Qwen3.8-Flash-Next architecture\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Attention: GDN + QSA for Efficient Memory and Precise Retrieval<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Following the architecture design introduced in Qwen3.5, Qwen3.8-Flash-Next adopts a&nbsp;<strong>GDN&nbsp;<a href=\"https:\/\/qwen.ai\/blog?id=qwen3.8-flash-next#ref1\">[1]<\/a>&nbsp;+ Attention Hybrid architecture<\/strong>: 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.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For global Attention, we further introduce&nbsp;<strong>Qwen Sparse Attention (QSA)<\/strong>. Sparse Attention reduces long-sequence computation by attending only to important context. However, existing approaches such as DSA&nbsp;<a href=\"https:\/\/qwen.ai\/blog?id=qwen3.8-flash-next#ref2\">[2]<\/a>&nbsp;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.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">QSA further compresses this process: a lightweight indexer first aggregates the sequence into&nbsp;<strong>micro-blocks<\/strong>, 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&nbsp;<a href=\"https:\/\/qwen.ai\/blog?id=qwen3.8-flash-next#ref3\">[3]<\/a>, 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.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/qianwen-res.oss-accelerate.aliyuncs.com\/Qwen3.8-Flash-Next\/qsa_arch.png#center\" alt=\"Overview of Qwen Sparse Attention (QSA)\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Put simply:&nbsp;<strong>GDN efficiently \u201cremembers,\u201d while QSA precisely \u201cretrieves.\u201d<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">At&nbsp;<strong>1M tokens<\/strong>, QSA\u2019s Attention Kernel achieves up to&nbsp;<strong>7.6\u00d7<\/strong>&nbsp;and&nbsp;<strong>4.9\u00d7<\/strong>&nbsp;speedups in Prefill and Decode, respectively. In an experimental setup representative of online serving scenarios with high cache reuse (a&nbsp;<strong>90% Prefix Cache hit rate<\/strong>), Qwen3.8-Flash-Next achieves&nbsp;<strong>8.6\u00d7<\/strong>&nbsp;the Prefill throughput of Qwen3.7-Plus at a&nbsp;<strong>1M-token context length<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/qianwen-res.oss-accelerate.aliyuncs.com\/Qwen3.8-Flash-Next\/throughput.png#center\" alt=\"Relative prefill throughput at 90% cache hit rate\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Gated Residual: More Paths for Information Flow<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Gated Residual (GR)<\/strong>&nbsp;can be viewed as a combination of two ideas: it follows&nbsp;<strong>Hyper-Connection<\/strong>&nbsp;<a href=\"https:\/\/qwen.ai\/blog?id=qwen3.8-flash-next#ref4\">[4]<\/a>&nbsp;in widening the residual stream into multiple branches, while incorporating the element-wise dynamic gating of&nbsp;<strong>GatedNorm<\/strong>&nbsp;<a href=\"https:\/\/qwen.ai\/blog?id=qwen3.8-flash-next#ref5\">[5]<\/a>&nbsp;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.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">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&nbsp;<strong>activation outliers<\/strong>&nbsp;and improves training stability. In addition, the Residual State supports&nbsp;<strong>FP8<\/strong>&nbsp;storage, further reducing memory-access overhead.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">N-gram Embedding: Expanding Model Capacity at Low Cost<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Inspired by Per-Layer Embedding in Gemma 3n and works such as DeepSeek Engram&nbsp;<a href=\"https:\/\/qwen.ai\/blog?id=qwen3.8-flash-next#ref6\">[6]<\/a>, we further introduce&nbsp;<strong>N-gram Embedding<\/strong>&nbsp;to scale model capacity beyond the parameters of the Transformer backbone.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Its key advantage is that it&nbsp;<strong>can add a large number of parameters with almost no additional computation per token<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Qwen3.8-Flash-Next introduces an additional&nbsp;<strong>51B N-gram Embedding parameters<\/strong>. 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.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The final model uses only a single N-gram Embedding layer near the beginning of the network, effectively adding a large-scale&nbsp;<strong>\u201clocal-pattern memory\u201d<\/strong>&nbsp;at relatively low additional cost.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Optimization: Co-designing Architecture and Optimization<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Qwen3.8-Flash-Next is trained with the&nbsp;<strong>Muon Optimizer<\/strong>&nbsp;<a href=\"https:\/\/qwen.ai\/blog?id=qwen3.8-flash-next#ref7\">[7]<\/a>, with further improvements around three key aspects of applying Muon to large-scale model training:&nbsp;<strong>orthogonalization accuracy, parameter assignment between Muon and AdamW, and splitting fused parameter matrices<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For the new architecture and Optimizer, we refit the Scaling Law. The results show that the model can stably use&nbsp;<strong>larger Learning Rates and Batch Sizes<\/strong>, further improving convergence efficiency and large-scale parallel training throughput.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We also find that&nbsp;<strong>Batch Size Warmup<\/strong>, 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&nbsp;<strong>18.8% more optimizer steps<\/strong>. In the final training Recipe, we therefore start directly with the target Batch Size.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Other Architecture Optimizations<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The remaining components follow the design established in Qwen3-Next and refined through the Qwen3.5\u2013Qwen3.8 series.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Ultra-sparse MoE<\/strong>: With global load balancing&nbsp;<a href=\"https:\/\/qwen.ai\/blog?id=qwen3.8-flash-next#ref8\">[8]<\/a>, 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.<\/li>\n\n\n\n<li><strong>Multi-Token Prediction<\/strong>: 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.<\/li>\n\n\n\n<li><strong>Training stability<\/strong>: Zero-centered RMSNorm with weight decay applied to norm weights, the attention output gating mechanism&nbsp;<a href=\"https:\/\/qwen.ai\/blog?id=qwen3.8-flash-next#ref9\">[9]<\/a>, and normalized MoE router initialization are retained. These designs make small-scale ablations more reliable and help large-scale training run smoothly.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Base Model Performance<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">We compare Qwen3.8-Flash-Next-Base with the base models of Qwen3.8-27B and Qwen3.7-Plus.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th class=\"has-text-align-left\" data-align=\"left\"><\/th><th class=\"has-text-align-center\" data-align=\"center\">Qwen3.8-Flash-Next-Base<\/th><th class=\"has-text-align-center\" data-align=\"center\">Qwen3.8-27B-Base<\/th><th class=\"has-text-align-center\" data-align=\"center\">Qwen3.7-Plus-Base<\/th><\/tr><\/thead><tbody><tr><td class=\"has-text-align-left\" data-align=\"left\"># Params<\/td><td class=\"has-text-align-center\" data-align=\"center\">125B<\/td><td class=\"has-text-align-center\" data-align=\"center\">27B<\/td><td class=\"has-text-align-center\" data-align=\"center\">397B<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\"># Activated params<\/td><td class=\"has-text-align-center\" data-align=\"center\">6B<\/td><td class=\"has-text-align-center\" data-align=\"center\">27B<\/td><td class=\"has-text-align-center\" data-align=\"center\">17B<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\"># N-gram embedding params<\/td><td class=\"has-text-align-center\" data-align=\"center\">51B<\/td><td class=\"has-text-align-center\" data-align=\"center\">&#8212;<\/td><td class=\"has-text-align-center\" data-align=\"center\">&#8212;<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\" colspan=\"4\">General tasks<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">MMLU<\/td><td class=\"has-text-align-center\" data-align=\"center\">90.36<\/td><td class=\"has-text-align-center\" data-align=\"center\">87.51<\/td><td class=\"has-text-align-center\" data-align=\"center\"><strong>90.43<\/strong><\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">MMLU-Redux<\/td><td class=\"has-text-align-center\" data-align=\"center\">90.68<\/td><td class=\"has-text-align-center\" data-align=\"center\">87.26<\/td><td class=\"has-text-align-center\" data-align=\"center\"><strong>91.47<\/strong><\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">MMLU-Pro<\/td><td class=\"has-text-align-center\" data-align=\"center\"><strong>73.23<\/strong><\/td><td class=\"has-text-align-center\" data-align=\"center\">68.60<\/td><td class=\"has-text-align-center\" data-align=\"center\">70.90<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">SuperGPQA<\/td><td class=\"has-text-align-center\" data-align=\"center\"><strong>51.36<\/strong><\/td><td class=\"has-text-align-center\" data-align=\"center\">44.86<\/td><td class=\"has-text-align-center\" data-align=\"center\">48.42<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">BBH<\/td><td class=\"has-text-align-center\" data-align=\"center\"><strong>90.87<\/strong><\/td><td class=\"has-text-align-center\" data-align=\"center\">89.56<\/td><td class=\"has-text-align-center\" data-align=\"center\">89.41<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\" colspan=\"4\">Math &amp; STEM tasks<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">GPQA<\/td><td class=\"has-text-align-center\" data-align=\"center\">51.42<\/td><td class=\"has-text-align-center\" data-align=\"center\">45.01<\/td><td class=\"has-text-align-center\" data-align=\"center\"><strong>51.52<\/strong><\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">GSM8K<\/td><td class=\"has-text-align-center\" data-align=\"center\"><strong>93.29<\/strong><\/td><td class=\"has-text-align-center\" data-align=\"center\">93.18<\/td><td class=\"has-text-align-center\" data-align=\"center\">92.95<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">MATH<\/td><td class=\"has-text-align-center\" data-align=\"center\">72.78<\/td><td class=\"has-text-align-center\" data-align=\"center\">60.54<\/td><td class=\"has-text-align-center\" data-align=\"center\"><strong>74.38<\/strong><\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\" colspan=\"4\">Coding tasks<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">EvalPlus<\/td><td class=\"has-text-align-center\" data-align=\"center\"><strong>78.76<\/strong><\/td><td class=\"has-text-align-center\" data-align=\"center\">76.05<\/td><td class=\"has-text-align-center\" data-align=\"center\">78.06<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">MultiPL-E<\/td><td class=\"has-text-align-center\" data-align=\"center\">79.09<\/td><td class=\"has-text-align-center\" data-align=\"center\">74.50<\/td><td class=\"has-text-align-center\" data-align=\"center\"><strong>81.68<\/strong><\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">SWEBench-Pretrain<\/td><td class=\"has-text-align-center\" data-align=\"center\"><strong>50.99<\/strong><\/td><td class=\"has-text-align-center\" data-align=\"center\">41.66<\/td><td class=\"has-text-align-center\" data-align=\"center\">49.24<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\" colspan=\"4\">Multilingual tasks<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">MGSM<\/td><td class=\"has-text-align-center\" data-align=\"center\"><strong>89.33<\/strong><\/td><td class=\"has-text-align-center\" data-align=\"center\">86.37<\/td><td class=\"has-text-align-center\" data-align=\"center\">85.42<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">MMMLU<\/td><td class=\"has-text-align-center\" data-align=\"center\"><strong>84.86<\/strong><\/td><td class=\"has-text-align-center\" data-align=\"center\">79.74<\/td><td class=\"has-text-align-center\" data-align=\"center\">84.53<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">INCLUDE<\/td><td class=\"has-text-align-center\" data-align=\"center\">78.40<\/td><td class=\"has-text-align-center\" data-align=\"center\">74.37<\/td><td class=\"has-text-align-center\" data-align=\"center\"><strong>78.90<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">1. The best result in each row is shown in bold.<br>2. Empty cells (&#8211;): scores are not yet available or not applicable.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Develop with Qwen3.8-Flash-Next<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Qwen3.8-Flash-Next is available as an open-weight model on&nbsp;<a href=\"https:\/\/huggingface.co\/collections\/Qwen\/qwen38-flash-next\">HuggingFace<\/a>&nbsp;and&nbsp;<a href=\"https:\/\/www.modelscope.cn\/collections\/Qwen\/Qwen38-Flash-Next\">ModelScope<\/a>, with official managed APIs on&nbsp;<a href=\"https:\/\/www.qwencloud.com\/models\/qwen3.8-flash\">QwenCloud<\/a>. Designed to balance capability, latency, and cost, it is well suited for high-volume applications, tool-driven workflows, and coding &amp; 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.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">API Usage<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Qwen3.8-Flash-Next is available via API:<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">QwenCloud<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">On&nbsp;<a href=\"https:\/\/www.qwencloud.com\/\">QwenCloud<\/a>, the model is served under the name&nbsp;<a href=\"https:\/\/www.qwencloud.com\/models\/qwen3.8-flash\"><code>qwen3.8-flash<\/code><\/a>. QwenCloud supports industry-standard protocols, including OpenAI-compatible Chat Completions and Responses APIs, alongside an Anthropic-compatible interface.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">python<code>\"\"\"\nEnvironment variables:\n  DASHSCOPE_API_KEY: Your API Key from https:\/\/home.qwencloud.com\/\n  DASHSCOPE_BASE_URL: (optional) Base URL for compatible-mode API.\n    - Beijing: https:\/\/dashscope.aliyuncs.com\/compatible-mode\/v1\n    - Singapore: https:\/\/dashscope-intl.aliyuncs.com\/compatible-mode\/v1\n    - US (Virginia): https:\/\/dashscope-us.aliyuncs.com\/compatible-mode\/v1\n\"\"\"from openai import OpenAIimport os<br>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'\"    )<br>client = OpenAI(    api_key=api_key,    base_url=os.environ.get(        \"DASHSCOPE_BASE_URL\",        \"https:\/\/dashscope-intl.aliyuncs.com\/compatible-mode\/v1\",    ),)<br>messages = [{\"role\": \"user\", \"content\": \"Write a Python function to merge two sorted linked lists.\"}]<br>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,)<br>reasoning_content = \"\"answer_content = \"\"is_answering = Falseprint(\"\\n\" + \"=\" * 20 + \"Reasoning\" + \"=\" * 20 + \"\\n\")<br>for chunk in completion:    if not chunk.choices:        print(\"\\nUsage:\")        print(chunk.usage)        continue<br>    delta = chunk.choices[0].delta<br>    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<br>    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<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Agent Frameworks &amp; Coding Assistants<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Qwen3.8-Flash-Next integrates seamlessly with popular agent frameworks and coding assistants:<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">QwenWork<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/qwenwork.ai\/\">QwenWork<\/a>&nbsp;is Alibaba\u2019s flagship AI productivity platform, designed to help individuals and enterprises automate daily tasks and accelerate operational efficiency.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We are excited to share that QwenWork has integrated&nbsp;<strong>Qwen3.8-Flash-Next<\/strong>&nbsp;to power its newly launched \u201cStandard\u201d mode, leveraging the model\u2019s cutting-edge capabilities to deliver a seamless, cost-effective experience that sets a new standard for AI agents in the workplace.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/qianwen-res.oss-accelerate.aliyuncs.com\/Qwen3.8-Flash-Next\/qwen-work-ai.png#center\" alt=\"Qwen3.8-Flash on QwenWork\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Learn more in the&nbsp;<a href=\"https:\/\/docs.qwenwork.ai\/product-introduction\">official documentation<\/a>!<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Claude Code<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Qwen APIs support the Anthropic API protocol, enabling direct use with&nbsp;<strong>Claude Code<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">bash<code>npm install -g @anthropic-ai\/claude-code\n<br>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\nexport ANTHROPIC_AUTH_TOKEN=&lt;your_api_key&gt;\n<br>claude\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Codex<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Qwen APIs support the OpenAI Responses protocol, enabling use with&nbsp;<strong>Codex<\/strong>:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In&nbsp;<code>~\/.codex\/model-catalog.local.json<\/code><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">json<code>{  \"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      }    }  ]}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">In&nbsp;<code>~\/.codex\/config.toml<\/code><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">toml<code>model_catalog_json = \"~\/.codex\/model-catalog.local.json\"<br>model_provider = \"QwenCloud\"model = \"qwen3.8-flash\"<br>[model_providers.QwenCloud]name = \"QwenCloud\"base_url = \"https:\/\/dashscope-intl.aliyuncs.com\/compatible-mode\/v1\"env_key = \"OPENAI_API_KEY\"wire_api = \"responses\"<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">bash<code>npm install -g @openai\/codex\n<br>export OPENAI_API_KEY=&lt;your_api_key&gt;\n<br>codex\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Qoder CLI<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/qoder.com\/\">Qoder<\/a>&nbsp;co-evolves with Qwen for agentic coding:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">bash<code>curl -fsSL https:\/\/qoder.com\/install | bash\n<br>qoder\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Qwen Code<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/qwen.ai\/qwencode\">Qwen Code<\/a>&nbsp;is deeply optimized for the Qwen series:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">bash<code>npm install -g @qwen-code\/qwen-code@latest\n<br>qwen\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">OpenClaw<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Connect to&nbsp;<a href=\"https:\/\/openclaw.ai\/\">OpenClaw<\/a>&nbsp;via&nbsp;<a href=\"https:\/\/docs.qwencloud.com\/developer-guides\/clients-and-developer-tools\/openclaw\">QwenCloud<\/a>:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">bash<code>curl -fsSL https:\/\/openclaw.ai\/install.sh | bash\n<br>export DASHSCOPE_API_KEY=&lt;your_api_key&gt;\n<br>openclaw dashboard\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Configure&nbsp;<code>~\/.openclaw\/openclaw.json<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">json<code>{  \"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\"      }    }  }}<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Summary<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">References<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\"><a>[1]<\/a>&nbsp;Gated Delta Networks: Improving Mamba2 with Delta Rule<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a>[2]<\/a>&nbsp;DeepSeek-V3.2: Pushing the Frontier of Open Large Language Models<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a>[3]<\/a>&nbsp;IndexCache: Accelerating Sparse Attention via Cross-Layer Index Reuse<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a>[4]<\/a>&nbsp;Hyper-Connections<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a>[5]<\/a>&nbsp;A Unified View of Attention and Residual Sinks: Outlier-Driven Rescaling is Essential for Transformer Training<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a>[6]<\/a>&nbsp;Conditional Memory via Scalable Lookup: A New Axis of Sparsity for Large Language Models<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a>[7]<\/a>&nbsp;Muon: An Optimizer for Hidden Layers in Neural Networks<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a>[8]<\/a>&nbsp;Demons in the Detail: On Implementing Load Balancing Loss for Training Specialized Mixture-of-Expert Models<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a>[9]<\/a>&nbsp;Gated Attention for Large Language Models: Non-linearity, Sparsity, and Attention-Sink-Free<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction In this release we are opening the weights of&nbsp;Qwen3.8-Flash-Next, a multimodal MoE model that also serves as an early preview of the architecture used [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":287,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-227","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry"],"_links":{"self":[{"href":"https:\/\/tongyi.ai\/index.php?rest_route=\/wp\/v2\/posts\/227","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tongyi.ai\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tongyi.ai\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tongyi.ai\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tongyi.ai\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=227"}],"version-history":[{"count":2,"href":"https:\/\/tongyi.ai\/index.php?rest_route=\/wp\/v2\/posts\/227\/revisions"}],"predecessor-version":[{"id":280,"href":"https:\/\/tongyi.ai\/index.php?rest_route=\/wp\/v2\/posts\/227\/revisions\/280"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tongyi.ai\/index.php?rest_route=\/wp\/v2\/media\/287"}],"wp:attachment":[{"href":"https:\/\/tongyi.ai\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=227"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tongyi.ai\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=227"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tongyi.ai\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=227"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}