Meta · 2023-02 · Dense
LLaMA 1 7B
LLaMA 1 7B est un Transformer à attention multi-tête (MHA) publié par Meta en 2023-02, avec 32 couches, une dimension cachée de 4096 et une fenêtre de contexte de 2,048 tokens.
Pile de couches
Attention ×32 · Couches 32
Faits clés
| Laboratoire | Meta |
|---|---|
| Publication | 2023-02 |
| Paramètres | 6.74 Md |
| Contexte | 2,048 tokens |
| Attention | MHA (32:32) |
| Couches | 32 |
| Dimension cachée | 4,096 |
| Têtes d'attention | 32 |
| Vocabulaire | 32,000 |
| Encodage positionnel | learned/absolute |
| Normalisation | RMSNorm |
| Activation | silu |
| Précision | — |
| Classe d'architecture | LlamaForCausalLM |
Vue d'ensemble de l'architecture
Attention
attention multi-tête (MHA) — 32 q-heads / 32 kv-heads.
FFN / MoE
C’est un modèle dense : la totalité des 6.74Md de paramètres participe au calcul de chaque token.
Comparaison champ à champ
Comparé au modèle précédent du même labo ; à défaut, au modèle structurellement le plus proche. La colonne ratio = ce modèle ÷ le modèle comparé.
Comparaison complète avec le plus proche, DeepSeek-Coder 6.7B
| Modèle | 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 | = |
Architectures les plus proches
- 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
La similarité varie de 0 (aucune caractéristique catégorielle commune) à 1 (profils identiques).
Champs bruts du config.json
20 champs
| _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 |