Skip to main content
conformance ✓ spec 1.0 qwen3_5 The Model Spec of Qwen/Qwen3.8-27B in TheFormalEra.Spec.Registry. The constants below are transcribed from its published config.json, and the official transformers.Qwen3_5ForConditionalGeneration is checked against them.

At a glance

What to watch for

  • Layer i is full attention iff i % 4 = 3 (qwen3_8_27b_pattern): layers 3, 7, …, 63. The other 48 layers are Gated DeltaNet.
  • RMSNorm weights are applied as (1 + w) (rmsnormOffset), including the per-head q/k norms and the final norm. A kernel that multiplies by w is a counterexample for every T.
  • Gated Attention: 24 query heads, 4 KV heads (6 query heads per KV head), head dim 256. Each head’s query and output gate come from the same projection, and the output is o ⊙ σ(gate) (attn.gate).
  • Partial RoPE: only the first 64 of 256 dimensions rotate (partial_rotary_factor = 1/4), θ = 10,000,000. The mRoPE sections only matter for image and video input; for text the three position groups coincide.
  • Gated DeltaNet: 16 key heads and 48 value heads of dimension 128 (value head h reads key head h / 3), a width-4 causal convolution with SiLU, L2-normalised q and k, and a gated RMSNorm on the output.
  • Scope: the text-only language-model path. The vision encoder and the MTP head are out of scope.

Compute-graph nodes

Use these paths in Spec Keys: Qwen/Qwen3.8-27B@1.0:layers[*].<node> for per-layer nodes, Qwen/Qwen3.8-27B@1.0:<node> for the others. Nodes listed twice have different constants in different layers (for example, sliding-window and global attention). A kernel annotated with layers[*].<node> is verified against each variant.

Tensors of the main nodes

Conformance

The official transformers.Qwen3_5ForConditionalGeneration agrees with this spec, layer by layer in float64, to a maximum relative error of 4.1e-14 (reduced-width profile, 2 weight draws × 2 lengths).

Published configuration