Meta · 2024-07 · Dense

Llama 3.1 70B

Llama 3.1 70B is a grouped-query attention (GQA) transformer released by Meta in 2024-07, with 80 layers, hidden size 8192 and a context window of 131,072 tokens.

Layer stack

Attention ×80 · Layers 80

Key facts

FamilyMeta
Released2024-07
Params70.55 B
Context131,072 tokens
AttentionGQA (64:8)
Layers80
Hidden8,192
Heads64
Vocab128,256
PositionRoPE
NormRMSNorm
Activationsilu
Dtypebf16
Architecture classLlamaForCausalLM

Architecture overview

t₁ t₂ t₃ t₄ input tokens Embedding · Vocab 128,256 → Hidden 8,192 Q1 Q2 Q3 Qn KV1 KV2 KV3 KVn Heads 64 KV heads 8 head dim 128 · RoPE FFN · SwiGLU FFN dim 28,672 × 80 transformer block Attention Feed-forward / MoE RMSNorm pre-norm Final norm · RMSNorm LM head → Vocab 128,256 p p p → next token Position RoPE Dtype BF16 Context 128K tok
Drawn from the shipped config.json · 80 layers / width 8,192 / context 131,072. Original diagram by this atlas.

Attention

grouped-query attention (GQA) — 64 q-heads / 8 kv-heads. RoPE θ=500,000.

Feed-forward / MoE

It is a dense model: all 70.55B 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 predecessor Llama 2 70B
ModelLlama 3.1 70BLlama 2 70BRatio
model_typellamallama
architecturesLlamaForCausalLMLlamaForCausalLM
hidden_size81928192≈1
num_hidden_layers8080≈1
num_attention_heads6464≈1
num_key_value_heads88≈1
intermediate_size2867228672≈1
hidden_actsilusilu
rope_theta500000
max_position_embeddings1310724096×32.00
rms_norm_eps0.000010.00001≈1
vocab_size12825632000×4.01
torch_dtypebfloat16float16
attention_biasfalse
attention_dropout0
bos_token_id1280001×128000.00
eos_token_id128001×1 + 128008×1 + 128009×12
initializer_range0.020.02≈1
mlp_biasfalse
pretraining_tp1
tie_word_embeddingsfalsefalse
transformers_version4.42.34.31.0.dev0
use_cachetruetrue

Most similar architectures

Similarity values range from 0 (no shared categorical features) to 1 (identical profiles).

Raw config fields

23 fields
architecturesLlamaForCausalLM
attention_biasfalse
attention_dropout0
bos_token_id128000
eos_token_id128001×1 + 128008×1 + 128009×1
hidden_actsilu
hidden_size8192
initializer_range0.02
intermediate_size28672
max_position_embeddings131072
mlp_biasfalse
model_typellama
num_attention_heads64
num_hidden_layers80
num_key_value_heads8
pretraining_tp1
rms_norm_eps0.00001
rope_theta500000
tie_word_embeddingsfalse
torch_dtypebfloat16
transformers_version4.42.3
use_cachetrue
vocab_size128256