microsoft/beit-base-patch16-224
Original86.5Mparameters
Fixture187.3Kparameters
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.
beit.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 |
|---|---|---|---|---|
| beit.layers | 85.2M | 98.4% | 72.9K | 38.9% |
| classifier | 769.0K | 0.9% | 65.0K | 34.7% |
| beit.embeddings | 591.4K | 0.7% | 49.3K | 26.3% |
| beit.pooler | 1.5K | 0.0% | 128 | 0.1% |
Preserved properties
| Config | Property | Original | Fixture | |
|---|---|---|---|---|
| model | model_type | beit | beit | ✓ kept |
| model | vocab_size | 8192 | 8192 | ✓ 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 Beit omitted).
| Class | Original | Fixture |
|---|---|---|
| Linear | 73 | 13 |
| LayerNorm | 25 | 5 |
| Dropout | 13 | 3 |
| Attention | 12 | 2 |
| Layer | 12 | 2 |
| MLP | 12 | 2 |
| RelativePositionBias | 12 | 2 |
| GELUActivation | 12 | 2 |
| DropPath | 11 | 1 |
| Identity | 2 | 2 |
| Embeddings | 1 | 1 |
| ForImageClassification | 1 | 1 |
| Model | 1 | 1 |
| PatchEmbeddings | 1 | 1 |
| Pooler | 1 | 1 |
| Conv2d | 1 | 1 |
| ModuleList | 1 | 1 |
Config changes
6 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 |
| out_features | ["stage12"] | ["stage2"] |
| out_indices | [12] | [2] |