mistralai/Mistral-7B-Instruct-v0.2
Original7.2Bparameters
Fixture8.4Mparameters
Layer stacks1compared
Findings1to review
⚠ To review
- model: max_position_embeddings 32768 became 512
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 · 32
Fixture · 2
| Kind | Original | Fixture | |
|---|---|---|---|
| DecoderLayer | 32 | 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 |
|---|---|---|---|---|
| model.layers | 7.0B | 96.4% | 246.3K | 2.9% |
| model.embed_tokens | 131.1M | 1.8% | 4.1M | 48.5% |
| lm_head | 131.1M | 1.8% | 4.1M | 48.5% |
| model.norm | 4.1K | 0.0% | 128 | 0.0% |
Preserved properties
| Config | Property | Original | Fixture | |
|---|---|---|---|---|
| model | attention style | GQA (32 heads, 8 KV) | GQA (4 heads, 2 KV) | ✓ kept |
| model | RoPE type | default | default | ✓ kept |
| model | model_type | mistral | mistral | ✓ kept |
| model | vocab_size | 32000 | 32000 | ✓ kept |
| model | tie_word_embeddings | False | False | ✓ kept |
| model | hidden_act | silu | silu | ✓ kept |
| model | max_position_embeddings | 32768 | 512 | ⚠ changed |
Module classes
Instances of each class in the built model (prefix Mistral omitted).
| Class | Original | Fixture |
|---|---|---|
| Linear | 225 | 15 |
| RMSNorm | 65 | 5 |
| Attention | 32 | 2 |
| DecoderLayer | 32 | 2 |
| MLP | 32 | 2 |
| SiLUActivation | 32 | 2 |
| Embedding | 1 | 1 |
| ForCausalLM | 1 | 1 |
| Model | 1 | 1 |
| RotaryEmbedding | 1 | 1 |
| ModuleList | 1 | 1 |
Config changes
7 fields changed, 21 unchanged.
| Field | Original | Fixture |
|---|---|---|
| head_dim | 128 | 16 |
| hidden_size | 4096 | 128 |
| intermediate_size | 14336 | 256 |
| max_position_embeddings | 32768 | 512 |
| num_attention_heads | 32 | 4 |
| num_hidden_layers | 32 | 2 |
| num_key_value_heads | 8 | 2 |