LiquidAI/LFM3-1.7B-Base — model analysis

Summary

  • Size: The model consists of about 1.7 billion numbers (parameters). Its saved files total about 3.46GB.
  • Structure: A dense model that uses all of its parameters for every input. About 70% of the parameters are assigned to the part that holds knowledge (FFN), about 20% to the vocabulary dictionary (embedding), about 10% to the part that mixes nearby context (short convolution), and about 7% to the part that reads context (attention).
  • 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,033 vocabulary entries, 7,798 contain kana or kanji.
  • Context length: The limit written in the config (max_position_embeddings) is 262,144 tokens, roughly 400,000 Japanese characters or 1,100,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. Position 1534 was among the positions where outliers (extremely large values) appear most often, in 19 of 24 layers. This kind of skew is generally considered a cause of accuracy loss when a model is compressed (quantized).

One line: Dense · lfm3 · 24 layers · 1.73B params · GQA (4:1) · context 262,144 · vocab 128,000

Basic information

Architecture (stage 0)

Parameters by part

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

Parameters by part

Part Parameters Share
FFN (dense) 1,132,462,080 65.51%
Embedding 262,144,000 15.16%
Short convolution (conv) 218,290,176 12.63%
Attention 115,703,808 6.69%
Normalization 201,472 0.01%

Structure

Values from config.json.

Item Value
model_type / architectures lfm3 / Lfm3ForCausalLM
Layers 24
Hidden size 2,048
FFN intermediate size (intermediate_size) 7,680
Attention type GQA (4:1)
Heads / KV heads / head dim 16 / 4 / 128
Sliding window 256 (use_sliding_window=—)
Layer types (layer_types) conv×13, full_attention×6, sliding_attention×5
RoPE θ —
RoPE scaling {'full_attention': {'partial_rotary_factor': 0.5, 'rope_theta': 1000000.0, 'rope_type': 'default'}, 'sliding_attention': {'rope_theta': 10000, 'rope_type': 'default'}}
Partial rotary (partial_rotary_factor) —
Context length (max_position_embeddings) 262,144
Tied input/output embeddings Yes
Activation —
Normalization ε —

MoE configuration

Not applicable (not an MoE model).

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 24 24 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 7,680 7,680 Yes model.layers.0.feed_forward.w1.weight
tie_word_embeddings (no output-head tensor) Yes Yes Yes tensor list

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,033 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

124 special tokens. BOS: <|startoftext|>, EOS: <|im_end|>. Chat template: present (12129 characters, sha256 prefix f45005c50cd2). 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 286 of 286 tensors (compute time 3 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.

RMS

max|w| ÷ RMS

Excess kurtosis

Matrices with the largest values (main-model weights with 2 or more dimensions): max|w| ÷ RMS 64.763 (model.layers.11.conv.out_proj.weight), excess kurtosis 59.057 (model.layers.7.conv.out_proj.weight), outlier share 0.103% (model.layers.3.conv.out_proj.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 24)
1534 19
275 17
1174 17
193 15
297 15
1835 15
232 14
970 14
1217 14
1453 14

Normalization-layer weights

For each of the 97 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 22 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
397 60
603 35
232 32
1996 32
287 30
917 28
1000 28
1174 28
1518 26
1835 22

Dimensions shared with the top 10 outlier channels above: 232, 1174, 1835.

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
FFN (dense) 72 0.0142 0.0865 0.3401 model.layers.1.feed_forward.w2.weight
Attention 55 0.0061 0.1067 0.448 model.layers.18.self_attn.o_proj.weight
Short convolution (conv) 26 0.0045 0.0315 0.0426 model.layers.7.conv.out_proj.weight
Embedding 1 0.0058 0.0058 0.0058 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.4604 0.4631 0.4633 1.0648 1.2934 1.6994

Rows with small norms (128 rows in the bottom 0.1%, the 20 smallest): 65277:'ddComponent'(0.4604), 105636:'neString'(0.4611), 95312:'setTi'(0.4613), 67060:'_PrefabAsset'(0.4615), 67062:'_PrefabInstance'(0.4616), 113194:'trollo'(0.4616), 104893:'"resolv'(0.4616), 67282:'_StaticEditorFlags'(0.4617), 103675:'رسانة'(0.4617), 106758:'ArrivedTo'(0.4617), 98135:'.framewo'(0.4617), 98560:'(socke'(0.4618), 67106:'_PrefabParentObject'(0.4618), 114998:'chu�'(0.4619), 111246:' adoos'(0.462), 115065:'_arqui'(0.462), 66913:'inSlope'(0.462), 66968:'_ObjectHideFlags'(0.462), 93344:'Tryi'(0.462), 67070:'_PrefabInternal'(0.462)

A small norm does not mean that the token is unimportant or untrained.

Similarity between experts

Not applicable (not an MoE model).

Measurement conditions

  • mbscope 0.2.17 (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

Comments

…

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

← All notes