Qwen · 2024-09 · Dense
Qwen2.5 7B
Qwen2.5 7B is a grouped-query attention (GQA) transformer released by Qwen in 2024-09, with 28 layers, hidden size 3584 and a context window of 32,768 tokens.
Layer stack
Attention ×28 · Layers 28
Key facts
| Family | Qwen |
|---|---|
| Released | 2024-09 |
| Params | 7.6 B |
| Context | 32,768 tokens |
| Attention | GQA (28:4) |
| Layers | 28 |
| Hidden | 3,584 |
| Heads | 28 |
| Vocab | 152,064 |
| Position | RoPE |
| Norm | RMSNorm |
| Activation | silu |
| Dtype | bf16 |
| Architecture class | Qwen2ForCausalLM |
Architecture overview
Attention
grouped-query attention (GQA) — 28 q-heads / 4 kv-heads. RoPE θ=1,000,000.
Feed-forward / MoE
It is a dense model: all 7.6B 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 Qwen2.5 72B
| Model | Qwen2.5 7B | Qwen2.5 72B | Ratio |
|---|---|---|---|
| model_type | qwen2 | qwen2 | = |
| architectures | Qwen2ForCausalLM | Qwen2ForCausalLM | = |
| hidden_size | 3584 | 8192 | ×0.438 |
| num_hidden_layers | 28 | 80 | ×0.350 |
| num_attention_heads | 28 | 64 | ×0.438 |
| num_key_value_heads | 4 | 8 | ×0.500 |
| intermediate_size | 18944 | 29568 | ×0.641 |
| hidden_act | silu | silu | = |
| rope_theta | 1000000 | 1000000 | ≈1 |
| max_position_embeddings | 32768 | 32768 | ≈1 |
| sliding_window | 131072 | 131072 | ≈1 |
| rms_norm_eps | 0.000001 | 0.000001 | ≈1 |
| vocab_size | 152064 | 152064 | ≈1 |
| torch_dtype | bfloat16 | bfloat16 | = |
| attention_dropout | 0 | 0 | = |
| bos_token_id | 151643 | 151643 | ≈1 |
| eos_token_id | 151645 | 151645 | ≈1 |
| initializer_range | 0.02 | 0.02 | ≈1 |
| max_window_layers | 28 | 70 | ×0.400 |
| tie_word_embeddings | false | false | = |
| transformers_version | 4.43.1 | 4.43.1 | = |
| use_cache | true | true | = |
| use_sliding_window | false | false | = |
Most similar architectures
- Hunyuan 7B (Hunyuan, 2025-08) 1.000
- Mistral 7B (Mistral, 2023-09) 1.000
- Qwen3 8B (Qwen, 2025-04) 0.999
- Llama 3.1 8B (Meta, 2024-07) 0.999
- Hunyuan-TurboS 7B (Hunyuan, 2026-05) 0.998
- Qwen3 0.6B (Qwen, 2025-04) 0.989
Similarity values range from 0 (no shared categorical features) to 1 (identical profiles).
Raw config fields
23 fields
| architectures | Qwen2ForCausalLM |
|---|---|
| attention_dropout | 0 |
| bos_token_id | 151643 |
| eos_token_id | 151645 |
| hidden_act | silu |
| hidden_size | 3584 |
| initializer_range | 0.02 |
| intermediate_size | 18944 |
| max_position_embeddings | 32768 |
| max_window_layers | 28 |
| model_type | qwen2 |
| num_attention_heads | 28 |
| num_hidden_layers | 28 |
| num_key_value_heads | 4 |
| rms_norm_eps | 0.000001 |
| rope_theta | 1000000 |
| sliding_window | 131072 |
| tie_word_embeddings | false |
| torch_dtype | bfloat16 |
| transformers_version | 4.43.1 |
| use_cache | true |
| use_sliding_window | false |
| vocab_size | 152064 |