OLMo 2 7B
Ai2 · OLMo · open weights
- MHA
- RoPE
- Post-norm
- QK-norm
Facts and where they come from
| Released | 2024-12 | config.jsonconfig.jsonHugging Face repository creation date (api.createdAt) |
|---|---|---|
| Licence | apache-2.0 | config.jsonconfig.jsonREADME metadata: license |
| Total parameters | 7B | labmodel cardmodel name OLMo-2-1124-7B |
| Active parameters | not disclosed | not disclosed |
| Context length | 4K tokens | config.jsonconfig.jsonmax_position_embeddings |
| Norm placement | post | codemodelling codetransformers 5.18.0 olmo2: post_attention_layernorm and post_feedforward_layernorm only |
| Norm type | RMSNorm | codemodelling codetransformers 5.18.0 olmo2: post_attention_layernorm and post_feedforward_layernorm only |
| QK-norm | yes | codemodelling codetransformers 5.18.0 olmo2: q_norm and k_norm |
| Positional encoding | RoPE | codemodelling coderotary on the full head (default) |
| Parallel attention and MLP | no | codemodelling codetransformers 5.18.0 olmo2: post_attention_layernorm and post_feedforward_layernorm only |
Architecture, drawn from the data
MHA 32q/32kv. 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) | 7.3B |
|---|---|
| Active per token (modelled) | 7.3B |
| Without embeddings and output head | 6.48B total, 6.48B active |
| Published weights (Hugging Face count) | 7.3B |
| KV cache per token, BF16 (layers that grow with context) | 512 KiB |
| KV cache + state at 4K tokens, BF16 | 2 GiB |
| Decode FLOPs per token at 4K context | 15.9 GFLOP |
| Prefill FLOPs for a 4K prompt | 57.5 TFLOP |
KV cache against context
Every architecture field
| Field | Value | Source |
|---|---|---|
| d_model | 4,096 | config.jsonconfig.jsonhidden_size |
| vocab | 100,352 | config.jsonconfig.jsonvocab_size |
| tied_embeddings | false | config.jsonconfig.jsontie_word_embeddings |
| mixers.full.type | attn | codemodelling codeattention block |
| mixers.full.heads | 32 | config.jsonconfig.jsonnum_attention_heads |
| mixers.full.kv_heads | 32 | config.jsonconfig.jsonnum_key_value_heads |
| mixers.full.head_dim | 128 | codemodelling codetransformers 5.18.0: head_dim = hidden_size / num_attention_heads |
| mixers.full.qk_norm | true | codemodelling codetransformers 5.18.0 olmo2: q_norm and k_norm |
| ffns.dense.type | dense | codemodelling codeMLP block |
| ffns.dense.d_ff | 11,008 | config.jsonconfig.jsonintermediate_size |
| ffns.dense.gated | true | codemodelling codeMLP: gated (SwiGLU/GeGLU) |
| layout | 32× full/dense | config.jsonconfig.jsonnum_hidden_layers |
Sources
- config.json @ 470b1fb
- model card
- arXiv 2501.00656
- 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 “OLMo 2 (7B)” (name only; see about).