AI & prompting

What Does 7B Mean in an LLM? Parameters, Size and Memory

The "7B" in a model name means it has about 7 billion parameters: the learned numbers (weights) that make up the neural network. The number tells you roughly how big the model file is and how much memory it needs: at 16 bits per parameter, 7 billion parameters take about 14 GB.

It is a rounded label, not an exact count, and it says less about quality than it seems to. Here is what it means in practice.

What a parameter is

A language model is a large stack of matrix multiplications. Each matrix is filled with numbers that were adjusted during training until the model got good at predicting the next token. Those numbers are the parameters (also called weights). When the model runs, every token you send passes through these matrices, so every parameter is involved in producing every token of output.

A parameter is not a fact, a word or a rule. Knowledge is spread across all of them, which is why you can't point at the part of a model that "knows" something, and why parameter count is only a loose proxy for what a model can do.

Where 7 billion parameters come from

You can check a model's count yourself from its published configuration. Mistral 7B's config.json on Hugging Face lists 32 layers, a hidden size of 4096, an intermediate (feed-forward) size of 14336, 32 attention heads with 8 key-value heads, and a vocabulary of 32,000 tokens, with separate input and output embeddings. Adding up the weight matrices:

PartCalculationParameters
Attention, per layer4096×4096 (Q) + 4096×1024 (K) + 4096×1024 (V) + 4096×4096 (output)41,943,040
Feed-forward, per layer3 × 4096 × 14336176,160,768
Norms, per layer2 × 40968,192
All 32 layers32 × 218,112,0006,979,584,000
Input and output embeddings2 × 32,000 × 4096262,144,000
Final norm40964,096
Total7,241,732,096

That is 7.24 billion. Mistral's announcement calls it "a 7.3B parameter model", and the name rounds it to 7B. About 96% of the parameters are in the 32 repeated layers, and about four-fifths of each layer (176 of 218 million) is the feed-forward block, not attention. (K and V are 1024 wide instead of 4096 because the model shares 8 key-value heads across its 32 query heads, a technique called grouped-query attention.)

The "7B" label is rounded, and labs count differently

Different 7B models have noticeably different real sizes:

  • Mistral 7B: 7.3B according to Mistral (7.24B from the config arithmetic above).
  • Qwen2.5-7B: the model card lists 7.61B parameters, of which 6.53B are non-embedding. Its large vocabulary puts over a billion parameters into the embedding tables.
  • Llama 2: released in sizes "ranging in scale from 7 billion to 70 billion parameters", labelled 7B, 13B and 70B.

So treat the label as a size class. Two "7B" models can differ by several hundred million parameters and by a few hundred megabytes in file size.

How much memory a 7B model needs

The weights alone take parameters × bytes per parameter. For Mistral 7B's 7.24 billion parameters:

PrecisionBytes per parameter7B (7.24B)13B70B
32-bit float429.0 GB52 GB280 GB
16-bit (FP16/BF16)214.5 GB26 GB140 GB
8-bit quantized17.2 GB13 GB70 GB
4-bit quantized0.53.6 GB6.5 GB35 GB

The 13B and 70B columns use the nominal size, so real files differ a little. GB here is 10^9 bytes; in the GiB your operating system may show, 14.5 GB is 13.5 GiB. Mistral's config lists bfloat16 as its stored precision, so the original download is in the 16-bit row.

Real usage is higher than the table: quantized formats keep some tensors at higher precision and store scale factors, and running the model needs extra memory for the context (the KV cache) that grows with prompt length. For practical numbers per GPU, see how much VRAM you need to run an LLM locally, and for what the 4-bit and 8-bit formats are, LLM quantization and GGUF explained.

What 8x7B and "active parameters" mean

Mixture-of-experts (MoE) models break the simple rule. In Mixtral 8x7B, the feed-forward block of each layer is split into 8 experts, and a router picks two of them for each token at every layer. Mistral states that "Mixtral has 46.7B total parameters but only uses 12.9B parameters per token". Two consequences:

  • Memory follows the total. All 46.7B parameters have to be loaded, so it needs memory like a 47B model, not a 7B or 13B one.
  • Speed follows the active count. Each token only passes through about 12.9B parameters, so generation runs at roughly the speed of a 13B dense model.

The total is not 8 × 7 = 56B because only the feed-forward block is split into experts; the attention layers and embeddings exist once.

Does a bigger number mean a better model?

Within one model family trained the same way, yes, usually: the 70B version beats the 7B version. Across families and generations, not reliably. Mistral's announcement claimed its 7.3B model "outperforms Llama 2 13B on all benchmarks". Training data, training length and fine-tuning matter as much as size.

A practical way to choose: pick the largest model whose quantized weights fit in your GPU memory (or RAM) with a couple of gigabytes to spare for context, then compare two or three candidates on your own tasks. To try models on your own machine, see running an LLM locally with Ollama.

Other numbers in model names

In the nameUsually means
7B, 13B, 70BParameter count in billions
8x7BMixture of experts: 8 experts per layer
Q4_K_M, Q8_0GGUF quantization type from the 4-bit or 8-bit family
Instruct, ChatFine-tuned to follow instructions (the base model just continues text)
32k, 128kContext window in tokens

Frequently asked questions

Is a 70B model ten times smarter than a 7B model?
No. More parameters generally mean more capacity, but quality depends just as much on training data, training length and fine-tuning. Mistral reported that its 7B model outperformed Llama 2 13B on all the benchmarks it tested, so a newer small model can beat an older larger one.
What does the B stand for in 7B, 13B and 70B?
Billion, meaning thousand million (10^9). 7B is about 7,000,000,000 parameters. You will also see M for million, as in a 125M model, and T for trillion.
Can I run a 7B model on my laptop?
Usually yes, with a quantized version. At 4 bits per weight, the weights of a 7B model take roughly 3.5 to 4 GB, which fits in many laptops' RAM or an 8 GB GPU with room for the context. At full 16-bit precision it needs about 14 to 15 GB.
What does 'A3B' mean in a name like Qwen3-30B-A3B?
It gives the active parameters of a mixture-of-experts model. Qwen's model card lists Qwen3-30B-A3B as 30.5B parameters in total with 3.3B activated per token (8 of its 128 experts). It needs memory for all 30.5B but computes each token with about 3.3B.

Sources