google-t5/t5-small
Original60.5Mparameters
Fixture2.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 · 6
Fixture · 2
| Kind | Original | Fixture | |
|---|---|---|---|
| Embedding | 1 | 1 | ✓ kept |
| no Embedding | 5 | 1 | ✓ kept |
decoder.block
Original · 6
Fixture · 2
| Kind | Original | Fixture | |
|---|---|---|---|
| Embedding | 1 | 1 | ✓ kept |
| no Embedding | 5 | 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 |
|---|---|---|---|---|
| decoder.block | 25.2M | 41.6% | 98.8K | 4.4% |
| encoder.block | 18.9M | 31.2% | 65.9K | 3.0% |
| shared | 16.4M | 27.2% | 2.1M | 92.6% |
| 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 | t5 | t5 | ✓ kept |
| model | vocab_size | 32128 | 32128 | ✓ kept |
| model | tie_word_embeddings | True | True | ✓ kept |
Module classes
Instances of each class in the built model (prefix T5 omitted).
| Class | Original | Fixture |
|---|---|---|
| Linear | 97 | 33 |
| Dropout | 44 | 16 |
| LayerNorm | 32 | 12 |
| Attention | 18 | 6 |
| ModuleList | 14 | 6 |
| ReLU | 12 | 4 |
| Block | 12 | 4 |
| DenseActDense | 12 | 4 |
| LayerFF | 12 | 4 |
| LayerSelfAttention | 12 | 4 |
| LayerCrossAttention | 6 | 2 |
| Embedding | 5 | 5 |
| Stack | 2 | 2 |
| ForConditionalGeneration | 1 | 1 |
Config changes
6 fields changed, 29 unchanged.
| Field | Original | Fixture |
|---|---|---|
| d_ff | 2048 | 128 |
| d_kv | 64 | 16 |
| d_model | 512 | 64 |
| num_decoder_layers | 6 | 2 |
| num_heads | 8 | 4 |
| num_layers | 6 | 2 |