Qwen · 2024-02 · Dense
Qwen1.5 7B
Qwen1.5 7B is a multi-head attention (MHA) transformer released by Qwen in 2024-02, with 32 layers, hidden size 4096 and a context window of 32,768 tokens.
Layer stack
Attention ×32 · Layers 32
Key facts
| Family | Qwen |
|---|---|
| Released | 2024-02 |
| Params | 6.6 B |
| Context | 32,768 tokens |
| Attention | MHA (32:32) |
| Layers | 32 |
| Hidden | 4,096 |
| Heads | 32 |
| Vocab | 151,936 |
| Position | RoPE |
| Norm | RMSNorm |
| Activation | silu |
| Dtype | bf16 |
| Architecture class | Qwen2ForCausalLM |
Architecture overview
Attention
multi-head attention (MHA) — 32 q-heads / 32 kv-heads. RoPE θ=1,000,000.
Feed-forward / MoE
It is a dense model: all 6.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 most-similar DeepSeek-Coder 6.7B
| Model | Qwen1.5 7B | DeepSeek-Coder 6.7B | Ratio |
|---|---|---|---|
| model_type | qwen2 | llama | ≠ |
| architectures | Qwen2ForCausalLM | LlamaForCausalLM | ≠ |
| hidden_size | 4096 | 4096 | ≈1 |
| num_hidden_layers | 32 | 32 | ≈1 |
| num_attention_heads | 32 | 32 | ≈1 |
| num_key_value_heads | 32 | 32 | ≈1 |
| intermediate_size | 11008 | 11008 | ≈1 |
| hidden_act | silu | silu | = |
| rope_theta | 1000000 | 100000 | ×10.00 |
| max_position_embeddings | 32768 | 16384 | ×2.00 |
| sliding_window | 32768 | — | |
| rms_norm_eps | 0.000001 | 0.000001 | ≈1 |
| vocab_size | 151936 | 32256 | ×4.71 |
| torch_dtype | bfloat16 | bfloat16 | = |
| attention_dropout | 0 | — | |
| bos_token_id | 151643 | 32013 | ×4.74 |
| eos_token_id | 151643 | 32014 | ×4.74 |
| initializer_range | 0.02 | 0.02 | ≈1 |
| max_window_layers | 28 | — | |
| tie_word_embeddings | false | false | = |
| transformers_version | 4.37.0 | 4.34.1 | ≠ |
| use_cache | true | true | = |
| use_sliding_window | false | — |
Most similar architectures
- DeepSeek-Coder 6.7B (DeepSeek, 2023-11) 1.000
- DeepSeek LLM 7B (DeepSeek, 2023-11) 0.998
- LLaMA 1 7B (Meta, 2023-02) 0.884
- DeepSeekMoE 16B (DeepSeek, 2024-01) 0.872
- Hunyuan-TurboS 7B (Hunyuan, 2026-05) 0.793
- Llama 3.1 8B (Meta, 2024-07) 0.792
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 | 151643 |
| hidden_act | silu |
| hidden_size | 4096 |
| initializer_range | 0.02 |
| intermediate_size | 11008 |
| max_position_embeddings | 32768 |
| max_window_layers | 28 |
| model_type | qwen2 |
| num_attention_heads | 32 |
| num_hidden_layers | 32 |
| num_key_value_heads | 32 |
| rms_norm_eps | 0.000001 |
| rope_theta | 1000000 |
| sliding_window | 32768 |
| tie_word_embeddings | false |
| torch_dtype | bfloat16 |
| transformers_version | 4.37.0 |
| use_cache | true |
| use_sliding_window | false |
| vocab_size | 151936 |