archdb

LLM architectures and pretraining recipes, with sources.

Qwen3.8-27B

Qwen · reasoning checkpoint

No base checkpoint is public; facts describe the released post-trained checkpoint.

Open in the comparison table Hugging Face ↗

KV calculations use one sequence at 131,072 tokens and 16-bit cache elements. They include bounded sliding-window caches. This is retained cache payload, not peak prefill memory. The comparison table also offers sourced mixed-precision layouts, including quantization scales.

Release

Released

2026-08-14

Source: model-card · QwenLM GitHub README; News
2026-08-14: Qwen3.8-27B is now available on

Hugging Face repository created 2026-08-05, before public release.

Date the weights (or, if earlier, the technical report) were first made public, YYYY-MM-DD, as dated by the publisher. A Hugging Face repository creation date is used only when no dated publisher page exists, with a note.

License

apache-2.0

Source: model-card · README.md; YAML front matter
license: apache-2.0

License of the released weights as declared by the publisher (model card metadata or license file), e.g. apache-2.0, mit, or the name of a custom license.

Input modalities

text + image + video

Source: model-card · README.md; introduction
a native vision-language model that understands images and videos

Input modalities of the released checkpoint as the publisher states them, from: text, image, video, audio, joined with ' + ' in that order ("text", "text + image + video").

Parameters

Total params

27B parameters

Source: model-card · README.md; Model Overview; Language Model
Number of Parameters: 27B

Total parameter count as reported by the publisher. See params.note for whether embeddings, MTP heads or vision towers are included.

Active params

27B parameters

Source: model-card · README.md; Model Overview; Language Model
Number of Parameters: 27B

Dense model; all parameters active.

Parameters used per token in the forward pass, as reported by the publisher.

Active non-embedding (stated)

Not disclosed

Active parameters excluding the input embedding and the output head (unembedding). Stated by the publisher, or computed from params.active by subtracting vocab × d_model for each of the embedding and output head that params.active is stated to include (basis inferred, note with the arithmetic). Not disclosed when the scope of params.active is not stated.

Counted total params

26.9B parameters

Calculated: embedding + output head + all experts + other weights, Qwen/Qwen3.8-27B@1d4bf0f safetensors headers; reproduces stated total (backbone) and active (with embedding and output head)

Parameters of the text backbone counted from the released checkpoint's safetensors headers (embedding, output head, all experts and other weights; excluding MTP modules, vision/audio towers and n-gram lookup tables). Shown only when the counts reproduce the publisher's stated total and active parameters within 5% under some scope.

Counted embedding + head

2.543B parameters

Calculated: input embedding + output head, Qwen/Qwen3.8-27B@1d4bf0f safetensors headers

Input embedding plus output head (once if tied), counted from the checkpoint.

Non-emb. params (counted)

24.35B parameters

Calculated: dense + routed backbone weights; excludes input embedding, output head, lookup tables, MTP and other modalities, Qwen/Qwen3.8-27B@1d4bf0f safetensors headers; reproduces stated total (backbone) and active (with embedding and output head)

Language backbone weights excluding input embeddings, output head, lookup/Engram tables, MTP modules and vision/audio towers. Equals params.counted_total minus params.counted_embedding. Same validation as params.counted_total.

Largest layer (counted)

383.3M parameters

Calculated: max(sum of dense and routed weights sharing a full layers.<index> tensor path), all experts included, Qwen/Qwen3.8-27B@1d4bf0f safetensors headers

Largest group of language-backbone weights sharing a full layers.<index> tensor path, including every routed expert. Excludes lookup/Engram tables, embeddings, output head, MTP and other modalities. Hybrid checkpoints may store mixers and FFNs as separate layers. All-gather volume also depends on wrapping, sharding and dtype.

Active non-emb. (counted)

24.35B parameters

Calculated: all weights except embedding and output head, Qwen/Qwen3.8-27B@1d4bf0f safetensors headers; reproduces stated total (backbone) and active (with embedding and output head)

Active parameters per token excluding the input embedding and output head, counted from the checkpoint as all non-expert weights plus routed-expert weights × top_k / experts. Same validation as params.counted_total.

Counting scope

Rounded card figure, listed under the Language Model block; the vision encoder is separate. Whether the MTP module is counted is not stated.

Source: model-card · README.md; Model Overview
Type: Causal Language Model with Vision Encoder

What the publisher's counts include or exclude (MTP modules, embeddings, vision encoder, n-gram tables).

Shape

Layers

64

Source: config · /text_config/num_hidden_layers

