ibm-granite/granite-3.1-2b-instruct
✓ Same architecture, smaller
Every module class, layer kind and checked property of the original is in the fixture.
Model tester (advisory)
The model's own small test config in its ModelTester (21 literal values, 21 set by the model's own tester, the rest generic base-tester defaults). Testers are usually representative but not always, so these notes are for review, not rules.
The fixture covers every per-layer kind the tester sets, and shrinks every size it does.
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
| Kind | Original | Fixture | |
|---|---|---|---|
| DecoderLayer | 40 | 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.
| Component | Original | Share | Fixture | Share |
|---|---|---|---|---|
| model.layers | 2.4B | 96.0% | 74.0K | 2.3% |
| model.embed_tokens | 100.7M | 4.0% | 3.1M | 97.7% |
| model.norm | 2.0K | 0.0% | 64 | 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 | granite | granite | ✓ kept |
| model | vocab_size | 49155 | 49155 | ✓ kept |
| model | tie_word_embeddings | True | True | ✓ 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 Granite omitted).
| Class | Original | Fixture |
|---|---|---|
| Linear | 281 | 15 |
| RMSNorm | 81 | 5 |
| Attention | 40 | 2 |
| DecoderLayer | 40 | 2 |
| MLP | 40 | 2 |
| SiLUActivation | 40 | 2 |
| Embedding | 1 | 1 |
| ForCausalLM | 1 | 1 |
| Model | 1 | 1 |
| RotaryEmbedding | 1 | 1 |
| ModuleList | 1 | 1 |
Config changes
5 fields changed, 27 unchanged.
| Field | Original | Fixture |
|---|---|---|
| hidden_size | 2048 | 64 |
| intermediate_size | 8192 | 128 |
| num_attention_heads | 32 | 4 |
| num_hidden_layers | 40 | 2 |
| num_key_value_heads | 8 | 2 |