Free tools / LLM memory calculator

LLM VRAM and RAM calculator

Find out how much memory a local LLM needs before you rent a server for it. Choose a model such as Llama 3.1 8B, Qwen 2.5 14B or DeepSeek R1 70B, the quantization and the context length. The calculator shows the VRAM to fit it on a GPU, the RAM to run it on a CPU server, the cheapest servers from our catalog that hold it and the speed to expect, measured on our own servers where we have the numbers.

Everything runs in your browser. Nothing you type is sent to a server or stored.

Model

Memory needed

On a GPU (VRAM)
6.4 GB
On a CPU server (RAM)
6.9 GB

Weights 4.9 GB, context cache 0.5 GB at 4K tokens, plus about 1 GB for the GPU runtime or 1.5 GB for the system on a CPU server.

Run it with Ollama
ollama run llama3.1:8b

GPU servers it fits on

GPUVRAMTokens/sPrice
A16Vultr16 GBabout 35$0.658/hr
RTX 4000 AdaLinode20 GBabout 65measured$0.726/hr
L4OVHcloud24 GBabout 51measured$1.16/hr
A10OVHcloud24 GBabout 85$1.17/hr

The cheapest city for each card, billed by the hour. Speed is generation with Ollama: measured where marked, otherwise estimated from the card's memory bandwidth and our measurements on RTX 4000 Ada and L4.

See all GPU servers

CPU servers (no GPU)

ServerRAMTokens/sPrice
4 shared vCPUHetzner8 GBabout 3.5$18/mo$0.025/hr
2 dedicated vCPUOVHcloud16 GBabout 4$83/mo$0.114/hr

A person reads 5 to 10 tokens per second. On CPU, models up to about 8B are usable for chat, larger ones suit batch jobs. Estimates from our CPU benchmark on 4 vCPU servers.

Memory for popular models at a glance

VRAM to fit the whole model on a GPU and RAM to run it on a CPU server, at Ollama's default 4K context. Q4_K_M is the default download; Q8_0 is close to the original quality at about twice the size.

ModelQ4_K_M VRAMQ4_K_M RAMQ8_0 VRAMQ8_0 RAM
Llama 3.2 3Bllama3.2:3b3.4 GB3.9 GB4.9 GB5.4 GB
Qwen 2.5 7Bqwen2.5:7b5.9 GB6.4 GB9.3 GB9.8 GB
DeepSeek R1 7Bdeepseek-r1:7b5.9 GB6.4 GB9.3 GB9.8 GB
Llama 3.1 8Bllama3.1:8b6.4 GB6.9 GB10 GB11 GB
Qwen 2.5 14Bqwen2.5:14b11 GB11 GB17 GB18 GB
DeepSeek R1 14Bdeepseek-r1:14b11 GB11 GB17 GB18 GB
Phi-4 14Bphi4:14b11 GB11 GB17 GB18 GB
Qwen 2.5 32Bqwen2.5:32b22 GB22 GB37 GB37 GB
DeepSeek R1 32Bdeepseek-r1:32b22 GB22 GB37 GB37 GB
Llama 3.3 70Bllama3.3:70b45 GB46 GB77 GB78 GB
DeepSeek R1 70Bdeepseek-r1:70b45 GB46 GB77 GB78 GB

Measured generation speeds for these models on cloud GPUs are on the LLM speed benchmark page.

How to use

  1. Pick the model. For one that is not in the list, choose Other model and enter its size in billions of parameters.
  2. Keep Q4_K_M unless you need higher quality. It is what ollama pull downloads by default and needs about a third of the memory of FP16.
  3. Set the context length to the longest prompt plus answer you expect. Ollama uses 4K tokens unless you raise num_ctx, and a long context can need more memory than the model itself.
  4. Read the VRAM figure for a GPU server and the RAM figure for a CPU server. Leave about 10% spare, since other programs and longer chats use some too.
  5. Compare the servers that fit by price and speed, deploy one, and run the Ollama command shown under the memory figures.

Frequently asked questions

How much VRAM do I need for a 70B model?

About 45 GB for Llama 3.3 70B or DeepSeek R1 70B in Q4_K_M at a 4K context: roughly 43 GB of weights plus the context cache and the GPU runtime. One 48 GB card such as an L40S or an A40 holds it. A 24 GB card does not, and Ollama then moves part of the model to system RAM, which makes it several times slower.

Can I run a local LLM without a GPU?

Yes, if the server has enough RAM. 7B and 8B models in Q4_K_M need about 7 GB, which an 8 GB server covers, and run at about 4 tokens per second on 4 shared vCPUs and about 8 on 4 dedicated ones in our benchmark. That is close to reading speed. Models from 14B up are better suited to batch jobs on CPU.

Why does the context length change the memory?

The model keeps a cache of every token in the conversation, and it grows with the context. For Llama 3.1 8B it is about 0.5 GB at 4K tokens and about 17 GB at the full 128K, more than three times the weights. Raise num_ctx only as far as you need.

How accurate are the numbers?

Memory is calculated from the model size, the bits per weight of each quantization and the cache size from the model's architecture, and matches Ollama's download sizes within a few percent. Speeds marked measured come from our own runs; the rest are estimates from memory bandwidth, so treat them as a guide.

Further reading

More free tools

Ready to run the model? GPU servers billed by the hour