google/vit-base-patch16-224
Original86.6Mparameters
Fixture194.0Kparameters
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.
vit.layers
Original · 12
Fixture · 2
| Kind | Original | Fixture | |
|---|---|---|---|
| Layer | 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 |
|---|---|---|---|---|
| vit.layers | 85.1M | 98.3% | 66.9K | 34.5% |
| classifier | 769.0K | 0.9% | 65.0K | 33.5% |
| vit.embeddings | 742.7K | 0.9% | 61.9K | 31.9% |
| vit.layernorm | 1.5K | 0.0% | 128 | 0.1% |
Preserved properties
| Config | Property | Original | Fixture | |
|---|---|---|---|---|
| model | model_type | vit | vit | ✓ kept |
| model | hidden_act | gelu | gelu | ✓ kept |
| model | image_size | 224 | 224 | ✓ kept |
| model | patch_size | 16 | 16 | ✓ kept |
| model | num_channels | 3 | 3 | ✓ kept |
Module classes
Instances of each class in the built model (prefix ViT omitted).
| Class | Original | Fixture |
|---|---|---|
| Linear | 73 | 13 |
| LayerNorm | 25 | 5 |
| Dropout | 13 | 3 |
| GELUActivation | 12 | 2 |
| Attention | 12 | 2 |
| Layer | 12 | 2 |
| MLP | 12 | 2 |
| Conv2d | 1 | 1 |
| ModuleList | 1 | 1 |
| Embeddings | 1 | 1 |
| ForImageClassification | 1 | 1 |
| Model | 1 | 1 |
| PatchEmbeddings | 1 | 1 |
Config changes
5 fields changed, 20 unchanged.
| Field | Original | Fixture |
|---|---|---|
| hidden_size | 768 | 64 |
| intermediate_size | 3072 | 128 |
| num_attention_heads | 12 | 4 |
| num_hidden_layers | 12 | 2 |
| problem_type | null | single_label_classification |