Glossary · The shape of a model

Parameters

Also: weightsparameter count7B70B

Read it at the depth you need: one sentence · a paragraph · the math · in the models here

1In one sentence

The learned numbers in a model: every entry of every weight matrix, bias and norm vector. "8B" means about eight billion of them.

2In a paragraph

A parameter is one learned number. The "8B" in Llama 3.1 8B is the count of all of them: the entries of every matrix in every block, plus the embedding table, the output head and the small norm vectors. The count decides how much memory the weights need (2 bytes each in BF16) and, roughly, how much compute each token costs (2 FLOPs per parameter).

3The math, shapes and parameters

The count follows from config.json alone: list every tensor, multiply out its shape, add up. For a dense model with grouped-query attention and a gated FFN:

N = V·d (embedding) + L × [ d·H·h + 2·d·K·h + H·h·d (attention) + 3·d·f (FFN) + 2·d (norms) ] + d (final norm) + V·d (head, unless tied)

Every model page on this site does exactly this, line by line, and checks the result against the count Hugging Face reads from the checkpoint files. The small things decide whether it matches to the parameter: biases on q, k and v (Qwen2), q/k norms (Qwen3, Gemma 3), tied embeddings, and in mixtures of experts the router and shared experts.

For a mixture of experts there are two counts: total (what has to be stored) and active (what one token uses).

4In the 96 models on this site

The 96 models here run from SmolLM2 135M (135M) to Kimi K2 (1.03T). All of their counts match the safetensors files exactly; the about page lists what it took.

Related

Transformer block · Mixture of experts (MoE) · Quantization · FLOPs per token · every term