What is parameter count?
Parameter count is the total number of weight and bias values learned in training in an AI model; for large language models it is stated in billions and is a rough indicator of capacity, memory needs and running cost.
Unlike active parameters, which count those actually used when processing a token, parameter count includes every weight in the model. In mixture of experts models the two differ greatly: a large total, with only a small part run per token.
- Topic
- Machine learning, models and training
- Also known as
- Model size
How parameter count works
- Element counts of weight matrices and biases in each layer are summed; the embedding layer is often stated separately.
- Weight memory is roughly parameter count times bytes per parameter.
- Quantisation does not change parameter count; it reduces bytes per parameter.
- Training cost depends on training token count as well as parameter count.
In more detail
Scaling with inference cost in mind
The compute-optimal ratio aims to make the best use of a one-off training budget; it ignores serving cost over the model's lifetime. Developers have therefore moved to training fairly small models far past that ratio on trillions of tokens, because a lower parameter count cuts on-premise GPU needs, energy use and per-token latency.
Why reported counts differ
Reported parameter counts can differ between model cards depending on whether tied input and output embeddings or vision and audio encoders are counted and whether exact counts are rounded into labels. It is worth verifying the exact count in the model's config or safetensors metadata before provisioning GPUs.
Commonly confused terms
| Term | How it differs |
|---|---|
| Context window | Parameter count measures model size (capacity in weights), whereas context window measures how many input and output tokens the model can attend to at once; a smaller-parameter model can still have a much larger context window and KV cache footprint than a larger model. |
| Compute (FLOPs) | Parameter count only reflects the number of learned numbers, whereas FLOPs (floating-point operations) measure actual computational work; dense models, MoE models and reasoning models with identical parameter counts can spend vastly different FLOPs per query. |
Why parameter count matters for on-premises AI
Parameter count is the first input to in-house hardware sizing but does not set quality alone. Scaling studies show loss falls predictably with model size, data and training compute together. A study of compute-optimal training found model size and training tokens should scale equally; with the same budget, a 70 billion parameter model trained on four times more data outperformed a 280 billion parameter model.
Example calculation: a public body's chosen 70 billion parameter model needs 70 × 10⁹ × 2 bytes = 140 GB for weights at 16 bits and 70 × 10⁹ × 0.5 bytes = 35 GB at 4 bits excluding quantisation scales; it plans GPU memory leaving room for the KV cache and working memory.
Common questions
Does a larger parameter count always mean a better model?
No. Quality grows with data and training compute too; a smaller model trained on more data can be better.
How is memory need calculated from parameter count?
Multiply parameter count by bytes per parameter, then add KV cache and working memory.
Related terms
Sources
- Kaplan et al., Scaling Laws for Neural Language Models, 2020
- Hoffmann et al., Training Compute-Optimal Large Language Models, 2022
In the glossary: Glossary, M to Q