llm-architectures-explained

/models

Qwen3 32B

Alibaba Cloud (Qwen) · Qwen3 · open weights

Facts and where they come from

Released2025-04config.jsonconfig.jsonHugging Face repository creation date (api.createdAt)
Licenceapache-2.0config.jsonconfig.jsonREADME metadata: license
Total parameters32.8Blabmodel cardREADME: Number of Parameters: 32.8B
Active parametersnot disclosednot disclosed
Context length32K tokenslabmodel cardREADME: 32,768 natively
Norm placementprecodemodelling codetransformers 5.18.0 / repo modelling code for qwen3: input_layernorm before attention, post_attention_layernorm before the MLP
Norm typeRMSNormcodemodelling codetransformers 5.18.0 / repo modelling code for qwen3: input_layernorm before attention, post_attention_layernorm before the MLP
QK-normyescodemodelling codetransformers 5.18.0 qwen3: q_norm and k_norm
Positional encodingRoPEcodemodelling coderotary on the full head (default)
Parallel attention and MLPnocodemodelling codetransformers 5.18.0 / repo modelling code for qwen3: input_layernorm before attention, post_attention_layernorm before the MLP

Architecture, drawn from the data

GQA 64q/8kv. Each column is one layer: its token mixer above, its feed-forward block below. Paler columns reuse another layer’s keys and values.

Qwen3 32B: layer stack and blockslayers (64)mixer / FFNlayer 0: GQA: 64 query / 8 KV heads · head 128layer 0: Gated MLP: 25600layer 1: GQA: 64 query / 8 KV heads · head 128layer 1: Gated MLP: 25600layer 2: GQA: 64 query / 8 KV heads · head 128layer 2: Gated MLP: 25600layer 3: GQA: 64 query / 8 KV heads · head 128layer 3: Gated MLP: 25600layer 4: GQA: 64 query / 8 KV heads · head 128layer 4: Gated MLP: 25600layer 5: GQA: 64 query / 8 KV heads · head 128layer 5: Gated MLP: 25600layer 6: GQA: 64 query / 8 KV heads · head 128layer 6: Gated MLP: 25600layer 7: GQA: 64 query / 8 KV heads · head 128layer 7: Gated MLP: 25600layer 8: GQA: 64 query / 8 KV heads · head 128layer 8: Gated MLP: 25600layer 9: GQA: 64 query / 8 KV heads · head 128layer 9: Gated MLP: 25600layer 10: GQA: 64 query / 8 KV heads · head 128layer 10: Gated MLP: 25600layer 11: GQA: 64 query / 8 KV heads · head 128layer 11: Gated MLP: 25600layer 12: GQA: 64 query / 8 KV heads · head 128layer 12: Gated MLP: 25600layer 13: GQA: 64 query / 8 KV heads · head 128layer 13: Gated MLP: 25600layer 14: GQA: 64 query / 8 KV heads · head 128layer 14: Gated MLP: 25600layer 15: GQA: 64 query / 8 KV heads · head 128layer 15: Gated MLP: 25600layer 16: GQA: 64 query / 8 KV heads · head 128layer 16: Gated MLP: 25600layer 17: GQA: 64 query / 8 KV heads · head 128layer 17: Gated MLP: 25600layer 18: GQA: 64 query / 8 KV heads · head 128layer 18: Gated MLP: 25600layer 19: GQA: 64 query / 8 KV heads · head 128layer 19: Gated MLP: 25600layer 20: GQA: 64 query / 8 KV heads · head 128layer 20: Gated MLP: 25600layer 21: GQA: 64 query / 8 KV heads · head 128layer 21: Gated MLP: 25600layer 22: GQA: 64 query / 8 KV heads · head 128layer 22: Gated MLP: 25600layer 23: GQA: 64 query / 8 KV heads · head 128layer 23: Gated MLP: 25600layer 24: GQA: 64 query / 8 KV heads · head 128layer 24: Gated MLP: 25600layer 25: GQA: 64 query / 8 KV heads · head 128layer 25: Gated MLP: 25600layer 26: GQA: 64 query / 8 KV heads · head 128layer 26: Gated MLP: 25600layer 27: GQA: 64 query / 8 KV heads · head 128layer 27: Gated MLP: 25600layer 28: GQA: 64 query / 8 KV heads · head 128layer 28: Gated MLP: 25600layer 29: GQA: 64 query / 8 KV heads · head 128layer 29: Gated MLP: 25600layer 30: GQA: 64 query / 8 KV heads · head 128layer 30: Gated MLP: 25600layer 31: GQA: 64 query / 8 KV heads · head 128layer 31: Gated MLP: 25600layer 32: GQA: 64 query / 8 KV heads · head 128layer 32: Gated MLP: 25600layer 33: GQA: 64 query / 8 KV heads · head 128layer 33: Gated MLP: 25600layer 34: GQA: 64 query / 8 KV heads · head 128layer 34: Gated MLP: 25600layer 35: GQA: 64 query / 8 KV heads · head 128layer 35: Gated MLP: 25600layer 36: GQA: 64 query / 8 KV heads · head 128layer 36: Gated MLP: 25600layer 37: GQA: 64 query / 8 KV heads · head 128layer 37: Gated MLP: 25600layer 38: GQA: 64 query / 8 KV heads · head 128layer 38: Gated MLP: 25600layer 39: GQA: 64 query / 8 KV heads · head 128layer 39: Gated MLP: 25600layer 40: GQA: 64 query / 8 KV heads · head 128layer 40: Gated MLP: 25600layer 41: GQA: 64 query / 8 KV heads · head 128layer 41: Gated MLP: 25600layer 42: GQA: 64 query / 8 KV heads · head 128layer 42: Gated MLP: 25600layer 43: GQA: 64 query / 8 KV heads · head 128layer 43: Gated MLP: 25600layer 44: GQA: 64 query / 8 KV heads · head 128layer 44: Gated MLP: 25600layer 45: GQA: 64 query / 8 KV heads · head 128layer 45: Gated MLP: 25600layer 46: GQA: 64 query / 8 KV heads · head 128layer 46: Gated MLP: 25600layer 47: GQA: 64 query / 8 KV heads · head 128layer 47: Gated MLP: 25600layer 48: GQA: 64 query / 8 KV heads · head 128layer 48: Gated MLP: 25600layer 49: GQA: 64 query / 8 KV heads · head 128layer 49: Gated MLP: 25600layer 50: GQA: 64 query / 8 KV heads · head 128layer 50: Gated MLP: 25600layer 51: GQA: 64 query / 8 KV heads · head 128layer 51: Gated MLP: 25600layer 52: GQA: 64 query / 8 KV heads · head 128layer 52: Gated MLP: 25600layer 53: GQA: 64 query / 8 KV heads · head 128layer 53: Gated MLP: 25600layer 54: GQA: 64 query / 8 KV heads · head 128layer 54: Gated MLP: 25600layer 55: GQA: 64 query / 8 KV heads · head 128layer 55: Gated MLP: 25600layer 56: GQA: 64 query / 8 KV heads · head 128layer 56: Gated MLP: 25600layer 57: GQA: 64 query / 8 KV heads · head 128layer 57: Gated MLP: 25600layer 58: GQA: 64 query / 8 KV heads · head 128layer 58: Gated MLP: 25600layer 59: GQA: 64 query / 8 KV heads · head 128layer 59: Gated MLP: 25600layer 60: GQA: 64 query / 8 KV heads · head 128layer 60: Gated MLP: 25600layer 61: GQA: 64 query / 8 KV heads · head 128layer 61: Gated MLP: 25600layer 62: GQA: 64 query / 8 KV heads · head 128layer 62: Gated MLP: 25600layer 63: GQA: 64 query / 8 KV heads · head 128layer 63: Gated MLP: 2560003263× 64normGQA: 64 query / 8 KV heads · head 128+normGated MLP: 25600+full attentiondense FFN

