YituTech/conv-bert-base
Original105.7Mparameters
Fixture24.0Mparameters
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.
encoder.layer
Original · 12
Fixture · 2
| Kind | Original | Fixture | |
|---|---|---|---|
| Layer | 12 | 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 |
|---|---|---|---|---|
| encoder.layer | 81.8M | 77.4% | 65.1K | 0.3% |
| embeddings.word_embeddings | 23.4M | 22.2% | 23.4M | 97.9% |
| embeddings.position_embeddings | 393.2K | 0.4% | 393.2K | 1.6% |
| embeddings.token_type_embeddings | 1.5K | 0.0% | 1.5K | 0.0% |
| embeddings.LayerNorm | 1.5K | 0.0% | 1.5K | 0.0% |
| embeddings_project | 0 | 0.0% | 49.2K | 0.2% |
Preserved properties
| Config | Property | Original | Fixture | |
|---|---|---|---|---|
| model | model_type | convbert | convbert | ✓ kept |
| model | vocab_size | 30522 | 30522 | ✓ kept |
| model | tie_word_embeddings | True | True | ✓ kept |
| model | hidden_act | gelu | gelu | ✓ kept |
| model | max_position_embeddings | 512 | 512 | ✓ kept |
Module classes
Instances of each class in the built model (prefix ConvBert omitted).
| Class | Original | Fixture |
|---|---|---|
| Linear | 96 | 17 |
| Dropout | 37 | 7 |
| LayerNorm | 25 | 5 |
| Conv1d | 24 | 4 |
| Attention | 12 | 2 |
| Intermediate | 12 | 2 |
| Layer | 12 | 2 |
| Output | 12 | 2 |
| SelfAttention | 12 | 2 |
| SelfOutput | 12 | 2 |
| GELUActivation | 12 | 2 |
| SeparableConv1D | 12 | 2 |
| Unfold | 12 | 2 |
| Embedding | 3 | 3 |
| Embeddings | 1 | 1 |
| Encoder | 1 | 1 |
| Model | 1 | 1 |
| ModuleList | 1 | 1 |
Config changes
4 fields changed, 28 unchanged.
| Field | Original | Fixture |
|---|---|---|
| hidden_size | 768 | 64 |
| intermediate_size | 3072 | 128 |
| num_attention_heads | 12 | 4 |
| num_hidden_layers | 12 | 2 |