docling-project/docling-layout-heron
Original42.8Mparameters
Fixture10.9Mparameters
Layer stacks11compared
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.backbone.model.encoder.stages
Original · 4
Fixture · 4
| Kind | Original | Fixture | |
|---|---|---|---|
| no AvgPool2d | 1 | 1 | ✓ kept |
| AvgPool2d | 3 | 3 | ✓ kept |
model.encoder_input_proj
Original · 3
Fixture · 3
| Kind | Original | Fixture | |
|---|---|---|---|
| Conv2d | 3 | 3 | ✓ kept |
model.encoder.aifi
Original · 1
Fixture · 1
| Kind | Original | Fixture | |
|---|---|---|---|
| AIFILayer | 1 | 1 | ✓ kept |
model.encoder.lateral_convs
Original · 2
Fixture · 2
| Kind | Original | Fixture | |
|---|---|---|---|
| ConvNormLayer | 2 | 2 | ✓ kept |
model.encoder.fpn_blocks
Original · 2
Fixture · 2
| Kind | Original | Fixture | |
|---|---|---|---|
| CSPRepLayer | 2 | 2 | ✓ kept |
model.encoder.downsample_convs
Original · 2
Fixture · 2
| Kind | Original | Fixture | |
|---|---|---|---|
| ConvNormLayer | 2 | 2 | ✓ kept |
model.encoder.pan_blocks
Original · 2
Fixture · 2
| Kind | Original | Fixture | |
|---|---|---|---|
| CSPRepLayer | 2 | 2 | ✓ kept |
model.decoder_input_proj
Original · 3
Fixture · 3
| Kind | Original | Fixture | |
|---|---|---|---|
| Conv2d | 3 | 3 | ✓ kept |
model.decoder.layers
Original · 6
Fixture · 2
| Kind | Original | Fixture | |
|---|---|---|---|
| DecoderLayer | 6 | 2 | ✓ kept |
model.decoder.bbox_embed
Original · 6
Fixture · 2
| Kind | Original | Fixture | |
|---|---|---|---|
| Linear | 6 | 2 | ✓ kept |
bbox_embed
Original · 6
Fixture · 2
| Kind | Original | Fixture | |
|---|---|---|---|
| Linear | 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.model.encoder.stages | 23.4M | 54.8% | 32.4K | 0.3% |
| model.decoder.layers | 6.0M | 14.0% | 102.6K | 0.9% |
| model.encoder.pan_blocks | 4.5M | 10.4% | 4.5M | 41.0% |
| model.encoder.fpn_blocks | 4.5M | 10.4% | 4.5M | 41.0% |
| model.encoder.downsample_convs | 1.2M | 2.8% | 1.2M | 10.8% |
| model.encoder_input_proj | 919.0K | 2.1% | 58.9K | 0.5% |
| model.decoder.bbox_embed | 795.7K | 1.9% | 17.2K | 0.2% |
| 9 others | 1.5M | 3.5% | 566.5K | 5.2% |
Preserved properties
| Config | Property | Original | Fixture | |
|---|---|---|---|---|
| model | model_type | rt_detr_v2 | rt_detr_v2 | ✓ kept |
| model | tie_word_embeddings | True | True | ✓ kept |
| backbone_config | model_type | rt_detr_resnet | rt_detr_resnet | ✓ kept |
| backbone_config | hidden_act | relu | relu | ✓ kept |
| backbone_config | num_channels | 3 | 3 | ✓ kept |
Module classes
Instances of each class in the built model (prefix RTDetrV2 omitted).
| Class | Original | Fixture |
|---|---|---|
| Linear | 121 | 49 |
| Conv2d | 97 | 61 |
| ReLU | 57 | 17 |
| Identity | 56 | 32 |
| FrozenBatchNorm2d | 55 | 19 |
| RTDetrResNetConvLayer | 51 | 15 |
| BatchNorm2d | 42 | 42 |
| ConvNormLayer | 36 | 36 |
| Sequential | 35 | 23 |
| ModuleList | 28 | 20 |
| SiLUActivation | 24 | 24 |
| LayerNorm | 21 | 9 |
| RTDetrResNetBottleNeckLayer | 16 | 4 |
| MLPPredictionHead | 14 | 6 |
| RepVggBlock | 12 | 12 |
| MLP | 7 | 3 |
| SelfAttention | 7 | 3 |
| DecoderLayer | 6 | 2 |
| MultiscaleDeformableAttention | 6 | 2 |
| RTDetrResNetShortCut | 4 | 4 |
| RTDetrResNetStage | 4 | 4 |
| CSPRepLayer | 4 | 4 |
| AvgPool2d | 3 | 3 |
| Embedding | 1 | 1 |
| GELUActivation | 1 | 1 |
| MaxPool2d | 1 | 1 |
| RTDetrResNetBackbone | 1 | 1 |
| RTDetrResNetEmbeddings | 1 | 1 |
| RTDetrResNetEncoder | 1 | 1 |
| AIFILayer | 1 | 1 |
| ConvEncoder | 1 | 1 |
| Decoder | 1 | 1 |
| EncoderLayer | 1 | 1 |
| ForObjectDetection | 1 | 1 |
| HybridEncoder | 1 | 1 |
| Model | 1 | 1 |
| SinePositionEmbedding | 1 | 1 |
Config changes
9 fields changed, 74 unchanged.
| Field | Original | Fixture |
|---|---|---|
| backbone_config.depths | [3, 4, 6, 3] | [1, 1, 1, 1] |
| backbone_config.hidden_sizes | [256, 512, 1024, 2048] | [16, 32, 64, 128] |
| d_model | 256 | 64 |
| decoder_attention_heads | 8 | 4 |
| decoder_ffn_dim | 1024 | 128 |
| decoder_layers | 6 | 2 |
| encoder_attention_heads | 8 | 4 |
| encoder_ffn_dim | 1024 | 128 |
| encoder_in_channels | [512, 1024, 2048] | [32, 64, 128] |