Modelled costs

From the cost model, batch size 1. Totals the lab states are in the table above; differences come from rounding, from what a lab counts, or from parts the model does not describe (listed on the about page).

Parameters (modelled)32.8B
Active per token (modelled)32.8B
Without embeddings and output head31.2B total, 31.2B active
Published weights (Hugging Face count)32.8B
KV cache per token, BF16 (layers that grow with context)256 KiB
KV cache + state at 32K tokens, BF168 GiB
Decode FLOPs per token at 4K context72.6 GFLOP
Prefill FLOPs for a 4K prompt273 TFLOP

KV cache against context

Qwen3 32B: KV cache bytes against context length101001,00010,000980 KiB9.5 MiB95 MiB950 MiBcontext (tokens)KV cache + state (BF16)Qwen3 32B

Compare with other models →

Every architecture field

FieldValueSource
d_model5,120config.jsonconfig.jsonhidden_size
vocab151,936config.jsonconfig.jsonvocab_size
tied_embeddingsfalseconfig.jsonconfig.jsontie_word_embeddings
mixers.full.typeattncodemodelling codeattention block
mixers.full.heads64config.jsonconfig.jsonnum_attention_heads
mixers.full.kv_heads8config.jsonconfig.jsonnum_key_value_heads
mixers.full.head_dim128config.jsonconfig.jsonhead_dim
mixers.full.qk_normtruecodemodelling codetransformers 5.18.0 qwen3: q_norm and k_norm
ffns.dense.typedensecodemodelling codeMLP block
ffns.dense.d_ff25,600config.jsonconfig.jsonintermediate_size
ffns.dense.gatedtruecodemodelling codeMLP: gated (SwiGLU/GeGLU)
layout64× full/denseconfig.jsonconfig.jsonnum_hidden_layers

Sources

Listed in the LLM Architecture Gallery checklist as “Qwen3 (32B)” (name only; see about).