The Decoder / One term

How much RAM do I need to run an AI model?

A local AI model needs a little more memory than its file size: 8 GB of RAM runs the 3 to 4 billion parameter models, 16 GB runs the 7 to 8 billion ones comfortably, and 32 GB opens the 13 to 30 billion range.

By Mstimaj Numbers checked 30 September 2026 Updated 30 September 2026 Level Technical Tool Ollama

Sign in to save your place and mark this done. Free, no card.

Two memory sticks lying on a dark desk beside a glowing cube that is slightly larger than one of them

The model file is loaded whole into memory, plus a margin for the conversation. So the rule is the file size plus about a third. A 2 gigabyte model runs on almost anything. A 5 gigabyte model wants 8 gigabytes free, which on a 16 gigabyte machine leaves room for a browser. Ollama's original guidance says the same in round numbers: 8, 16 and 32 gigabytes for 7, 13 and 33 billion parameters.

Key facts

  • +30%rough headroom to add to a model's file size for the working memory it needs
  • 16 GBthe memory LM Studio recommends, and the sweet spot for 7 to 8 billion parameter models
  • 4 GBdedicated graphics memory LM Studio suggests if you use a card; the model then loads there instead
  • 4.9 GBdownload size of Llama 3.1 8B, the most common first model
  • Ollama library tag pages for file sizes; Ollama's original README guidance; LM Studio system requirements; headroom rule from the file size versus loaded memory of the models in the table; checked 30 September 2026

Why does the file size decide it?

A model is a very large table of numbers, the parameters. To answer you, every one of those numbers has to be in memory at once, because each new word passes through all of them. The download is that table, compressed to fewer bits per number so it fits on ordinary machines. Compression is why an 8 billion parameter model can be a 5 gigabyte file rather than 16. Load it and it takes about its file size, then the conversation you are having needs its own space on top, which grows with the length of the chat.

Model size, file size and the memory to run it
Parameters Typical download Memory to run it well Examples
3 to 4 billion 2 to 3.3 GB 8 GB Llama 3.2 3B, Gemma 3 4B
7 to 8 billion 4.4 to 5.2 GB 16 GB Llama 3.1 8B, Qwen 3 8B, Mistral 7B, DeepSeek R1 8B
12 to 14 billion 8 to 9 GB 16 GB with nothing else open, 32 GB comfortable Gemma 3 12B, Phi-4 14B
30 to 33 billion 18 to 20 GB 32 GB Larger Qwen and Gemma variants
70 billion 40 GB and up 64 GB or a large graphics card Llama 3.3 70B
Memory needed by model size MEMORY NEEDED BY MODEL SIZE 3 to 4B 8 GB 7 to 8B 16 GB 13B 16 GB 33B 32 GB 70B 64 GB
Ollama's own round numbers for 7B, 13B and 33B, plus the two ends of the range. Add the memory your other programs use.

What do the letters after the model name mean?

The number with a B is the parameter count in billions, which is the honest measure of size: 3B, 8B, 12B, 70B. The Q with a number, when you see one, is the compression level; Q4 means the numbers were squeezed to about four bits each, which is the default most libraries ship and the point where quality holds up. A lower Q is a smaller file and a slightly worse model. If the download is close to your memory, look for a lower Q version before you give up on the model.

Does a graphics card change the RAM I need?

It moves the requirement rather than removing it. When a card is used, the model loads into the card’s own memory, which is separate from your main RAM and usually smaller: 8 gigabytes on a common card, 12 or 16 on a good one, 24 on the expensive ones. A 5 gigabyte model fits an 8 gigabyte card and runs several times faster than on the processor. A 9 gigabyte model does not fit that card and spills back to the main memory, where the speed advantage mostly disappears. Match the model to the card’s memory first, then to the machine’s.

What happens if I do not have enough?

One of three things. The program refuses to load the model and tells you so, which is the kind outcome. Or it loads and runs painfully slowly, because the operating system is shuffling parts of the model to disk and back. Or it loads, runs, and crashes the moment the conversation grows. None of them damage anything. Close other programs and try again, or step down one model size. The 3 to 4 billion parameter models are better than their size suggests for everyday questions.

Ask what did not make sense

Comments go through our own form and are read before they appear. Links are not allowed; describe it in words.

Comments are read before they appear.

The newsletter

Get the next term.

One email when something goes up. The argument, the film and the term, nothing else. One click to leave.

Have a question now? Ask Mstimaj, she knows the archive.