HuggingFaceTB/SmolVLM2-2.2B-Instruct
Original2.2Bparameters
Fixture6.6Mparameters
Layer stacks2compared
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.vision_model.encoder.layers
Original · 27
Fixture · 2
| Kind | Original | Fixture | |
|---|---|---|---|
| EncoderLayer | 27 | 2 | ✓ kept |
model.text_model.layers
Original · 24
Fixture · 2
| Kind | Original | Fixture | |
|---|---|---|---|
| LlamaDecoderLayer | 24 | 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.text_model.layers | 1.6B | 71.7% | 82.2K | 1.2% |
| model.vision_model.encoder.layers | 411.5M | 18.3% | 66.9K | 1.0% |
| model.text_model | 100.9M | 4.5% | 3.2M | 47.9% |
| lm_head | 100.9M | 4.5% | 3.2M | 47.9% |
| model.connector | 21.2M | 0.9% | 36.9K | 0.6% |
| model.vision_model | 1.5M | 0.1% | 84.5K | 1.3% |
Preserved properties
| Config | Property | Original | Fixture | |
|---|---|---|---|---|
| model | model_type | smolvlm | smolvlm | ✓ kept |
| model | vocab_size | 49280 | 49280 | ✓ kept |
| model | tie_word_embeddings | False | False | ✓ kept |
| vision_config | model_type | smolvlm_vision | smolvlm_vision | ✓ kept |
| vision_config | tie_word_embeddings | False | False | ✓ kept |
| vision_config | hidden_act | gelu_pytorch_tanh | gelu_pytorch_tanh | ✓ kept |
| vision_config | image_size | 384 | 384 | ✓ kept |
| vision_config | patch_size | 14 | 14 | ✓ kept |
| vision_config | num_channels | 3 | 3 | ✓ kept |
| text_config | attention style | MHA (32 heads, 32 KV) | MHA (4 heads, 4 KV) | ✓ kept |
| text_config | RoPE type | default | default | ✓ kept |
| text_config | model_type | llama | llama | ✓ kept |
| text_config | vocab_size | 49280 | 49280 | ✓ kept |
| text_config | tie_word_embeddings | False | False | ✓ kept |
| text_config | hidden_act | silu | silu | ✓ kept |
| text_config | max_position_embeddings | 8192 | 8192 | ✓ kept |
| text_config.perceiver_config | model_type | vllama3 | vllama3 | ✓ kept |
| text_config.perceiver_config | tie_word_embeddings | True | True | ✓ kept |
| text_config.perceiver_config | hidden_act | silu | silu | ✓ kept |
Module classes
Instances of each class in the built model (prefix SmolVLM omitted).
| Class | Original | Fixture |
|---|---|---|
| Linear | 332 | 28 |
| LayerNorm | 55 | 5 |
| LlamaRMSNorm | 49 | 5 |
| GELUTanh | 27 | 2 |
| EncoderLayer | 27 | 2 |
| VisionAttention | 27 | 2 |
| VisionMLP | 27 | 2 |
| LlamaAttention | 24 | 2 |
| LlamaDecoderLayer | 24 | 2 |
| LlamaMLP | 24 | 2 |
| SiLUActivation | 24 | 2 |
| Embedding | 2 | 2 |
| ModuleList | 2 | 2 |
| Conv2d | 1 | 1 |
| LlamaModel | 1 | 1 |
| LlamaRotaryEmbedding | 1 | 1 |
| Connector | 1 | 1 |
| Encoder | 1 | 1 |
| ForConditionalGeneration | 1 | 1 |
| Model | 1 | 1 |
| SimpleMLP | 1 | 1 |
| VisionEmbeddings | 1 | 1 |
| VisionTransformer | 1 | 1 |
Config changes
10 fields changed, 127 unchanged.
| Field | Original | Fixture |
|---|---|---|
| text_config.head_dim | 64 | 16 |
| text_config.hidden_size | 2048 | 64 |
| text_config.intermediate_size | 8192 | 128 |
| text_config.num_attention_heads | 32 | 4 |
| text_config.num_hidden_layers | 24 | 2 |
| text_config.num_key_value_heads | 32 | 4 |
| vision_config.hidden_size | 1152 | 64 |
| vision_config.intermediate_size | 4304 | 128 |
| vision_config.num_attention_heads | 16 | 4 |
| vision_config.num_hidden_layers | 27 | 2 |