Helsinki-NLP/opus-mt-fr-en
Original75.1Mparameters
Fixture4.0Mparameters
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 | |
|---|---|---|---|
| MarianEncoderLayer | 6 | 2 | ✓ kept |
model.decoder.layers
Original · 6
Fixture · 2
| Kind | Original | Fixture | |
|---|---|---|---|
| MarianDecoderLayer | 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.shared | 30.5M | 40.6% | 3.8M | 94.2% |
| model.decoder.layers | 25.2M | 33.6% | 100.5K | 2.5% |
| model.encoder.layers | 18.9M | 25.2% | 66.9K | 1.7% |
| model.encoder | 262.1K | 0.3% | 32.8K | 0.8% |
| model.decoder | 262.1K | 0.3% | 32.8K | 0.8% |
Preserved properties
| Config | Property | Original | Fixture | |
|---|---|---|---|---|
| model | model_type | marian | marian | ✓ kept |
| model | vocab_size | 59514 | 59514 | ✓ kept |
| model | tie_word_embeddings | True | True | ✓ kept |
| model | max_position_embeddings | 512 | 512 | ✓ kept |
Module classes
Instances of each class in the built model (prefix MarianMT omitted).
| Class | Original | Fixture |
|---|---|---|
| Linear | 97 | 33 |
| LayerNorm | 30 | 10 |
| MarianAttention | 18 | 6 |
| SiLU | 12 | 4 |
| MarianDecoderLayer | 6 | 2 |
| MarianEncoderLayer | 6 | 2 |
| Embedding | 3 | 3 |
| MarianSinusoidalPositionalEmbedding | 2 | 2 |
| ModuleList | 2 | 2 |
| MarianDecoder | 1 | 1 |
| MarianEncoder | 1 | 1 |
| Model | 1 | 1 |
| MarianModel | 1 | 1 |
Config changes
7 fields changed, 38 unchanged.
| Field | Original | Fixture |
|---|---|---|
| d_model | 512 | 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 |