baidu/ERNIE-5.5-Flash-Base-BF16 — model analysis

Summary

  • Size: The model consists of about 286 billion numbers (parameters). Its saved files total about 573GB.
  • Structure: A mixture-of-experts (MoE) model that, for each input, selects only 10 of its 512 experts. Of about 286 billion parameters in total, about 14.3 billion are used per computation step. About 90% of the parameters are assigned to the experts, about 2% to the multi-token prediction part (MTP), and about 2% to the part that reads context (attention).
  • Expert input size: In the tensor shapes, the expert matrices take 2,048-dimensional input, not the 4,096-dimensional hidden state. There is a matrix that reduces 4,096 dimensions to 2,048 (fc1_latent_proj, 2,048 × 4,096) and one that brings them back (fc2_latent_proj, 4,096 × 2,048), matching moe_latent_size=2,048 in the config.
  • Hyper-connections: The residual stream is kept as 4 parallel copies (hc_mult=4 in the config), and the weights that mix them (hc_* / hyper_connection) total about 33.9 million.
  • Japanese text: In Japanese, one token holds about 1.6 characters. In English, one token holds about 4.2 characters. For the same number of characters, Japanese needs about 2.6 times as many tokens as English. Of its 201,216 vocabulary entries, 58,150 contain kana or kanji.
  • Context length: The limit written in the config (max_position_embeddings) is 1,048,576 tokens, roughly 1,700,000 Japanese characters or 4,400,000 English characters at the same ratio as the fixed texts above.
  • Skew in values: Values inside the model flow in groups of 4,096. Position 1285 was among the positions where outliers (extremely large values) appear most often, in 38 of 43 layers. Position 1285 also appeared in the tally of positions where normalization-layer weights take extreme values (85 of 87 normalization layers). This kind of skew is generally considered a cause of accuracy loss when a model is compressed (quantized).
  • Nearly unused tokens: In the input embedding, 1,238 of 201,216 rows have a length of 1/1000 of the median or less. Feeding these tokens in gives an almost-zero embedding.

One line: MoE (10 of 512 experts active) · ernie5_5_moe · 43 layers · 286.25B params · 14.29B active · mixed (compressed (compressor) ×37, MLA + selection (indexer) ×6) · context 1,048,576 · vocab 201,216

Basic information

Architecture (stage 0)

Parameters by part

Counted from the tensor shapes in the safetensors headers (measured).

Parameters by part

Part Parameters Share
Experts 270,582,939,648 94.53%
MTP (multi-token prediction) 6,654,094,203 2.32%
Attention 5,211,841,216 1.82%
Shared experts 1,056,964,608 0.37%
Output head 824,180,744 0.29%
Embedding 824,180,736 0.29%
MoE latent projections 704,643,072 0.25%
Router 176,203,776 0.06%
FFN (dense) 176,160,768 0.06%
Hyper-connections 33,884,439 0.01%
Normalization 528,896 0.00%

Structure

Values from config.json.

Item Value
model_type / architectures ernie5_5_moe / Ernie5_5_MoeForCausalLM
Layers 43
Hidden size 4,096
FFN intermediate size (intermediate_size) 14,336
Attention type mixed (compressed (compressor) ×37, MLA + selection (indexer) ×6)
Heads / KV heads / head dim 64 / 1 / 512
MLA settings q_lora_rank=1024, kv_lora_rank=512, qk_rope_head_dim=64, qk_nope_head_dim=448, v_head_dim=512
Layers by attention build (from tensor names) compressed (compressor): 0, 1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 22, 23, 24, 25, 26, 27, 29, 30, 31, 32, 33, 34, 36, 37, 38, 39, 40, 41; MLA + selection (indexer): 7, 14, 21, 28, 35, 42
Layers by attention compression ratio (compress_ratios) -2×7, 128×37
Hyper-connections (hc_mult) 4
Sliding window 128 (use_sliding_window=—)
Layer types (layer_types) —
RoPE θ 8,000,000
RoPE scaling {'beta_fast': 32, 'beta_slow': 1, 'factor': 16, 'original_max_position_embeddings': 65536, 'type': 'yarn'}
Partial rotary (partial_rotary_factor) —
Context length (max_position_embeddings) 1,048,576
Tied input/output embeddings No
Activation situ
Normalization ε 1.000e-06

