microsoft/Phi-3.5-mini-instruct
Original3.8Bparameters
Fixture4.2Mparameters
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 · 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 | 3.6B | 94.8% | 82.2K | 2.0% |
| lm_head | 98.5M | 2.6% | 2.1M | 49.0% |
| model.embed_tokens | 98.5M | 2.6% | 2.1M | 49.0% |
| model.norm | 3.1K | 0.0% | 64 | 0.0% |
Preserved properties
| Config | Property | Original | Fixture | |
|---|---|---|---|---|
| model | attention style | MHA (32 heads, 32 KV) | MHA (4 heads, 4 KV) | ✓ kept |
| model | RoPE type | longrope | longrope | ✓ kept |
| model | model_type | phi3 | phi3 | ✓ kept |
| model | vocab_size | 32064 | 32064 | ✓ kept |
| model | tie_word_embeddings | False | False | ✓ kept |
| model | hidden_act | silu | silu | ✓ kept |
| model | max_position_embeddings | 131072 | 131072 | ✓ kept |
Module classes
Instances of each class in the built model (prefix Phi3 omitted).
| Class | Original | Fixture |
|---|---|---|
| Linear | 129 | 9 |
| RMSNorm | 65 | 5 |
| Dropout | 64 | 4 |
| Attention | 32 | 2 |
| DecoderLayer | 32 | 2 |
| MLP | 32 | 2 |
| SiLUActivation | 32 | 2 |
| Embedding | 1 | 1 |
| ModuleList | 1 | 1 |
| ForCausalLM | 1 | 1 |
| Model | 1 | 1 |
| RotaryEmbedding | 1 | 1 |
Config changes
6 fields changed, 26 unchanged.
| Field | Original | Fixture |
|---|---|---|
| hidden_size | 3072 | 64 |
| intermediate_size | 8192 | 128 |
| num_attention_heads | 32 | 4 |
| num_hidden_layers | 32 | 2 |
| num_key_value_heads | 32 | 4 |
| rope_parameters | {"long_factor": [1.0800000429153442, 1.1100000143051147, 1.1399999856948853, … | {"long_factor": [1.0800000429153442, 1.6200000047683716, 7.700000286102295, 3… |