LLM memory planning

LLM VRAM Requirements: How Much GPU Memory Do You Need?

LLM VRAM requirements come from three separate allocations: model weights, the KV cache for active context, and runtime headroom. Estimate all three before choosing a GPU for local or cloud inference. This guide focuses on capacity sizing; the budget GPU comparison helps with buying or renting, while the cost-per-token guide covers serving economics.

Published December 2, 2026 · Examples are transparent estimates, not hardware benchmarks.

Illustrative GPU memory layers around an accelerator, representing model weights, active context, and runtime reserve.
An illustrative view of the memory categories that share a GPU during LLM inference.

Short answer

LLM VRAM requirements: start with weights, cache, and headroom

Estimated VRAM = model weights + KV cache + runtime and safety margin. A quick weight-only floor is parameter count multiplied by bytes per weight: about 2 GB per billion parameters at 16-bit, 1 GB at 8-bit, or 0.5 GB at 4-bit. Those are decimal approximations, and the 4-bit figure excludes quantization metadata. The full LLM VRAM requirements depend on the model architecture, context, concurrency, cache precision, and serving runtime.

For example, 7 billion parameters at 4-bit need about 3.5 GB for nominal weights alone. Add memory for the prompt and generated tokens, temporary allocations, and a reserve before comparing that estimate with usable GPU capacity.

The static part of the budget

LLM VRAM requirements start with model weights and precision

Begin with the parameter count shown for the checkpoint and the precision used at inference. For a simple lower-bound estimate, multiply the number of parameters by the bytes used to store each weight. One billion parameters at two bytes each is approximately two billion bytes, or 2 GB using decimal units.

Weight-only estimate parameter count × bits per weight ÷ 8
Model sizeFP16 / BF168-bitNominal 4-bitWhat the row means
7B~14 GB~7 GB~3.5 GBWeights only
13B~26 GB~13 GB~6.5 GBWeights only
70B~140 GB~70 GB~35 GBWeights only

These are weight-only floors, not complete deployment recommendations. Quantization scales, metadata, embeddings, higher-precision layers, or loader conversions can raise memory use. Confirm the exact format and runtime instead of assuming every “4-bit” checkpoint uses precisely half a byte per parameter.

File size is only a clue: the runtime still needs cache and workspace memory, and may allocate a temporary copy during loading. An LLM’s GPU VRAM requirements therefore extend beyond its quantized file. Keep model revision and precision fixed when comparing estimates.

The part that grows during a session

How context length and concurrency change LLM VRAM requirements

During autoregressive inference, a transformer retains key and value states for tokens it may attend to later. This KV cache is separate from the model weights. Longer prompt-plus-generation sequences retain more states; serving several active sequences retains cache for each one. A model that fits for one short prompt may run out of memory when the context window or number of simultaneous requests increases.

Illustrative request streams entering a GPU as layered KV cache memory grows with context and concurrent active sequences.
The KV cache grows with live token history and active sequences; this visual is illustrative and contains no measured values.
Approximate KV-cache bytes 2 × layers × KV heads × head dimension × active tokens × concurrent sequences × bytes per cache value

The leading 2 counts keys and values. Use the model’s KV-head count; grouped-query attention can have fewer KV heads than attention heads. Active tokens are roughly prompt plus generated tokens retained by the runtime. For an LLM, cache requirements are part of VRAM requirements and scale with active sequences. Sliding windows, prefix sharing, paged caches, and quantized caches can change actual allocations.

For a stated example, 32 layers × 8 KV heads × 128 values per head × 4,096 tokens × one sequence × two bytes per value is about 0.54 decimal GB. Doubling tokens or serving four independent sequences roughly doubles or quadruples that cache. This is not a claim about every 7B or 13B model.

For architecture-specific estimates, read the model configuration and cache precision used by the serving engine. Hugging Face’s KV-cache documentation describes cache strategies and their memory trade-offs.

Turn the formula into a shortlist

LLM VRAM requirements for 7B, 13B, and 70B models

These examples use 4-bit weights and one 4,096-token sequence. Illustrative GQA cache assumptions are 32, 40, and 80 layers for 7B, 13B, and 70B; each uses 8 KV heads, 128 values per head, and 16-bit cache. The resulting cache estimates are about 0.54, 0.67, and 1.34 decimal GB. Model configurations differ.

