Qwen · 2025-04 · Dense
Qwen3 8B
Qwen3 8B is a grouped-query attention (GQA) transformer released by Qwen in 2025-04, with 36 layers, hidden size 4096 and a context window of 40,960 tokens.
Layer stack
Attention ×36 · Layers 36
Key facts
| Family | Qwen |
|---|---|
| Released | 2025-04 |
| Params | 7.9 B |
| Context | 40,960 tokens |
| Attention | GQA (32:8) |
| Layers | 36 |
| Hidden | 4,096 |
| Heads | 32 |
| Vocab | 151,936 |
| Position | RoPE |
| Norm | RMSNorm |
| Activation | silu |
| Dtype | bf16 |
| Architecture class | Qwen3ForCausalLM |
Architecture overview
Attention
grouped-query attention (GQA) — 32 q-heads / 8 kv-heads. RoPE θ=1,000,000.
Feed-forward / MoE
It is a dense model: all 7.9B 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 Qwen3 32B
| Model | Qwen3 8B | Qwen3 32B | Ratio |
|---|---|---|---|
| model_type | qwen3 | qwen3 | = |
| architectures | Qwen3ForCausalLM | Qwen3ForCausalLM | = |
| hidden_size | 4096 | 5120 | ×0.800 |
| num_hidden_layers | 36 | 64 | ×0.563 |
| num_attention_heads | 32 | 64 | ×0.500 |
| num_key_value_heads | 8 | 8 | ≈1 |
| head_dim | 128 | 128 | ≈1 |
| intermediate_size | 12288 | 25600 | ×0.480 |
| hidden_act | silu | silu | = |
| rope_theta | 1000000 | 1000000 | ≈1 |
| max_position_embeddings | 40960 | 40960 | ≈1 |
| rms_norm_eps | 0.000001 | 0.000001 | ≈1 |
| vocab_size | 151936 | 151936 | ≈1 |
| torch_dtype | bfloat16 | bfloat16 | = |
| attention_bias | false | false | = |
| 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 | 36 | 64 | ×0.563 |
| tie_word_embeddings | false | false | = |
| transformers_version | 4.51.0 | 4.51.0 | = |
| 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
- Qwen2.5 7B (Qwen, 2024-09) 0.999
- Llama 3.1 8B (Meta, 2024-07) 0.999
- Hunyuan-TurboS 7B (Hunyuan, 2026-05) 0.998
- Qwen3.6 27B (Qwen, 2026-04) 0.992
Similarity values range from 0 (no shared categorical features) to 1 (identical profiles).
Raw config fields
24 fields
| architectures | Qwen3ForCausalLM |
|---|---|
| attention_bias | false |
| attention_dropout | 0 |
| bos_token_id | 151643 |
| eos_token_id | 151645 |
| head_dim | 128 |
| hidden_act | silu |
| hidden_size | 4096 |
| initializer_range | 0.02 |
| intermediate_size | 12288 |
| max_position_embeddings | 40960 |
| max_window_layers | 36 |
| model_type | qwen3 |
| num_attention_heads | 32 |
| num_hidden_layers | 36 |
| num_key_value_heads | 8 |
| rms_norm_eps | 0.000001 |
| rope_theta | 1000000 |
| tie_word_embeddings | false |
| torch_dtype | bfloat16 |
| transformers_version | 4.51.0 |
| use_cache | true |
| use_sliding_window | false |
| vocab_size | 151936 |