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.
ollama run llama3.1:8bGPU servers it fits on
| GPU | VRAM | Tokens/s | Price |
|---|---|---|---|
| A16Vultr | 16 GB | about 35 | $0.658/hr |
| RTX 4000 AdaLinode | 20 GB | about 65measured | $0.726/hr |
| L4OVHcloud | 24 GB | about 51measured | $1.16/hr |
| A10OVHcloud | 24 GB | about 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 serversCPU servers (no GPU)
| Server | RAM | Tokens/s | Price |
|---|---|---|---|
| 4 shared vCPUHetzner | 8 GB | about 3.5 | $18/mo$0.025/hr |
| 2 dedicated vCPUOVHcloud | 16 GB | about 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.
| Model | Q4_K_M VRAM | Q4_K_M RAM | Q8_0 VRAM | Q8_0 RAM |
|---|---|---|---|---|
| Llama 3.2 3Bllama3.2:3b | 3.4 GB | 3.9 GB | 4.9 GB | 5.4 GB |
| Qwen 2.5 7Bqwen2.5:7b | 5.9 GB | 6.4 GB | 9.3 GB | 9.8 GB |
| DeepSeek R1 7Bdeepseek-r1:7b | 5.9 GB | 6.4 GB | 9.3 GB | 9.8 GB |
| Llama 3.1 8Bllama3.1:8b | 6.4 GB | 6.9 GB | 10 GB | 11 GB |
| Qwen 2.5 14Bqwen2.5:14b | 11 GB | 11 GB | 17 GB | 18 GB |
| DeepSeek R1 14Bdeepseek-r1:14b | 11 GB | 11 GB | 17 GB | 18 GB |
| Phi-4 14Bphi4:14b | 11 GB | 11 GB | 17 GB | 18 GB |
| Qwen 2.5 32Bqwen2.5:32b | 22 GB | 22 GB | 37 GB | 37 GB |
| DeepSeek R1 32Bdeepseek-r1:32b | 22 GB | 22 GB | 37 GB | 37 GB |
| Llama 3.3 70Bllama3.3:70b | 45 GB | 46 GB | 77 GB | 78 GB |
| DeepSeek R1 70Bdeepseek-r1:70b | 45 GB | 46 GB | 77 GB | 78 GB |
Measured generation speeds for these models on cloud GPUs are on the LLM speed benchmark page.
How to use
- Pick the model. For one that is not in the list, choose Other model and enter its size in billions of parameters.
- 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.
- 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.
- 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.
- 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
- SSH hardening config generatorKey-only login, root off, AllowUsers, timeouts and modern ciphers as a drop-in or a full sshd_config.
- UFW firewall rules generatorOrdered ufw commands from presets or custom ports, with SSH allowed before the firewall turns on.
- Cloud-init user-data generatorA #cloud-config file for first boot: sudo user, SSH key, updates, ufw, fail2ban, auto updates and swap.
- WireGuard config generatorA server wg0.conf and up to 10 client configs with browser-generated keys, NAT rules and setup commands.
- Nginx reverse proxy config generatorAn nginx server block for a local app with Let's Encrypt HTTPS, WebSocket, redirects, gzip and rate limiting.
- Systemd service file generatorA .service unit for your app with user, environment, restart policy and optional hardening, plus the enable commands.
Ready to run the model? GPU servers billed by the hour