Meta · 2024-07 · Dicht

Llama 3.1 8B

Llama 3.1 8B ist ein Grouped-Query-Attention (GQA)-Transformer, veröffentlicht von Meta im 2024-07, mit 32 Schichten, Hidden-Größe 4096 und einem Kontextfenster von 131,072 Tokens.

Schichtstapel

Attention ×32 · Schichten 32

Kernfakten

LaborMeta
Veröffentlicht2024-07
Parameter8.03 Mrd.
Kontext131,072 tokens
AttentionGQA (32:8)
Schichten32
Hidden-Dim.4,096
Attention-Köpfe32
Vokabular128,256
PositionscodierungRoPE
NormierungRMSNorm
Aktivierungsilu
Präzisionbf16
ArchitekturklasseLlamaForCausalLM

Architekturüberblick

t₁ t₂ t₃ t₄ Eingabetokens Embedding · Vokabular 128,256 → Hidden-Dim. 4,096 Q1 Q2 Q3 Qn KV1 KV2 KV3 KVn Attention-Köpfe 32 KV-Köpfe 8 head dim 128 · RoPE FFN · SwiGLU FFN-Dim. 14,336 × 32 Transformer-Block Attention FFN / MoE RMSNorm pre-norm Finale Norm · RMSNorm LM head → Vokabular 128,256 p p p → nächstes Token Positionscodierung RoPE Präzision BF16 Kontext 128K tok
Gezeichnet nach der mitgelieferten config.json · 32 Schichten / Breite 4,096 / Kontext 131,072. Originaldiagramm dieses Atlas.

Attention

Grouped-Query-Attention (GQA) — 32 q-heads / 8 kv-heads. RoPE θ=500,000.

FFN / MoE

Es ist ein dichtes Modell: Alle 8.03 Mrd. Parameter sind an der Berechnung jedes Tokens beteiligt.

Feldweiser Vergleich

Verglichen mit dem vorherigen Modell desselben Labors; fehlt dieses, mit dem strukturell nächsten Modell. Die Spalte Ratio = dieses Modell ÷ Vergleichsmodell.

Vollfeldvergleich mit dem Vorgänger Llama 3.1 70B
ModellLlama 3.1 8BLlama 3.1 70BRatio
model_typellamallama
architecturesLlamaForCausalLMLlamaForCausalLM
hidden_size40968192×0.500
num_hidden_layers3280×0.400
num_attention_heads3264×0.500
num_key_value_heads88≈1
head_dim128
intermediate_size1433628672×0.500
hidden_actsilusilu
rope_theta500000500000≈1
max_position_embeddings131072131072≈1
rms_norm_eps0.000010.00001≈1
vocab_size128256128256≈1
torch_dtypebfloat16bfloat16
_name_or_pathmeta-llama/meta-Llama-3.1-8B-Instruct
attention_biasfalsefalse
attention_dropout00
bos_token_id128000128000≈1
eos_token_id128009128001×1 + 128008×1 + 128009×1
initializer_range0.020.02≈1
mlp_biasfalsefalse
pad_token_id128004
pretraining_tp11≈1
tie_word_embeddingsfalsefalse
transformers_version4.49.0.dev04.42.3
unsloth_fixedtrue

Strukturell ähnlichste Modelle

Ähnlichkeitswerte reichen von 0 (keine gemeinsamen kategorialen Merkmale) bis 1 (identische Profile).

Rohe Config-Felder

27 Felder
_name_or_pathmeta-llama/meta-Llama-3.1-8B-Instruct
architecturesLlamaForCausalLM
attention_biasfalse
attention_dropout0
bos_token_id128000
eos_token_id128009
head_dim128
hidden_actsilu
hidden_size4096
initializer_range0.02
intermediate_size14336
max_position_embeddings131072
mlp_biasfalse
model_typellama
num_attention_heads32
num_hidden_layers32
num_key_value_heads8
pad_token_id128004
pretraining_tp1
rms_norm_eps0.00001
rope_theta500000
tie_word_embeddingsfalse
torch_dtypebfloat16
transformers_version4.49.0.dev0
unsloth_fixedtrue
use_cachetrue
vocab_size128256