distilbert/distilbert-base-uncased
Original67.0Mparameters
Fixture2.1Mparameters
Layer stacks1compared
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.
distilbert.transformer.layer
Original · 6
Fixture · 2
| Kind | Original | Fixture | |
|---|---|---|---|
| TransformerBlock | 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 |
|---|---|---|---|---|
| distilbert.transformer.layer | 42.5M | 63.5% | 66.9K | 3.2% |
| distilbert.embeddings | 23.8M | 35.6% | 2.0M | 95.1% |
| vocab_transform | 590.6K | 0.9% | 4.2K | 0.2% |
| vocab_projector | 30.5K | 0.0% | 30.5K | 1.5% |
| vocab_layer_norm | 1.5K | 0.0% | 128 | 0.0% |
Preserved properties
| Config | Property | Original | Fixture | |
|---|---|---|---|---|
| model | model_type | distilbert | distilbert | ✓ kept |
| model | vocab_size | 30522 | 30522 | ✓ 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 DistilBert omitted).
| Class | Original | Fixture |
|---|---|---|
| Linear | 38 | 14 |
| LayerNorm | 14 | 6 |
| Dropout | 13 | 5 |
| GELUActivation | 7 | 3 |
| SelfAttention | 6 | 2 |
| FFN | 6 | 2 |
| TransformerBlock | 6 | 2 |
| Embedding | 2 | 2 |
| CrossEntropyLoss | 1 | 1 |
| ForMaskedLM | 1 | 1 |
| Model | 1 | 1 |
| Embeddings | 1 | 1 |
| ModuleList | 1 | 1 |
| Transformer | 1 | 1 |
Config changes
4 fields changed, 23 unchanged.
| Field | Original | Fixture |
|---|---|---|
| dim | 768 | 64 |
| hidden_dim | 3072 | 128 |
| n_heads | 12 | 4 |
| n_layers | 6 | 2 |