Gnox AI / Blog

,

LLM Parameters Explained: Weights, Model Size and Memory

Abstract diagram illustrating large language models

LLM parameters are numbers stored inside a large language model. Most are weights the model learns during training. When a model is labeled 7B, the label usually means it has about seven billion parameters. That count helps you estimate how much memory the weights need and gives you a rough sense of model capacity.

What do LLM parameters do?

Weights are learned multipliers used in calculations throughout the network. Some layers also have learned values called biases that shift a calculation’s result. Working together, the weights turn token representations into progressively transformed signals, which the model uses to score possible next tokens.

During training, an optimizer changes the weights based on errors measured by a loss function. The same weights are reused across many examples. The guide to epochs in machine learning explains how those examples are grouped into batches and passes through the data.

For one place learned weights are used, see how transformer attention works, including the query, key, and value calculations.

Parameters, tokens, and generation settings

A token is a unit of input or output, often a word fragment, punctuation mark, or whole word. A parameter in a model-size label is a stored number the network uses to process those tokens. A 7B model can still have a much smaller context window, which describes how many tokens it can handle in a request.

An API may also call options such as temperature and the maximum output length parameters. Those are request settings. Temperature changes how the system samples from possible next tokens, while a length setting caps the response. The deep learning inference guide explains what happens when a trained network processes a request.

To compare families on more than the numbers in their names, see what makes a language model small.

What model size tells you about memory

A first estimate of weight storage is the parameter count multiplied by the number of bytes used per parameter. Seven billion weights at two bytes each, as in bfloat16, take roughly 14 GB in decimal units. At four bits each, the raw arithmetic gives 3.5 GB before quantization metadata and other storage overhead.

A running model also needs memory for temporary calculations and cached information from earlier tokens. Long contexts and concurrent requests can raise that requirement. Compare the model file and runtime measurements with the memory available on your device. The local AI GPU guide covers how to interpret those requirements when choosing hardware.

For examples of applying this calculation, see our guide to choosing a local LLM for your hardware.

Total vs. active parameters

A mixture-of-experts model routes each token through selected groups of weights called experts. Mistral AI reports that Mixtral 8x7B has 46.7 billion parameters in total and uses about 12.9 billion per token. That is possible because its router sends each token through two of eight experts in each relevant layer.

The total helps estimate how much space the complete set of weights needs. The active count helps explain how much of the model does work on each token. Actual response speed also depends on the hardware, runtime, and routing overhead, so check measurements for the deployment you plan to use.

How to compare model sizes

Use the count and precision to shortlist models that fit your hardware. Then give each candidate the same prompts and evaluate whether it completes the task accurately, follows your format, and responds quickly enough. A larger model can have more capacity, while data, architecture, and training choices can change how well that capacity serves your task.

Frequently asked questions

What does 7B mean in an LLM name?

It usually means the model has about seven billion parameters. Check the model card for the exact count and whether the figure describes the whole model or the subset used for each token.

Does a model have one parameter for each word?

No. Parameters are stored numerical values. A tokenizer turns text into tokens, and many of the same weights are reused to process different tokens.

Do prompts change model parameters?

A prompt supplies input to the model. It can change the answer without modifying the stored weights. Fine-tuning is a training process that modifies weights or learns extra parameters.

Does quantization change the parameter count?

Standard weight quantization represents the same weights with fewer bits. It typically reduces storage and memory requirements without changing how many parameters are in the model.