Qwen · 2024-06 · Dense

Qwen2 72B

Qwen2 72B is a grouped-query attention (GQA) transformer released by Qwen in 2024-06, with 80 layers, hidden size 8192 and a context window of 32,768 tokens.

Layer stack

Attention ×80 · Layers 80

Key facts

FamilyQwen
Released2024-06
Params71.4 B
Context32,768 tokens
AttentionGQA (64:8)
Layers80
Hidden8,192
Heads64
Vocab152,064
PositionRoPE
NormRMSNorm
Activationsilu
Dtypebf16
Architecture classQwen2ForCausalLM

Architecture overview

t₁ t₂ t₃ t₄ input tokens Embedding · Vocab 152,064 → Hidden 8,192 Q1 Q2 Q3 Qn KV1 KV2 KV3 KVn Heads 64 KV heads 8 head dim 128 · RoPE FFN · SwiGLU FFN dim 29,568 × 80 transformer block Attention Feed-forward / MoE RMSNorm pre-norm Final norm · RMSNorm LM head → Vocab 152,064 p p p → next token Position RoPE Dtype BF16 Context 32K tok
Drawn from the shipped config.json · 80 layers / width 8,192 / context 32,768. Original diagram by this atlas.

Attention

grouped-query attention (GQA) — 64 q-heads / 8 kv-heads. RoPE θ=1,000,000.

Feed-forward / MoE

It is a dense model: all 71.4B parameters participate in computing every token.

Field-level comparison

Compared against the previous model of the same lab; where none exists, against the structurally closest model. The ratio column is this model divided by the comparison model.

Full-field comparison vs predecessor Qwen1.5 7B
ModelQwen2 72BQwen1.5 7BRatio
model_typeqwen2qwen2
architecturesQwen2ForCausalLMQwen2ForCausalLM
hidden_size81924096×2.00
num_hidden_layers8032×2.50
num_attention_heads6432×2.00
num_key_value_heads832×0.250
intermediate_size2956811008×2.69
hidden_actsilusilu
rope_theta10000001000000≈1
max_position_embeddings3276832768≈1
sliding_window13107232768×4.00
rms_norm_eps0.0000010.000001≈1
vocab_size152064151936≈1
torch_dtypebfloat16bfloat16
attention_dropout00
bos_token_id151643151643≈1
eos_token_id151645151643≈1
initializer_range0.020.02≈1
max_window_layers8028×2.86
tie_word_embeddingsfalsefalse
transformers_version4.40.14.37.0
use_cachetruetrue
use_sliding_windowfalsefalse

Most similar architectures

Similarity values range from 0 (no shared categorical features) to 1 (identical profiles).

Raw config fields

23 fields
architecturesQwen2ForCausalLM
attention_dropout0
bos_token_id151643
eos_token_id151645
hidden_actsilu
hidden_size8192
initializer_range0.02
intermediate_size29568
max_position_embeddings32768
max_window_layers80
model_typeqwen2
num_attention_heads64
num_hidden_layers80
num_key_value_heads8
rms_norm_eps0.000001
rope_theta1000000
sliding_window131072
tie_word_embeddingsfalse
torch_dtypebfloat16
transformers_version4.40.1
use_cachetrue
use_sliding_windowfalse
vocab_size152064