google/pegasus-xsum
Original569.7Mparameters
Fixture6.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 · 16
Fixture · 2
| Kind | Original | Fixture | |
|---|---|---|---|
| EncoderLayer | 16 | 2 | ✓ kept |
model.decoder.layers
Original · 16
Fixture · 2
| Kind | Original | Fixture | |
|---|---|---|---|
| DecoderLayer | 16 | 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 | 268.7M | 47.2% | 100.5K | 1.6% |
| model.encoder.layers | 201.5M | 35.4% | 66.9K | 1.0% |
| model.shared | 98.4M | 17.3% | 6.2M | 96.3% |
| model.decoder | 526.3K | 0.1% | 32.9K | 0.5% |
| model.encoder | 526.3K | 0.1% | 32.9K | 0.5% |
Preserved properties
| Config | Property | Original | Fixture | |
|---|---|---|---|---|
| model | model_type | pegasus | pegasus | ✓ kept |
| model | vocab_size | 96103 | 96103 | ✓ 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 Pegasus omitted).
| Class | Original | Fixture |
|---|---|---|
| Linear | 257 | 33 |
| LayerNorm | 82 | 12 |
| Attention | 48 | 6 |
| ReLU | 32 | 4 |
| DecoderLayer | 16 | 2 |
| EncoderLayer | 16 | 2 |
| Embedding | 3 | 3 |
| ModuleList | 2 | 2 |
| SinusoidalPositionalEmbedding | 2 | 2 |
| Decoder | 1 | 1 |
| Encoder | 1 | 1 |
| ForConditionalGeneration | 1 | 1 |
| Model | 1 | 1 |
Config changes
7 fields changed, 38 unchanged.
| Field | Original | Fixture |
|---|---|---|
| d_model | 1024 | 64 |
| decoder_attention_heads | 16 | 4 |
| decoder_ffn_dim | 4096 | 128 |
| decoder_layers | 16 | 2 |
| encoder_attention_heads | 16 | 4 |
| encoder_ffn_dim | 4096 | 128 |
| encoder_layers | 16 | 2 |