google/canine-c
Original132.1Mparameters
Fixture2.3Mparameters
Layer stacks3compared
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.
initial_char_encoder.layer
Original · 1
Fixture · 1
| Kind | Original | Fixture | |
|---|---|---|---|
| Layer | 1 | 1 | ✓ kept |
encoder.layer
Original · 12
Fixture · 2
| Kind | Original | Fixture | |
|---|---|---|---|
| Layer | 12 | 2 | ✓ kept |
final_char_encoder.layer
Original · 1
Fixture · 1
| Kind | Original | Fixture | |
|---|---|---|---|
| Layer | 1 | 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 |
|---|---|---|---|---|
| encoder.layer | 85.1M | 64.4% | 66.9K | 2.9% |
| char_embeddings.char_position_embeddings | 12.6M | 9.5% | 1.0M | 45.9% |
| final_char_encoder.layer | 7.1M | 5.4% | 33.5K | 1.5% |
| initial_char_encoder.layer | 7.1M | 5.4% | 33.5K | 1.5% |
| projection.conv | 4.7M | 3.6% | 32.8K | 1.4% |
| chars_to_molecules.conv | 2.4M | 1.8% | 16.4K | 0.7% |
| char_embeddings.HashBucketCodepointEmbedder_5 | 1.6M | 1.2% | 131.1K | 5.7% |
| 12 others | 11.6M | 8.8% | 923.1K | 40.4% |
Preserved properties
| Config | Property | Original | Fixture | |
|---|---|---|---|---|
| model | model_type | canine | canine | ✓ kept |
| model | hidden_act | gelu | gelu | ✓ kept |
| model | max_position_embeddings | 16384 | 16384 | ✓ kept |
Module classes
Instances of each class in the built model (prefix Canine omitted).
| Class | Original | Fixture |
|---|---|---|
| Linear | 85 | 25 |
| Dropout | 44 | 14 |
| LayerNorm | 31 | 11 |
| GELUActivation | 16 | 6 |
| Attention | 14 | 4 |
| Intermediate | 14 | 4 |
| Layer | 14 | 4 |
| Output | 14 | 4 |
| SelfAttention | 14 | 4 |
| SelfOutput | 14 | 4 |
| Embedding | 10 | 10 |
| Encoder | 3 | 3 |
| ModuleList | 3 | 3 |
| Conv1d | 2 | 2 |
| Embeddings | 1 | 1 |
| Model | 1 | 1 |
| Pooler | 1 | 1 |
| CharactersToMolecules | 1 | 1 |
| ConvProjection | 1 | 1 |
| Tanh | 1 | 1 |
Config changes
4 fields changed, 24 unchanged.
| Field | Original | Fixture |
|---|---|---|
| hidden_size | 768 | 64 |
| intermediate_size | 3072 | 128 |
| num_attention_heads | 12 | 4 |
| num_hidden_layers | 12 | 2 |