Llama 3.2 1B
Meta · Llama 3 · open weights
- GQA
- RoPE
- Pre-norm
Facts and where they come from
| Released | 2024-09 | config.jsonconfig.jsonHugging Face repository creation date (api.createdAt) |
|---|---|---|
| Licence | llama3.2 | config.jsonconfig.jsonREADME metadata: license |
| Total parameters | 1.23B | labmodel cardREADME table: 1B (1.23B) |
| Active parameters | not disclosed | not disclosed |
| Context length | 128K tokens | labmeta-llama/llama-models sku_list.py (pinned)model card (README): context length 128k |
| Norm placement | pre | codemodelling codetransformers 5.18.0 / repo modelling code for llama: input_layernorm before attention, post_attention_layernorm before the MLP |
| Norm type | RMSNorm | codemodelling codetransformers 5.18.0 / repo modelling code for llama: input_layernorm before attention, post_attention_layernorm before the MLP |
| QK-norm | no | codemodelling codeno q/k normalisation in the attention block |
| Positional encoding | RoPE | codemodelling coderotary on the full head (default) |
| Parallel attention and MLP | no | codemodelling codetransformers 5.18.0 / repo modelling code for llama: input_layernorm before attention, post_attention_layernorm before the MLP |
Architecture, drawn from the data
GQA 32q/8kv. Each column is one layer: its token mixer above, its feed-forward block below. Paler columns reuse another layer’s keys and values.
Modelled costs
From the cost model, batch size 1. Totals the lab states are in the table above; differences come from rounding, from what a lab counts, or from parts the model does not describe (listed on the about page).
| Parameters (modelled) | 1.24B |
|---|---|
| Active per token (modelled) | 1.24B |
| Without embeddings and output head | 973M total, 973M active |
| Published weights (Hugging Face count) | 1.24B |
| KV cache per token, BF16 (layers that grow with context) | 32 KiB |
| KV cache + state at 128K tokens, BF16 | 4 GiB |
| Decode FLOPs per token at 4K context | 3.01 GFLOP |
| Prefill FLOPs for a 4K prompt | 9.07 TFLOP |
KV cache against context
Every architecture field
| Field | Value | Source |
|---|---|---|
| d_model | 2,048 | labmeta-llama/llama-models sku_list.py (pinned)sku_list.py arch_args_1b: dim |
| vocab | 128,256 | labmeta-llama/llama-models sku_list.py (pinned)sku_list.py: LLAMA3_VOCAB_SIZE |
| tied_embeddings | true | labmeta-llama/llama-models sku_list.py (pinned)model card: shared embeddings |
| mixers.full.type | attn | codemodelling codeattention block |
| mixers.full.heads | 32 | labmeta-llama/llama-models sku_list.py (pinned)sku_list.py arch_args_1b: n_heads |
| mixers.full.kv_heads | 8 | labmeta-llama/llama-models sku_list.py (pinned)sku_list.py arch_args_1b: n_kv_heads |
| mixers.full.head_dim | 64 | codemodelling codetransformers 5.18.0: head_dim = hidden_size / num_attention_heads |
| ffns.dense.type | dense | codemodelling codeMLP block |
| ffns.dense.d_ff | 8,192 | labmeta-llama/llama-models sku_list.py (pinned)llama3/model.py FeedForward: int(2*4*dim/3), x ffn_dim_multiplier 1.5, rounded up to multiple_of 256 |
| ffns.dense.gated | true | codemodelling codeMLP: gated (SwiGLU/GeGLU) |
| layout | 16× full/dense | labmeta-llama/llama-models sku_list.py (pinned)sku_list.py arch_args_1b: n_layers |
Sources
- config.json @ 4e20de3
- model card
- meta-llama/llama-models sku_list.py (pinned) · meta-llama/llama-models sku_list.py (pinned)
- modelling code · transformers 5.18.0 modelling code, or the model repository's own modelling file at the pinned revision
Listed in the LLM Architecture Gallery checklist as “Llama 3.2 (1B)” (name only; see about).