Guideschevron_rightServers

Servers · 6 min read · Updated

How Much VRAM Do You Need to Run an LLM?

A model needs about its parameter count times the bytes per parameter in GPU memory, plus about 20% for the context and the runtime. At 16-bit that is 2 GB per billion parameters, at 8-bit 1 GB, and at 4-bit about 0.6 GB: an 8B model needs roughly 20 GB at 16-bit or 6 GB at 4-bit, and a 70B model about 168 GB at 16-bit or 51 GB at 4-bit. Long contexts and many users at once need more on top.

GPU Memory by Model Size

Approximate GPU memory needed, including 20% for context and runtime
Model size16-bit (FP16 / BF16)8-bit4-bit
8Babout 20 GBabout 10 GBabout 6 GB
14Babout 34 GBabout 17 GBabout 11 GB
32Babout 77 GBabout 39 GBabout 24 GB
70Babout 168 GBabout 84 GBabout 51 GB

These are estimates for one user with a moderate context. Real builds vary: mixture-of-experts models need memory for all their parameters even though only some run for each word, and a vision model adds its image encoder.

What Uses the Memory

  • Weights: the model itself, fixed by its size and precision.
  • KV cache: the memory of the conversation so far. It grows with context length and with every user served at once, and for long contexts it can rival the weights.
  • Runtime: CUDA, the inference engine and its working buffers, typically one to a few GB.

vLLM reserves most of the GPU's memory at start-up and uses what the weights leave for the KV cache, so more spare memory means more users at once rather than an error.

Common GPUs and Their Memory

Memory of widely used NVIDIA GPUs
GPUMemoryAt 4-bit, fits about
RTX 409024 GB32B
RTX 509032 GB32B with room for context
L40S / RTX 6000 Ada48 GB32B with a long context
A100 80 GB / H10080 GB70B with room for context

No GPU? Models also run on the processor from system memory, more slowly: see running an LLM on a CPU server. To set one up, start with the NVIDIA drivers and then serve it with vLLM or Ollama.

Common Questions

  • How do I estimate VRAM for a model?

    Multiply the parameters in billions by the bytes per parameter: 2 for 16-bit, 1 for 8-bit, about 0.6 for 4-bit. That gives the weights in GB. Add around 20% for the context (KV cache) and the runtime, more for long contexts or many users at once.

  • Can a model use two GPUs?

    Yes. vLLM splits a model across GPUs with tensor parallelism, and Ollama and llama.cpp can spread layers across cards. The total memory is what counts for fitting the model, though speed depends on how fast the cards talk to each other.

  • What if the model does not fit in VRAM?

    Ollama and llama.cpp keep the layers that do not fit in system memory and run them on the processor, which works but is much slower. Better options are a smaller or more heavily quantized model, or more GPU memory.

  • Does 4-bit quantization hurt quality?

    A little. Good 4-bit builds keep most of the model's quality at about a third of the 16-bit size, which is why they are the default in Ollama. 8-bit is very close to the original. For the best quality at a given VRAM, a larger model at 4-bit often beats a smaller one at 16-bit.

Plans and prices

Dedicated Servers

Dedicated servers with the memory to run large models on the processor.

See all plans
  • AMD Ryzen 9 5950X

    16 Cores · 128 GB RAM · 2x 1TB NVMe

    Ashburn, VA · Dallas, TX · 50 TB transfer · 10 GigE

    $399.00/mo

  • AMD Ryzen 9 9950X

    16 Cores · 192 GB RAM · 2x 2 TB NVMe

    Ashburn, VA · Dallas, TX · 50 TB transfer · 10 GigE

    $669.00/mo

  • AMD EPYC 4585PX

    16 Cores · 128 GB RAM · 2x 6.4TB NVMe Gen4

    Dallas, TX · 200 TB transfer · 50 Gbps

    $849.00/mo

  • AMD EPYC 7443P

    24 Cores · 512 GB RAM · 2x 2TB NVMe

    Dallas, TX · Ashburn, VA · 50 TB transfer · 10 GigE

    $969.00/mo

Keep Reading

All guides