Number of transformer blocks in the main backbone (attention or token mixer plus FFN), excluding MTP modules.

d_model

5,120

Source: config · /text_config/hidden_size

Residual stream width.

Vocab

248,320

Source: config · /text_config/vocab_size

Embedding table rows (vocab_size in config, may include padding).

Tied embeddings

No

Source: config · /text_config/tie_word_embeddings

Input embedding and output head share weights.

d_model / layers

80

Calculated: d_model / layers

Width-to-depth ratio, d_model divided by the number of blocks.

Attention

Token mixers

Gated DeltaNet, GQA

Source: model-card · README.md; Model Overview; Hidden Layout
16 × (3 × (Gated DeltaNet → FFN) → 1 × (Gated Attention → FFN))

Gated Attention is GQA with 24 Q / 4 KV heads.

Token-mixing layer types in the backbone, e.g. GQA, MLA, SWA, Gated DeltaNet, Mamba-2, DSA (DeepSeek sparse attention).

Layer layout

3 Gated DeltaNet : 1 GQA

Inferred from the source; see the explanation below.

Source: config · config.json; /text_config/layer_types
"layer_types": [ "linear_attention", "linear_attention", "linear_attention", "full_attention", "linear_attention", "linear_attention", "linear_attention", "full_attention", "linear_attention", "linear_attention", "linear_attention", "full_attention", "linear_attention", "linear_attention", "linear_attention", "full_attention", "linear_attention", "linear_attention", "linear_attention", "full_attention", "linear_attention", "linear_attention", "linear_attention", "full_attention", "linear_attention", "linear_attention", "linear_attention", "full_attention", "linear_attention", "linear_attention", "linear_attention", "full_attention", "linear_attention", "linear_attention", "linear_attention", "full_attention", "linear_attention", "linear_attention", "linear_attention", "full_attention", "linear_attention", "linear_attention", "linear_attention", "full_attention", "linear_attention", "linear_attention", "linear_attention", "full_attention", "linear_attention", "linear_attention", "linear_attention", "full_attention", "linear_attention", "linear_attention", "linear_attention", "full_attention", "linear_attention", "linear_attention", "linear_attention", "full_attention", "linear_attention", "linear_attention", "linear_attention", "full_attention" ]

Config full_attention_interval 4; layer_types lists the same pattern. Ordered 64-layer backbone from /text_config/layer_types; auxiliary modules are excluded.

Token-mixer order, summarized as a pattern or layer positions. The fact's optional sequence lists each mixer in order; a ratio alone does not establish the order. Auxiliary prediction modules and standalone FFNs are excluded.

Global-attention layers

16

Source: config · /text_config/layer_types | count full_attention

Layers whose KV cache grows with full context (dense or sparse global attention, MLA). Excludes sliding-window and linear/recurrent layers.

Linear : global

3

Calculated: attn.linear_layers / attn.global_layers

attn.linear_layers divided by attn.global_layers (3 for '3 Gated DeltaNet : 1 GQA').

Linear / SSM layers

48

Source: config · /text_config/layer_types | count linear_attention

Layers with a fixed-size recurrent state (linear attention, DeltaNet variants, Mamba).

Query heads

24

Source: config · /text_config/num_attention_heads

Query heads in the global-attention layers.

KV heads

4

Source: config · /text_config/num_key_value_heads

Key/value heads in the global-attention layers. Not applicable to MLA, whose cache is a shared latent.

Heads × head dim

6,144

Calculated: heads × head_dim

attn.heads × attn.head_dim, the query projection width of global layers.

Q heads / KV head

6

Calculated: heads / kv_heads

attn.heads divided by attn.kv_heads in global layers.

QK head dim

256

Source: config · /text_config/head_dim

Query/key dimension per head in global-attention layers (for MLA, nope + rope dims).

Positional encoding

partial RoPE

Source: model-card · README.md; Model Overview; Gated Attention
Rotary Position Embedding Dimension: 64

64 of 256 head dims rotated; config rope_parameters mrope_section [11, 11, 10], interleaved in code.

Positional scheme in global layers: RoPE, partial RoPE, NoPE, or mixed per layer type.

RoPE base

10,000,000

Source: config · /text_config/rope_parameters/rope_theta

RoPE base frequency of the global layers at release.

Rotary fraction

0.25

Source: config · /text_config/partial_rotary_factor

Fraction of each head's QK dimensions that are rotated.

QK norm

Yes

Source: code · modeling_qwen3_5.py; Qwen3_5Attention.__init__
self.q_norm = Qwen3_5RMSNorm(self.head_dim, eps=config.rms_norm_eps)