MoE configuration

Expert counts come from both config and tensor names (MTP layers excluded). Active parameters = total − MTP − expert part + expert part × active ÷ experts (computed).

Item Value
Experts (config) 512
Experts counted from tensor names (count: layers) 512:42 layers
Active experts per token 10
Expert intermediate size (moe_intermediate_size) 2,048
Reduced dimension at the expert input (moe_latent_size) 2,048
Shared experts 1
MoE layers 42
Leading dense layers (first_k_dense_replace) 1
Expert parameters 270.58B
Active parameters 14.29B
MTP parameters (excluded from active) 6.65B

config vs. actual tensors

Values in config.json side by side with the actual tensor shapes (measured).

Item config Actual Match Source of actual
vocab_size 201,216 201,216 Yes model.embed_tokens.weight
hidden_size 4,096 4,096 Yes model.embed_tokens.weight
num_hidden_layers 43 43 Yes largest layer index + 1 (excluding MTP layers)
intermediate_size 14,336 14,336 Yes model.layers.0.mlp.gate_proj.weight
moe_intermediate_size 2,048 2,048 Yes model.layers.1.block_sparse_moe.experts.0.w1.weight
tie_word_embeddings (no output-head tensor) No No Yes tensor list
num_experts 512 512 Yes tensor names

Tokenizer

Results of tokenizing the fixed Japanese and English texts (see conditions) without special tokens (measured). "Tokens splitting a character" is the share of tokens that decode to a broken character (U+FFFD) on their own.

Text Characters Tokens Chars/token Bytes/token Tokens splitting a character Round-trips exactly
Japanese 449 280 1.604 4.804 1.4% Yes
English 1,201 285 4.214 4.312 0.0% Yes

Of 201,216 vocabulary entries, 58,150 (28.90%) contain at least one kana or kanji character and 52,484 contain two or more (loaded with tokenizers).

Special tokens and chat format

1207 special tokens. BOS: <|ERNIE_BEGIN|>, EOS: <|ERNIE_MASK|>. Chat template: none. Thinking tags: No, tool calls: No, FIM: No, image tokens: No (found by searching special-token names and the template text).

List of special tokens

<|ERNIE_PAD|>, <|ERNIE_BEGIN|>, <|ERNIE_MASK|>, <|ERNIE_endofprompt|>, <|ernie:im_start|>, <|ernie:im_end|>, <ernie:system_setting>, </ernie:system_setting>, <ernie:global_setting>, </ernie:global_setting>, <ernie:tool_list>, </ernie:tool_list>, <ERNIE_mask:14>, <ERNIE_mask:15>, <ERNIE_mask:16>, <ERNIE_mask:17>, <ERNIE_mask:18>, <ERNIE_mask:19>, <ERNIE_mask:20>, <ERNIE_mask:21>, <ERNIE_mask:22>, <ERNIE_mask:23>, <ERNIE_mask:24>, <ERNIE_mask:25>, <ERNIE_mask:26>, <ERNIE_mask:27>, <ERNIE_mask:28>, <ERNIE_mask:29>, <ERNIE_mask:30>, <ERNIE_mask:31>, <ERNIE_mask:32>, <ERNIE_mask:33>, <ERNIE_mask:34>, <ERNIE_mask:35>, <ERNIE_mask:36>, <ERNIE_mask:37>, <ERNIE_mask:38>, <ERNIE_mask:39>, <ERNIE_mask:40>, <ERNIE_mask:41>, <ERNIE_mask:42>, <ERNIE_mask:43>, <ERNIE_mask:44>, <ERNIE_mask:45>, <ERNIE_mask:46>, <ERNIE_mask:47>, <ERNIE_mask:48>, <ERNIE_mask:49>, <ERNIE_mask:50>, <ERNIE_mask:51>, <ERNIE_mask:52>, <ERNIE_mask:53>, <ERNIE_mask:54>, <ERNIE_mask:55>, <ERNIE_mask:56>, <ERNIE_mask:57>, <ERNIE_mask:58>, <ERNIE_mask:59>, <ERNIE_mask:60>, <ERNIE_mask:61> …

