Meta · 2024-07 · Dense
Llama 3.1 8B
Llama 3.1 8B est un Transformer à attention groupée (GQA) publié par Meta en 2024-07, avec 32 couches, une dimension cachée de 4096 et une fenêtre de contexte de 131,072 tokens.
Pile de couches
Attention ×32 · Couches 32
Faits clés
| Laboratoire | Meta |
|---|---|
| Publication | 2024-07 |
| Paramètres | 8.03 Md |
| Contexte | 131,072 tokens |
| Attention | GQA (32:8) |
| Couches | 32 |
| Dimension cachée | 4,096 |
| Têtes d'attention | 32 |
| Vocabulaire | 128,256 |
| Encodage positionnel | RoPE |
| Normalisation | RMSNorm |
| Activation | silu |
| Précision | bf16 |
| Classe d'architecture | LlamaForCausalLM |
Vue d'ensemble de l'architecture
Attention
attention groupée (GQA) — 32 q-heads / 8 kv-heads. RoPE θ=500,000.
FFN / MoE
C’est un modèle dense : la totalité des 8.03Md 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 prédécesseur Llama 3.1 70B
| Modèle | Llama 3.1 8B | Llama 3.1 70B | Ratio |
|---|---|---|---|
| model_type | llama | llama | = |
| architectures | LlamaForCausalLM | LlamaForCausalLM | = |
| hidden_size | 4096 | 8192 | ×0.500 |
| num_hidden_layers | 32 | 80 | ×0.400 |
| num_attention_heads | 32 | 64 | ×0.500 |
| num_key_value_heads | 8 | 8 | ≈1 |
| head_dim | 128 | — | |
| intermediate_size | 14336 | 28672 | ×0.500 |
| hidden_act | silu | silu | = |
| rope_theta | 500000 | 500000 | ≈1 |
| max_position_embeddings | 131072 | 131072 | ≈1 |
| rms_norm_eps | 0.00001 | 0.00001 | ≈1 |
| vocab_size | 128256 | 128256 | ≈1 |
| torch_dtype | bfloat16 | bfloat16 | = |
| _name_or_path | meta-llama/meta-Llama-3.1-8B-Instruct | — | |
| attention_bias | false | false | = |
| attention_dropout | 0 | 0 | = |
| bos_token_id | 128000 | 128000 | ≈1 |
| eos_token_id | 128009 | 128001×1 + 128008×1 + 128009×1 | ≠ |
| initializer_range | 0.02 | 0.02 | ≈1 |
| mlp_bias | false | false | = |
| pad_token_id | 128004 | — | |
| pretraining_tp | 1 | 1 | ≈1 |
| tie_word_embeddings | false | false | = |
| transformers_version | 4.49.0.dev0 | 4.42.3 | ≠ |
| unsloth_fixed | true | — |
Architectures les plus proches
- Hunyuan-TurboS 7B (Hunyuan, 2026-05) 1.000
- Qwen3 8B (Qwen, 2025-04) 0.999
- Hunyuan 7B (Hunyuan, 2025-08) 0.999
- Mistral 7B (Mistral, 2023-09) 0.999
- Qwen2.5 7B (Qwen, 2024-09) 0.999
- Qwen3.6 27B (Qwen, 2026-04) 0.992
La similarité varie de 0 (aucune caractéristique catégorielle commune) à 1 (profils identiques).
Champs bruts du config.json
27 champs
| _name_or_path | meta-llama/meta-Llama-3.1-8B-Instruct |
|---|---|
| architectures | LlamaForCausalLM |
| attention_bias | false |
| attention_dropout | 0 |
| bos_token_id | 128000 |
| eos_token_id | 128009 |
| head_dim | 128 |
| hidden_act | silu |
| hidden_size | 4096 |
| initializer_range | 0.02 |
| intermediate_size | 14336 |
| max_position_embeddings | 131072 |
| mlp_bias | false |
| model_type | llama |
| num_attention_heads | 32 |
| num_hidden_layers | 32 |
| num_key_value_heads | 8 |
| pad_token_id | 128004 |
| pretraining_tp | 1 |
| rms_norm_eps | 0.00001 |
| rope_theta | 500000 |
| tie_word_embeddings | false |
| torch_dtype | bfloat16 |
| transformers_version | 4.49.0.dev0 |
| unsloth_fixed | true |
| use_cache | true |
| vocab_size | 128256 |