Topic 1 of 5 · 4 min read
Parameters and what model size means
Goal: Estimate the memory a model needs from its parameter count and precision and explain what size does and does not predict.
A model's size is the number of parameters it holds, and the parameter count times the bytes per parameter tells you roughly how much memory it needs just to load. Inference means running a model that is already trained. Nothing is learned during a chat. The model only reads its fixed numbers and produces the next token.
Check yourself · 1 of 3
A model card says "8B". What does that most likely mean?
Why it matters
Parameters are the numbers (also called weights) that training adjusted. A model card that says "8B" means about 8 billion of them. They all have to sit in fast memory, usually GPU memory, before the first word can be produced. So size decides what hardware you need, how fast the model runs and, for hosted models, much of what the provider charges.
How to estimate memory
- Find the parameter count. For example 8 billion.
- Find the precision. Each parameter is stored in some number of bytes. 16-bit storage uses 2 bytes. 8-bit uses 1 byte. 4-bit uses half a byte.
- Multiply. 8 billion times 2 bytes is about 16 GB for the weights alone. At 4-bit it is about 4 GB.
- Add headroom. The running conversation needs extra memory too (the next topics explain why), so plan for noticeably more than the weights.
You can do this on a napkin when you read about open-weight models such as Llama, Mistral, Qwen or Gemma. For closed models such as Claude, ChatGPT or Gemini, the provider usually does not publish the size, so you cannot do the sum.
What size does and does not predict
Bigger models tend to know more and follow harder instructions better. But size is a weak guide on its own. A newer small model can beat an older large one, because training data, training method and tuning matter as much. Two models with the same parameter count can differ a lot in quality, speed and price. Treat size as a hint about cost and hardware, not as a score.
Before and after
Before: "A 70B model will just run on my 24 GB graphics card, since it is only a file."
After: "70 billion at 2 bytes is about 140 GB. Even at 4-bit it is about 35 GB, which is still more than 24 GB. I need a smaller model, a smaller precision, or more than one card."
What goes wrong
- Reading "more parameters" as "smarter" and paying for a larger model than the task needs.
- Forgetting the extra memory for the conversation, so a model that "fits" crashes on long inputs.
- Comparing models from different years by size alone.
Examples
Napkin math for three open-weight models
You want to run a model on one 24 GB graphics card.
- 7B at 16-bit: 7 billion x 2 bytes = about 14 GB. Fits, with room for a conversation.
- 13B at 16-bit: about 26 GB. Does not fit.
- 13B at 4-bit: about 6.5 GB. Fits easily.
The parameter count is the same story each time; the precision changes the answer.
Why a small model can win
A team compares a 70B model from an older generation with a newer 8B model on their own support tickets. The 8B model answers correctly more often and costs a fraction as much to run. Size told them about hardware. Only a test on their own tasks told them about quality.
Key points
- Inference runs a fixed, already trained model; nothing is learned while you chat.
- Parameters are the stored numbers a model uses, and a count such as 8B means about 8 billion of them.
- Weight memory is roughly parameters times bytes per parameter, so 8 billion at 2 bytes is about 16 GB.
- The running conversation needs memory on top of the weights, so a model that barely fits will fail on long inputs.
- Size hints at cost and hardware needs but is a poor measure of quality on its own.
Common mistakes
- Treating parameter count as a quality score.
- Counting only the weights and forgetting memory for the conversation.
- Assuming a closed model's size is known or the same as a similar-sounding open one.
- Mixing up the file size on disk with the memory needed at run time.
Check yourself · 2 of 3
A model has 10 billion parameters stored at 2 bytes each. About how much memory do the weights alone need?
Check yourself · 3 of 3
Which statement about model size is the most accurate?
Practice items, not counted towards your mastery.
Start here
- Optimizing LLMs for speed and memory (Hugging Face Transformers docs) (opens in a new tab)DocsFree
Covers the KV cache, quantization and faster decoding with runnable settings and plain explanations.
- Mixture of Experts Explained (Hugging Face) (opens in a new tab)ArticleFree
A clear walk through experts, routers, and why total size and active size differ.
- Prompt caching (Claude docs) (opens in a new tab)DocsFree
A vendor's own rules for cacheable prefixes, what breaks a cache hit, and how cached reads are billed.
More for this topic
- Quantization overview (Hugging Face Transformers docs) (opens in a new tab)DocsFree
Compares common quantization methods and the memory and quality trade-offs of each.