Weights (stage 1)

Analyzed 67,692 of 67,692 tensors (compute time 6.6 min). Each tensor was converted to fp32 for computation. The 1,582 tensors of the MTP (multi-token prediction) part (layer 43) were analyzed but kept out of the per-layer trends, outlier channels, normalization-layer dimensions, embedding rows, expert similarity and extremes below, so that only the main layers are counted.

Trends across layers

RMS is the root mean square of the elements. max|w| ÷ RMS is how many times larger the largest element is than a typical one. Excess kurtosis measures tail heaviness and is 0 for a normal distribution (all measured). The figures use weights with 2 or more dimensions (matrices) only; 1-D biases and similar are left out.

RMS

max|w| ÷ RMS

Excess kurtosis

Matrices with the largest values (main-model weights with 2 or more dimensions): max|w| ÷ RMS 148.421 (model.layers.0.mlp_hyper_connection.mapping_proj.weight), excess kurtosis 4389.326 (model.layers.21.self_attn.core_attention.indexer.weights_proj.weight), outlier share 0.723% (model.layers.17.self_attn.core_attention.compressor.ape).

Outliers and outlier channels

An outlier is an element exceeding 6 times the standard deviation of its matrix. For each matrix that takes the hidden dimension as input, the columns with the most outliers (top 16) were collected, and the number of layers in which each column appeared was counted (measured).

Hidden-dimension column Layers it appeared in (of 43)
1285 38
3530 32
490 27
1821 22
954 17
1606 16
3510 16
1072 15
2812 13
1470 12

Normalization-layer weights

For each of the 87 normalization layers whose length equals the hidden size (4,096), the dimensions farthest from the median (top 16) were collected, and the number of normalization layers in which each dimension appeared was counted (measured). The 177 normalization layers of other lengths, such as per-head normalization, were left out because their dimension numbers mean something different.

Dimension Normalization layers it appeared in
1285 85
3530 56
490 52
1821 52
2812 39
1606 33
3510 32
1470 30
1914 30
3260 27

Dimensions shared with the top 10 outlier channels above: 490, 1285, 1470, 1606, 1821, 2812, 3510, 3530.

Effective rank

Stable rank = (Frobenius norm)² ÷ (largest singular value)², divided by the matrix's shorter side to scale it to 0–1. The largest singular value is approximated by power iteration (30 steps) (estimated).

Effective rank

Stable rank ÷ shorter side by part:

Part Matrices Min Median Max Matrix with the minimum
Experts 64512 0.0145 0.1726 0.2634 model.layers.39.block_sparse_moe.experts.493.w2.weight
MTP (multi-token prediction) 1559 0.0218 0.0807 0.4839 model.layers.43.block_sparse_moe.experts.289.w2.weight
Attention 473 0.0026 0.1405 0.5384 model.layers.27.self_attn.core_attention.compressor.linear_wgate.weight
Shared experts 126 0.0163 0.0597 0.1535 model.layers.38.block_sparse_moe.shared_experts.w1.weight
Hyper-connections 87 0.0717 0.2386 0.3934 model.layers.0.self_attention_hyper_connection.mapping_proj.weight
MoE latent projections 84 0.1175 0.3641 0.6349 model.layers.42.block_sparse_moe.fc2_latent_proj.weight
Router 84 0.0133 0.0173 0.0316 model.layers.24.block_sparse_moe.gate.weight
FFN (dense) 3 0.1055 0.1498 0.1706 model.layers.0.mlp.down_proj.weight
Embedding 1 0.0169 0.0169 0.0169 model.embed_tokens.weight
Output head 1 0.017 0.017 0.017 lm_head.weight

Embedding rows

Distribution of the length (norm) of each vocabulary entry's embedding row, and the rows with the smallest norms (bottom 0.1%) (measured).

model.embed_tokens.weight (201,216 rows)

Min Bottom 0.1% Bottom 1% Median Top 1% Max
3.4892e-05 3.6033e-05 0.8046 1.5946 1.7801 2.1818

Rows of length exactly 0: 0. Rows of length 1/1000 of the median or less (including the zero rows): 1,238.

