google/owlv2-base-patch16-ensemble
Original155.0Mparameters
Fixture3.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.
owlv2.text_model.encoder.layers
Original · 12
Fixture · 2
| Kind | Original | Fixture | |
|---|---|---|---|
| EncoderLayer | 12 | 2 | ✓ kept |
owlv2.vision_model.encoder.layers
Original · 12
Fixture · 2
| Kind | Original | Fixture | |
|---|---|---|---|
| EncoderLayer | 12 | 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 |
|---|---|---|---|---|
| owlv2.vision_model.encoder.layers | 85.1M | 54.9% | 66.9K | 1.9% |
| owlv2.text_model.encoder.layers | 37.8M | 24.4% | 66.9K | 1.9% |
| owlv2.text_model | 25.3M | 16.3% | 3.2M | 87.7% |
| owlv2.vision_model | 3.4M | 2.2% | 279.9K | 7.8% |
| objectness_head.dense0 | 590.6K | 0.4% | 4.2K | 0.1% |
| box_head.dense0 | 590.6K | 0.4% | 4.2K | 0.1% |
| objectness_head.dense1 | 590.6K | 0.4% | 4.2K | 0.1% |
| 10 others | 1.6M | 1.1% | 17.1K | 0.5% |
Preserved properties
| Config | Property | Original | Fixture | |
|---|---|---|---|---|
| model | model_type | owlv2 | owlv2 | ✓ kept |
| text_config | model_type | owlv2_text_model | owlv2_text_model | ✓ kept |
| text_config | vocab_size | 49408 | 49408 | ✓ kept |
| text_config | hidden_act | quick_gelu | quick_gelu | ✓ kept |
| text_config | max_position_embeddings | 16 | 16 | ✓ kept |
| vision_config | model_type | owlv2_vision_model | owlv2_vision_model | ✓ kept |
| vision_config | hidden_act | quick_gelu | quick_gelu | ✓ kept |
| vision_config | image_size | 960 | 960 | ✓ kept |
| vision_config | patch_size | 16 | 16 | ✓ kept |
| vision_config | num_channels | 3 | 3 | ✓ kept |
Module classes
Instances of each class in the built model (prefix Owlv2 omitted).
| Class | Original | Fixture |
|---|---|---|
| Linear | 155 | 35 |
| LayerNorm | 52 | 12 |
| Attention | 24 | 4 |
| EncoderLayer | 24 | 4 |
| MLP | 24 | 4 |
| QuickGELUActivation | 24 | 4 |
| Embedding | 3 | 3 |
| GELU | 2 | 2 |
| ModuleList | 2 | 2 |
| BoxPredictionHead | 2 | 2 |
| Encoder | 2 | 2 |
| Conv2d | 1 | 1 |
| ELU | 1 | 1 |
| ClassPredictionHead | 1 | 1 |
| ForObjectDetection | 1 | 1 |
| Model | 1 | 1 |
| TextEmbeddings | 1 | 1 |
| TextTransformer | 1 | 1 |
| VisionEmbeddings | 1 | 1 |
| VisionTransformer | 1 | 1 |
| Sigmoid | 1 | 1 |
Config changes
9 fields changed, 47 unchanged.
| Field | Original | Fixture |
|---|---|---|
| projection_dim | 512 | 64 |
| text_config.hidden_size | 512 | 64 |
| text_config.intermediate_size | 2048 | 128 |
| text_config.num_attention_heads | 8 | 4 |
| text_config.num_hidden_layers | 12 | 2 |
| vision_config.hidden_size | 768 | 64 |
| vision_config.intermediate_size | 3072 | 128 |
| vision_config.num_attention_heads | 12 | 4 |
| vision_config.num_hidden_layers | 12 | 2 |