Per-head RMSNorm on Q and K in the full-attention layers.

Queries and keys are normalized per head before the dot product.

Output gate

sigmoid, elementwise on the attention output before o_proj; gate projected jointly with Q

Source: code · modeling_qwen3_5.py; Qwen3_5Attention.forward
attn_output = attn_output * torch.sigmoid(gate)

Config attn_output_gate true; the code applies the gate unconditionally.

Gate applied to the attention output before the output projection, with its placement.

QKV bias

No

Source: config · /text_config/attention_bias

Query/key/value projections have bias terms.

Linear-mixer details

Gated DeltaNet: 16 QK heads, 48 V heads, head dim 128, short conv 4, SiLU-gated RMSNorm on output

Source: model-card · README.md; Model Overview; Gated DeltaNet
Number of Linear Attention Heads: 48 for V and 16 for QK

QK heads/dim from config linear_num_key_heads and linear_key_head_dim; conv kernel from config linear_conv_kernel_dim; SiLU output gate from Qwen3_5RMSNormGated in modeling_qwen3_5.py; config output_gate_type swish (not read by the code).

Configuration of the linear / SSM layers (e.g. Gated DeltaNet heads and dims, Mamba-2 state size), as one string.

Linear-mixer heads

48

Source: config · /text_config/linear_num_value_heads

Value heads (or SSM heads) in the linear / SSM layers.

Linear-mixer head dim

128

Source: config · /text_config/linear_value_head_dim

Head dimension of the linear / SSM layers (value head dim for DeltaNet variants, head_dim for Mamba-2).

Short conv kernel

4

Source: config · /text_config/linear_conv_kernel_dim

Kernel size of the causal short convolution in linear / SSM layers or attention projections.

Feed-forward

Activation

SwiGLU

Source: code · modeling_qwen3_5.py; Qwen3_5MLP.forward
down_proj = self.down_proj(self.act_fn(self.gate_proj(x)) * self.up_proj(x))

act_fn is SiLU (config hidden_act silu).

FFN activation (SwiGLU, GeGLU, ...).

Dense FFN dim

17,408

Source: config · /text_config/intermediate_size

Intermediate width of the dense FFN layers that are actually executed.

FFN bias

No

Source: code · modeling_qwen3_5.py; Qwen3_5MLP.__init__
self.gate_proj = nn.Linear(self.hidden_size, self.intermediate_size, bias=False)

FFN projections have bias terms.

Dense FFN / d_model

3.4

Calculated: ffn.dim / d_model

ffn.dim divided by shape.d_model.

Multi-token prediction

MTP depth

Not disclosed

Additional future tokens predicted during pretraining (0 when the model was trained without MTP).

MTP modules

1

Source: config · /text_config/mtp_num_hidden_layers

One MTP decoder layer (mtp.layers.0 only in the weight index); card: MTP trained with multiple steps.

MTP modules with distinct weights. 1 with mtp.depth > 1 means one module is applied recursively.

MTP module

one decoder layer (gated attention + dense SwiGLU FFN); RMSNormed hidden state and RMSNormed next-token embedding fused by linear fc; final RMSNorm

Source: config · model.safetensors.index.json; weight_map mtp.* entries
mtp.pre_fc_norm_embedding.weight

From weight names: pre_fc_norm_hidden, pre_fc_norm_embedding, fc, layers.0 (self_attn with q_norm/k_norm, mlp), norm.

Contents of one MTP module (mixer and FFN type, norms, how the previous hidden state and next-token embedding are combined).

MTP FFN

dense

Source: config · model.safetensors.index.json; weight_map mtp.layers.0.mlp
mtp.layers.0.mlp.gate_proj.weight

FFN in the MTP module: 'dense' or 'MoE', with its width when it differs from the backbone.

MTP shares embedding/head

Yes

Source: config · config.json; mtp_use_dedicated_embeddings
"mtp_use_dedicated_embeddings": false

The weight index has no MTP embedding or output head.

MTP modules use the main model's input embedding and output head.

MTP loss weight

Not disclosed

Weight of the MTP loss, including its schedule.

MTP weights released

Yes

Source: config · model.safetensors.index.json; weight_map mtp.* entries
mtp.fc.weight

The released checkpoint contains the MTP module weights.

Normalization and stability

Norm

RMSNorm (1+w gain)

Source: code · modeling_qwen3_5.py; Qwen3_5RMSNorm.forward
output = output * (1.0 + self.weight.float())

Gain initialized at 0 and applied as 1 + weight.

Normalization layer type in the blocks.

Norm placement

pre

