google/mt5-small
Original172.1Mparameters
Fixture16.2Mparameters
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.
encoder.block
Original · 8
Fixture · 2
| Kind | Original | Fixture | |
|---|---|---|---|
| Embedding | 1 | 1 | ✓ kept |
| no Embedding | 7 | 1 | ✓ kept |
decoder.block
Original · 8
Fixture · 2
| Kind | Original | Fixture | |
|---|---|---|---|
| Embedding | 1 | 1 | ✓ kept |
| no Embedding | 7 | 1 | ✓ 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 |
|---|---|---|---|---|
| shared | 128.1M | 74.4% | 16.0M | 98.8% |
| decoder.block | 25.2M | 14.6% | 115.2K | 0.7% |
| encoder.block | 18.9M | 11.0% | 82.3K | 0.5% |
| decoder.final_layer_norm | 512 | 0.0% | 64 | 0.0% |
| encoder.final_layer_norm | 512 | 0.0% | 64 | 0.0% |
Preserved properties
| Config | Property | Original | Fixture | |
|---|---|---|---|---|
| model | model_type | mt5 | mt5 | ✓ kept |
| model | vocab_size | 250112 | 250112 | ✓ kept |
| model | tie_word_embeddings | True | True | ✓ kept |
Module classes
Instances of each class in the built model (prefix MT5 omitted).
| Class | Original | Fixture |
|---|---|---|
| Linear | 145 | 37 |
| Dropout | 58 | 16 |
| LayerNorm | 42 | 12 |
| Attention | 24 | 6 |
| ModuleList | 18 | 6 |
| Block | 16 | 4 |
| DenseGatedActDense | 16 | 4 |
| LayerFF | 16 | 4 |
| LayerSelfAttention | 16 | 4 |
| NewGELUActivation | 16 | 4 |
| LayerCrossAttention | 8 | 2 |
| Embedding | 5 | 5 |
| Stack | 2 | 2 |
| ForConditionalGeneration | 1 | 1 |
Config changes
6 fields changed, 27 unchanged.
| Field | Original | Fixture |
|---|---|---|
| d_ff | 1024 | 128 |
| d_kv | 64 | 16 |
| d_model | 512 | 64 |
| num_decoder_layers | 8 | 2 |
| num_heads | 6 | 4 |
| num_layers | 8 | 2 |