Track VI · Frontier Tech Reports · 07/20

Qwen3-Next와 Qwen3.5 — Gated DeltaNet 하이브리드와 Gated AttentionQwen3-Next and Qwen3.5 — the Gated DeltaNet hybrid and gated attention

Qwen3 다음 세대의 아키텍처를 읽는다. 층의 3/4를 고정 크기 상태의 Gated DeltaNet으로, 1/4를 출력 gate가 달린 full attention으로 바꾸고, 512-expert 초희소 MoE와 MTP를 더한 Qwen3-Next(2025-09)와 그것을 그대로 키운 Qwen3.5(2026-02)다. delta rule을 온라인 회귀로 유도하고, attention sink가 왜 생기고 gate가 왜 없애는지 계산으로 확인한다.The architecture of the generation after Qwen3. Qwen3-Next (2025-09) turns three quarters of the layers into Gated DeltaNet with a fixed-size state and the remaining quarter into full attention with an output gate, adds a 512-expert ultra-sparse MoE and MTP; Qwen3.5 (2026-02) scales the same design up. We derive the delta rule as online regression and compute why attention sinks form and why a gate removes them.

Qwen3 was a standard Transformer: every layer is full attention, and the KV cache grows with the context. When an agent carries hundreds of thousands of tokens of context for a long time, most of the decode cost goes into reading the KV cache. Qwen3-Next (2025-09) is the first Qwen model that cuts this cost through architecture. Three quarters of the layers are Gated DeltaNet (GDN), which updates a fixed-size state; only the remaining quarter is full attention, and that attention carries a sigmoid output gate. The FFN is an ultra-sparse MoE using 11 of 512 experts (10 routed + 1 shared). Qwen3.5 (2026-02) scales this design to 397B-A17B and broadens multimodality and multilinguality.

One caveat up front: neither model has a technical report. The primary sources are blog posts and model cards, plus the Qwen team’s separate paper justifying a component (Gated Attention, 2505.06708) and the ablations of the later Qwen3.8-Next report (2608.30320). Every number in this lesson names its source.

At a glance

ItemQwen3-Next-80B-A3BQwen3.5-397B-A17B
Release2025-09-11 (GitHub notice), blog2026-02-16, blog (dated 2026-02-17)
Parameters (total / active)80B / 3B (79B non-embedding)397B / 17B
Layer layout48 layers = 12 × (3 × GDN→MoE, 1 × Gated Attention→MoE)60 layers = 15 × (3 × GDN→MoE, 1 × Gated Attention→MoE)
Hidden size20484096
Gated attentionQ 16 / KV 2 heads, head dim 256, RoPE on 64 dims (25%)Q 32 / KV 2, head 256, RoPE on 64 dims
Gated DeltaNetV 32 / QK 16 heads, head dim 128V 64 / QK 16 heads, head 128
MoE512 experts, 10 routed + 1 shared, expert dim 512512 experts, 10 routed + 1 shared, expert dim 1024
MTPyes (multi-step training)yes (multi-step training)
Context262,144 native, extensible to 1,010,000262,144 native, extensible to 1,010,000
Pre-training15T (uniform sample of Qwen3’s 36T corpus)not disclosed (“far more visual-text tokens than Qwen3”)
Vocabulary151,936 (same as Qwen3, padded)248,320 (padded, “250K”)
LicenseApache 2.0, open weightsApache 2.0, open weights
Sources: Qwen3-Next and Qwen3.5 model cards and config.json, blogs. Release dates from the QwenLM GitHub README notices.

What is new

  • 3:1 hybrid. One full-attention layer after every three GDN layers. The blog says GDN had stronger in-context learning than sliding-window attention or Mamba2, and that the 3:1 mix consistently beat any single architecture.
  • Gated attention. A per-head sigmoid gate on the SDPA output, head dim 128 → 256, RoPE on the first 25% of dimensions only.
  • Ultra-sparse MoE. From Qwen3’s 128 experts / 8 active to 512 experts / 10+1 active. Activation ratio about 3.7%.
  • Stability. Attention output gating (removes sinks and massive activations), zero-centred RMSNorm with weight decay on the norm weights, normalised router initialisation.
  • MTP. A draft for speculative decoding that also helps pre-training; multi-step training keeps training and inference consistent.

Architecture

Layer layout and state size

A full-attention layer stores K and V for every token and reads all of them at each decode step. A GDN layer carries only one dk×dvd_k\times d_v matrix StS_t per head, the same size whatever the length. With Qwen3-Next’s numbers:

  • KV of one full-attention layer: 2×2KV heads×256=1,0242\times 2_{\text{KV heads}}\times 256 = 1{,}024 values per token.
  • State of one GDN layer: 32V heads×128×128=524,28832_{\text{V heads}}\times 128\times 128 = 524{,}288 values (+ short-conv state).

With the state in FP32 and KV in BF16, one GDN layer’s state equals about 1K tokens’ worth of KV for one full-attention layer. Below 1K tokens of context the hybrid actually costs more memory; at hundreds of thousands of tokens the 4× smaller KV cache is what remains.

→ Go deeper: The Qwen lineage for how this hybrid carries into Qwen3.5 and Qwen3.8-Next; Long-context serving for what a fixed recurrent state means for prefix caching and state snapshots when serving.

Qwen3는 표준 Transformer였다. 모든 층이 full attention이고, KV cache는 문맥 길이에 비례해 자란다. agent 작업처럼 수십만 토큰의 문맥을 오래 들고 다니면 decode 비용의 대부분이 KV cache를 읽는 데 들어간다. Qwen3-Next(2025-09)는 이 비용을 구조로 줄인 첫 Qwen 모델이다. 층의 3/4는 고정 크기 상태를 갱신하는 Gated DeltaNet(GDN), 나머지 1/4만 full attention으로 두고, 그 attention에는 sigmoid 출력 gate를 단다. FFN은 512개 expert 중 11개(10 routed + 1 shared)만 쓰는 초희소 MoE다. Qwen3.5(2026-02)는 이 설계를 그대로 397B-A17B로 키우고 멀티모달·다국어를 넓혔다.

주의할 점이 하나 있다. 두 모델 모두 기술 보고서가 없다. 1차 자료는 블로그 글과 model card, 그리고 구성 요소를 정당화한 Qwen 팀의 별도 논문(Gated Attention, 2505.06708)과 이후 Qwen3.8-Next 보고서(2608.30320)의 ablation이다. 이 레슨의 숫자는 모두 그 출처를 밝힌다.

한눈에

항목Qwen3-Next-80B-A3BQwen3.5-397B-A17B
공개2025-09-11 (GitHub 공지), 블로그2026-02-16, 블로그 (2026-02-17자)
파라미터 (총 / 활성)80B / 3B (비임베딩 79B)397B / 17B
층 배치48층 = 12 × (3 × GDN→MoE, 1 × Gated Attention→MoE)60층 = 15 × (3 × GDN→MoE, 1 × Gated Attention→MoE)
hidden20484096
Gated AttentionQ 16 / KV 2 head, head 차원 256, RoPE 64차원(25%)Q 32 / KV 2, head 256, RoPE 64차원
Gated DeltaNetV 32 / QK 16 head, head 차원 128V 64 / QK 16 head, head 128
MoE512 expert, 10 routed + 1 shared, expert 차원 512512 expert, 10 routed + 1 shared, expert 차원 1024
MTP있음 (multi-step 학습)있음 (multi-step 학습)
문맥262,144 기본, 1,010,000까지 확장262,144 기본, 1,010,000까지 확장
사전학습15T (Qwen3 36T 코퍼스의 균등 표본)비공개 (“Qwen3보다 훨씬 많은 시각-텍스트 토큰”)
어휘151,936 (Qwen3와 동일, padded)248,320 (padded, “250K”)
라이선스Apache 2.0, 가중치 공개Apache 2.0, 가중치 공개
출처: Qwen3-Next·Qwen3.5 model card와 config.json, 블로그. 공개일은 QwenLM GitHub README의 공지.

무엇이 새로운가

  • 3:1 하이브리드. GDN 3층마다 full attention 1층. 블로그는 GDN이 sliding window attention이나 Mamba2보다 in-context learning이 강했고, 3:1 혼합이 단일 구조보다 일관되게 좋았다고 쓴다.
  • gated attention. SDPA 출력에 head별 sigmoid gate, head 차원 128 → 256, RoPE는 앞 25% 차원에만.
  • 초희소 MoE. Qwen3의 128 expert/8 활성에서 512 expert/10+1 활성으로. 활성 비율 약 3.7%.
  • 안정화. attention 출력 gate(sink·massive activation 제거), zero-centered RMSNorm과 norm weight의 weight decay, router 파라미터 초기화 정규화.
  • MTP. speculative decoding용 draft 겸 사전학습 성능 향상. 학습-추론 일치를 위한 multi-step 학습.

아키텍처

층 배치와 상태 크기

