LogoAI Jet

Local LLM VRAM Calculator

Estimate GPU VRAM for DeepSeek, Llama, and Qwen. Calculate model weights and KV cache for FP16, Q8, or Q4, then check RTX 4090, RTX 5090, and Mac memory fit.

Model and inference settings

70B total parameters · Model card

KV cache settings

Llama 3.3 70B Instruct

Estimated memory for inference

47.2 GiB

Model weights
39.5 GiB
KV cache
2.5 GiB
Runtime allowance
5.2 GiB

Memory fit by device

Mac unified memory budget with system reserve: 60 GiB or more.

RTX 4090 (24 GB)
2 cards minimum
RTX 5090 (32 GB)
2 cards minimum
MacBook Pro M3 family
64 GB unified
MacBook Pro M4 family
64 GB unified
MacBook Pro M5 family
64 GB unified
Mac Studio M3 Ultra
96 GB unified
Mac Studio M5 Ultra
96 GB unified

How much VRAM does a 70B model need at 4-bit?

With Llama 3.3 70B Instruct at Q4_K_M and an 8,192-token context, this calculator estimates 39.5 GiB for weights, 2.5 GiB for one FP16 KV cache, and 47.2 GiB in total after runtime allowance. A single 24 GB RTX 4090 or 32 GB RTX 5090 falls below that full-GPU estimate.

The GPU counts show a minimum based on aggregate capacity. Multi-GPU runtimes must be able to shard the model and place the cache, and an uneven split or duplicated buffers can increase per-card requirements. Partial CPU offload reduces GPU memory at the cost of moving data or computing on the CPU.

Llama 3.3 model cardNVIDIA GPU specs

Can I run DeepSeek, Llama, or Qwen locally?

Choose the exact checkpoint. DeepSeek R1 Distill Qwen 7B and the full DeepSeek R1 671B have different architectures and memory needs. A mixture-of-experts model such as DeepSeek R1 or Qwen3 30B-A3B activates only a subset of its parameters per token. Keeping the entire model in accelerator memory still requires room for all weights.

Context length counts prompt and generated tokens kept in the cache. Parallel requests multiply cache memory. The calculator uses grouped-query attention dimensions for Llama and Qwen. For full DeepSeek R1, you can compare compressed MLA with an expanded cache layout.

DeepSeek R1 model cardQwen3 30B-A3B model card

What goes into the memory estimate?

  • Weights use total parameters multiplied by effective bits per weight and divided by eight. Q8_0 uses about 8.5 bits and Q4_K_M about 4.85. Mixed tensor quantization and metadata affect actual checkpoint size.
  • KV cache uses layers × stored elements per token per layer × bytes per element × context tokens × parallel sequences. Regular attention stores both keys and values. A compressed MLA implementation stores a latent vector plus rotary components.
  • Runtime allowance adds 1 GiB plus 10% of weights and cache. Frameworks can allocate additional buffers during prompt processing. Estimates use binary GiB and assume text inference.
  • Mac unified memory shares memory with macOS and other apps. Suggested Mac configurations keep at least 6 GiB or 20% free, whichever is larger. Runtime memory limits and bandwidth still affect fit and speed.

llama.cpp quantization referenceApple M3 specsApple M4 specsApple M5 specsMac Studio M3 Ultra specsMac Studio M5 Ultra specs