Source: code · modeling_qwen3_5.py; Qwen3_5DecoderLayer.forward
hidden_states = self.input_layernorm(hidden_states)

Pre-norm, post-norm, or sandwich (pre and post).

Norm epsilon

1e-06

Source: config · /text_config/rms_norm_eps

Epsilon of the block normalization layers.

Context length

Pretraining context

Not disclosed

Sequence length of the main pretraining stage.

Trained context

Not disclosed

Longest sequence length trained on after context extension.

Advertised context

1M tokens

Source: model-card · README.md; Model Overview
262,144 natively and extensible up to 1,000,000 tokens

262,144 native (config max_position_embeddings); beyond that via inference-time YaRN.

Longest context the publisher says the model supports, possibly beyond trained length via RoPE scaling.

Pretraining recipe

Pretraining tokens

Not disclosed

Tokens seen in pretraining including annealing and context extension, as reported.

Optimizer

Not disclosed

Optimizer used for the bulk of parameters.

Peak LR

Not disclosed

Peak learning rate of the main pretraining stage.

Final LR

Not disclosed

Learning rate at the end of the decay.

LR schedule

Not disclosed

Learning-rate schedule shape with phase boundaries.

Warmup

Not disclosed

Warmup length in steps or tokens.

Batch size

Not disclosed

Global batch size, including any batch-size ramp: sequences × sequence length (token total), or the token total alone when only that is stated.

Weight decay

Not disclosed

Decoupled weight decay coefficient.

Adam betas

Not disclosed

(beta1, beta2) of the Adam-family optimizer or its AdamW fallback.

Grad clip

Not disclosed

Global gradient-norm clipping threshold.

Training precision

Not disclosed

Matmul precision of pretraining (BF16, FP8 recipe, NVFP4 recipe) with the scaling granularity where disclosed. Never inferred from the released checkpoint dtype.

KV cache

KV bytes / token

65,536 bytes

Calculated: kv.bytes_at_context / 131072 tokens; uniform BF16, payload only; quantization overhead excluded. Global KV: 16 × (2048 × 16/8) B/entry

Retained KV cache divided by context length, including bounded SWA caches and indexer keys. Exports use uniform BF16 at 131,072 tokens. The website can select uniform payload precision (no quantization overhead) or sourced component formats (including scales and documented padding). This is cache payload, not peak prefill memory or persistent prefix storage.

Global KV bytes / token

65,536 bytes

Calculated: 65536 B / 1 tokens (Global KV); uniform BF16, payload only; quantization overhead excluded. Global KV: 16 × (2048 × 16/8) B/entry

Long-context global KV bytes per token, including indexer keys; excludes bounded SWA caches. Compression rates and cross-layer cache reuse are included. Exports use uniform BF16; the website's storage selector also applies here. This is the field to compare with global-KV figures in reports, using the matching storage recipe.

KV bytes / token / B active

2,427 bytes

Calculated: kv.bytes_per_token (131072 tokens) / (params.active / 1e9); uniform BF16, payload only; quantization overhead excluded. Global KV: 16 × (2048 × 16/8) B/entry

kv.bytes_per_token divided by active parameters in billions (131,072 tokens in exports).

KV at context / B active

318,145,726 bytes

Calculated: kv.bytes_at_context (131072 tokens) / (params.active / 1e9); uniform BF16, payload only; quantization overhead excluded. Global KV: 16 × (2048 × 16/8) B/entry

kv.bytes_at_context divided by active parameters in billions (131,072 tokens in exports).

KV at context

8,589,934,592 bytes

Calculated: 65536 B × 131072 (Global KV); uniform BF16, payload only; quantization overhead excluded. Global KV: 16 × (2048 × 16/8) B/entry

Retained KV cache for one sequence at the selected context, including SWA windows and indexer keys. Exports use uniform BF16 at 131,072 tokens. Excludes recurrent state, compressor tail state, draft/MTP caches, temporary prefill tensors, allocator metadata and persistent prefix snapshots. Does not estimate peak prefill or total serving memory.

Evaluations

AA Intelligence Index

34

Source: leaderboard · Artificial Analysis model page /models/qwen3-8-27b, Wayback snapshot 2026-10-19
Qwen3.8 27B (Xhigh) scores 34 on the Artificial Analysis Intelligence Index

Variant: Qwen3.8 27B (Xhigh). Index v4.3.2.

Artificial Analysis Intelligence Index v4.3.2 of the post-trained model, from a dated Wayback snapshot of its Artificial Analysis page. The note names the variant (reasoning setting).

All models · Link to this model