hustvl/yolos-small
Original30.7Mparameters
Fixture379.7Kparameters
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.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 |
|---|---|---|---|---|
| vit.encoder.layer | 21.3M | 69.4% | 66.9K | 17.6% |
| vit.encoder | 7.7M | 25.2% | 117.1K | 30.8% |
| vit.embeddings | 1.0M | 3.4% | 172.7K | 45.5% |
| class_labels_classifier.layers | 331.1K | 1.1% | 14.3K | 3.8% |
| bbox_predictor.layers | 297.2K | 1.0% | 8.6K | 2.3% |
| vit.layernorm | 768 | 0.0% | 128 | 0.0% |
Preserved properties
| Config | Property | Original | Fixture | |
|---|---|---|---|---|
| model | model_type | yolos | yolos | ✓ kept |
| model | hidden_act | gelu | gelu | ✓ kept |
| model | image_size | [512, 864] | [512, 864] | ✓ kept |
| model | patch_size | 16 | 16 | ✓ kept |
| model | num_channels | 3 | 3 | ✓ kept |
Module classes
Instances of each class in the built model (prefix Yolos omitted).
| Class | Original | Fixture |
|---|---|---|
| Linear | 78 | 18 |
| Dropout | 25 | 5 |
| LayerNorm | 25 | 5 |
| GELUActivation | 12 | 2 |
| Attention | 12 | 2 |
| Intermediate | 12 | 2 |
| Layer | 12 | 2 |
| Output | 12 | 2 |
| SelfAttention | 12 | 2 |
| SelfOutput | 12 | 2 |
| ModuleList | 3 | 3 |
| MLPPredictionHead | 2 | 2 |
| Conv2d | 1 | 1 |
| InterpolateInitialPositionEmbeddings | 1 | 1 |
| InterpolateMidPositionEmbeddings | 1 | 1 |
| Embeddings | 1 | 1 |
| Encoder | 1 | 1 |
| ForObjectDetection | 1 | 1 |
| Model | 1 | 1 |
| PatchEmbeddings | 1 | 1 |
Config changes
4 fields changed, 27 unchanged.
| Field | Original | Fixture |
|---|---|---|
| hidden_size | 384 | 64 |
| intermediate_size | 1536 | 128 |
| num_attention_heads | 6 | 4 |
| num_hidden_layers | 12 | 2 |