HuggingFaceTB/SmolLM-135M
Original134.5Mparameters
Fixture3.2Mparameters
Layer stacks1compared
Findings0to review
✓ Same architecture, smaller
Every module class, layer kind and checked property of the original is in the fixture.
Layer stacks
One square per layer, colored by kind: the layer's module classes and type attributes. Hover a square for its index and kind.
model.layers
Original · 30
Fixture · 2
| Kind | Original | Fixture | |
|---|---|---|---|
| DecoderLayer | 30 | 2 | ✓ kept |
Where the parameters are
Share of each model's parameters per component. Vocabulary and patch sizes are kept, so embeddings usually take a larger share of the fixture.
Original
Fixture
| Component | Original | Share | Fixture | Share |
|---|---|---|---|---|
| model.layers | 106.2M | 79.0% | 74.0K | 2.3% |
| model.embed_tokens | 28.3M | 21.0% | 3.1M | 97.7% |
| model.norm | 576 | 0.0% | 64 | 0.0% |
Preserved properties
| Config | Property | Original | Fixture | |
|---|---|---|---|---|
| model | attention style | GQA (9 heads, 3 KV) | GQA (4 heads, 2 KV) | ✓ kept |
| model | RoPE type | default | default | ✓ kept |
| model | model_type | llama | llama | ✓ kept |
| model | vocab_size | 49152 | 49152 | ✓ kept |
| model | tie_word_embeddings | True | True | ✓ kept |
| model | hidden_act | silu | silu | ✓ kept |
| model | max_position_embeddings | 2048 | 2048 | ✓ kept |
Module classes
Instances of each class in the built model (prefix Llama omitted).
| Class | Original | Fixture |
|---|---|---|
| Linear | 211 | 15 |
| RMSNorm | 61 | 5 |
| Attention | 30 | 2 |
| DecoderLayer | 30 | 2 |
| MLP | 30 | 2 |
| SiLUActivation | 30 | 2 |
| Embedding | 1 | 1 |
| ForCausalLM | 1 | 1 |
| Model | 1 | 1 |
| RotaryEmbedding | 1 | 1 |
| ModuleList | 1 | 1 |
Config changes
6 fields changed, 24 unchanged.
| Field | Original | Fixture |
|---|---|---|
| head_dim | 64 | 16 |
| hidden_size | 576 | 64 |
| intermediate_size | 1536 | 128 |
| num_attention_heads | 9 | 4 |
| num_hidden_layers | 30 | 2 |
| num_key_value_heads | 3 | 2 |