Meta · 2023-02 · Dense
LLaMA 1 7B
LLaMA 1 7B is a multi-head attention (MHA) transformer released by Meta in 2023-02, with 32 layers, hidden size 4096 and a context window of 2,048 tokens.
Layer stack
Attention ×32 · Layers 32
Key facts
| Family | Meta |
|---|---|
| Released | 2023-02 |
| Params | 6.74 B |
| Context | 2,048 tokens |
| Attention | MHA (32:32) |
| Layers | 32 |
| Hidden | 4,096 |
| Heads | 32 |
| Vocab | 32,000 |
| Position | learned/absolute |
| Norm | RMSNorm |
| Activation | silu |
| Dtype | — |
| Architecture class | LlamaForCausalLM |
Architecture overview
Attention
multi-head attention (MHA) — 32 q-heads / 32 kv-heads.
Feed-forward / MoE
It is a dense model: all 6.74B 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 | LLaMA 1 7B | DeepSeek-Coder 6.7B | Ratio |
|---|---|---|---|
| model_type | llama | llama | = |
| architectures | LlamaForCausalLM | LlamaForCausalLM | = |
| hidden_size | 4096 | 4096 | ≈1 |
| num_hidden_layers | 32 | 32 | ≈1 |
| num_attention_heads | 32 | 32 | ≈1 |
| num_key_value_heads | — | 32 | |
| intermediate_size | 11008 | 11008 | ≈1 |
| hidden_act | silu | silu | = |
| rope_theta | — | 100000 | |
| max_position_embeddings | 2048 | 16384 | ×0.125 |
| rms_norm_eps | 0.000001 | 0.000001 | ≈1 |
| vocab_size | 32000 | 32256 | ×0.992 |
| torch_dtype | float16 | bfloat16 | ≠ |
| _name_or_path | /home/sgugger/tmp/llama/llama-7b/ | — | |
| bos_token_id | 1 | 32013 | ×0.000 |
| eos_token_id | 2 | 32014 | ×0.000 |
| initializer_range | 0.02 | 0.02 | ≈1 |
| max_sequence_length | 2048 | — | |
| pad_token_id | 0 | — | |
| tie_word_embeddings | false | false | = |
| transformers_version | 4.28.0.dev0 | 4.34.1 | ≠ |
| use_cache | true | true | = |
Most similar architectures
- DeepSeek-Coder 6.7B (DeepSeek, 2023-11) 0.884
- Qwen1.5 7B (Qwen, 2024-02) 0.884
- DeepSeek LLM 7B (DeepSeek, 2023-11) 0.882
- DeepSeekMoE 16B (DeepSeek, 2024-01) 0.771
- Qwen3.5 27B (Qwen, 2026-02) 0.720
- Qwen3.5 9B (Qwen, 2026-02) 0.718
Similarity values range from 0 (no shared categorical features) to 1 (identical profiles).
Raw config fields
20 fields
| _name_or_path | /home/sgugger/tmp/llama/llama-7b/ |
|---|---|
| architectures | LlamaForCausalLM |
| bos_token_id | 1 |
| eos_token_id | 2 |
| hidden_act | silu |
| hidden_size | 4096 |
| initializer_range | 0.02 |
| intermediate_size | 11008 |
| max_position_embeddings | 2048 |
| max_sequence_length | 2048 |
| model_type | llama |
| num_attention_heads | 32 |
| num_hidden_layers | 32 |
| pad_token_id | 0 |
| rms_norm_eps | 0.000001 |
| tie_word_embeddings | false |
| torch_dtype | float16 |
| transformers_version | 4.28.0.dev0 |
| use_cache | true |
| vocab_size | 32000 |