IQuestLab/IQuest-Q1 — model analysis

Summary

  • Size: The model consists of about 320 billion numbers (parameters). Its saved files total about 641GB.
  • Structure: A mixture-of-experts (MoE) model that, for each input, selects only 8 of its 256 experts. Of about 320 billion parameters in total, about 14.9 billion are used per computation step. About 98% of the parameters are assigned to the experts and about 1% to the part that reads context (attention).
  • Japanese text: In Japanese, one token holds about 1.4 characters. In English, one token holds about 4.2 characters. For the same number of characters, Japanese needs about 3.0 times as many tokens as English. Of its 160,000 vocabulary entries, 56,352 contain kana or kanji.
  • Context length: The limit written in the config (max_position_embeddings) is 524,288 tokens, roughly 750,000 Japanese characters or 2,200,000 English characters at the same ratio as the fixed texts above.
  • Skew in values: Values inside the model flow in groups of 3,072. Position 1572 was among the positions where outliers (extremely large values) appear most often, in 82 of 88 layers. Position 1572 also appeared in the tally of positions where normalization-layer weights take extreme values (147 of 266 normalization layers). This kind of skew is generally considered a cause of accuracy loss when a model is compressed (quantized).

One line: MoE (8 of 256 experts active) · iquest_q1 · 88 layers · 320.32B params · 14.89B active · GQA (6:1) · context 524,288 · vocab 160,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
Experts 315,277,443,072 98.43%
Attention 3,875,627,008 1.21%
Embedding 491,520,000 0.15%
Output head 491,520,000 0.15%
FFN (dense) 113,246,208 0.04%
Router 68,419,584 0.02%
Normalization 839,680 0.00%

Structure

Values from config.json.

Item Value
model_type / architectures iquest_q1 / IQuestQ1ForCausalLM
Layers 88
Hidden size 3,072
FFN intermediate size (intermediate_size) 1,536
Dense-layer FFN intermediate size (dense_intermediate_size) 12,288
Attention type GQA (6:1)
Heads / KV heads / head dim 48 / 8 / 128
Sliding window 4,096 (use_sliding_window=Yes)
Layer types (layer_types) —
RoPE θ 1,000,000
RoPE scaling —
Partial rotary (partial_rotary_factor) —
Context length (max_position_embeddings) 524,288
Tied input/output embeddings No
Activation silu
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) 256
Experts counted from tensor names (count: layers) 256:87 layers
Active experts per token 8
Shared experts —
MoE layers 87
Leading dense layers (first_k_dense_replace) —
Expert parameters 315.28B
Active parameters 14.89B

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 160,000 160,000 Yes model.embed_tokens.weight
hidden_size 3,072 3,072 Yes model.embed_tokens.weight
num_hidden_layers 88 88 Yes largest layer index + 1 (excluding MTP layers)
num_key_value_heads×head_dim 1,024 1,024 Yes model.layers.0.self_attn.k_proj.weight
num_attention_heads×head_dim 6,144 6,144 Yes model.layers.0.self_attn.q_proj.weight
dense_intermediate_size 12,288 12,288 Yes model.layers.0.mlp.gate_proj.weight
tie_word_embeddings (no output-head tensor) No No Yes tensor list
num_experts 256 256 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 315 1.425 4.27 3.2% Yes
English 1,201 284 4.229 4.327 0.0% Yes

Of 160,000 vocabulary entries, 56,352 (35.22%) contain at least one kana or kanji character and 50,722 contain two or more (loaded with tokenizers).

Special tokens and chat format

493 special tokens. BOS: None, EOS: <|iquest_end|>. Chat template: present (10909 characters, sha256 prefix b3c99aab1b3f). 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

<|iquest_end|>, <|im_start|>, <|im_end|>, <|object_ref_start|>, <|object_ref_end|>, <|box_start|>, <|box_end|>, <|quad_start|>, <|quad_end|>, <|vision_start|>, <|vision_end|>, <|vision_pad|>, <|image_pad|>, <|video_pad|>, <|fim_prefix|>, <|iquest_system|>, <|iquest_user|>, <|iquest_assistant|>, <|iquest_tool|>, <|endoftext|>, <|iquest_developer|>, <|reserved_14|>, <|reserved_15|>, <|reserved_16|>, <|reserved_17|>, <|reserved_18|>, <|reserved_19|>, <|reserved_20|>, <|reserved_21|>, <|reserved_22|>, <|reserved_23|>, <|reserved_24|>, <|reserved_25|>, <|reserved_26|>, <|reserved_27|>, <|reserved_28|>, <|reserved_29|>, <|reserved_30|>, <|reserved_31|>, <|reserved_32|>, <|reserved_33|>, <|reserved_34|>, <|reserved_35|>, <|reserved_36|>, <|reserved_37|>, <|reserved_38|>, <|reserved_39|>, <|reserved_40|>, <|reserved_41|>, <|reserved_42|>, <|reserved_43|>, <|reserved_44|>, <|reserved_45|>, <|reserved_46|>, <|reserved_47|>, <|reserved_48|>, <|reserved_49|>, <|reserved_50|>, <|reserved_51|>, <|reserved_52|> …

