← MIC coverage of Transformers model types

google/gemma-4-12B-it

huggingface-mic/gemma-4-12B-it-mic@84b68ccdfc26 ← google/gemma-4-12B-it@707f0a3b8a3c · Gemma4UnifiedForConditionalGeneration · random weights · built before the shrink rule (no recorded recipe)

CI: no failure on main in 30 days · MIC failures dashboard

Original12.0Bparameters
Fixture52.6Mparameters
Layer stacks1compared
Findings0to review

✓ 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 (35 literal values, 19 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.language_model.layers

Original · 48
Fixture · 2
KindOriginalFixture
sliding_attention401✓ kept
full_attention81✓ 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
ComponentOriginalShareFixtureShare
model.language_model.layers10.9B91.1%357.9K0.7%
model.language_model1.0B8.4%16.8M31.9%
model.embed_vision49.9M0.4%35.4M67.3%
model.embed_audio2.5M0.0%41.0K0.1%

Preserved properties

ConfigPropertyOriginalFixture
modelmodel_typegemma4_unifiedgemma4_unified✓ kept
modeltie_word_embeddingsTrueTrue✓ kept
text_configattention styleGQA (16 heads, 8 KV)GQA (4 heads, 2 KV)✓ kept
text_configmodel_typegemma4_unified_textgemma4_unified_text✓ kept
text_configvocab_size262144262144✓ kept
text_configtie_word_embeddingsTrueTrue✓ kept
text_configmax_position_embeddings262144262144✓ kept
vision_configmodel_typegemma4_unified_visiongemma4_unified_vision✓ kept
vision_configpatch_size1616✓ kept
audio_configmodel_typegemma4_unified_audiogemma4_unified_audio✓ kept

Module classes

Instances of each class in the built model (prefix Gemma4Unified omitted).

ClassOriginalFixture
RMSNorm33917
Linear33217
GELUTanh482
TextAttention482
TextDecoderLayer482
TextMLP482
LayerNorm33
MultimodalEmbedder22
ForConditionalGeneration11
Model11
TextModel11
TextRotaryEmbedding11
TextScaledWordEmbedding11
VisionEmbedder11
ModuleList11

Config changes

16 fields changed, 82 unchanged.

FieldOriginalFixture
text_config.head_dim25616
text_config.hidden_size384064
text_config.intermediate_size15360128
text_config.layer_types48 entries: 40× sliding_attention, 8× full_attention["sliding_attention", "full_attention"]
text_config.num_attention_heads164
text_config.num_hidden_layers482
text_config.num_key_value_heads82
text_config.per_layer_config.05{"head_dim": 512, "num_key_value_heads": 1}—
text_config.per_layer_config.1—{"head_dim": 512, "num_key_value_heads": 1}
text_config.per_layer_config.11{"head_dim": 512, "num_key_value_heads": 1}—
text_config.per_layer_config.17{"head_dim": 512, "num_key_value_heads": 1}—
text_config.per_layer_config.23{"head_dim": 512, "num_key_value_heads": 1}—
text_config.per_layer_config.29{"head_dim": 512, "num_key_value_heads": 1}—
text_config.per_layer_config.35{"head_dim": 512, "num_key_value_heads": 1}—
text_config.per_layer_config.41{"head_dim": 512, "num_key_value_heads": 1}—
text_config.per_layer_config.47{"head_dim": 512, "num_key_value_heads": 1}—