Parameter count4-bit weight floorIllustrative KV cacheInitial capacity shortlist
7B~3.5 GB~0.54 GB8 GB may work for a short single sequence; 12 GB adds room
13B~6.5 GB~0.67 GB12–16 GB gives a more useful margin
70B~35 GB~1.34 GB48 GB can be tight; 80 GB leaves more space

The shortlist is not a compatibility promise. These LLM VRAM requirements are rounded planning ranges, not model-fit guarantees. It leaves approximate room for metadata, kernels, temporary tensors, fragmentation, and other processes. Longer context or more concurrent requests may require the next tier; reserve capacity for the desktop if the GPU drives a display.

Precision matters: nominal 70B weights rise from about 35 GB at 4-bit to 70 GB at 8-bit and 140 GB at 16-bit, before cache or runtime. Quantization can reduce the capacity floor while changing quality, throughput, and kernel support, so test a representative prompt.

GPU capacity is commonly marketed in decimal gigabytes while system tools may report GiB. Compare byte counts or convert units consistently; a nominal 16 GB card does not expose every byte to one process.

Capacity is a constraint, not a speed score

Choose a GPU that meets LLM VRAM requirements

Compare the estimate with memory available to the process. Reserve space for workspaces, fragmentation, the desktop, and other jobs. If the fit is close, choose a higher tier or reduce context or concurrency and test again.

Multiple GPUs can hold model shards, but their memory is not always one seamless pool. An LLM shard can have its own VRAM requirements; total card capacity alone does not show fit. The runtime must support the split; buffers, communication, and synchronization affect capacity and speed. Benchmark the actual device configuration.

CPU offload can place layers or cache in system RAM, but transfers may reduce tokens per second. Treat it as a trade-off to measure, not as equivalent VRAM.

Once a capacity tier is plausible, compare actual hardware and rental options in the GPU price directory, the cloud GPU pricing comparison, or the GPU rental cost calculator. Capacity tells you what may fit; a workload benchmark and price comparison tell you whether it is a good choice.

Two different memory budgets

LLM VRAM requirements versus system RAM

VRAM holds the weights, cache, and working data used by GPU kernels; system RAM holds the operating system, application state, and host data. Abundant RAM does not prevent an out-of-memory error when GPU-resident allocations exceed available VRAM.

Offload and unified-memory behavior depends on hardware, drivers, and runtime; transfers can shift the bottleneck to PCIe or CPU memory. Test the intended prompt, output, concurrency, and latency, and report GPU and system memory separately.

A different memory equation

Why fine-tuning has different LLM VRAM requirements

This page sizes inference. Training adds gradients, optimizer states, saved activations, and sometimes master weights, so full fine-tuning can require much more memory for the same parameter count.

LoRA and QLoRA reduce trainable state, but activations and runtime buffers remain. Gradients, optimizer state, batch size, sequence length, checkpointing, and quantization shape training memory; see the separate fine-tuning GPU guidance and GPU use-case guide instead of applying this inference table.

Common questions

LLM VRAM requirements FAQ

How much VRAM does a 7B LLM need?

A 7B model in 4-bit has a rough 3.5 GB weight floor, then needs KV cache and runtime memory. For a 7B LLM, practical VRAM requirements include both. An 8 GB GPU may fit a short single sequence; 12 GB gives more room.

Can a 4 GB GPU run a 7B model?

Some offloaded setups may load, but 4 GB is below the usual 3.5 GB 4-bit weight floor once cache and runtime allocations are included. It is not a dependable fully GPU-resident target.

How much VRAM does a 70B model need?

At 4-bit, 70B parameters have a nominal 35 GB weight floor before cache and runtime memory. Full LLM VRAM requirements also depend on the checkpoint and runtime. A 48 GB GPU can be tight; 8-bit and FP16 weights alone are roughly 70 GB and 140 GB.

Does context length increase LLM VRAM requirements?

Yes. KV-cache memory grows approximately with retained tokens and concurrent active sequences for a fixed model and cache precision. Architecture and serving-engine features can change the result.

Is the model download size the same as VRAM use?

No. A checkpoint is only a clue about weight memory; cache, metadata, workspaces, and fragmentation add to runtime use. File fit does not prove the target context will fit.

Method, limitations, and sources

Examples use parameter arithmetic and stated cache assumptions, not benchmarks. GPU Cost did not test these model/runtime combinations; estimates do not guarantee a successful load or target token rate.

GPU Cost publishes GPU pricing and workload cost comparisons. Those pages help compare hardware after sizing; they are not compatibility certifications or endorsements.

Check model configuration and available device memory after changing context, concurrency, precision, or serving engine.