Weights (stage 1)

Analyzed 1,148 of 1,148 tensors (compute time 6.5 min). 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 125.293 (model.layers.24.mlp.experts.fc), excess kurtosis 24.409 (model.layers.24.self_attn.o_proj.weight), outlier share 0.488% (model.layers.72.self_attn.sink_k).

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 88)
1572 82
349 81
987 80
2631 78
1332 73
2259 71
2686 70
1919 67
2439 63
708 59

Normalization-layer weights

For each of the 266 normalization layers whose length equals the hidden size (3,072), 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 176 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
1572 147
1332 141
2627 115
2686 88
2631 78
349 76
1960 74
2259 67
409 58
567 56

Dimensions shared with the top 10 outlier channels above: 349, 1332, 1572, 2259, 2631, 2686.

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
Attention 440 0.0088 0.1012 0.6121 model.layers.85.self_attn.k_proj.weight
Experts 174 0.0225 0.1408 0.2961 model.layers.85.mlp.experts.fc
Router 87 0.0062 0.0396 0.2718 model.layers.85.mlp.router.weight
FFN (dense) 3 0.1376 0.1409 0.152 model.layers.0.mlp.gate_proj.weight
Embedding 1 0.0157 0.0157 0.0157 model.embed_tokens.weight
Output head 1 0.0091 0.0091 0.0091 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 (160,000 rows)

Min Bottom 0.1% Bottom 1% Median Top 1% Max
0.8644 1.7446 1.7995 1.9482 2.1033 3.6429

Rows with small norms (160 rows in the bottom 0.1%, the 20 smallest): 29:'<|iquest_tool|>'(0.8644), 28:'<|iquest_assistant|>'(0.8682), 27:'<|iquest_user|>'(0.892), 26:'<|iquest_system|>'(0.8922), 34:'</arg_key>'(1.3013), 36:'</arg_value>'(1.3117), 37:'<iquest_tool_call>'(1.3615), 38:'</iquest_tool_call>'(1.3854), 31:'<tools>'(1.3881), 33:'<arg_key>'(1.4061), 35:'<arg_value>'(1.4159), 32:'</tools>'(1.419), 130394:'ſe'(1.4555), 25:'</think>'(1.5003), 53068:' ſ'(1.5038), 120895:'让人不敢随便'(1.505), 91988:'ſt'(1.528), 117979:'是一部制作精良'(1.5613), 87219:'分享贡献'(1.5968), 107013:'请以银行'(1.6093)

lm_head.weight (160,000 rows)

Min Bottom 0.1% Bottom 1% Median Top 1% Max
0.7617 0.8785 0.9591 1.2329 1.5937 2.4927

Rows with small norms (160 rows in the bottom 0.1%, the 20 smallest): 22051:'\ufeffusing'(0.7617), 120403:' Hmm'(0.7687), 11342:' và'(0.7893), 3401:'\tif'(0.7946), 77637:' ∠'(0.796), 25113:'}=\\'(0.8069), 57829:' př'(0.808), 92311:' în'(0.8087), 13738:' untuk'(0.8092), 80806:' gcd'(0.8096), 93225:' și'(0.81), 3169:' и'(0.8112), 77768:' avons'(0.8122), 15255:'}(\\'(0.814), 11049:'\t\t\n'(0.8143), 19804:' sont'(0.8151), 5558:' و'(0.8183), 15803:'}='(0.8186), 16705:'}$,'(0.819), 8895:'\tfor'(0.8196)

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: 5.2106e-04.

Expert similarity

Measurement conditions

  • mbscope 0.2.11 (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.8. The measurements were re-aggregated with mbscope 0.2.11 without re-measuring

Comments

…

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

← All notes