llm-architectures-explained

/models

SmolLM3 3B

Hugging Face · SmolLM · open weights

Facts and where they come from

Released2025-06config.jsonconfig.jsonHugging Face repository creation date (api.createdAt)
Licenceapache-2.0config.jsonconfig.jsonREADME metadata: license
Total parameters3Blabmodel cardREADME: SmolLM3 is a 3B parameter language model
Active parametersnot disclosednot disclosed
Context length64K tokensconfig.jsonconfig.jsonmax_position_embeddings
Norm placementprecodemodelling codetransformers 5.18.0 / repo modelling code for smollm3: input_layernorm before attention, post_attention_layernorm before the MLP
Norm typeRMSNormcodemodelling codetransformers 5.18.0 / repo modelling code for smollm3: input_layernorm before attention, post_attention_layernorm before the MLP
QK-normnocodemodelling codeno q/k normalisation in the attention block
Positional encodingRoPE; every 4th layer has no RoPEconfig.jsonconfig.jsonno_rope_layer_interval
Parallel attention and MLPnocodemodelling codetransformers 5.18.0 / repo modelling code for smollm3: input_layernorm before attention, post_attention_layernorm before the MLP

Architecture, drawn from the data

GQA 16q/4kv. Each column is one layer: its token mixer above, its feed-forward block below. Paler columns reuse another layer’s keys and values.

SmolLM3 3B: layer stack and blockslayers (36)mixer / FFNlayer 0: GQA: 16 query / 4 KV heads · head 128layer 0: Gated MLP: 11008layer 1: GQA: 16 query / 4 KV heads · head 128layer 1: Gated MLP: 11008layer 2: GQA: 16 query / 4 KV heads · head 128layer 2: Gated MLP: 11008layer 3: GQA: 16 query / 4 KV heads · head 128layer 3: Gated MLP: 11008layer 4: GQA: 16 query / 4 KV heads · head 128layer 4: Gated MLP: 11008layer 5: GQA: 16 query / 4 KV heads · head 128layer 5: Gated MLP: 11008layer 6: GQA: 16 query / 4 KV heads · head 128layer 6: Gated MLP: 11008layer 7: GQA: 16 query / 4 KV heads · head 128layer 7: Gated MLP: 11008layer 8: GQA: 16 query / 4 KV heads · head 128layer 8: Gated MLP: 11008layer 9: GQA: 16 query / 4 KV heads · head 128layer 9: Gated MLP: 11008layer 10: GQA: 16 query / 4 KV heads · head 128layer 10: Gated MLP: 11008layer 11: GQA: 16 query / 4 KV heads · head 128layer 11: Gated MLP: 11008layer 12: GQA: 16 query / 4 KV heads · head 128layer 12: Gated MLP: 11008layer 13: GQA: 16 query / 4 KV heads · head 128layer 13: Gated MLP: 11008layer 14: GQA: 16 query / 4 KV heads · head 128layer 14: Gated MLP: 11008layer 15: GQA: 16 query / 4 KV heads · head 128layer 15: Gated MLP: 11008layer 16: GQA: 16 query / 4 KV heads · head 128layer 16: Gated MLP: 11008layer 17: GQA: 16 query / 4 KV heads · head 128layer 17: Gated MLP: 11008layer 18: GQA: 16 query / 4 KV heads · head 128layer 18: Gated MLP: 11008layer 19: GQA: 16 query / 4 KV heads · head 128layer 19: Gated MLP: 11008layer 20: GQA: 16 query / 4 KV heads · head 128layer 20: Gated MLP: 11008layer 21: GQA: 16 query / 4 KV heads · head 128layer 21: Gated MLP: 11008layer 22: GQA: 16 query / 4 KV heads · head 128layer 22: Gated MLP: 11008layer 23: GQA: 16 query / 4 KV heads · head 128layer 23: Gated MLP: 11008layer 24: GQA: 16 query / 4 KV heads · head 128layer 24: Gated MLP: 11008layer 25: GQA: 16 query / 4 KV heads · head 128layer 25: Gated MLP: 11008layer 26: GQA: 16 query / 4 KV heads · head 128layer 26: Gated MLP: 11008layer 27: GQA: 16 query / 4 KV heads · head 128layer 27: Gated MLP: 11008layer 28: GQA: 16 query / 4 KV heads · head 128layer 28: Gated MLP: 11008layer 29: GQA: 16 query / 4 KV heads · head 128layer 29: Gated MLP: 11008layer 30: GQA: 16 query / 4 KV heads · head 128layer 30: Gated MLP: 11008layer 31: GQA: 16 query / 4 KV heads · head 128layer 31: Gated MLP: 11008layer 32: GQA: 16 query / 4 KV heads · head 128layer 32: Gated MLP: 11008layer 33: GQA: 16 query / 4 KV heads · head 128layer 33: Gated MLP: 11008layer 34: GQA: 16 query / 4 KV heads · head 128layer 34: Gated MLP: 11008layer 35: GQA: 16 query / 4 KV heads · head 128layer 35: Gated MLP: 1100801835× 36normGQA: 16 query / 4 KV heads · head 128+normGated MLP: 11008+full attentiondense FFN

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)3.08B
Active per token (modelled)3.08B
Without embeddings and output head2.81B total, 2.81B active
Published weights (Hugging Face count)3.08B
KV cache per token, BF16 (layers that grow with context)72 KiB
KV cache + state at 64K tokens, BF164.5 GiB
Decode FLOPs per token at 4K context7.36 GFLOP
Prefill FLOPs for a 4K prompt25.5 TFLOP

KV cache against context

SmolLM3 3B: KV cache bytes against context length101001,00010,000980 KiB9.5 MiB95 MiB950 MiBcontext (tokens)KV cache + state (BF16)SmolLM3 3B

Compare with other models →

Every architecture field

FieldValueSource
d_model2,048config.jsonconfig.jsonhidden_size
vocab128,256config.jsonconfig.jsonvocab_size
tied_embeddingstrueconfig.jsonconfig.jsontie_word_embeddings
mixers.full.typeattncodemodelling codeattention block
mixers.full.heads16config.jsonconfig.jsonnum_attention_heads
mixers.full.kv_heads4config.jsonconfig.jsonnum_key_value_heads
mixers.full.head_dim128codemodelling codetransformers 5.18.0: head_dim = hidden_size / num_attention_heads
ffns.dense.typedensecodemodelling codeMLP block
ffns.dense.d_ff11,008config.jsonconfig.jsonintermediate_size
ffns.dense.gatedtruecodemodelling codeMLP: gated (SwiGLU/GeGLU)
layout36× full/denseconfig.jsonconfig.jsonnum_hidden_layers

Sources

Listed in the LLM Architecture Gallery checklist as “SmolLM3 (3B)” (name only; see about).