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
| Item | Qwen3-Next-80B-A3B | Qwen3.5-397B-A17B |
|---|---|---|
| Release | 2025-09-11 (GitHub notice), blog | 2026-02-16, blog (dated 2026-02-17) |
| Parameters (total / active) | 80B / 3B (79B non-embedding) | 397B / 17B |
| Layer layout | 48 layers = 12 × (3 × GDN→MoE, 1 × Gated Attention→MoE) | 60 layers = 15 × (3 × GDN→MoE, 1 × Gated Attention→MoE) |
| Hidden size | 2048 | 4096 |
| Gated attention | Q 16 / KV 2 heads, head dim 256, RoPE on 64 dims (25%) | Q 32 / KV 2, head 256, RoPE on 64 dims |
| Gated DeltaNet | V 32 / QK 16 heads, head dim 128 | V 64 / QK 16 heads, head 128 |
| MoE | 512 experts, 10 routed + 1 shared, expert dim 512 | 512 experts, 10 routed + 1 shared, expert dim 1024 |
| MTP | yes (multi-step training) | yes (multi-step training) |
| Context | 262,144 native, extensible to 1,010,000 | 262,144 native, extensible to 1,010,000 |
| Pre-training | 15T (uniform sample of Qwen3’s 36T corpus) | not disclosed (“far more visual-text tokens than Qwen3”) |
| Vocabulary | 151,936 (same as Qwen3, padded) | 248,320 (padded, “250K”) |
| License | Apache 2.0, open weights | Apache 2.0, open weights |
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 matrix per head, the same size whatever the length. With Qwen3-Next’s numbers:
- KV of one full-attention layer: values per token.
- State of one GDN layer: 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-A3B | Qwen3.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) |
| hidden | 2048 | 4096 |
| Gated Attention | Q 16 / KV 2 head, head 차원 256, RoPE 64차원(25%) | Q 32 / KV 2, head 256, RoPE 64차원 |
| Gated DeltaNet | V 32 / QK 16 head, head 차원 128 | V 64 / QK 16 head, head 128 |
| MoE | 512 expert, 10 routed + 1 shared, expert 차원 512 | 512 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, 가중치 공개 |
무엇이 새로운가
- 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마다 행렬 하나 만 들고 다니며, 길이에 상관없이 크기가 같다. Qwen3-Next의 수치로 계산하면 이렇다.
- full attention 한 층의 KV: 토큰당 개 값.
- GDN 한 층의 상태: 개 값(+ short conv 상태).
상태를 FP32, KV를 BF16으로 두면 GDN 한 층의 상태가 full attention 한 층의 약 1K 토큰 분 KV와 같다. 문맥이 1K보다 짧으면 하이브리드는 메모리 면에서 오히려 손해고, 수십만 토큰에서는 KV가 1/4로 줄어든 효과가 그대로 남는다.
→ 더 깊이: 이 하이브리드가 Qwen3.5와 Qwen3.8-Next로 어떻게 이어지는지는 Qwen 계보, 고정 크기 recurrent 상태가 서빙의 prefix caching과 상태 snapshot에 주는 의미는 긴 문맥 서빙.
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 with . is a matrix that stores key→value associations — a fast weight (Schlag et al. 2021). Pure addition has two problems. Writing a new value under the same key adds it to the old one. And putting in more pairs than causes interference with no way to erase.
The delta rule treats as “a linear regression from keys to values” and takes one gradient step on the squared error of the new pair :
is the learning rate, and is “the difference from what is already bound to this key”. With and , holds exactly after the update: rewriting a key replaces its value. Gated DeltaNet (Yang et al. 2024) multiplies by a data-dependent decay that gradually erases all old memory (Mamba2’s gate). In the notation of the Qwen3.8-Next report (2608.30320 Eq. 1–5):
The two gates do different jobs: sets the lifetime of the whole state, and the delta term handle the content of a specific key. The same report’s parameterisation (Eq. 6–11):
L2 normalisation guarantees , keeping the eigenvalues of in (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):
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-Next | Qwen3.5 | |
|---|---|---|
| Pre-training tokens | 15T, a uniform sample of Qwen3’s 36T corpus | not disclosed. “Far larger” visual-text token count than Qwen3; strengthened Chinese, English, multilingual, STEM and reasoning data; stricter filtering |
| Modalities | text | text, image, video with early fusion (native VLM) |
| Languages | same as Qwen3 (119) | 201 languages and dialects |
| Tokenizer | same as Qwen3 | ~250K vocabulary; 10–60% better encoding/decoding efficiency for most languages |
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:
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
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를 빼면 출력은 , 로 쓸 수 있다. 는 key→value 연상을 저장하는 행렬, 즉 fast weight다(Schlag et al. 2021). 순수 덧셈 에는 두 가지 문제가 있다. 같은 key에 새 값을 쓰면 옛 값과 더해진다. 그리고 보다 많은 쌍을 넣으면 서로 간섭하는데 지울 방법이 없다.
delta rule은 를 “key를 넣으면 value가 나오는 선형 회귀”로 보고, 새 쌍 에 대한 제곱오차를 한 step 경사하강한다.
은 학습률이고, 는 “이미 이 key에 묶인 값과의 차이”다. 이고 이면 갱신 뒤 가 정확히 성립한다. 같은 key를 다시 쓰면 교체가 된다. Gated DeltaNet(Yang et al. 2024)은 여기에 데이터 의존 감쇠 를 곱해 오래된 기억 전체를 서서히 지운다(Mamba2의 gate). Qwen3.8-Next 보고서의 표기(2608.30320 Eq. 1–5)로 정리하면
두 gate의 역할이 다르다. 는 상태 전체의 수명을, 와 delta 항은 특정 key의 내용을 다룬다. 같은 보고서의 파라미터화(Eq. 6–11)는 이렇다.
L2 정규화가 을 보장해 의 고유값이 에 머물게 하고(안정성), 길이 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).
는 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-Next | Qwen3.5 | |
|---|---|---|
| 사전학습 토큰 | 15T, Qwen3의 36T 코퍼스에서 균등 표본 | 비공개. Qwen3보다 “훨씬 큰” 시각-텍스트 토큰, 중·영·다국어·STEM·추론 데이터 강화, 더 엄격한 필터링 |
| 모달리티 | 텍스트 | 텍스트·이미지·비디오 early fusion (native VLM) |
| 언어 | Qwen3와 동일(119) | 201개 언어·방언 |
| 토크나이저 | Qwen3와 동일 | 약 250K 어휘. 대부분 언어에서 인코딩·디코딩 효율 10–60% 향상 |
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로 다뤘다.
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 잊는 메모리
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 . When the state overflows () the delta rule cannot avoid interference either, but with 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.
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.
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 , 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은 에서 그 key를 정확히 교체한다. 로 상태가 넘치면 delta rule도 간섭을 피하지 못하는데, 이면 오래된 key를 희생해 최근 key를 깨끗하게 유지한다. 언어 모델링에서 “최근 문맥이 더 중요하다”는 사전 지식을 gate로 넣은 셈이다. full attention 층이 필요한 이유도 여기서 보인다. 고정 크기 상태는 결국 넘치고, 정확한 토큰 단위 검색은 KV를 그대로 가진 층만 할 수 있다.
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 버전이다.
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는 이 역할을 대신한다. 에서 gate가 0에 가까우면 attention 분포가 어디를 보든 출력이 작아지므로, 분포는 내용에 머물 수 있다. 이것이 gate가 query 의존적이고 head별이어야 하는 이유다. 각 head가 각 query에서 따로 “끄기”를 결정해야 한다.
The paper attributes the effect to two causes (§4).
Non-linearity. Head ‘s output is : collapses into a single linear map of rank at most . Putting a non-linearity in between (after the value, , or after SDPA, ) increases expressiveness. That a gate after the dense output () 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 () depends on past tokens, so it cannot switch off per query, and the sink stays (0.297).
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.
| Architecture | MMLU | MMLU-Pro | SuperGPQA | MATH | GSM8K | BBH | MMMLU | EvalPlus | MultiPL-E | Avg |
|---|---|---|---|---|---|---|---|---|---|---|
| Full attention | 62.65 | 37.59 | 21.76 | 49.40 | 75.13 | 63.78 | 47.74 | 51.01 | 39.73 | 49.87 |
| SWA hybrid | 66.30 | 40.67 | 22.45 | 45.48 | 74.22 | 65.88 | 51.33 | 52.12 | 41.93 | 51.15 |
| GDN hybrid | 66.26 | 42.82 | 23.45 | 53.98 | 77.07 | 68.72 | 54.83 | 49.71 | 47.48 | 53.81 |
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 PPL | Hellaswag | MMLU | GSM8k | C-eval |
|---|---|---|---|---|---|
| Baseline (q=32, kv=4) | 6.026 | 73.07 | 58.79 | 52.92 | 60.26 |
| 8 kv heads (+50M) | 5.979 | 73.51 | 59.78 | 52.16 | 62.26 |
| 4 more experts (+400M) | 5.964 | 73.19 | 58.84 | 52.54 | 63.19 |
| SDPA elementwise gate (+201M) | 5.761 | 74.64 | 60.82 | 55.27 | 62.20 |
| SDPA headwise gate (+1.6M) | 5.792 | 74.50 | 60.05 | 54.44 | 62.61 |
| Dense-output gate | 6.017 | 73.32 | 59.41 | 50.87 | 59.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 의 출력은 로, 가 랭크 이하인 선형사상 하나로 합쳐진다. 그 사이에 비선형을 넣으면(value 뒤 또는 SDPA 뒤 ) 표현력이 오른다. dense 출력 뒤()의 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()는 과거 토큰에 의존하므로 query별로 끌 수 없어 sink가 그대로다(0.297).
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이다.
| 구조 | MMLU | MMLU-Pro | SuperGPQA | MATH | GSM8K | BBH | MMMLU | EvalPlus | MultiPL-E | 평균 |
|---|---|---|---|---|---|---|---|---|---|---|
| Full attention | 62.65 | 37.59 | 21.76 | 49.40 | 75.13 | 63.78 | 47.74 | 51.01 | 39.73 | 49.87 |
| SWA hybrid | 66.30 | 40.67 | 22.45 | 45.48 | 74.22 | 65.88 | 51.33 | 52.12 | 41.93 | 51.15 |
| GDN hybrid | 66.26 | 42.82 | 23.45 | 53.98 | 77.07 | 68.72 | 54.83 | 49.71 | 47.48 | 53.81 |
GDN 하이브리드가 full attention보다 9개 중 8개에서 낫다. “효율을 위해 성능을 조금 양보한다”가 아니라 이 규모에서는 성능도 오른다는 결과다. 다만 보고서 스스로 어느 구성 요소가 어떤 향상을 만들었는지는 분리하지 못한다고 적고 있다.
Gated attention의 효과
| 15A2B MoE, 400B 토큰 (Table 1) | Avg PPL | Hellaswag | MMLU | GSM8k | C-eval |
|---|---|---|---|---|---|
| Baseline (q=32, kv=4) | 6.026 | 73.07 | 58.79 | 52.92 | 60.26 |
| kv head 8로 (+50M) | 5.979 | 73.51 | 59.78 | 52.16 | 62.26 |
| expert 4개 추가 (+400M) | 5.964 | 73.19 | 58.84 | 52.54 | 63.19 |
| SDPA 원소별 gate (+201M) | 5.761 | 74.64 | 60.82 | 55.27 | 62.20 |
| SDPA headwise gate (+1.6M) | 5.792 | 74.50 | 60.05 | 54.44 | 62.61 |
| dense 출력 gate | 6.017 | 73.32 | 59.41 | 50.87 | 59.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 사후학습 모델
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).
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 : the same key is replaced, and the decay 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 레슨).
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 행렬 에 대한 온라인 회귀의 경사 한 step이다. 같은 key는 교체되고, 감쇠 가 오래된 기억을 지운다. 고정 크기 상태는 결국 넘치므로 정확한 검색은 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
- Qwen Team, Qwen3-Next: Towards Ultimate Training & Inference Efficiency (blog, 2025-09) — Qwen3-Next의 1차 자료(기술 보고서 없음). 3:1 하이브리드, 512 expert, 안정화 설계, MTP, 15T 토큰과 비용·처리량 수치. 원문은 qwen.ai/blog?id=qwen3-next.The primary source for Qwen3-Next (there is no technical report). The 3:1 hybrid, 512 experts, stability designs, MTP, 15T tokens and the cost and throughput numbers. Original at qwen.ai/blog?id=qwen3-next.
- Qwen Team, Qwen3-Next-80B-A3B-Instruct / -Thinking model cards (Hugging Face, 2025) — 층 배치, head 수·차원, expert 구성, 사후학습 벤치마크 표.Layer layout, head counts and sizes, expert configuration, post-training benchmark tables.
- Qiu et al., Gated Attention for Large Language Models: Non-linearity, Sparsity, and Attention-Sink-Free (arXiv 2505.06708, 2025) — Qwen3-Next·Qwen3.5 full attention 층의 출력 gate를 정당화한 Qwen 팀 논문. 30여 개 변형 비교, sink·massive activation 분석.The Qwen-team paper behind the output gate in the full-attention layers of Qwen3-Next and Qwen3.5. 30+ variants compared; analysis of sinks and massive activations.
- Yang, Kautz, Hatamizadeh, Gated Delta Networks: Improving Mamba2 with Delta Rule (arXiv 2412.06464, ICLR 2025) — Gated DeltaNet 원 논문. 감쇠 gate와 delta rule의 결합, chunkwise 병렬 학습.The original Gated DeltaNet paper. Combines a decay gate with the delta rule; chunkwise-parallel training.
- Qwen Team, Qwen3.5: Towards Native Multimodal Agents (blog, 2026-02) — Qwen3-Next 아키텍처를 397B-A17B로 키운 다음 세대. 201개 언어, 250K 어휘, FP8 파이프라인, 비동기 RL과 RL 환경 확장.The next generation, scaling the Qwen3-Next architecture to 397B-A17B. 201 languages, 250K vocabulary, FP8 pipeline, asynchronous RL and scaled RL environments.
- Qwen Team, On the Design of Qwen3.8-Next Architecture (arXiv 2608.30320, 2026) — Qwen3.5 구조 위에서 한 GDN 하이브리드 vs SWA 하이브리드 vs full attention ablation(Table 1)과 GDN 식 정리. 다음 레슨의 대상.The GDN-hybrid vs SWA-hybrid vs full-attention ablation on the Qwen3.5 structure (Table 1) and a clean statement of the GDN equations. Subject of the next lesson.
- Schlag, Irie, Schmidhuber, Linear Transformers Are Secretly Fast Weight Programmers (ICML 2021) — linear attention = fast-weight 메모리, delta rule을 처음 attention에 넣은 논문.Linear attention as fast-weight memory; the paper that first brought the delta rule into attention.
- Xiao et al., Efficient Streaming Language Models with Attention Sinks (ICLR 2024) — attention sink 현상을 처음 정리한 논문.The paper that first described the attention-sink phenomenon.