Parameters, or weights, are all the trainable numbers in a model: the matrices and vectors that make up its layers. A “9B” model contains about 9 billion such numbers. Training fits them; after training they do not change and are stored in the model files.
How much memory is needed
Memory for the weights equals the number of parameters multiplied by the size of one number in bytes. For a model with 9 billion parameters it works out as follows:
| Number format | Bytes per parameter | Weights of a 9B model |
|---|---|---|
| FP32 | 4 | about 36 GB |
| BF16 or FP16 | 2 | about 18 GB |
| INT8 or FP8 | 1 | about 9 GB |
| INT4 or FP4 | 0.5 | about 4.5 GB |
That is the weights only. On top of them you need memory for the KV cache, which grows with context length, and for working buffers, so in practice you leave a margin. Training adds gradients and optimiser state, usually several times larger than the weights themselves.
Not to be confused with settings
- model parameters are the numbers inside the model, found by training;
- hyperparameters are training settings, such as the learning rate and batch size; a person sets them before training;
- generation parameters are
temperature,top_pandmax_new_tokens; they are set with each request and do not change the weights.
How to see the parameter count
n = model.num_parameters()print(f"{n / 1e9:.1f} billion parameters")In a model name, the number usually means the total parameter count: 27B is 27 billion. For mixture-of-experts models the active count is also given, for example 30B-A3B: 30 billion are stored, and about 3 billion work on each token.
Sources
the term is written from these pages- Hugging Face Transformers — Models (num_parameters, get_memory_footprint)huggingface.co/docs/transformers/main/en/main_classes/model(opens in a new tab)
- Hugging Face Transformers — GPU memory usagehuggingface.co/docs/transformers/model_memory_anatomy(opens in a new tab)
- Qwen3-30B-A3B — карточка моделиhuggingface.co/Qwen/Qwen3-30B-A3B(opens in a new tab)
Verified 18 Nov