llava-hf/LLaVA-NeXT-Video-7B-hf
Original7.1Bparameters
Fixture4.3Mparameters
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_tower.encoder.layers
Original · 24
Fixture · 2
| Kind | Original | Fixture | |
|---|---|---|---|
| CLIPEncoderLayer | 24 | 2 | ✓ kept |
model.language_model.layers
Original · 32
Fixture · 2
| Kind | Original | Fixture | |
|---|---|---|---|
| LlamaDecoderLayer | 32 | 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.language_model.layers | 6.5B | 91.7% | 82.2K | 1.9% |
| model.vision_tower.encoder.layers | 302.3M | 4.3% | 66.9K | 1.5% |
| model.language_model | 131.3M | 1.9% | 2.1M | 47.3% |
| lm_head | 131.3M | 1.9% | 2.1M | 47.3% |
| model.multi_modal_projector | 21.0M | 0.3% | 8.3K | 0.2% |
| model.vision_tower | 1.2M | 0.0% | 74.9K | 1.7% |
| model | 4.1K | 0.0% | 64 | 0.0% |
Preserved properties
| Config | Property | Original | Fixture | |
|---|---|---|---|---|
| model | model_type | llava_next_video | llava_next_video | ✓ kept |
| model | tie_word_embeddings | False | False | ✓ kept |
| vision_config | model_type | clip_vision_model | clip_vision_model | ✓ kept |
| vision_config | vocab_size | 32000 | 32000 | ✓ kept |
| vision_config | hidden_act | quick_gelu | quick_gelu | ✓ kept |
| vision_config | image_size | 336 | 336 | ✓ 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 | linear | linear | ✓ kept |
| text_config | model_type | llama | llama | ✓ kept |
| text_config | vocab_size | 32064 | 32064 | ✓ kept |
| text_config | tie_word_embeddings | False | False | ✓ kept |
| text_config | hidden_act | silu | silu | ✓ kept |
| text_config | max_position_embeddings | 4096 | 4096 | ✓ kept |
Module classes
Instances of each class in the built model (prefix LlavaNextVideo omitted).
| Class | Original | Fixture |
|---|---|---|
| Linear | 371 | 29 |
| LlamaRMSNorm | 65 | 5 |
| LayerNorm | 50 | 6 |
| LlamaAttention | 32 | 2 |
| LlamaDecoderLayer | 32 | 2 |
| LlamaMLP | 32 | 2 |
| SiLUActivation | 32 | 2 |
| CLIPAttention | 24 | 2 |
| CLIPEncoderLayer | 24 | 2 |
| CLIPMLP | 24 | 2 |
| QuickGELUActivation | 24 | 2 |
| Embedding | 2 | 2 |
| ModuleList | 2 | 2 |
| AvgPool2d | 1 | 1 |
| CLIPEncoder | 1 | 1 |
| CLIPVisionEmbeddings | 1 | 1 |
| CLIPVisionModel | 1 | 1 |
| Conv2d | 1 | 1 |
| GELUActivation | 1 | 1 |
| LlamaModel | 1 | 1 |
| LlamaRotaryEmbedding | 1 | 1 |
| ForConditionalGeneration | 1 | 1 |
| Model | 1 | 1 |
| MultiModalProjector | 1 | 1 |
| Pooler | 1 | 1 |
Config changes
11 fields changed, 67 unchanged.
| Field | Original | Fixture |
|---|---|---|
| text_config.head_dim | 128 | 16 |
| text_config.hidden_size | 4096 | 64 |
| text_config.intermediate_size | 11008 | 128 |
| text_config.num_attention_heads | 32 | 4 |
| text_config.num_hidden_layers | 32 | 2 |
| text_config.num_key_value_heads | 32 | 4 |
| vision_config.hidden_size | 1024 | 64 |
| vision_config.intermediate_size | 4096 | 128 |
| vision_config.num_attention_heads | 16 | 4 |
| vision_config.num_hidden_layers | 24 | 2 |
| vision_config.projection_dim | 768 | 32 |