facebook/bart-base
Original139.4Mparameters
Fixture3.5Mparameters
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.decoder.layers | 56.7M | 40.7% | 100.5K | 2.9% |
| model.encoder.layers | 42.5M | 30.5% | 66.9K | 1.9% |
| model.shared | 38.6M | 27.7% | 3.2M | 91.5% |
| model.encoder | 789.5K | 0.6% | 65.8K | 1.9% |
| model.decoder | 789.5K | 0.6% | 65.8K | 1.9% |
Preserved properties
| Config | Property | Original | Fixture | |
|---|---|---|---|---|
| model | model_type | bart | bart | ✓ kept |
| model | vocab_size | 50265 | 50265 | ✓ kept |
| model | tie_word_embeddings | True | True | ✓ kept |
| model | max_position_embeddings | 1024 | 1024 | ✓ kept |
Module classes
Instances of each class in the built model (prefix Bart omitted).
| Class | Original | Fixture |
|---|---|---|
| Linear | 97 | 33 |
| LayerNorm | 32 | 12 |
| Attention | 18 | 6 |
| GELUActivation | 12 | 4 |
| DecoderLayer | 6 | 2 |
| EncoderLayer | 6 | 2 |
| ScaledWordEmbedding | 3 | 3 |
| LearnedPositionalEmbedding | 2 | 2 |
| ModuleList | 2 | 2 |
| Decoder | 1 | 1 |
| Encoder | 1 | 1 |
| ForConditionalGeneration | 1 | 1 |
| Model | 1 | 1 |
Config changes
7 fields changed, 35 unchanged.
| Field | Original | Fixture |
|---|---|---|
| d_model | 768 | 64 |
| decoder_attention_heads | 12 | 4 |
| decoder_ffn_dim | 3072 | 128 |
| decoder_layers | 6 | 2 |
| encoder_attention_heads | 12 | 4 |
| encoder_ffn_dim | 3072 | 128 |
| encoder_layers | 6 | 2 |