How it works
Every number on this site is worked out from one file: the model's config.json on Hugging Face, which lists the sizes the code needs to build the model.
Parameters
From the config the site lists every weight tensor the model has, with its shape, and multiplies out the shapes. The total is then checked against the number Hugging Face reads from the model's safetensors files. For all 68 models here the two agree to the parameter, once the few stored tensors that are not separate weights are set aside (they are explained on the page where they occur).
The details that make the count come out right:
- Tied embeddings. Small models often reuse the embedding matrix as the output head, saving V × d parameters. (Qwen3 0.6B and 1.7B tie them but still store a copy of the head in the files.)
- Biases. Qwen2 and Qwen2.5 add biases to the query, key and value projections; their configs don't say so. gpt-oss has biases on attention, the router and every expert; Phi-3.5-MoE uses LayerNorm, with a bias, and a bias on its output head.
- Query and key norms. Qwen3 and Gemma 3 normalize each head's queries and keys (two vectors of size h per layer); OLMo 2 normalizes across all heads; Llama 4 uses an L2 norm with no weights.
- Four norms per block in Gemma 2 and 3, before and after both attention and the FFN.
- Fused matrices. Phi-3 and Phi-4 store q, k, v as one matrix and the FFN gate and up as another; Llama 4 and gpt-oss store all experts' gate and up projections in one tensor. The count is the same.
- Mixture of experts. Each expert is a full FFN; the router is a d × E matrix. DeepSeek also has shared experts that every token uses, dense layers at the start, and (V3, R1) a routing bias per expert. Llama 4 has a shared expert too, and Maverick alternates MoE layers with dense ones of a wider FFN.
- Multi-head latent attention (DeepSeek) compresses keys and values into a small latent and expands them per head.
- Multi-token prediction. DeepSeek-V3's files carry an extra block with its own embedding and head: 671B in the model, 685B in the files.
- Vision encoders. Gemma 3 (4B and up) and Llama 4 nest the language model's sizes in
text_configand add an image encoder fromvision_config, counted separately. - MXFP4. gpt-oss stores its experts as 4-bit values with one 8-bit scale per 32; the count here is of logical weights, as Hugging Face's is.
Memory
Weights: parameters × bytes per parameter. KV cache: 2 (a key and a value) × layers × KV heads × head size × bytes, per token of context, per sequence. These are lower bounds: runtimes add activations, buffers and fragmentation, and quantized files carry scales. The GPU pages add those scales and keep 10% of the card free.
FLOPs
Two per weight per token (a multiply and an add), plus the attention scores, which grow with the context. Training is about three times that.
Sources
Meta's and Google's repositories need a sign-in to download, so their configs are read from public copies (unsloth, NousResearch); each page names the copy it used. The configs are the same files. Hugging Face's API gives the parameter count even for gated repositories.
Privacy
No cookies of our own; nothing you pick in the calculators leaves your browser.