← MIC coverage of Transformers model types

facebook/mask2former-swin-tiny-coco-instance

huggingface-mic/mask2former-swin-tiny-coco-instance-mic@851c4b7fb35c ← facebook/mask2former-swin-tiny-coco-instance@22c4a2f15dc8 · Mask2FormerForUniversalSegmentation · random weights

CI: no failure on main in 30 days · MIC failures dashboard

Original47.4Mparameters
Fixture8.0Mparameters
Layer stacks4compared
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.

model.pixel_level_module.encoder.swin.encoder.layers

Original · 4
Fixture · 4
KindOriginalFixture
SwinPatchMerging33✓ kept
no SwinPatchMerging11✓ kept

model.pixel_level_module.decoder.input_projections

Original · 3
Fixture · 3
KindOriginalFixture
Conv2d33✓ kept

model.pixel_level_module.decoder.encoder.layers

Original · 6
Fixture · 2
KindOriginalFixture
FormerPixelDecoderEncoderLayer62✓ kept

model.transformer_module.decoder.layers

Original · 9
Fixture · 1
KindOriginalFixture
FormerMaskedAttentionDecoderLayer91✓ 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
ComponentOriginalShareFixtureShare
model.pixel_level_module.encoder.swin.encoder.layers27.5M58.0%4.9M60.7%
model.transformer_module.decoder.layers14.2M30.0%659.3K8.2%
model.pixel_level_module.decoder.encoder.layers4.4M9.3%1.4M17.3%
model.pixel_level_module691.3K1.5%680.0K8.4%
model.pixel_level_module.decoder.input_projections346.4K0.7%231.7K2.9%
model.transformer_module249.9K0.5%191.0K2.4%
class_predictor20.8K0.0%10.4K0.1%

Preserved properties

ConfigPropertyOriginalFixture
modelmodel_typemask2formermask2former✓ kept
backbone_configmodel_typeswinswin✓ kept
backbone_configtie_word_embeddingsTrueTrue✓ kept
backbone_confighidden_actgelugelu✓ kept
backbone_configimage_size224224✓ kept
backbone_configpatch_size44✓ kept
backbone_confignum_channels33✓ kept

Module classes

Instances of each class in the built model (prefix Mask2 omitted).

ClassOriginalFixture
Linear16949
LayerNorm7325
Dropout135
GELUActivation124
ReLU124
SwinAttention124
SwinLayer124
SwinMLP124
SwinRelativePositionBias124
SwinDropPath113
FormerAttention91
FormerMaskedAttentionDecoderLayer91
ModuleList99
MultiheadAttention91
NonDynamicallyQuantizableLinear91
Sequential85
Conv2d710
FormerPixelDecoderEncoderLayer62
FormerPixelDecoderEncoderMultiscaleDeformableAttention62
GroupNorm55
SwinStage44
Embedding33
FormerPredictionBlock33
SwinPatchMerging33
Identity22
FormerSinePositionEmbedding22
FormerForUniversalSegmentation11
FormerHungarianMatcher11
FormerLoss11
FormerMLPPredictionHead11
FormerMaskPredictor11
FormerMaskedAttentionDecoder11
FormerModel11
FormerPixelDecoder11
FormerPixelDecoderEncoderOnly11
FormerPixelLevelModule11
FormerTransformerModule11
ModuleDict11
SwinBackbone11
SwinEmbeddings11
SwinEncoder11
SwinModel11
SwinPatchEmbeddings11

Config changes

9 fields changed, 78 unchanged.

FieldOriginalFixture
backbone_config.depths[2, 2, 6, 2][1, 1, 1, 1]
backbone_config.embed_dim9664
backbone_config.hidden_size76864
backbone_config.num_heads[3, 6, 12, 24][2, 4, 8, 16]
backbone_config.num_layers42
decoder_layers102
encoder_layers62
hidden_dim256128
num_attention_heads84