Skip to content

smollm3

smollm3

SmolLM3 (SmolLM3ForCausalLM).

Llama's tree and Llama's block: model.{embed_tokens, layers[i].{input_layernorm, self_attn, post_attention_layernorm, mlp}, norm} and lm_head, the residual added in the block, attention through the shared eager forward. Some layers use sliding-window attention and some no positional embedding.

RENAME module-attribute

RENAME = {'model.embed_tokens': 'embed_tokens', 'model.layers': 'layers', 'model.norm': 'norm'}

ENVOYS module-attribute

ENVOYS = {SmolLM3DecoderLayer: Layer, SmolLM3Attention: Attention, SmolLM3MLP: Mlp}