← MIC coverage of Transformers model types

nghuyong/ernie-3.0-base-zh

huggingface-mic/ernie-3.0-base-zh-mic@1fbbc8112764 ← nghuyong/ernie-3.0-base-zh@8ad12310fa2e · ErnieForMaskedLM · random weights

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

Original118.0Mparameters
Fixture2.8Mparameters
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 (20 literal values, 20 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.

ernie.encoder.layer

Original · 12
Fixture · 2
KindOriginalFixture
Layer122✓ 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
ernie.encoder.layer85.1M72.1%66.9K2.4%
ernie.embeddings32.3M27.4%2.7M96.0%
cls.predictions632.1K0.5%44.3K1.6%

Preserved properties

ConfigPropertyOriginalFixture
modelmodel_typeernieernie✓ kept
modelvocab_size4000040000✓ kept
modeltie_word_embeddingsTrueTrue✓ kept
modelhidden_actgelugelu✓ kept
modelmax_position_embeddings20482048✓ kept

Module classes

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

ClassOriginalFixture
Linear7414
Dropout377
LayerNorm266
GELUActivation133
Attention122
Intermediate122
Layer122
Output122
SelfAttention122
SelfOutput122
Embedding44
Embeddings11
Encoder11
ForMaskedLM11
LMPredictionHead11
Model11
OnlyMLMHead11
PredictionHeadTransform11
ModuleList11

Config changes

4 fields changed, 27 unchanged.

FieldOriginalFixture
hidden_size76864
intermediate_size3072128
num_attention_heads124
num_hidden_layers122