unsloth/Llama-3.2-11B-Vision-Instruct
Original10.7Bparameters
Fixture20.7Mparameters
Layer stacks3compared
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.transformer.layers
Original · 32
Fixture · 2
| Kind | Original | Fixture | |
|---|---|---|---|
| VisionEncoderLayer | 32 | 2 | ✓ kept |
model.vision_model.global_transformer.layers
Original · 8
Fixture · 8
| Kind | Original | Fixture | |
|---|---|---|---|
| VisionEncoderLayer | 8 | 8 | ✓ kept |
model.language_model.layers
Original · 40
Fixture · 2
| Kind | Original | Fixture | |
|---|---|---|---|
| is_causal=True, SelfAttentionDecoderLayer, TextSelfAttention | 32 | 1 | ✓ kept |
| CrossAttentionDecoderLayer, TextCrossAttention | 8 | 1 | ✓ 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.language_model.layers | 8.7B | 81.8% | 74.0K | 0.4% |
| model.vision_model.transformer.layers | 629.5M | 5.9% | 66.4K | 0.3% |
| model.language_model | 525.4M | 4.9% | 8.2M | 39.7% |
| lm_head | 525.3M | 4.9% | 8.2M | 39.7% |
| model.vision_model.global_transformer.layers | 157.4M | 1.5% | 265.7K | 1.3% |
| model.vision_model | 76.7M | 0.7% | 3.8M | 18.5% |
| model.multi_modal_projector | 31.5M | 0.3% | 12.4K | 0.1% |
Preserved properties
| Config | Property | Original | Fixture | |
|---|---|---|---|---|
| model | model_type | mllama | mllama | ✓ kept |
| vision_config | model_type | mllama_vision_model | mllama_vision_model | ✓ kept |
| vision_config | tie_word_embeddings | True | True | ✓ kept |
| vision_config | hidden_act | gelu | gelu | ✓ kept |
| vision_config | image_size | 560 | 560 | ✓ kept |
| vision_config | patch_size | 14 | 14 | ✓ kept |
| vision_config | num_channels | 3 | 3 | ✓ kept |
| text_config | attention style | GQA (32 heads, 8 KV) | GQA (4 heads, 2 KV) | ✓ kept |
| text_config | RoPE type | llama3 | llama3 | ✓ kept |
| text_config | model_type | mllama_text_model | mllama_text_model | ✓ kept |
| text_config | vocab_size | 128256 | 128256 | ✓ kept |
| text_config | tie_word_embeddings | False | False | ✓ kept |
| text_config | hidden_act | silu | silu | ✓ kept |
| text_config | max_position_embeddings | 131072 | 131072 | ✓ kept |
Module classes
Instances of each class in the built model (prefix Mllama omitted).
| Class | Original | Fixture |
|---|---|---|
| Linear | 522 | 76 |
| TextRMSNorm | 97 | 7 |
| LayerNorm | 82 | 22 |
| GELUActivation | 40 | 10 |
| TextMLP | 40 | 2 |
| VisionAttention | 40 | 10 |
| VisionEncoderLayer | 40 | 10 |
| VisionMLP | 40 | 10 |
| SiLUActivation | 40 | 2 |
| SelfAttentionDecoderLayer | 32 | 1 |
| TextSelfAttention | 32 | 1 |
| CrossAttentionDecoderLayer | 8 | 1 |
| TextCrossAttention | 8 | 1 |
| Embedding | 4 | 4 |
| ModuleList | 3 | 3 |
| PrecomputedAspectRatioEmbedding | 2 | 2 |
| VisionEncoder | 2 | 2 |
| Conv2d | 1 | 1 |
| ForConditionalGeneration | 1 | 1 |
| Model | 1 | 1 |
| PrecomputedPositionEmbedding | 1 | 1 |
| RotaryEmbedding | 1 | 1 |
| TextModel | 1 | 1 |
| VisionModel | 1 | 1 |
Config changes
11 fields changed, 85 unchanged.
| Field | Original | Fixture |
|---|---|---|
| text_config.cross_attention_layers | 8 entries | [1] |
| text_config.hidden_size | 4096 | 64 |
| text_config.intermediate_size | 14336 | 128 |
| text_config.num_attention_heads | 32 | 4 |
| text_config.num_hidden_layers | 40 | 2 |
| text_config.num_key_value_heads | 8 | 2 |
| vision_config.hidden_size | 1280 | 64 |
| vision_config.intermediate_layers_indices | [3, 7, 15, 23, 30] | [0, 1] |
| vision_config.intermediate_size | 5120 | 128 |
| vision_config.num_hidden_layers | 32 | 2 |
| vision_config.vision_output_dim | 7680 | 192 |