answerdotai/ModernBERT-base
Original149.7Mparameters
Fixture3.4Mparameters
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.
model.layers
Original · 22
Fixture · 2
| Kind | Original | Fixture | |
|---|---|---|---|
| full_attention | 8 | 1 | ✓ kept |
| sliding_attention | 14 | 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 |
|---|---|---|---|---|
| model.layers | 110.3M | 73.7% | 82.1K | 2.4% |
| model.embeddings | 38.7M | 25.8% | 3.2M | 95.9% |
| head.dense | 589.8K | 0.4% | 4.1K | 0.1% |
| decoder | 50.4K | 0.0% | 50.4K | 1.5% |
| model.final_norm | 768 | 0.0% | 64 | 0.0% |
| head.norm | 768 | 0.0% | 64 | 0.0% |
Preserved properties
| Config | Property | Original | Fixture | |
|---|---|---|---|---|
| model | model_type | modernbert | modernbert | ✓ kept |
| model | vocab_size | 50368 | 50368 | ✓ kept |
| model | tie_word_embeddings | True | True | ✓ kept |
| model | max_position_embeddings | 8192 | 8192 | ✓ kept |
Module classes
Instances of each class in the built model (prefix ModernBert omitted).
| Class | Original | Fixture |
|---|---|---|
| Linear | 90 | 10 |
| LayerNorm | 46 | 6 |
| Dropout | 23 | 3 |
| GELUActivation | 23 | 3 |
| Identity | 23 | 3 |
| Attention | 22 | 2 |
| EncoderLayer | 22 | 2 |
| MLP | 22 | 2 |
| Embedding | 1 | 1 |
| Embeddings | 1 | 1 |
| ForMaskedLM | 1 | 1 |
| Model | 1 | 1 |
| PredictionHead | 1 | 1 |
| RotaryEmbedding | 1 | 1 |
| ModuleList | 1 | 1 |
Config changes
5 fields changed, 41 unchanged.
| Field | Original | Fixture |
|---|---|---|
| hidden_size | 768 | 64 |
| intermediate_size | 1152 | 128 |
| layer_types | 22 entries: 14× sliding_attention, 8× full_attention | ["full_attention", "sliding_attention"] |
| num_attention_heads | 12 | 4 |
| num_hidden_layers | 22 | 2 |