microsoft/table-transformer-detection
Original28.8Mparameters
Fixture11.4Mparameters
Layer stacks2compared
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.encoder.layers
Original · 6
Fixture · 2
| Kind | Original | Fixture | |
|---|---|---|---|
| EncoderLayer | 6 | 2 | ✓ kept |
model.decoder.layers
Original · 6
Fixture · 2
| Kind | Original | Fixture | |
|---|---|---|---|
| DecoderLayer | 6 | 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 |
|---|---|---|---|---|
| model.backbone | 11.2M | 38.8% | 11.2M | 98.2% |
| model.decoder.layers | 9.5M | 32.9% | 100.5K | 0.9% |
| model.encoder.layers | 7.9M | 27.4% | 66.9K | 0.6% |
| bbox_predictor.layers | 132.6K | 0.5% | 8.6K | 0.1% |
| model.input_projection | 131.3K | 0.5% | 32.8K | 0.3% |
| model.query_position_embeddings | 3.8K | 0.0% | 960 | 0.0% |
| class_labels_classifier | 771 | 0.0% | 195 | 0.0% |
| 2 others | 1.0K | 0.0% | 256 | 0.0% |
Preserved properties
| Config | Property | Original | Fixture | |
|---|---|---|---|---|
| model | model_type | table-transformer | table-transformer | ✓ kept |
| model | max_position_embeddings | 1024 | 1024 | ✓ kept |
| model | num_channels | 3 | 3 | ✓ kept |
| backbone_config | model_type | timm_backbone | timm_backbone | ✓ kept |
| backbone_config | num_channels | 3 | 3 | ✓ kept |
Module classes
Instances of each class in the built model (prefix TableTransformer omitted).
| Class | Original | Fixture |
|---|---|---|
| Linear | 100 | 36 |
| LayerNorm | 32 | 12 |
| ReLU | 29 | 21 |
| Conv2d | 21 | 21 |
| FrozenBatchNorm2d | 20 | 20 |
| Attention | 18 | 6 |
| Identity | 16 | 16 |
| BasicBlock | 8 | 8 |
| Sequential | 7 | 7 |
| DecoderLayer | 6 | 2 |
| EncoderLayer | 6 | 2 |
| ModuleList | 3 | 3 |
| Embedding | 1 | 1 |
| FeatureListNet | 1 | 1 |
| MaxPool2d | 1 | 1 |
| ConvEncoder | 1 | 1 |
| ConvModel | 1 | 1 |
| Decoder | 1 | 1 |
| Encoder | 1 | 1 |
| ForObjectDetection | 1 | 1 |
| MLPPredictionHead | 1 | 1 |
| Model | 1 | 1 |
| SinePositionEmbedding | 1 | 1 |
Config changes
10 fields changed, 48 unchanged.
| Field | Original | Fixture |
|---|---|---|
| backbone_config.out_features | null | ["layer4"] |
| backbone_config.out_indices | [1, 2, 3, 4] | [-1] |
| backbone_config.stage_names | — | ["act1", "layer1", "layer2", "layer3", "layer4"] |
| d_model | 256 | 64 |
| decoder_attention_heads | 8 | 4 |
| decoder_ffn_dim | 2048 | 128 |
| decoder_layers | 6 | 2 |
| encoder_attention_heads | 8 | 4 |
| encoder_ffn_dim | 2048 | 128 |
| encoder_layers | 6 | 2 |