kunalkanaujiya/clip-vit-base-patch32-vision
Original87.8Mparameters
Fixture269.1Kparameters
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.
vision_model.encoder.layers
Original · 12
Fixture · 2
| Kind | Original | Fixture | |
|---|---|---|---|
| CLIPEncoderLayer | 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 |
|---|---|---|---|---|
| vision_model.encoder.layers | 85.1M | 96.8% | 66.9K | 24.9% |
| vision_model.embeddings | 2.4M | 2.7% | 199.9K | 74.3% |
| visual_projection | 393.2K | 0.4% | 2.0K | 0.8% |
| vision_model.pre_layrnorm | 1.5K | 0.0% | 128 | 0.0% |
| vision_model.post_layernorm | 1.5K | 0.0% | 128 | 0.0% |
Preserved properties
| Config | Property | Original | Fixture | |
|---|---|---|---|---|
| model | model_type | clip_vision_model | clip_vision_model | ✓ kept |
| model | tie_word_embeddings | True | True | ✓ kept |
| model | hidden_act | quick_gelu | quick_gelu | ✓ kept |
| model | image_size | 224 | 224 | ✓ kept |
| model | patch_size | 32 | 32 | ✓ kept |
| model | num_channels | 3 | 3 | ✓ kept |
Module classes
Instances of each class in the built model (prefix CLIPVision omitted).
| Class | Original | Fixture |
|---|---|---|
| Linear | 73 | 13 |
| LayerNorm | 26 | 6 |
| CLIPAttention | 12 | 2 |
| CLIPEncoderLayer | 12 | 2 |
| CLIPMLP | 12 | 2 |
| QuickGELUActivation | 12 | 2 |
| CLIPEncoder | 1 | 1 |
| Embeddings | 1 | 1 |
| Model | 1 | 1 |
| ModelWithProjection | 1 | 1 |
| Conv2d | 1 | 1 |
| Embedding | 1 | 1 |
| ModuleList | 1 | 1 |
Config changes
5 fields changed, 35 unchanged.
| Field | Original | Fixture |
|---|---|---|
| hidden_size | 768 | 64 |
| intermediate_size | 3072 | 128 |
| num_attention_heads | 12 | 4 |
| num_hidden_layers | 12 | 2 |
| projection_dim | 512 | 32 |