⌕ search /
Engineering notes

The parameter count is not the model: reading 2026 checkpoints

Published 2026-11-24 · updated 2026-11-24 · engineering note

The parameter count on a Hugging Face model page is a count of stored tensor elements. For the 2026 generation of open models it is neither the number of weights nor the number that runs per token. Read naively, it doubles Kimi K3.1 Pro to 5.5 T parameters (the maker says 2.8 T), halves MiniMax M3.1 Flash to 220 B (the real model is about 428 B), and puts Inkling 2 Small at 508 B active per token where the maker states 17 B — estimates 2–30× off. The Hub is not wrong: it counts what is stored. This note shows what the count means, in four traps with exact worked numbers, then a recipe to check any model from its config.json.

Trap 1: elements are not weights

4-bit expert weights are stored packed, and the Hub counts the elements of the packed tensor — usually U8. Whether one element holds one weight or two depends on the packing, and the page does not say which. The config does: the routed experts' shape gives their weight count G exactly.

G = Σ over MoE blocks  blocks × experts × 3 × h_exp × d_ff
P = the page's packed count (U8 elements)

P = G      →  one element is one weight;  total = the page's total
P = G / 2  →  two weights per element;    total = the page's total + P

Kimi K3.1 Pro: 92 MoE layers × 896 experts × 3 × 3 584 × 3 072 = 2,722,740,830,208 — exactly the page's U8 count. One element is one weight; the page's total of 2 780.1 B is right. A reader that unpacks by doubling adds the U8 count again and reports 5 502.9 B.

MiniMax M3.1 Flash: 57 × 128 × 3 × 6 144 × 3 072 = 413,122,166,784, and the page's U8 count is 206,561,083,392 — exactly half. Here two weights share an element (the config names the format nvfp4-pack-quantized), the page shows 220.5 B, and the model holds 220.5 + 206.6 = 427.1 B — matching the unquantized MiniMax M3 (427.0 B). Inkling 2 Small shows the third pattern: its U8 (40 layers) and F8_E4M3 (8 layers) expert counts add up to G = 587,068,342,272, one element per weight again.

Trap 2: the expert geometry is not where you expect

The check above only works when G is computed from the right fields. Three configs move them.

  • Latent MoE. Kimi K3 and K3.1 project the hidden state into a narrower space before the experts: routed_expert_hidden_size is 3 584, while hidden_size is 7 168. With the wrong width G doubles to 5,445,481,660,416, the packed count looks like G / 2, and the reader lands on 5.5 T again — the two traps give the same wrong answer.
  • A list where a number was expected. MiniMax M3 gives moe_layer_freq as a per-layer list of 60 entries, 57 of them ones. A reader that expects a scalar falls back to a parameter heuristic and reports 54.7 B active; the geometry gives 26.8 B. Its multi-token-prediction modules (num_mtp_modules) carry no routed experts and add nothing to G.
  • MoE blocks beyond the backbone. DeepSeek V4 lists one compress_ratios entry per block, including draft blocks after num_hidden_layers. On V4.1 Flash the list has 43 entries for 40 layers: three draft blocks, each with its own 128 experts and 3 active (dspark_n_routed_experts, dspark_num_experts_per_tok). Then G = 384 × 40 × 35,389,440 + 128 × 3 × 35,389,440 = 557,171,343,360, the page's I8 count to the element.

Trap 3: parameters that are memory, not compute

DeepSeek V4.1 Flash stores 196.6 B parameters of Engram lookup tables: Σ engram_num_embeddings × engram_head_dim = (384,006,168 + 384,016,682) × 256 = 196,613,849,600. That is a quarter (25.8 %) of the 763.2 B on the page. The maker describes them as sparsely accessed by token-based lookup: they are not multiplied per token, so they cost memory, not compute.

A reader that leaves them in the active count (and treats the three draft blocks as full 384-expert layers) reports 188.0 B active. The geometry, with the tables kept in the total and taken out of the active figure, gives 18.2 B. The maker states 16 B active during decode and 8 B during prefill. For sizing, the tables belong in memory and out of the decode bandwidth estimate.

Trap 4: the cache is not one KV per layer

GLM-5.3 Flash uses latent attention with kv_lora_rank 512 and qk_rope_head_dim 0. A reader that needs both fields to recognise latent attention treats the model as plain multi-head attention: 2 × 64 heads × 64 dims = 8 192 values per token per layer, against a 512-value latent — 16× the cache. At 128K context, one sequence, 16-bit cache, its 11 attention layers hold 1.48 GB, not 23.6 GB. The other 34 of its 45 layers are linear attention with a fixed state of about 2.2 MB per layer per sequence that does not grow with context (the state math is in the hybrid attention memory note).