full attention 층은 토큰마다 K, V를 저장해 decode에서 매번 전부 읽는다. GDN 층은 head마다 dk×dvd_k\times d_v 행렬 하나 StS_t만 들고 다니며, 길이에 상관없이 크기가 같다. Qwen3-Next의 수치로 계산하면 이렇다.

  • full attention 한 층의 KV: 토큰당 2×2KV head×256=1,0242\times 2_{\text{KV head}}\times 256 = 1{,}024개 값.
  • GDN 한 층의 상태: 32V head×128×128=524,28832_{\text{V head}}\times 128\times 128 = 524{,}288개 값(+ short conv 상태).

상태를 FP32, KV를 BF16으로 두면 GDN 한 층의 상태가 full attention 한 층의 약 1K 토큰 분 KV와 같다. 문맥이 1K보다 짧으면 하이브리드는 메모리 면에서 오히려 손해고, 수십만 토큰에서는 KV가 1/4로 줄어든 효과가 그대로 남는다.

→ 더 깊이: 이 하이브리드가 Qwen3.5와 Qwen3.8-Next로 어떻게 이어지는지는 Qwen 계보, 고정 크기 recurrent 상태가 서빙의 prefix caching과 상태 snapshot에 주는 의미는 긴 문맥 서빙.

full / GDN 층full / GDN layers – KV cache – GDN 상태(고정)GDN state (fixed) – 전부 full일 때 대비vs all-full – GDN 한 층 상태 = KVone GDN layer state = KV of – 토큰 분tokens
Top: layer layout (■ Gated DeltaNet, ■ gated full attention). Bottom: the size of the state that must be held to decode one sequence (GiB, log scale). Decode reads this state once per token, so it is also the memory-bandwidth cost. Set the ratio to 0:1 and every layer builds a KV cache, as in a plain Transformer; at 3:1 the KV shrinks to 1/4 at the price of a length-independent GDN state. For short contexts the GDN state is actually larger — below the crossover the hybrid does not pay. (For Qwen3-30B-A3B, raising the ratio borrows Qwen3-Next's GDN sizes as a hypothetical.) 위: 층 배치(■ Gated DeltaNet, ■ gated full attention). 아래: 시퀀스 하나를 decode할 때 들고 있어야 하는 상태의 크기(GiB, 로그 축). decode는 매 토큰 이 상태를 한 번씩 읽으므로 메모리 대역폭 비용과도 같다. 비율을 0:1로 내리면 모든 층이 KV cache를 쌓는 일반 Transformer가 되고, 3:1로 올리면 KV가 1/4로 줄어드는 대신 길이와 무관한 GDN 상태가 생긴다. 짧은 문맥에서는 오히려 GDN 상태가 더 크다. 교차점 아래에서는 하이브리드가 이득이 아니다. (Qwen3-30B-A3B에서 비율을 올리면 Qwen3-Next의 GDN 크기를 빌린 가상 설정이 된다.)
The FP32 GDN state follows mamba_ssm_dtype: float32 in the Qwen3.5 config — an assumption; real serving engines differ.

The blog reports throughput relative to Qwen3-32B: prefill about 7× at 4K context and more than 10× beyond 32K; decode about 4× at 4K and more than 10× beyond 32K. Qwen3.5-397B-A17B’s decode throughput at 32K/256K is 3.5×/7.2× that of Qwen3-235B-A22B and 8.6×/19.0× that of Qwen3-Max. The ratio grows with context for the same reason as the curves above. These ratios also mix in the difference in active parameters (32B dense vs 3B).

Gated DeltaNet: the delta rule is online regression

Remove the softmax from attention and the output becomes yt=∑j≤t(qt⊤kj) vj=St⊤qty_t=\sum_{j\le t}(q_t^\top k_j)\,v_j = S_t^\top q_t with St=∑j≤tkjvj⊤S_t=\sum_{j\le t}k_jv_j^\top. StS_t is a matrix that stores key→value associations — a fast weight (Schlag et al. 2021). Pure addition St=St−1+ktvt⊤S_t=S_{t-1}+k_tv_t^\top has two problems. Writing a new value under the same key adds it to the old one. And putting in more pairs than dkd_k causes interference with no way to erase.

The delta rule treats SS as “a linear regression from keys to values” and takes one gradient step on the squared error of the new pair (kt,vt)(k_t,v_t):

Lt(S)=12∥S⊤kt−vt∥2,∇SLt=kt (S⊤kt−vt)⊤\mathcal{L}_t(S)=\tfrac12\big\|S^\top k_t-v_t\big\|^2,\qquad \nabla_S\mathcal{L}_t = k_t\,(S^\top k_t-v_t)^\topSt=St−1−βt∇SLt(St−1)=St−1+βt kt(vt−St−1⊤kt)⊤S_t = S_{t-1}-\beta_t\nabla_S\mathcal{L}_t(S_{t-1}) = S_{t-1}+\beta_t\,k_t\big(v_t-S_{t-1}^\top k_t\big)^\top

βt∈(0,1)\beta_t\in(0,1) is the learning rate, and vt−St−1⊤ktv_t-S_{t-1}^\top k_t is “the difference from what is already bound to this key”. With ∥kt∥=1\|k_t\|=1 and βt=1\beta_t=1, St⊤kt=vtS_t^\top k_t=v_t holds exactly after the update: rewriting a key replaces its value. Gated DeltaNet (Yang et al. 2024) multiplies by a data-dependent decay αt∈(0,1)\alpha_t\in(0,1) that gradually erases all old memory (Mamba2’s gate). In the notation of the Qwen3.8-Next report (2608.30320 Eq. 1–5):

S~t−1=αtSt−1,St=S~t−1+βt kt(vt−S~t−1⊤kt)⊤=αt(I−βtktkt⊤)St−1+βtktvt⊤,yt=St⊤qt\tilde S_{t-1}=\alpha_t S_{t-1},\qquad S_t=\tilde S_{t-1}+\beta_t\,k_t\big(v_t-\tilde S_{t-1}^\top k_t\big)^\top =\alpha_t\big(I-\beta_t k_tk_t^\top\big)S_{t-1}+\beta_t k_tv_t^\top,\qquad y_t=S_t^\top q_t

The two gates do different jobs: αt\alpha_t sets the lifetime of the whole state, βt\beta_t and the delta term handle the content of a specific key. The same report’s parameterisation (Eq. 6–11):

qt,kt=L2Norm⁡ ⁣(SiLU⁡(ShortConv⁡(Wq,kxt))),vt=SiLU⁡(ShortConv⁡(Wvxt))q_t,k_t=\operatorname{L2Norm}\!\big(\operatorname{SiLU}(\operatorname{ShortConv}(W_{q,k}x_t))\big),\quad v_t=\operatorname{SiLU}(\operatorname{ShortConv}(W_vx_t))βt=σ(Wβxt),αt=exp⁡ ⁣[−eAsoftplus⁡(Wαxt+bα)],ot=Wo[gate⁡(Wzxt)⊙RMSNorm⁡(yt)]\beta_t=\sigma(W_\beta x_t),\qquad \alpha_t=\exp\!\big[-e^{A}\operatorname{softplus}(W_\alpha x_t+b_\alpha)\big],\qquad o_t=W_o\big[\operatorname{gate}(W_zx_t)\odot\operatorname{RMSNorm}(y_t)\big]

L2 normalisation guarantees ∥kt∥=1\|k_t\|=1, keeping the eigenvalues of I−βtktkt⊤I-\beta_tk_tk_t^\top in [0,1][0,1] (stability), and a depthwise causal conv of length 4 (config linear_conv_kernel_dim: 4) mixes local information before compression. In Qwen3-Next, 16 QK heads are shared by 32 V heads (the same sharing as GQA). The output gate is SiLU in the original GDN; the Qwen3.8-Next report says it switched to sigmoid.

→ Go deeper: Linear attention and SSMs — the delta rule next to Mamba, KDA and lightning attention.

Gated attention

The full-attention layers change three things relative to Qwen3’s attention: (1) a query-dependent sigmoid gate on the SDPA output, (2) head dim 256, (3) RoPE on only the first 25% of the head dimensions (64 dims). The gate is per head and per element (Qiu et al. 2025 Eq. 5):

Y′=SDPA⁡(Q,K,V)⊙σ(XWθ),O=Y′WOY'=\operatorname{SDPA}(Q,K,V)\odot\sigma(XW_\theta),\qquad O=Y'W_O

XX is the hidden state after pre-norm — the representation of the current query token. Why this works is covered under “Core methods” below.

Ultra-sparse MoE and stability

512 experts, 10 per token plus 1 shared. The blog says that with global load balancing (the global-batch LBL of the Qwen3 lesson), increasing total expert parameters at a fixed number of active experts kept lowering the training loss. Having seen the QK-Norm weights in Qwen3 grow abnormally large, they switched to zero-centred RMSNorm and put weight decay on the norm weights so they cannot grow without bound, and they normalise the router parameters at initialisation so that expert selection is not biased early in training.

Data

Qwen3-NextQwen3.5
Pre-training tokens15T, a uniform sample of Qwen3’s 36T corpusnot disclosed. “Far larger” visual-text token count than Qwen3; strengthened Chinese, English, multilingual, STEM and reasoning data; stricter filtering
Modalitiestexttext, image, video with early fusion (native VLM)
Languagessame as Qwen3 (119)201 languages and dialects
Tokenizersame as Qwen3~250K vocabulary; 10–60% better encoding/decoding efficiency for most languages
Sources: the respective blogs and model cards.

The data choice for Qwen3-Next is best read as experimental design: trained on a uniform sample of the same corpus, almost all of its difference from Qwen3 comes from architecture and recipe. Post-training data is not disclosed for either model. The Qwen3.5 blog says the gains came mainly from “scaling virtually all RL tasks and environments we could conceive”, with the focus on the difficulty and generality of environments rather than on specific metrics.

Training

Pre-training cost. Qwen3-Next-80B-A3B-Base was trained with less than 80% of the GPU hours of Qwen3-30B-A3B and 9.3% of the compute of Qwen3-32B, and is reported to beat Qwen3-32B-Base on most benchmarks (blog; tables only as images). Optimizer, learning rate, batch and precision are not disclosed. Qwen3.5 reports an FP8 pipeline (activations, MoE routing and GEMMs in FP8, sensitive layers kept in BF16) with about 50% less activation memory and more than 10% speed-up.

MTP. Modules that predict the tokens after the next one are trained jointly. Matching multi-step use between training and inference raised the speculative-decoding acceptance rate. The serving examples use 3 draft steps in SGLang and 2 tokens in vLLM (model card).

Post-training. Qwen3-Next shipped as two checkpoints, Instruct (no thinking) and Thinking — Qwen3’s “one model, two modes” split in two again. The blog only says “the long-standing stability and efficiency issues of RL training caused by hybrid attention + high-sparsity MoE were solved”, without the method. The RL algorithm is not named either. GSPO, published by the Qwen team just before, addressed the swinging of token ratios in MoE with a sequence-level ratio:

JGSPO(θ)=E[1G∑i=1Gmin⁡(siA^i,clip⁡(si,1−ε,1+ε)A^i)],si=(πθ(yi∣x)πold(yi∣x))1/∣yi∣J_{\text{GSPO}}(\theta)=\mathbb{E}\Big[\frac1G\sum_{i=1}^G\min\big(s_i\hat A_i,\operatorname{clip}(s_i,1-\varepsilon,1+\varepsilon)\hat A_i\big)\Big],\qquad s_i=\Big(\frac{\pi_\theta(y_i\mid x)}{\pi_{\text{old}}(y_i\mid x)}\Big)^{1/|y_i|}

The Qwen3.5 blog is more concrete about RL infrastructure: an asynchronous RL framework that fully disaggregates training and inference; end-to-end FP8; rollout router replay (reusing in the training forward the experts chosen at inference); speculative decoding; and multi-turn rollout locking — bounding gradient staleness and improving train–inference consistency, with a reported 3–5× end-to-end speed-up and support for “million-scale agent scaffolds and environments”. Why such devices are needed is covered in the train–inference mismatch lesson.

Core methods in depth

1. Gated DeltaNet: additive memory vs replacing memory vs forgetting memory

GDN 상태를 FP32로 둔 것은 Qwen3.5 config의 mamba_ssm_dtype: float32를 따른 가정이다. 실제 서빙 엔진의 정밀도는 구현마다 다르다.

블로그는 처리량을 이렇게 보고한다. Qwen3-32B 대비 prefill은 4K 문맥에서 약 7배, 32K 이상에서 10배 이상, decode는 4K에서 약 4배, 32K 이상에서 10배 이상이다. Qwen3.5-397B-A17B의 decode 처리량은 32K/256K에서 Qwen3-235B-A22B의 3.5배/7.2배, Qwen3-Max의 8.6배/19.0배다. 문맥이 길수록 배수가 커지는 것은 위 그림의 곡선과 같은 이유다. 이 배수에는 활성 파라미터 차이(32B dense vs 3B)도 섞여 있다.

Gated DeltaNet: delta rule은 온라인 회귀다

attention에서 softmax를 빼면 출력은 yt=∑j≤t(qt⊤kj) vj=St⊤qty_t=\sum_{j\le t}(q_t^\top k_j)\,v_j = S_t^\top q_t, St=∑j≤tkjvj⊤S_t=\sum_{j\le t}k_jv_j^\top로 쓸 수 있다. StS_t는 key→value 연상을 저장하는 행렬, 즉 fast weight다(Schlag et al. 2021). 순수 덧셈 St=St−1+ktvt⊤S_t=S_{t-1}+k_tv_t^\top에는 두 가지 문제가 있다. 같은 key에 새 값을 쓰면 옛 값과 더해진다. 그리고 dkd_k보다 많은 쌍을 넣으면 서로 간섭하는데 지울 방법이 없다.

delta rule은 SS를 “key를 넣으면 value가 나오는 선형 회귀”로 보고, 새 쌍 (kt,vt)(k_t,v_t)에 대한 제곱오차를 한 step 경사하강한다.

Lt(S)=12∥S⊤kt−vt∥2,∇SLt=kt (S⊤kt−vt)⊤\mathcal{L}_t(S)=\tfrac12\big\|S^\top k_t-v_t\big\|^2,\qquad \nabla_S\mathcal{L}_t = k_t\,(S^\top k_t-v_t)^\topSt=St−1−βt∇SLt(St−1)=St−1+βt kt(vt−St−1⊤kt)⊤S_t = S_{t-1}-\beta_t\nabla_S\mathcal{L}_t(S_{t-1}) = S_{t-1}+\beta_t\,k_t\big(v_t-S_{t-1}^\top k_t\big)^\top

βt∈(0,1)\beta_t\in(0,1)은 학습률이고, vt−St−1⊤ktv_t-S_{t-1}^\top k_t는 “이미 이 key에 묶인 값과의 차이”다. ∥kt∥=1\|k_t\|=1이고 βt=1\beta_t=1이면 갱신 뒤 St⊤kt=vtS_t^\top k_t=v_t가 정확히 성립한다. 같은 key를 다시 쓰면 교체가 된다. Gated DeltaNet(Yang et al. 2024)은 여기에 데이터 의존 감쇠 αt∈(0,1)\alpha_t\in(0,1)를 곱해 오래된 기억 전체를 서서히 지운다(Mamba2의 gate). Qwen3.8-Next 보고서의 표기(2608.30320 Eq. 1–5)로 정리하면

S~t−1=αtSt−1,St=S~t−1+βt kt(vt−S~t−1⊤kt)⊤=αt(I−βtktkt⊤)St−1+βtktvt⊤,yt=St⊤qt\tilde S_{t-1}=\alpha_t S_{t-1},\qquad S_t=\tilde S_{t-1}+\beta_t\,k_t\big(v_t-\tilde S_{t-1}^\top k_t\big)^\top =\alpha_t\big(I-\beta_t k_tk_t^\top\big)S_{t-1}+\beta_t k_tv_t^\top,\qquad y_t=S_t^\top q_t

두 gate의 역할이 다르다. αt\alpha_t는 상태 전체의 수명을, βt\beta_t와 delta 항은 특정 key의 내용을 다룬다. 같은 보고서의 파라미터화(Eq. 6–11)는 이렇다.

qt,kt=L2Norm⁡ ⁣(SiLU⁡(ShortConv⁡(Wq,kxt))),vt=SiLU⁡(ShortConv⁡(Wvxt))q_t,k_t=\operatorname{L2Norm}\!\big(\operatorname{SiLU}(\operatorname{ShortConv}(W_{q,k}x_t))\big),\quad v_t=\operatorname{SiLU}(\operatorname{ShortConv}(W_vx_t))βt=σ(Wβxt),αt=exp⁡ ⁣[−eAsoftplus⁡(Wαxt+bα)],ot=Wo[gate⁡(Wzxt)⊙RMSNorm⁡(yt)]\beta_t=\sigma(W_\beta x_t),\qquad \alpha_t=\exp\!\big[-e^{A}\operatorname{softplus}(W_\alpha x_t+b_\alpha)\big],\qquad o_t=W_o\big[\operatorname{gate}(W_zx_t)\odot\operatorname{RMSNorm}(y_t)\big]

L2 정규화가 ∥kt∥=1\|k_t\|=1을 보장해 I−βtktkt⊤I-\beta_tk_tk_t^\top의 고유값이 [0,1][0,1]에 머물게 하고(안정성), 길이 4의 depthwise causal conv(config의 linear_conv_kernel_dim: 4)가 압축 전에 국소 정보를 섞는다. Qwen3-Next는 QK head 16개를 V head 32개가 나눠 쓴다(GQA와 같은 공유). 출력 gate는 원래 GDN이 SiLU, Qwen3.8-Next가 sigmoid로 바꿨다고 밝히고 있다.

→ 더 깊이: Linear attention과 SSM — delta rule을 Mamba·KDA·lightning attention과 나란히 본다.

Gated attention

full attention 층은 Qwen3의 attention에 세 가지를 바꿨다. (1) SDPA 출력에 query 의존 sigmoid gate, (2) head 차원 256, (3) RoPE를 head 차원의 앞 25%(64차원)에만. gate는 head별·원소별이다(Qiu et al. 2025 Eq. 5).

Y′=SDPA⁡(Q,K,V)⊙σ(XWθ),O=Y′WOY'=\operatorname{SDPA}(Q,K,V)\odot\sigma(XW_\theta),\qquad O=Y'W_O

XX는 pre-norm 뒤의 hidden state, 즉 현재 query 토큰의 표현이다. 왜 이것이 효과가 있는지는 아래 “핵심 method”에서 본다.

초희소 MoE와 안정화

expert는 512개, 토큰당 10개 + shared 1개. 블로그는 global load balancing(Qwen3 레슨의 global-batch LBL)을 쓰면 활성 expert 수를 고정한 채 총 expert 파라미터를 늘릴수록 학습 손실이 꾸준히 내려갔다고 쓴다. Qwen3에서 QK-Norm의 norm weight가 비정상적으로 커지는 현상을 보고 zero-centered RMSNorm으로 바꾸고 norm weight에도 weight decay를 걸어 무한정 커지지 않게 했으며, router 파라미터를 초기화 때 정규화해 학습 초반 expert 선택이 치우치지 않게 했다.

데이터

Qwen3-NextQwen3.5
사전학습 토큰15T, Qwen3의 36T 코퍼스에서 균등 표본비공개. Qwen3보다 “훨씬 큰” 시각-텍스트 토큰, 중·영·다국어·STEM·추론 데이터 강화, 더 엄격한 필터링
모달리티텍스트텍스트·이미지·비디오 early fusion (native VLM)
언어Qwen3와 동일(119)201개 언어·방언
토크나이저Qwen3와 동일약 250K 어휘. 대부분 언어에서 인코딩·디코딩 효율 10–60% 향상
출처: 각 블로그와 model card.

Qwen3-Next의 데이터 선택은 실험 설계로 읽는 편이 맞다. 같은 코퍼스의 균등 표본으로 학습했으니 Qwen3와의 차이는 거의 전부 아키텍처와 레시피에서 온다. 사후학습 데이터는 두 모델 모두 공개되지 않았다. Qwen3.5 블로그는 성능 향상이 주로 “생각할 수 있는 거의 모든 RL 과제와 환경의 확장”에서 왔고, 특정 지표가 아니라 환경의 난도와 일반화를 늘리는 데 집중했다고 쓴다.

학습

사전학습 비용. Qwen3-Next-80B-A3B-Base는 Qwen3-30B-A3B의 GPU 시간 80% 미만, Qwen3-32B 연산량의 9.3%로 학습했고, Qwen3-32B-Base보다 대부분의 벤치마크에서 낫다고 보고한다(블로그; 표는 이미지로만 제공). optimizer, 학습률, 배치, 정밀도는 공개되지 않았다. Qwen3.5는 FP8 파이프라인(activation, MoE routing, GEMM을 FP8로, 민감한 층은 BF16 유지)으로 activation 메모리 약 50% 절감, 10% 이상 가속을 보고한다.

MTP. 다음 토큰 외에 그 다음 토큰들을 예측하는 모듈을 함께 학습한다. 학습 때와 추론 때의 multi-step 사용을 일치시켜 speculative decoding 수락률을 높였다고 한다. 서빙 예시는 SGLang에서 draft 3 step, vLLM에서 2 token을 쓴다(model card).

사후학습. Qwen3-Next는 Instruct(사고 없음)와 Thinking 두 체크포인트로 나왔다. Qwen3의 “한 모델 두 모드”가 다시 둘로 갈라진 것이다. 블로그는 “하이브리드 attention + 고희소 MoE가 만든 RL 학습의 오래된 안정성·효율 문제를 해결했다”고만 쓰고 방법은 밝히지 않는다. RL 알고리즘도 명시돼 있지 않다. Qwen 팀이 직전에 발표한 GSPO는 MoE에서 토큰 ratio가 흔들리는 문제를 시퀀스 단위 ratio로 다뤘다.

JGSPO(θ)=E[1G∑i=1Gmin⁡(siA^i,clip⁡(si,1−ε,1+ε)A^i)],si=(πθ(yi∣x)πold(yi∣x))1/∣yi∣J_{\text{GSPO}}(\theta)=\mathbb{E}\Big[\frac1G\sum_{i=1}^G\min\big(s_i\hat A_i,\operatorname{clip}(s_i,1-\varepsilon,1+\varepsilon)\hat A_i\big)\Big],\qquad s_i=\Big(\frac{\pi_\theta(y_i\mid x)}{\pi_{\text{old}}(y_i\mid x)}\Big)^{1/|y_i|}

Qwen3.5 블로그는 RL 인프라를 더 구체적으로 쓴다. 학습과 추론을 완전히 분리한 비동기 RL 프레임워크, end-to-end FP8, rollout router replay(추론 때 고른 expert를 학습 forward에서 재사용), speculative decoding, multi-turn rollout locking으로 gradient staleness를 제한하고 학습-추론 일치를 높였으며, end-to-end 3–5배 가속과 “백만 단위 agent scaffold·환경” 지원을 보고한다. 이 장치들이 왜 필요한지는 학습–추론 불일치 레슨에서 다뤘다.

핵심 method 깊게 보기

1. Gated DeltaNet: 덧셈 메모리 vs 교체 메모리 vs 잊는 메모리

평균 상대 오차mean relative error: linear – · delta – · gated delta – 최근 8개 keylast 8 keys: gated delta –
Write (key, value) pairs one after another into a single dk×dv matrix, then read each key back and compare with its latest value. Left: per-key read error ‖Sᵀk − v‖/‖v‖ (x-axis: order of last write, newest on the right; ◆ marks overwritten keys). Right: mean error versus N (same dk, average of 6 seeds). Raise the overwrite fraction: purely additive linear attention sums old and new values, so the ◆ keys get large errors, while the delta rule writes only "the difference from what is stored" and replaces exactly at β=1. Push N above dk and every rule suffers interference, but gated delta with α<1 forgets old memories to keep recent keys clean. dk×dv 행렬 하나에 (key, value) 쌍을 차례로 쓰고, 마지막에 각 key로 읽어 최신 값과 비교한다. 왼쪽: key별 읽기 오차 ‖Sᵀk − v‖/‖v‖ (가로축은 마지막으로 쓴 순서, 오른쪽이 최근, ◆는 덮어쓴 key). 오른쪽: N에 따른 평균 오차(같은 dk, 시드 6개 평균). 덮어쓰기 비율을 올려 보면 순수 덧셈인 linear attention은 옛 값과 새 값을 합쳐 버려 ◆ key의 오차가 커지고, delta rule은 "이미 저장된 값과의 차이"만 써서 β=1이면 정확히 교체한다. N을 dk보다 키우면 모두 간섭이 생기는데, α<1인 gated delta는 옛 기억을 지우는 대신 최근 key를 깨끗하게 유지한다.

Three things to check in the figure. With overwrites, linear attention returns the sum of the old and new values (large error on the ◆ keys). The delta rule replaces that key exactly at β=1\beta=1. When the state overflows (N>dkN>d_k) the delta rule cannot avoid interference either, but with α<1\alpha<1 it sacrifices old keys to keep recent ones clean — the prior “recent context matters more” built in as a gate. It also shows why full-attention layers are needed: a fixed-size state eventually overflows, and exact token-level retrieval is only possible for layers that keep the KV.

NumPy Gated delta rule: the two forms agree, overwrites, capacity
import numpy as np
rng = np.random.default_rng(0)

def unit(x):
    return x / np.linalg.norm(x, axis=-1, keepdims=True)

def gated_delta(K, V, alpha, beta):
    """S_t = α_t S_{t-1} + β_t k_t (v_t - α_t S_{t-1}^T k_t)^T   (state S: d_k × d_v, 2608.30320 Eq. 1–3)"""
    dk, dv = K.shape[1], V.shape[1]
    S = np.zeros((dk, dv))
    for k, v, a, b in zip(K, V, alpha, beta):
        S = a * S
        e = v - S.T @ k                 # error w.r.t. what is already bound to k
        S = S + b * np.outer(k, e)      # write only the error
    return S

def gated_delta_eq5(K, V, alpha, beta):
    """the same as S_t = α_t (I - β_t k k^T) S_{t-1} + β_t k v^T  (Eq. 5)"""
    dk, dv = K.shape[1], V.shape[1]
    S = np.zeros((dk, dv))
    for k, v, a, b in zip(K, V, alpha, beta):
        S = a * (np.eye(dk) - b * np.outer(k, k)) @ S + b * np.outer(k, v)
    return S

def linear_attn(K, V):
    return K.T @ V                       # S = Σ k v^T (pure addition)

N, dk, dv = 24, 32, 8
K = unit(rng.normal(size=(N, dk))); V = rng.normal(size=(N, dv))
al = rng.uniform(0.9, 1.0, N); be = rng.uniform(0.3, 1.0, N)
print("Eq.1–3 vs Eq.5 difference:", np.abs(gated_delta(K, V, al, be) - gated_delta_eq5(K, V, al, be)).max())

def recall_err(S, K, V):
    """mean relative read error ||S^T k - v|| / ||v|| over the stored keys"""
    return np.mean(np.linalg.norm(K @ S - V, axis=1) / np.linalg.norm(V, axis=1))

# (1) overwrite the same key with a new value
k = unit(rng.normal(size=dk)); v_old, v_new = rng.normal(size=dv), rng.normal(size=dv)
Kr, Vr = np.stack([k, k]), np.stack([v_old, v_new])
for name, S in [("linear", linear_attn(Kr, Vr)), ("delta β=1", gated_delta(Kr, Vr, [1, 1], [1, 1]))]:
    print(f"{name:10s} error of the read value vs the latest value {np.linalg.norm(S.T @ k - v_new):.3f}")

# (2) capacity: what if the number of pairs N exceeds d_k?
print(f"\n{'N':>4} | linear | delta(β=1) | gated delta(α=0.97)  [d_k={dk}]")
for N in [8, 16, 32, 64, 128]:
    K = unit(rng.normal(size=(N, dk))); V = rng.normal(size=(N, dv))
    e_lin = recall_err(linear_attn(K, V), K, V)
    e_del = recall_err(gated_delta(K, V, np.ones(N), np.ones(N)), K, V)
    Sg = gated_delta(K, V, np.full(N, 0.97), np.ones(N))
    e_g = recall_err(Sg, K[-8:], V[-8:])     # gated: only the 8 most recent keys
    print(f"{N:>4} | {e_lin:6.2f} | {e_del:10.2f} | {e_g:6.2f} (last 8)")
 

Running this sequential recurrence as-is during training would leave the GPU idle, so real kernels split the sequence into chunks: matrix multiplies inside a chunk, recurrence only between chunks (the chunkwise algorithm of Yang et al., flash-linear-attention). The PyTorch code below is a naive recurrent version for understanding.

PyTorch PyTorch: a Gated DeltaNet layer (naive recurrent, reference) 로컬에서 실행run locally (pip install torch)
import torch, torch.nn as nn, torch.nn.functional as F

class GatedDeltaNet(nn.Module):
    """Parameterisation of 2608.30320 Eq. 1–11. Real training uses chunkwise kernels (fla)."""
    def __init__(self, d, n_qk=16, n_v=32, dk=128, dv=128, conv=4):
        super().__init__()
        self.n_qk, self.n_v, self.dk, self.dv = n_qk, n_v, dk, dv
        C = 2 * n_qk * dk + n_v * dv
        self.in_proj = nn.Linear(d, C, bias=False)                 # q, k, v
        self.conv = nn.Conv1d(C, C, conv, groups=C, padding=conv - 1, bias=False)
        self.w_beta = nn.Linear(d, n_v, bias=False)                # write strength β
        self.w_alpha = nn.Linear(d, n_v, bias=True)                # input of the decay α (bias = b_α)
        self.A = nn.Parameter(torch.zeros(n_v))                    # α = exp(-e^A softplus(.))
        self.w_z = nn.Linear(d, n_v * dv, bias=False)              # output gate
        self.norm = nn.RMSNorm(dv)
        self.out = nn.Linear(n_v * dv, d, bias=False)

    def forward(self, x):                                          # x: (B, T, d)
        B, T, _ = x.shape
        h = self.conv(self.in_proj(x).transpose(1, 2))[..., :T]    # causal: keep the first T
        h = F.silu(h).transpose(1, 2)
        q, k, v = h.split([self.n_qk * self.dk, self.n_qk * self.dk, self.n_v * self.dv], -1)
        rep = self.n_v // self.n_qk                                # each QK head is shared by rep V heads
        q = F.normalize(q.view(B, T, self.n_qk, self.dk), dim=-1).repeat_interleave(rep, 2)
        k = F.normalize(k.view(B, T, self.n_qk, self.dk), dim=-1).repeat_interleave(rep, 2)
        v = v.view(B, T, self.n_v, self.dv)
        beta = torch.sigmoid(self.w_beta(x))                       # (B, T, H)
        alpha = torch.exp(-self.A.exp() * F.softplus(self.w_alpha(x)))
        S = x.new_zeros(B, self.n_v, self.dk, self.dv, dtype=torch.float32)  # state in FP32
        q, k, v, beta, alpha = (u.float() for u in (q, k, v, beta, alpha))  # so the recurrence also runs in FP32 under bf16
        ys = []
        for t in range(T):
            S = alpha[:, t, :, None, None] * S
            e = v[:, t] - torch.einsum('bhk,bhkv->bhv', k[:, t], S)          # delta: the error
            S = S + beta[:, t, :, None, None] * torch.einsum('bhk,bhv->bhkv', k[:, t], e)
            ys.append(torch.einsum('bhk,bhkv->bhv', q[:, t], S))
        y = torch.stack(ys, 1).to(x.dtype)                         # (B, T, H, dv)
        g = self.w_z(x).view(B, T, self.n_v, self.dv)
        y = self.norm(y) * F.silu(g)       # original GDN: SiLU gate. Qwen3.8-Next switched to sigmoid (Eq. 11)
        return self.out(y.reshape(B, T, -1))
 

2. Gated attention: an output gate that removes the sink

The output of softmax attention is a convex combination of values: weights cannot be negative and sum to 1. So when a head wants to say “nothing to add for this query” — to make its output close to zero — it has exactly one option: dump the mass on a token whose value is nearly zero. In trained models the first token takes this role, and that is the attention sink (Xiao et al. 2024). Making a sink requires a large logit matching that token’s key, and as a by-product huge activations appear in the hidden state.

The output gate takes over this job. In Y′=Y⊙σ(xiWθ)Y'=Y\odot\sigma(x_iW_\theta), if the gate is near zero the output is small wherever the attention looks, so the distribution can stay on content. That is why the gate must be query-dependent and per head: each head has to decide separately, for each query, to “switch off”.

그림에서 확인할 것은 세 가지다. 덮어쓰기가 있으면 linear attention은 옛 값과 새 값의 합을 돌려준다(◆의 큰 오차). delta rule은 β=1\beta=1에서 그 key를 정확히 교체한다. N>dkN>d_k로 상태가 넘치면 delta rule도 간섭을 피하지 못하는데, α<1\alpha<1이면 오래된 key를 희생해 최근 key를 깨끗하게 유지한다. 언어 모델링에서 “최근 문맥이 더 중요하다”는 사전 지식을 gate로 넣은 셈이다. full attention 층이 필요한 이유도 여기서 보인다. 고정 크기 상태는 결국 넘치고, 정확한 토큰 단위 검색은 KV를 그대로 가진 층만 할 수 있다.

NumPy Gated delta rule: 두 형태의 일치, 덮어쓰기, 용량
import numpy as np
rng = np.random.default_rng(0)

def unit(x):
    return x / np.linalg.norm(x, axis=-1, keepdims=True)

def gated_delta(K, V, alpha, beta):
    """S_t = α_t S_{t-1} + β_t k_t (v_t - α_t S_{t-1}^T k_t)^T   (state S: d_k × d_v, 2608.30320 Eq. 1–3)"""
    dk, dv = K.shape[1], V.shape[1]
    S = np.zeros((dk, dv))
    for k, v, a, b in zip(K, V, alpha, beta):
        S = a * S
        e = v - S.T @ k                 # 이미 k에 묶여 있던 값과의 오차
        S = S + b * np.outer(k, e)      # 오차만 쓴다
    return S

def gated_delta_eq5(K, V, alpha, beta):
    """같은 것을 S_t = α_t (I - β_t k k^T) S_{t-1} + β_t k v^T 로 (Eq. 5)"""
    dk, dv = K.shape[1], V.shape[1]
    S = np.zeros((dk, dv))
    for k, v, a, b in zip(K, V, alpha, beta):
        S = a * (np.eye(dk) - b * np.outer(k, k)) @ S + b * np.outer(k, v)
    return S

def linear_attn(K, V):
    return K.T @ V                       # S = Σ k v^T (순수 덧셈)

N, dk, dv = 24, 32, 8
K = unit(rng.normal(size=(N, dk))); V = rng.normal(size=(N, dv))
al = rng.uniform(0.9, 1.0, N); be = rng.uniform(0.3, 1.0, N)
print("Eq.1–3 과 Eq.5 차이:", np.abs(gated_delta(K, V, al, be) - gated_delta_eq5(K, V, al, be)).max())

def recall_err(S, K, V):
    """저장된 각 key로 읽었을 때 상대 오차 ||S^T k - v|| / ||v||의 평균"""
    return np.mean(np.linalg.norm(K @ S - V, axis=1) / np.linalg.norm(V, axis=1))

# (1) 같은 key를 새 값으로 덮어쓰기
k = unit(rng.normal(size=dk)); v_old, v_new = rng.normal(size=dv), rng.normal(size=dv)
Kr, Vr = np.stack([k, k]), np.stack([v_old, v_new])
for name, S in [("linear", linear_attn(Kr, Vr)), ("delta β=1", gated_delta(Kr, Vr, [1, 1], [1, 1]))]:
    print(f"{name:10s} 읽은 값과 최신 값의 오차 {np.linalg.norm(S.T @ k - v_new):.3f}")

# (2) 용량: 저장 쌍 수 N이 d_k를 넘으면?
print(f"\n{'N':>4} | linear | delta(β=1) | gated delta(α=0.97)  [d_k={dk}]")
for N in [8, 16, 32, 64, 128]:
    K = unit(rng.normal(size=(N, dk))); V = rng.normal(size=(N, dv))
    e_lin = recall_err(linear_attn(K, V), K, V)
    e_del = recall_err(gated_delta(K, V, np.ones(N), np.ones(N)), K, V)
    Sg = gated_delta(K, V, np.full(N, 0.97), np.ones(N))
    e_g = recall_err(Sg, K[-8:], V[-8:])     # gated는 최근 8개만 본다
    print(f"{N:>4} | {e_lin:6.2f} | {e_del:10.2f} | {e_g:6.2f} (최근 8개)")
 

학습할 때 이 순차 recurrence를 그대로 돌리면 GPU가 놀기 때문에, 실제 커널은 시퀀스를 chunk로 나눠 chunk 안은 행렬곱으로, chunk 사이만 recurrence로 처리한다(Yang et al.의 chunkwise 알고리즘, flash-linear-attention). 아래 PyTorch 코드는 이해를 위한 naive recurrent 버전이다.

PyTorch PyTorch: Gated DeltaNet 층 (naive recurrent, 참고용) 로컬에서 실행run locally (pip install torch)
import torch, torch.nn as nn, torch.nn.functional as F

class GatedDeltaNet(nn.Module):
    """2608.30320 Eq. 1–11의 파라미터화. 실제 학습은 chunkwise 커널(fla)을 쓴다."""
    def __init__(self, d, n_qk=16, n_v=32, dk=128, dv=128, conv=4):
        super().__init__()
        self.n_qk, self.n_v, self.dk, self.dv = n_qk, n_v, dk, dv
        C = 2 * n_qk * dk + n_v * dv
        self.in_proj = nn.Linear(d, C, bias=False)                 # q, k, v
        self.conv = nn.Conv1d(C, C, conv, groups=C, padding=conv - 1, bias=False)
        self.w_beta = nn.Linear(d, n_v, bias=False)                # 쓰기 강도 β
        self.w_alpha = nn.Linear(d, n_v, bias=True)                # 감쇠 α의 입력 (bias = b_α)
        self.A = nn.Parameter(torch.zeros(n_v))                    # α = exp(-e^A softplus(.))
        self.w_z = nn.Linear(d, n_v * dv, bias=False)              # 출력 gate
        self.norm = nn.RMSNorm(dv)
        self.out = nn.Linear(n_v * dv, d, bias=False)

    def forward(self, x):                                          # x: (B, T, d)
        B, T, _ = x.shape
        h = self.conv(self.in_proj(x).transpose(1, 2))[..., :T]    # causal: 앞쪽 T개만
        h = F.silu(h).transpose(1, 2)
        q, k, v = h.split([self.n_qk * self.dk, self.n_qk * self.dk, self.n_v * self.dv], -1)
        rep = self.n_v // self.n_qk                                # QK head 하나를 V head rep개가 공유
        q = F.normalize(q.view(B, T, self.n_qk, self.dk), dim=-1).repeat_interleave(rep, 2)
        k = F.normalize(k.view(B, T, self.n_qk, self.dk), dim=-1).repeat_interleave(rep, 2)
        v = v.view(B, T, self.n_v, self.dv)
        beta = torch.sigmoid(self.w_beta(x))                       # (B, T, H)
        alpha = torch.exp(-self.A.exp() * F.softplus(self.w_alpha(x)))
        S = x.new_zeros(B, self.n_v, self.dk, self.dv, dtype=torch.float32)  # 상태는 FP32
        q, k, v, beta, alpha = (u.float() for u in (q, k, v, beta, alpha))  # bf16 입력에서도 순환은 FP32로
        ys = []
        for t in range(T):
            S = alpha[:, t, :, None, None] * S
            e = v[:, t] - torch.einsum('bhk,bhkv->bhv', k[:, t], S)          # delta: 오차
            S = S + beta[:, t, :, None, None] * torch.einsum('bhk,bhv->bhkv', k[:, t], e)
            ys.append(torch.einsum('bhk,bhkv->bhv', q[:, t], S))
        y = torch.stack(ys, 1).to(x.dtype)                         # (B, T, H, dv)
        g = self.w_z(x).view(B, T, self.n_v, self.dv)
        y = self.norm(y) * F.silu(g)       # 원 GDN은 SiLU gate. Qwen3.8-Next는 sigmoid로 바꿨다(Eq. 11)
        return self.out(y.reshape(B, T, -1))
 

2. Gated attention: sink를 없애는 출력 gate

softmax attention의 출력은 value들의 볼록 결합이다. 가중치는 음수가 될 수 없고 합이 1이다. 그러면 한 head가 “이 query에서는 할 말이 없다”, 즉 출력을 0에 가깝게 만들고 싶을 때 쓸 수 있는 방법은 하나뿐이다. value가 거의 0인 토큰에 질량을 몰아 버리는 것이다. 학습된 모델에서는 첫 토큰이 그 역할을 맡고, 이것이 attention sink다(Xiao et al. 2024). sink를 만들려면 그 토큰의 key와 맞는 큰 logit이 필요하고, 그 부산물로 hidden state에 거대한 activation이 생긴다.

출력 gate는 이 역할을 대신한다. Y′=Y⊙σ(xiWθ)Y'=Y\odot\sigma(x_iW_\theta)에서 gate가 0에 가까우면 attention 분포가 어디를 보든 출력이 작아지므로, 분포는 내용에 머물 수 있다. 이것이 gate가 query 의존적이고 head별이어야 하는 이유다. 각 head가 각 query에서 따로 “끄기”를 결정해야 한다.

gate 없음: 첫 토큰 가중치no gate: first-token weight – gate 있음: 첫 토큰 가중치gated: first-token weight –, gate 값gate value –
Left: a head should emit the value v of token 6 scaled by r. Top: plain softmax attention; bottom: the SDPA output multiplied by a sigmoid gate. Softmax weights sum to 1, so shrinking the output means dumping mass on the nearly-zero-valued first token (BOS). Drag r to 0: for a query with "nothing to do", all the weight goes to the first token — that is the attention sink. With a gate, the gate handles the scale and attention stays on content. Right: measured values per gate position and form on a 15A2B MoE (400B tokens) (Qiu et al. Table 4). Only the query-dependent, per-head SDPA gate removes first-token attention, 0.467 → 0.048. 왼쪽: 한 head가 token 6의 값 v를 r배만큼만 내보내야 하는 상황. 위는 일반 softmax attention, 아래는 SDPA 출력에 sigmoid gate를 곱한 경우다. softmax 가중치는 합이 1이라 출력을 줄이려면 값이 거의 0인 첫 토큰(BOS)에 질량을 버려야 한다. r을 0으로 끌어 보면 "할 일이 없는" query에서 가중치가 전부 첫 토큰으로 간다. 이것이 attention sink다. gate가 있으면 크기 조절은 gate가 맡고 attention은 내용에 머문다. 오른쪽: 15A2B MoE(400B 토큰)에서 gate 위치·형태별 실측값(Qiu et al. Table 4). query 의존적이고 head별인 SDPA gate만 첫 토큰 attention을 0.467 → 0.048로 없앤다.

The paper attributes the effect to two causes (§4).

Non-linearity. Head kk‘s output is oik=∑jSijk xj (WVkWOk)o^k_i=\sum_j S^k_{ij}\,x_j\,(W_V^kW_O^k): WVkWOkW_V^kW_O^k collapses into a single linear map of rank at most dkd_k. Putting a non-linearity in between (after the value, G2G_2, or after SDPA, G1G_1) increases expressiveness. That a gate after the dense output (G5G_5) does nothing (Table 1, PPL 6.017 vs baseline 6.026) fits this explanation. Even just an RMSNorm after SDPA lowers PPL to 5.847 (Table 3).

Query-dependent sparsity. The best gate, elementwise on the SDPA output, has a mean value of 0.116 — mostly near zero. NS-sigmoid, which restricts gate values to [0.5, 1], has the same non-linearity but no sparsity; its gain is smaller and the sink remains (F-Attn 0.451). A gate on the value side (G2G_2) depends on past tokens, so it cannot switch off per query, and the sink stays (0.297).

확인 문제Check yourself

In Table 4 of the gated attention paper, a gate after the value output (G2) cut the massive activation from 1053 to 125, yet first-token attention stayed at 0.297. What does this most directly suggest?

Massive activations dropped sharply but the sink stayed, so sinks do not necessarily arise only through massive activations (the paper’s reading in §4.3). What removed the sink was the per-head SDPA output gate that depends on the current query (F-Attn 0.048).

Results

Hybrid ablation: GDN vs SWA vs full attention

The Qwen3-Next blog published no comparison table. The later Qwen3.8-Next report ran the comparison on a 28-layer 25B-A3B MoE with the Qwen3.5 structure (400B tokens at 4K + 80B tokens at 32K). Both hybrids have one full-attention layer every four layers; the SWA window is 128.

ArchitectureMMLUMMLU-ProSuperGPQAMATHGSM8KBBHMMMLUEvalPlusMultiPL-EAvg
Full attention62.6537.5921.7649.4075.1363.7847.7451.0139.7349.87
SWA hybrid66.3040.6722.4545.4874.2265.8851.3352.1241.9351.15
GDN hybrid66.2642.8223.4553.9877.0768.7254.8349.7147.4853.81
2608.30320 Table 1.

The GDN hybrid beats full attention on 8 of 9. At this scale it is not “a little quality traded for efficiency” — quality goes up too. The report itself notes, however, that it cannot isolate which component causes which gain.

Effect of gated attention

15A2B MoE, 400B tokens (Table 1)Avg PPLHellaswagMMLUGSM8kC-eval
Baseline (q=32, kv=4)6.02673.0758.7952.9260.26
8 kv heads (+50M)5.97973.5159.7852.1662.26
4 more experts (+400M)5.96473.1958.8452.5463.19
SDPA elementwise gate G1G_1 (+201M)5.76174.6460.8255.2762.20
SDPA headwise gate G1G_1 (+1.6M)5.79274.5060.0554.4462.61
Dense-output gate G5G_56.01773.3259.4150.8759.43

The gate lowers PPL far more than spending the same parameters on heads or experts. A headwise gate — one scalar per head (1.6M parameters) — gives most of the effect. On a 1.7B dense 48-layer model at learning rate 8e-3 the baseline degrades to PPL 9.195 (400B tokens) or diverges (1T tokens), while with the gate the same learning rate improves results (7.325, 7.078; Table 2). For long context, extending 32K → 128K with YaRN gives RULER at 128K of 31.65 for the baseline and 58.82 with the gate (Table 5).

Qwen3-Next post-trained models

논문은 효과의 원인을 두 가지로 정리한다(§4).

비선형성. head kk의 출력은 oik=∑jSijk xj (WVkWOk)o^k_i=\sum_j S^k_{ij}\,x_j\,(W_V^kW_O^k)로, WVkWOkW_V^kW_O^k가 랭크 dkd_k 이하인 선형사상 하나로 합쳐진다. 그 사이에 비선형을 넣으면(value 뒤 G2G_2 또는 SDPA 뒤 G1G_1) 표현력이 오른다. dense 출력 뒤(G5G_5)의 gate가 효과가 없는 것(Table 1, PPL 6.017 vs baseline 6.026)이 이 설명과 맞는다. RMSNorm만 SDPA 뒤에 넣어도 PPL이 5.847로 내려간다(Table 3).

query 의존 희소성. 가장 좋은 SDPA 원소별 gate의 평균값은 0.116으로 대부분 0 근처다. gate 값을 [0.5, 1]로 제한한 NS-sigmoid는 비선형성은 같지만 희소성이 없어 효과가 작고 sink도 남는다(F-Attn 0.451). value 쪽 gate(G2G_2)는 과거 토큰에 의존하므로 query별로 끌 수 없어 sink가 그대로다(0.297).

확인 문제Check yourself

Gated attention 논문의 Table 4에서 value 출력 뒤 gate(G2)는 massive activation을 1053에서 125로 줄였지만 첫 토큰 attention은 0.297로 남았다. 이 결과가 가장 직접적으로 시사하는 것은?

massive activation은 크게 줄었는데 sink는 남았으므로, sink가 반드시 massive activation을 통해서만 생기는 것은 아니다(논문 §4.3의 해석). sink를 없앤 것은 현재 query에 의존하는 head별 SDPA 출력 gate였다(F-Attn 0.048).

실험 결과

하이브리드 ablation: GDN vs SWA vs full attention

Qwen3-Next 블로그는 비교 표를 공개하지 않았다. 이후 Qwen3.8-Next 보고서가 Qwen3.5 구조의 28층 25B-A3B MoE로 같은 비교를 했다(400B 토큰 4K + 80B 토큰 32K). 두 하이브리드 모두 4층마다 full attention 1층, SWA 창은 128이다.

구조MMLUMMLU-ProSuperGPQAMATHGSM8KBBHMMMLUEvalPlusMultiPL-E평균
Full attention62.6537.5921.7649.4075.1363.7847.7451.0139.7349.87
SWA hybrid66.3040.6722.4545.4874.2265.8851.3352.1241.9351.15
GDN hybrid66.2642.8223.4553.9877.0768.7254.8349.7147.4853.81
2608.30320 Table 1.

GDN 하이브리드가 full attention보다 9개 중 8개에서 낫다. “효율을 위해 성능을 조금 양보한다”가 아니라 이 규모에서는 성능도 오른다는 결과다. 다만 보고서 스스로 어느 구성 요소가 어떤 향상을 만들었는지는 분리하지 못한다고 적고 있다.

Gated attention의 효과

15A2B MoE, 400B 토큰 (Table 1)Avg PPLHellaswagMMLUGSM8kC-eval
Baseline (q=32, kv=4)6.02673.0758.7952.9260.26
kv head 8로 (+50M)5.97973.5159.7852.1662.26
expert 4개 추가 (+400M)5.96473.1958.8452.5463.19
SDPA 원소별 gate G1G_1 (+201M)5.76174.6460.8255.2762.20
SDPA headwise gate G1G_1 (+1.6M)5.79274.5060.0554.4462.61
dense 출력 gate G5G_56.01773.3259.4150.8759.43

같은 파라미터를 head나 expert로 늘리는 것보다 gate가 PPL을 훨씬 더 낮춘다. head당 스칼라 하나(1.6M 파라미터)인 headwise gate로도 효과의 대부분이 나온다. 1.7B dense 48층에서는 학습률 8e-3에서 baseline이 PPL 9.195로 무너지거나(400B 토큰) 발산하지만(1T 토큰), gate가 있으면 같은 학습률에서 오히려 좋아진다(7.325, 7.078; Table 2). 장문맥에서는 YaRN으로 32K → 128K 확장 시 RULER 128K가 baseline 31.65, gate 58.82다(Table 5).

Qwen3-Next 사후학습 모델

출처Source: Qwen3-Next-80B-A3B-Instruct model card
Qwen3-Next-Instruct (3B active) versus Qwen3-family instruct models. Tick All to see every benchmark at once as the difference from the across-model mean (points). A dash (–) means the value is not in the source. 활성 3B인 Qwen3-Next-Instruct와 Qwen3 계열 instruct 모델. 모두를 켜면 각 벤치마크에서 모델 평균과의 차이(점)를 한 번에 본다. 값이 없는 칸(–)은 보고서에 없는 값이다.

With 3B active it approaches Qwen3-235B-A22B-Instruct-2507 (22B active) on knowledge, reasoning and coding, but agent tasks show a large gap: TAU2-Retail 57.3 vs 74.6, TAU2-Telecom 13.2 vs 32.5. Arena-Hard v2 is a win rate judged by GPT-4.1. The Thinking version reaches AIME25 87.8, LiveCodeBench v6 68.7 and TAU2-Telecom 43.9, close to Qwen3-235B-A22B-Thinking-2507 (92.3, 74.1, 45.6) (Thinking model card).

Qwen3.5 base

In the base-model table of the Qwen3.5 blog, 397B-A17B versus Qwen3-235B-A22B-Base: MMLU-Pro 76.01 vs 67.73, SuperGPQA 57.96 vs 42.84, GPQA 54.64 vs 47.47, MultiPL-E 79.39 vs 65.94, SWE-agentless 43.26 vs 31.77. The blog calls this parity with the >1T-parameter Qwen3-Max-Base. The post-trained model reports SWE-bench Verified 76.4, Terminal Bench 2 52.5, BFCL-V4 72.9, TAU2-Bench 86.7 and BrowseComp 69.0 (context folding) / 78.6 (discard-all strategy) (model card).

Reading critically

  • No technical report. The Qwen3.5 blog announced an “upcoming technical report”, but as of 2026-12 the only one we could find is the Qwen3.5-Omni report (2604.15804). Training hyperparameters, data mixture, RL algorithm and rewards are all missing.
  • The evidence for the hybrid lives in another document. The 3:1 ratio rests on one sentence in the blog; the quantitative comparison came a year later in the next generation’s report (2608.30320 Table 1), at the 25B-A3B, 480B-token scale.
  • What the throughput ratios compare. “10× throughput” compares a dense 32B (32B active) with an MoE (3B active), so it is not the effect of the attention structure alone. The blog itself warns that it depends heavily on the implementation (vLLM/SGLang versions, kernels).
  • Same model, different numbers. Qwen3-235B-A22B-Base’s MMLU is 87.81 in the Qwen3 report and 87.33 in the Qwen3.5 blog table. The evaluation pipeline changed; cross-generation numbers should only be read within one table.
  • The agent gap. Despite the long-context and efficiency advantages, Qwen3-Next-Instruct is well below the 235B Instruct on the TAU2 family. The material cannot tell whether this is a limit of 3B active parameters or a difference in post-training.
  • Retrieval limits of linear attention. A GDN state always overflows as context grows; retrieval tasks like RULER are carried by the full-attention layers. Whether a 1/4 ratio is enough at 1M tokens is revisited in the next generation, which replaces full attention with sparse attention (Qwen3.8-Next lesson).
NumPy KV cache vs GDN state: decode memory for one sequence
cfg = {  # values from the public config / model cards
    "Qwen3-30B-A3B":      dict(L=48, full_every=1, kv=4, hd=128, v_heads=0,  qk_heads=0,  lhd=128),
    "Qwen3-Next-80B-A3B": dict(L=48, full_every=4, kv=2, hd=256, v_heads=32, qk_heads=16, lhd=128),
    "Qwen3.5-397B-A17B":  dict(L=60, full_every=4, kv=2, hd=256, v_heads=64, qk_heads=16, lhd=128),
}
def mem_bytes(c, n, kv_bytes=2, state_bytes=4, conv=4):
    n_full = c["L"] // c["full_every"]; n_lin = c["L"] - n_full
    kv = n_full * n * 2 * c["kv"] * c["hd"] * kv_bytes                      # K and V
    state = n_lin * c["v_heads"] * c["lhd"] * c["lhd"] * state_bytes        # d_k × d_v per head
    convs = n_lin * (conv - 1) * (2 * c["qk_heads"] + c["v_heads"]) * c["lhd"] * kv_bytes
    return kv, state + convs
print(f"{'model':20s} | {'context':>7} | {'KV cache':>9} | {'GDN state':>9} | total (one sequence, GiB)")
for name, c in cfg.items():
    for n in [32_768, 262_144, 1_048_576]:
        kv, st = mem_bytes(c, n)
        print(f"{name:20s} | {n//1024:>6}K | {kv/2**30:9.2f} | {st/2**30:9.3f} | {(kv+st)/2**30:.2f}")
 

Summary

  • Qwen3-Next is an 80B-A3B model with 48 layers arranged as 12 × (3 GDN + 1 gated attention) that uses 10+1 of 512 experts. Qwen3.5-397B-A17B is the same structure scaled to 60 layers, as a native VLM.
  • The delta rule is one gradient step of online regression on the fast-weight matrix SS: the same key is replaced, and the decay α\alpha erases old memory. A fixed-size state eventually overflows, so exact retrieval is left to the 1/4 of layers with full attention.
  • A query-dependent, per-head sigmoid gate on the SDPA output lifts the convex-combination constraint of softmax, removing attention sinks (first-token attention 0.467 → 0.048) and massive activations, and tolerating larger learning rates and context extension.
  • In a same-scale ablation, the GDN hybrid beats full attention on 8 of 9 benchmarks (2608.30320 Table 1).
  • Neither model has a technical report. The training and RL recipes exist only as blog-level descriptions, so read the numbers with their sources in mind.

활성 3B로 활성 22B인 Qwen3-235B-A22B-Instruct-2507에 지식·추론·코딩에서 근접하지만, agent 과제는 차이가 크다. TAU2-Retail 57.3 vs 74.6, TAU2-Telecom 13.2 vs 32.5. Arena-Hard v2는 GPT-4.1 채점 승률이다. Thinking 버전은 AIME25 87.8, LiveCodeBench v6 68.7, TAU2-Telecom 43.9로 Qwen3-235B-A22B-Thinking-2507(92.3, 74.1, 45.6)에 근접한다(Thinking model card).

Qwen3.5 base

Qwen3.5 블로그의 base 모델 표에서 397B-A17B는 Qwen3-235B-A22B-Base 대비 MMLU-Pro 76.01 vs 67.73, SuperGPQA 57.96 vs 42.84, GPQA 54.64 vs 47.47, MultiPL-E 79.39 vs 65.94, SWE-agentless 43.26 vs 31.77이다. 블로그는 이것이 1T 이상 파라미터의 Qwen3-Max-Base와 동급이라고 쓴다. 사후학습 모델은 SWE-bench Verified 76.4, Terminal Bench 2 52.5, BFCL-V4 72.9, TAU2-Bench 86.7, BrowseComp 69.0(context folding) / 78.6(discard-all 전략)이다(model card).

비판적으로 읽기

  • 기술 보고서가 없다. Qwen3.5 블로그는 “곧 나올 기술 보고서”를 예고했지만, 2026-12 현재 찾을 수 있는 것은 Qwen3.5-Omni 보고서(2604.15804)뿐이다. 학습 하이퍼파라미터, 데이터 혼합, RL 알고리즘과 보상이 모두 빠져 있다.
  • 하이브리드 비교의 근거가 다른 문서에 있다. 3:1 비율의 근거는 블로그의 한 문장이고, 정량 비교는 1년 뒤 다음 세대 보고서(2608.30320 Table 1)에서 나왔다. 그 비교도 25B-A3B, 480B 토큰 규모다.
  • 처리량 배수의 비교 대상. “10배 처리량”은 dense 32B(활성 32B)와 MoE(활성 3B)의 비교라 attention 구조만의 효과가 아니다. 구현(vLLM/SGLang 버전, 커널)에 따라 크게 달라진다고 블로그도 주의를 단다.
  • 같은 모델, 다른 숫자. Qwen3-235B-A22B-Base의 MMLU가 Qwen3 보고서에서 87.81, Qwen3.5 블로그 표에서 87.33이다. 평가 파이프라인이 바뀌었다는 뜻이고, 세대 간 비교 숫자는 같은 표 안에서만 읽어야 한다.
  • agent 성능의 격차. 장문맥·효율 이점에도 TAU2 계열에서 Qwen3-Next-Instruct는 235B-Instruct보다 크게 낮다. 활성 3B의 한계인지 사후학습의 차이인지 자료로는 구분할 수 없다.
  • 선형 attention의 검색 한계. GDN 상태는 문맥이 길어지면 반드시 넘친다. RULER 같은 검색 과제는 full attention 층이 떠받친다. 1/4 비율이 1M 토큰에서도 충분한지는 다음 세대에서 full attention을 sparse attention으로 바꾸며 다시 다뤄진다(Qwen3.8-Next 레슨).
NumPy KV cache vs GDN 상태: 시퀀스 하나의 decode 메모리
cfg = {  # 공개 config/model card 값
    "Qwen3-30B-A3B":      dict(L=48, full_every=1, kv=4, hd=128, v_heads=0,  qk_heads=0,  lhd=128),
    "Qwen3-Next-80B-A3B": dict(L=48, full_every=4, kv=2, hd=256, v_heads=32, qk_heads=16, lhd=128),
    "Qwen3.5-397B-A17B":  dict(L=60, full_every=4, kv=2, hd=256, v_heads=64, qk_heads=16, lhd=128),
}
def mem_bytes(c, n, kv_bytes=2, state_bytes=4, conv=4):
    n_full = c["L"] // c["full_every"]; n_lin = c["L"] - n_full
    kv = n_full * n * 2 * c["kv"] * c["hd"] * kv_bytes                      # K와 V
    state = n_lin * c["v_heads"] * c["lhd"] * c["lhd"] * state_bytes        # head마다 d_k × d_v
    convs = n_lin * (conv - 1) * (2 * c["qk_heads"] + c["v_heads"]) * c["lhd"] * kv_bytes
    return kv, state + convs
print(f"{'모델':20s} | {'문맥':>6} | {'KV cache':>9} | {'GDN 상태':>8} | 합계 (시퀀스 1개, GiB)")
for name, c in cfg.items():
    for n in [32_768, 262_144, 1_048_576]:
        kv, st = mem_bytes(c, n)
        print(f"{name:20s} | {n//1024:>5}K | {kv/2**30:9.2f} | {st/2**30:8.3f} | {(kv+st)/2**30:.2f}")
 

정리

  • Qwen3-Next는 48층을 12 × (GDN 3 + gated attention 1)로 짜고 512 expert 중 10+1개만 쓰는 80B-A3B다. Qwen3.5-397B-A17B는 같은 구조를 60층으로 키운 native VLM이다.
  • delta rule은 fast-weight 행렬 SS에 대한 온라인 회귀의 경사 한 step이다. 같은 key는 교체되고, 감쇠 α\alpha가 오래된 기억을 지운다. 고정 크기 상태는 결국 넘치므로 정확한 검색은 1/4의 full attention 층이 맡는다.
  • SDPA 출력의 query 의존·head별 sigmoid gate는 softmax의 볼록 결합 제약을 풀어 attention sink(첫 토큰 attention 0.467 → 0.048)와 massive activation을 없애고, 큰 학습률과 장문맥 확장을 견디게 한다.
  • 같은 규모 ablation에서 GDN 하이브리드는 full attention보다 9개 중 8개 벤치마크에서 낫다(2608.30320 Table 1).
  • 두 모델 모두 기술 보고서가 없다. 학습·RL 레시피는 블로그 수준의 서술뿐이므로 수치는 출처를 확인하며 읽어야 한다.

더 읽을거리Further reading