models / compare / qwen3-5-vs-deepseek-v4-1-flash
Qwen3.5-397B-A17B vs DeepSeek-V4.1-Flash
How Qwen3.5-397B-A17B (Alibaba Qwen, February 2026) and DeepSeek-V4.1-Flash (DeepSeek, September 2026) are built, drawn on the same November 2026 blueprint. They make different choices on 10 of 27 components. Select a component in either diagram to find it in the table.
--- frontier-llm@2026-11+++ qwen3-5@2026-02+0~3−3
Qwen3.5-397B-A17B
Alibaba Qwen, February 2026, 397B total, 17B active
--- frontier-llm@2026-11+++ deepseek-v4-1-flash@2026-09+0~3−1
DeepSeek-V4.1-Flash
DeepSeek, September 2026, 552B + 196B Engram total, 16B (8B in prefill) active
Component by component
Qwen3.5-397B-A17B and DeepSeek-V4.1-Flash differ on 10 of 27 components.
| Blueprint component | Qwen3.5-397B-A17B | DeepSeek-V4.1-Flash |
|---|---|---|
Same as the blueprintTwo Engram modules (196B parameters, FP8) at layers 1 and 14: n-gram orders 2–4, 8 hash heads per order, 2,048 dims per order, about 16M rows per head table. A sigmoid gate on each mHC stream's normalized dot product with its own key adds a shared value. The short causal conv was dropped. Rows are prefetched from host memory over RDMA. | ||
Single residual streamOne d = 4,096 pre-norm residual stream with zero-centred RMSNorm gains; no hyper-connections or depth attention. | Same as the blueprintSingle-Pass mHC: n = 4 streams of width 5,120 and 20 Sinkhorn iterations as in V4, but each sublayer reads its input with the mixing coefficients predicted by the previous sublayer. Removing that dependency lets the Mega-mHC kernel read and write the residual once, halving activation traffic, with negligible quality loss reported. | |
Same as the blueprintGated DeltaNet in 45 of 60 layers, three before every attention layer. 16 query/key heads and 64 value heads of dim 128 (each q/k head serves 4 value heads); short causal conv (kernel 4) + SiLU on q, k, v; per-head scalar decay g = −eᴬ·softplus(a + dt_bias) and write strength β = σ(b). Each layer keeps a 64 × 128 × 128 state per sequence, held in FP32. | ||
Gated grouped-query attentionEvery fourth layer: full causal GQA with 32 query heads sharing 2 KV heads of dim 256, QK-Norm and a sigmoid output gate. | CED decoder attention (CSA2 over encoder-projected KV)Layers 20–39 take uncompressed global KV from the encoder's last hidden state and re-select with a hierarchical indexer. | |
CSA2 encoder layers (2× compression, Full + Reuse)Layers 2–19: KV pooled 2→1 and computed in only 3 of 18 layers; the rest reuse that KV and its top-512 selection. | ||
Same as the blueprintLayers 0–1 are pure sliding-window layers; every other layer adds the 128 most recent uncompressed tokens (SWA KV kept in FP8) to its sparse selection. SWA KV is never persisted: on a prefix-cache hit it is rebuilt by replaying only the last 128 tokens (SWA Bounded Replay), with negligible measured loss. | ||
Softmax top-k routerA linear router scores 512 experts; softmax, keep the top 10, renormalize. No selection bias. | Same as the blueprint√softplus scores over 384 experts, top-6, with auxiliary-loss-free bias balancing kept separately for text and image tokens (each bias set updated from its own modality's load, speed 0.001) plus a 0.0001 sequence-level loss. Selected scores are normalized and scaled by 1.5. V4's hash-routed early layers are gone. | |
Same as the blueprintOne MTP layer: a full gated-attention + 512-expert MoE block whose input is a linear projection (8,192 → 4,096) of the RMSNorm'd next-token embedding concatenated with the RMSNorm'd trunk state. It reuses the main embedding and LM head and, per the model card, was trained with multiple steps, so the one layer is applied repeatedly to draft several tokens. | DSpark drafter (trained after pretraining)Three 128-token-window blocks draft 5 tokens per pass from the backbone's last 3 layers; no MTP loss in pretraining. | |
Same as the blueprintMuon (momentum 0.95, weight decay 0.1, update RMS 0.18) for backbone linear weights, Engram projections and the vision projector, applied per head to query and key weights. Embeddings, the head and Engram tables use a momentum update with Sinkhorn row/column balancing (Engram learning rate 5×); AdamW covers norms and other non-matrix parameters. | ||
Same as the blueprintThe final stage is full-vocabulary on-policy distillation over all domains from more than 40 teachers, which may differ architecturally from the student, run with asynchronous generation. |