DeepSeek V4.1 Flash keeps its persistent cache at four source layers only (kv_source_layer_ids 2, 8, 14, 20, compressed 2, 2, 2 and 1 times); the other layers share it. The maker states 890 bytes per token with a 4-bit cache. A reader that bills all 40 layers a 1 024-byte entry at 8 bits gets 40 960 bytes per token, 46× the maker's figure.

Inkling 2 Small: 40 of its 48 layers are local, with a 1 024-token window (local_layer_ids, sliding_window_size). At 128K context, one sequence, 16-bit cache, the 8 global layers plus 40 windowed ones hold 4.46 GB; billed as 48 full layers, 25.8 GB.

Six models, four readings

Billions of parameters. "Naive" is a reader without the rules above; "geometry" is the config read with them.

ModelPage countNaive: total / activeGeometry: total / activeMaker's card
Kimi K3.1 Pro2 780.15 502.9 / 154.62 780.1 / 106.02.8 T / 104
MiniMax M3.1 Flash220.5220.5 / 28.3427.1 / 26.8~428 / 23
MiniMax M3427.0427.0 / 54.7427.0 / 26.8~428 / ~23
DeepSeek V4.1 Flash763.2763.2 / 188.0763.2 (196.6 tables) / 18.2552 + 196 tables / 16 decode, 8 prefill
GLM-5.3 Flash321.3321.3 / 18.3, cache 16×321.3 / 18.3320 / 18
Inkling 2 Small594.11 083.3 / 508.4594.1 / 19.2594 / 17

Check a model in five minutes

All you need is the repository's config.json and the per-dtype counts on its model page.

  1. 01
    Open config.json — for a multimodal model, its text_config.
  2. 02
    Find the experts: the expert count, the active experts per token, the expert FFN width (moe_intermediate_size or intermediate_size) and the expert input width — routed_expert_hidden_size when it exists, else hidden_size.
  3. 03
    Count the MoE blocks: a scalar rule (leading dense layers, a step) or a per-layer list; then blocks beyond the backbone (compress_ratios longer than num_hidden_layers, next-n or MTP layers that carry experts).
  4. 04
    Compute G and compare with the packed count on the page. P = G: the total stands. P = G / 2: add P.
  5. 05
    Take out lookup tables (Engram, n-gram embeddings) from the active figure; keep them in the memory total.
  6. 06
    Read the cache: a latent rank (with or without a rotary part), shared source layers, local windows, linear-attention layers. Count only the layers that store a growing cache.

Where our reading is still approximate

  • Active parameters run high. From the geometry, the active figure lands 1.8–16.7 % above the makers' numbers (GLM-5.3 Flash +1.8 %, Kimi K3.1 Pro +1.9 %, Inkling 2 Small +13.0 %, DeepSeek V4.1 Flash +13.9 % against the decode figure, MiniMax M3 and M3.1 Flash +16.7 %). The config cannot separate the vision tower, the embeddings and the draft modules. The error is never below the card.
  • Mixed-precision checkpoints. DeepSeek ships 4-bit experts with 8-bit everything else. The calculator has no such weight mode, so it reads the checkpoint as block-scaled FP8 and bills the 557.2 B expert weights at about 8 bits (1.02 bytes each): the weight memory carries headroom.
  • The DeepSeek V4 and V4.1 cache is an approximation. The calculator divides a 576-value latent by each layer's compression ratio. For V4.1 that is 1 440 bytes per token with an 8-bit cache, where the maker states 890 bytes with a 4-bit cache, which the calculator does not offer.
  • Indexer caches. The sparse-attention indexer caches of DeepSeek V4 and V4.1, Kimi K3 and K3.1 and MiniMax M3 are not billed. GLM-5.3 Flash's is, at about 132 bytes per token per attention layer.

Try it

The calculator's model picker reads any Hugging Face repository with these rules (the model input article explains the three ways in). The six models of this note, at 128K context: Kimi K3.1 Pro (MXFP4), MiniMax M3.1 Flash (NVFP4), MiniMax M3 (FP8), DeepSeek V4.1 Flash (FP8), GLM-5.3 Flash (FP8), Inkling 2 Small (NVFP4).

What providers charge per token for them: Kimi K3.1 Pro, DeepSeek V4.1 Flash, GLM-5.3 Flash, MiniMax M3 on Model API prices. What the calculator leaves out is listed under what is not modeled; every calibration point is on the accuracy page.

Sources

Prices are collected daily from each provider's public price list or API. Estimates, not quotes — always confirm on the provider's own page before committing.

How this works · How accurate it is