facebook/dinov2-small
Original22.1Mparameters
Fixture225.9Kparameters
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.
encoder.layer
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 |
|---|---|---|---|---|
| encoder.layer | 21.3M | 96.6% | 100.2K | 44.4% |
| embeddings | 526.8K | 2.4% | 87.8K | 38.9% |
| embeddings.patch_embeddings | 226.2K | 1.0% | 37.7K | 16.7% |
| layernorm | 768 | 0.0% | 128 | 0.1% |
Preserved properties
| Config | Property | Original | Fixture | |
|---|---|---|---|---|
| model | model_type | dinov2 | dinov2 | ✓ kept |
| model | hidden_act | gelu | gelu | ✓ kept |
| model | image_size | 518 | 518 | ✓ kept |
| model | patch_size | 14 | 14 | ✓ kept |
| model | num_channels | 3 | 3 | ✓ kept |
Module classes
Instances of each class in the built model (prefix Dinov2 omitted).
| Class | Original | Fixture |
|---|---|---|
| Linear | 72 | 12 |
| LayerNorm | 25 | 5 |
| LayerScale | 24 | 4 |
| Attention | 12 | 2 |
| Layer | 12 | 2 |
| MLP | 12 | 2 |
| GELUActivation | 12 | 2 |
| Identity | 12 | 2 |
| Conv2d | 1 | 1 |
| Embeddings | 1 | 1 |
| Encoder | 1 | 1 |
| Model | 1 | 1 |
| PatchEmbeddings | 1 | 1 |
| Dropout | 1 | 1 |
| ModuleList | 1 | 1 |
Config changes
5 fields changed, 26 unchanged.
| Field | Original | Fixture |
|---|---|---|
| hidden_size | 384 | 64 |
| num_attention_heads | 6 | 4 |
| num_hidden_layers | 12 | 2 |
| out_features | ["stage12"] | ["stage2"] |
| out_indices | [12] | [2] |