Rows with small norms (202 rows in the bottom 0.1%, the 20 smallest): 819:'<ERNIE_mask:812>'(3.4892e-05), 1018:'<ERNIE_mask:1011>'(3.5181e-05), 328:'<ERNIE_mask:321>'(3.5296e-05), 277:'<ERNIE_mask:270>'(3.5310e-05), 577:'<ERNIE_mask:570>'(3.5335e-05), 772:'<ERNIE_mask:765>'(3.5352e-05), 507:'<ERNIE_mask:500>'(3.5362e-05), 779:'<ERNIE_mask:772>'(3.5367e-05), 1180:'<ERNIE_mask:1173>'(3.5399e-05), 1213:'<ERNIE_mask:1206>'(3.5428e-05), 188:'<ERNIE_mask:181>'(3.5437e-05), 1128:'<ERNIE_mask:1121>'(3.5449e-05), 776:'<ERNIE_mask:769>'(3.5469e-05), 590:'<ERNIE_mask:583>'(3.5493e-05), 325:'<ERNIE_mask:318>'(3.5505e-05), 432:'<ERNIE_mask:425>'(3.5520e-05), 564:'<ERNIE_mask:557>'(3.5531e-05), 1096:'<ERNIE_mask:1089>'(3.5544e-05), 412:'<ERNIE_mask:405>'(3.5545e-05), 849:'<ERNIE_mask:842>'(3.5560e-05)

lm_head.weight (201,216 rows)

Min Bottom 0.1% Bottom 1% Median Top 1% Max
0.3989 0.8422 1.0552 1.6213 1.9327 2.8458

Rows with small norms (202 rows in the bottom 0.1%, the 20 smallest): 107595:'timestampl'(0.3989), 187454:'评价人数'(0.604), 196457:'请简洁概括原文的核心要点'(0.6109), 194090:'请用一句话总结原文的中心思想或主题'(0.6203), 37718:'\x07\x08\x08'(0.6962), 104478:'>Writing'(0.7006), 51760:'\x07\x07\x08'(0.7006), 38340:'\x08\x07\x07'(0.7063), 105300:'Kaliwatan'(0.717), 58376:'\x06\x07\x07'(0.7226), 53675:'\x07\x08\x07'(0.724), 48026:'\x06\x08\x08'(0.7283), 39655:'\x08\x07\x08'(0.7369), 35941:'比赛名称'(0.7396), 57861:'\x08\x08\x07'(0.7403), 85288:'\x08\x07\x06'(0.7407), 88449:'\x07\x07\x06'(0.7444), 9100:'{volume'(0.7484), 87219:'\x07\x08\x06'(0.7486), 182669:'=TQQQ'(0.7576)

Rows of length 0 or nearly 0 hold almost no values for their token. They are likely tokens that were barely used in training or rows that were set to 0 on purpose, but this analysis cannot tell which. For longer rows, a small norm does not mean that the token is unimportant or untrained.

Similarity between experts

For matrices of the same kind in the same layer, the cosine similarity between experts was estimated with a 32×32 random projection (estimated). Mean over all layers: 1.6920e-04.

Expert similarity

Measurement conditions

  • mbscope 0.2.19 (result schema v1), Python 3.14.4, torch 2.13.0+cu130, safetensors 0.8.0, huggingface_hub 0.36.2, tokenizers 0.21.4, transformers 4.49.0
  • Estimation criteria: outlier_sigma=6.0, embed_low_pct=0.1, power_iters=30, sketch_dim=32, top_channels=16, seed=20261002
  • Input texts: ja: Natsume Sōseki, I Am a Cat, opening (Aozora Bunko 789_ruby_5639; source: Natsume Sōseki Zenshū 1, Chikuma Bunko), sha256 prefix 5d6b40f79b6a / en: Jane Austen, Pride and Prejudice, opening of Chapter 1 (Project Gutenberg eBook #1342), sha256 prefix 0a714a270435
  • Computed on GPU NVIDIA GeForce RTX 3090 (CUDA 13.0, TF32 off) in fp32
  • Measured with mbscope 0.2.17. The measurements were re-aggregated with mbscope 0.2.19 without re-measuring

Comments

…

Comments are public. Please don't include personal information. Inappropriate comments may be removed.

← All notes