LiquidAI/LFM2.5-24B-A2B-Base — model analysis
Summary
- Size: The model consists of about 24 billion numbers (parameters). Its saved files total about 47.9GB.
- Structure: A mixture-of-experts (MoE) model that, for each input, selects only 4 of its 64 experts. Of about 24 billion parameters in total, about 2.5 billion are used per computation step. About 96% of the parameters are assigned to the experts, about 2% to the part that mixes nearby context (short convolution), and about 1% to the vocabulary dictionary (embedding).
- Japanese text: In Japanese, one token holds about 1.5 characters. In English, one token holds about 4.2 characters. For the same number of characters, Japanese needs about 2.7 times as many tokens as English. Of its 125,017 vocabulary entries, 7,798 contain kana or kanji.
- Context length: The limit written in the config (max_position_embeddings) is 131,072 tokens, roughly 200,000 Japanese characters or 550,000 English characters at the same ratio as the fixed texts above.
- Skew in values: Values inside the model flow in groups of 2,048. Positions 263 and 518 were among the positions where outliers (extremely large values) appear most often, in all 40 layers. This kind of skew is generally considered a cause of accuracy loss when a model is compressed (quantized).
One line: MoE (4 of 64 experts active) · lfm2_moe · 40 layers · 23.97B params · 2.45B active · GQA (4:1) · context 131,072 · vocab 128,000
Basic information
- Model: LiquidAI/LFM2.5-24B-A2B-Base (revision
9156f24f4a22, config.json) - License: lfm1.0
- Declared base_model: none
- Storage dtypes: BF16 23.97B, F32 2.43K
Architecture (stage 0)
Parameters by part
Counted from the tensor shapes in the safetensors headers (measured).
| Part | Parameters | Share |
|---|---|---|
| Experts | 22,951,231,488 | 95.74% |
| Short convolution (conv) | 503,500,800 | 2.10% |
| Embedding | 262,144,000 | 1.09% |
| FFN (dense) | 144,703,488 | 0.60% |
| Attention | 104,857,600 | 0.44% |
| Router | 4,983,168 | 0.02% |
| Normalization | 167,168 | 0.00% |
Structure
Values from config.json.
| Item | Value |
|---|---|
| model_type / architectures | lfm2_moe / Lfm2MoeForCausalLM |
| Layers | 40 |
| Hidden size | 2,048 |
| FFN intermediate size (intermediate_size) | 11,776 |
| Attention type | GQA (4:1) |
| Heads / KV heads / head dim | 32 / 8 / 64 |
| Sliding window | — (use_sliding_window=—) |
| Layer types (layer_types) | conv×30, full_attention×10 |
| RoPE θ | 10,000,000 |
| RoPE scaling | {'rope_theta': 10000000.0, 'rope_type': 'default'} |
| Partial rotary (partial_rotary_factor) | — |
| Context length (max_position_embeddings) | 131,072 |
| Tied input/output embeddings | Yes |
| Activation | — |
| Normalization ε | — |
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) | 64 |
| Experts counted from tensor names (count: layers) | 64:38 layers |
| Active experts per token | 4 |
| Expert intermediate size (moe_intermediate_size) | 1,536 |
| Shared experts | — |
| MoE layers | 38 |
| Leading dense layers (first_k_dense_replace) | 2 |
| Expert parameters | 22.95B |
| Active parameters | 2.45B |
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 | 128,000 | 128,000 | Yes | model.embed_tokens.weight |
| hidden_size | 2,048 | 2,048 | Yes | model.embed_tokens.weight |
| num_hidden_layers | 40 | 40 | Yes | largest layer index + 1 (excluding MTP layers) |
| num_key_value_heads×head_dim | 512 | 512 | Yes | model.layers.2.self_attn.k_proj.weight |
| num_attention_heads×head_dim | 2,048 | 2,048 | Yes | model.layers.2.self_attn.q_proj.weight |
| intermediate_size | 11,776 | 11,776 | Yes | model.layers.0.feed_forward.w1.weight |
| moe_intermediate_size | 1,536 | 1,536 | Yes | model.layers.2.feed_forward.experts.0.w1.weight |
| tie_word_embeddings (no output-head tensor) | Yes | Yes | Yes | tensor list |
| num_experts | 64 | 64 | 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 | 291 | 1.543 | 4.622 | 5.5% | Yes |
| English | 1,201 | 284 | 4.229 | 4.327 | 0.0% | Yes |
Of 125,017 vocabulary entries, 7,798 (6.24%) contain at least one kana or kanji character and 4,807 contain two or more (loaded with tokenizers).
Special tokens and chat format
120 special tokens. BOS: <|startoftext|>, EOS: <|im_end|>. Chat template: present (4294 characters, sha256 prefix 46cd92afe7fe).
Thinking tags: Yes, tool calls: Yes, FIM: Yes, image tokens: Yes (found by searching special-token names and the template text).
List of special tokens
<|pad|>, <|startoftext|>, <|endoftext|>, <|fim_pre|>, <|fim_mid|>, <|fim_suf|>, <|im_start|>, <|im_end|>, <|tool_list_start|>, <|tool_list_end|>, <image>, <|img_row_1_col_1|>, <|img_row_1_col_2|>, <|img_row_1_col_3|>, <|img_row_1_col_4|>, <|img_row_1_col_5|>, <|img_row_1_col_6|>, <|img_row_1_col_7|>, <|img_row_1_col_8|>, <|img_row_1_col_9|>, <|img_row_1_col_10|>, <|img_row_2_col_1|>, <|img_row_2_col_2|>, <|img_row_2_col_3|>, <|img_row_2_col_4|>, <|img_row_2_col_5|>, <|img_row_2_col_6|>, <|img_row_2_col_7|>, <|img_row_2_col_8|>, <|img_row_2_col_9|>, <|img_row_2_col_10|>, <|img_row_3_col_1|>, <|img_row_3_col_2|>, <|img_row_3_col_3|>, <|img_row_3_col_4|>, <|img_row_3_col_5|>, <|img_row_3_col_6|>, <|img_row_3_col_7|>, <|img_row_3_col_8|>, <|img_row_3_col_9|>, <|img_row_3_col_10|>, <|img_row_4_col_1|>, <|img_row_4_col_2|>, <|img_row_4_col_3|>, <|img_row_4_col_4|>, <|img_row_4_col_5|>, <|img_row_4_col_6|>, <|img_row_4_col_7|>, <|img_row_4_col_8|>, <|img_row_4_col_9|>, <|img_row_4_col_10|>, <|img_row_5_col_1|>, <|img_row_5_col_2|>, <|img_row_5_col_3|>, <|img_row_5_col_4|>, <|img_row_5_col_5|>, <|img_row_5_col_6|>, <|img_row_5_col_7|>, <|img_row_5_col_8|>, <|img_row_5_col_9|> …
Weights (stage 1)
Analyzed 7,610 of 7,610 tensors (compute time 41 s). Each tensor was converted to fp32 for computation.
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.
Matrices with the largest values (main-model weights with 2 or more dimensions): max|w| ÷ RMS 94.091 (model.layers.39.feed_forward.experts.6.w2.weight), excess kurtosis 36.24 (model.layers.39.feed_forward.experts.52.w2.weight), outlier share 0.290% (model.layers.25.feed_forward.gate.weight).
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 40) |
|---|---|
| 263 | 40 |
| 518 | 40 |
| 279 | 39 |
| 341 | 39 |
| 483 | 39 |
| 550 | 39 |
| 876 | 39 |
| 898 | 39 |
| 1034 | 39 |
| 1205 | 39 |
Normalization-layer weights
For each of the 81 normalization layers whose length equals the hidden size (2,048), 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 20 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 |
|---|---|
| 557 | 49 |
| 1257 | 45 |
| 118 | 42 |
| 1614 | 40 |
| 2040 | 40 |
| 1758 | 39 |
| 225 | 36 |
| 233 | 35 |
| 549 | 33 |
| 110 | 32 |
Dimensions shared with the top 10 outlier channels above: none.
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).
Stable rank ÷ shorter side by part:
| Part | Matrices | Min | Median | Max | Matrix with the minimum |
|---|---|---|---|---|---|
| Experts | 7296 | 0.0052 | 0.0768 | 0.2874 | model.layers.39.feed_forward.experts.16.w3.weight |
| Short convolution (conv) | 60 | 0.0071 | 0.0278 | 0.0621 | model.layers.33.conv.out_proj.weight |
| Attention | 40 | 0.0094 | 0.0605 | 0.5104 | model.layers.38.self_attn.q_proj.weight |
| Router | 38 | 0.0416 | 0.0518 | 0.0581 | model.layers.36.feed_forward.gate.weight |
| FFN (dense) | 6 | 0.0097 | 0.0425 | 0.1097 | model.layers.0.feed_forward.w1.weight |
| Embedding | 1 | 0.0055 | 0.0055 | 0.0055 | model.embed_tokens.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 (128,000 rows)
| Min | Bottom 0.1% | Bottom 1% | Median | Top 1% | Max |
|---|---|---|---|---|---|
| 0.3302 | 0.3758 | 0.3759 | 0.958 | 1.4825 | 2.0163 |
Rows with small norms (128 rows in the bottom 0.1%, the 20 smallest): 124899:'<|im_start|>'(0.3302), 54265:'\t\xa0\t\xa0'(0.3757), 126592:''(0.3758), 125818:''(0.3758), 125376:''(0.3758), 126368:''(0.3758), 125183:''(0.3758), 125972:''(0.3758), 125847:''(0.3758), 126193:''(0.3758), 126981:''(0.3758), 126084:''(0.3758), 127983:''(0.3758), 126820:''(0.3758), 125092:''(0.3758), 125623:''(0.3758), 125554:''(0.3758), 125874:''(0.3758), 126817:''(0.3758), 125286:''(0.3758)
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: 0.0013.
Measurement conditions
- mbscope 0.2.16 (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 prefix0a714a270435 - Computed on GPU NVIDIA GeForce RTX 3090 (CUDA 13.0, TF32 off) in fp32
- Measured with mbscope 0.2.13. The measurements were re-aggregated with mbscope 0.2.16 without re-measuring
Comments
…