MemoryCapacity

What a 70B model really costs in VRAM

Discover how to calculate GPU memory usage for LLM inference, including weight footprints, quantization formats, and Key-Value cache sizing.

, AI Researcher9 min read
In this article8
  1. The components of GPU memory in LLM inference
  2. Model weights and quantization formats
  3. The KV cache: scaling with context and batch size
  4. Measured memory requirements for 7B to 70B models
  5. JEDEC memory standards and HBM bandwidth
  6. Matching inference footprints to GPU VM capacity
  7. Frequently asked questions
  8. Sources
The bare PCB of an NVIDIA GTX 1080 Ti with the GPU die surrounded by memory chips
The reference PCB of an NVIDIA GTX 1080 Ti, the GPU ringed by its memory chips. Weights, KV cache and activations all have to fit in that ring. Photo: Phiarc, CC BY-SA 4.0, via Wikimedia Commons

The components of GPU memory in LLM inference

Serving large language models (LLMs) requires provisioning GPU memory across distinct static and dynamic allocations. While model weights represent a fixed baseline determined at initialization, actual memory consumption during text generation expands significantly during runtime. Estimating total video random-access memory (VRAM) solely from model parameter counts leads to out-of-memory errors in production environments, as runtime buffers and dynamic context states scale with user traffic.

Total GPU memory consumption during inference is divided into three primary categories: static model weights, dynamic Key-Value (KV) cache allocations, and transient activation memory alongside framework workspace overhead. Understanding how each component behaves under varying operational parameters is necessary for accurate capacity planning.

  • Model weights: The static parameter tensor footprint loaded into VRAM at startup. This value remains constant throughout execution regardless of sequence length or batch size.
  • Key-Value (KV) cache: Dynamic memory used to store attention keys and values generated during previous decoding steps, preventing redundant computation. This allocation grows linearly with sequence length and concurrency.
  • Activation memory: Intermediate tensor states created during the forward pass, including attention score matrices and layer normalization buffers, which fluctuate based on batch size and input length.
  • Framework and runtime overhead: Fixed memory reservations by CUDA contexts, memory pool allocators, and serving engine kernels (such as vLLM or TensorRT-LLM) to prevent memory fragmentation.

Because dynamic allocations expand with concurrent user requests and expanding context windows, total production VRAM footprints regularly exceed the raw weight footprint, and at production batch sizes the KV cache can consume more memory than the weights themselves.

Model weights and quantization formats

Static weight memory defines the minimum hardware baseline required to load a model. The memory floor is calculated as the total parameter count multiplied by the bit precision of the stored weights. In full-precision 32-bit floating point (FP32), each parameter occupies 4 bytes. Modern production inference predominantly uses 16-bit half precision (FP16 or BF16) at 2 bytes per parameter as the standard baseline.

Quantization compresses model weights into lower-precision numerical representations, directly reducing the static memory footprint. INT8 and FP8 formats allocate 1 byte per parameter, cutting the weight floor roughly in half relative to FP16[1]. INT4 and 4-bit NormalFloat (NF4) representations require half a byte per parameter, roughly a four-fold reduction against FP16 storage[1].

Model Parameter CountFP16 Baseline (2 bytes/param)INT8 / FP8 (1 byte/param)INT4 (0.5 bytes/param)
7B parameters14.0 GB7.0 GB3.5 GB
14B parameters28.0 GB14.0 GB7.0 GB
32B parameters64.0 GB32.0 GB16.0 GB
70B parameters140.0 GB70.0 GB35.0 GB

As quantified in the comparison above, a 70B parameter model requires 140.0 GB of VRAM strictly for weights in FP16 precision, making it impossible to load onto a single 80 GB GPU. Applying INT4 quantization compresses those same weights down to 35.0 GB, allowing the static model parameters to fit within a single accelerator while preserving remaining memory for runtime allocations.

The KV cache: scaling with context and batch size

In autoregressive transformer generation, producing each new token requires attention computations across all preceding tokens in the sequence. To avoid recomputing attention keys and values for past tokens at every step, inference engines store these intermediate tensors in a dedicated Key-Value (KV) cache. Unlike static weights, the KV cache grows dynamically with every generated token.

The size of the KV cache is dictated by model architecture and execution parameters: total transformer layers, hidden dimension size, number of key-value attention heads, numerical precision, context sequence length, and concurrent batch size. The adoption of Grouped-Query Attention (GQA) and Multi-Query Attention (MQA) in modern architectures like Llama 3 reduces KV head counts relative to query heads, substantially lowering cache overhead compared to standard Multi-Head Attention (MHA).

  1. Sequence length scaling: Cache memory scales linearly with the number of tokens processed. A doubling of context length doubles the required KV cache storage per active stream.
  2. Batch concurrency scaling: Serving multiple simultaneous user requests multiplies the cache allocation linearly by the batch size.
  3. Precision impact: Quantizing KV cache tensors from FP16 (2 bytes) to FP8 (1 byte) halves the per-token memory footprint, expanding concurrency capacity on constrained hardware.

Under long-context workloads, caching requirements can quickly surpass the memory consumed by static model weights. Research on transformer serving limits demonstrates that serving large models across long context windows (such as 64K to 128K tokens) swells runtime memory to hundreds of gigabytes across concurrent streams[2]. When total VRAM capacity is exhausted, serving engines are forced to trigger request preemption or early cache eviction, causing severe latency degradation.

Measured memory requirements for 7B to 70B models

Production capacity planning requires sizing total VRAM, which combines static model weights, dynamic KV caches, activation buffers, and runtime framework overhead. Serving systems like vLLM reserve a fixed share of VRAM at startup for the model and its KV cache, defaulting to about 90% of the card and holding the remainder back for CUDA graphs and runtime overhead[3].

Empirical measurements show that operating a 7B parameter dense model at FP16 precision requires approximately 18 to 20 GB of total VRAM once the KV cache, activations and framework overhead are counted, while a 70B parameter model at FP16 demands roughly 168 to 172 GB to maintain functional serving headroom. At INT8 precision, total memory requirements for 70B serving settle around 84 to 86 GB, whereas INT4 quantization reduces total requirements to about 46 to 47 GB at short context lengths, rising again as context and concurrency grow.

Model ClassPrecisionStatic Weight FloorStandard Production Sizing (4K Context)Extended Context Sizing (32K+ Context)
7B DenseFP1614.0 GB18 to 20 GB24 to 32 GB
7B DenseINT43.5 GB6 to 8 GB12 to 16 GB
32B DenseFP1664.0 GB76 to 82 GB96 to 120 GB
32B DenseINT416.0 GB22 to 26 GB36 to 48 GB
70B DenseFP16140.0 GB168 to 172 GB220 to 280 GB
70B DenseINT435.0 GB48 to 56 GB80 to 110 GB

These empirical thresholds establish non-negotiable boundaries for accelerator deployment. While a quantized 7B model can operate comfortably within entry-level 16 GB or 24 GB hardware, unquantized 70B models require multi-GPU node configurations with aggregate memory exceeding 180 GB to avoid out-of-memory crashes during traffic surges.

JEDEC memory standards and HBM bandwidth

LLM inference during the decoding phase is fundamentally bounded by memory bandwidth rather than raw arithmetic compute. Because autoregressive decoding loads model parameters and the KV cache from memory to registers for every individual token generated, execution speed is dictated by the rate at which data traverses the memory bus. This dynamic, known as the memory wall, places memory architecture at the center of AI infrastructure design.

To resolve these bandwidth limitations, industry hardware standards governed by JEDEC focus on High Bandwidth Memory ( high-bandwidth memory) specifications[4]. The progression from HBM3 to HBM3e expanded per-stack bandwidth from approximately 819 GB/s to 1.2 TB/s. JEDEC standard specifications, including JESD330-4 for Standard Package High Bandwidth Memory (SPHBM4), establish architecture rules that allow high-density memory dies to interface efficiently across high-throughput data buses[4].

  • HBM3 standard: Provides up to 819 GB/s per stack, delivering up to 3.35 TB/s aggregate bandwidth across 80 GB configurations.
  • HBM3e standard: Extends pin speeds to deliver up to 4.8 TB/s of aggregate memory bandwidth on high-capacity accelerator architectures.
  • SPHBM4 standard (JESD330-4): Where the HBM4 interface has 2,048 data signals, SPHBM4 defines 512 data signals with 4:1 serialization to achieve the same bandwidth, allowing the relaxed bump pitch required for connection to organic rather than silicon substrates[4].

Without high memory bandwidth, large-batch inference encounters a throughput plateau where compute cores remain idle waiting for weight and cache memory retrieval. Higher bandwidth memory architectures are necessary to sustain user token generation rates as concurrent context loads scale.

Matching inference footprints to GPU VM capacity

Hardware selection for LLM serving is governed primarily by aggregate VRAM capacity and memory bandwidth rather than theoretical FLOPS. Selecting an infrastructure configuration requires aligning the total measured footprint of the target model with physical GPU memory limits.

Accelerators vary widely in their memory capacity: standard NVIDIA H100 configurations provide 80 GB of HBM3 memory, while the NVIDIA H200 provides 141 GB of HBM3e memory, and next-generation B200 accelerators expand capacity further. When a single accelerator lacks sufficient VRAM to hold the combined weight and KV cache footprint, workloads must be partitioned across multiple GPUs using tensor parallelism.

GPU ModelVRAM CapacityMemory TypeSupported Single-Card WorkloadsMulti-GPU Sizing Requirement
NVIDIA H10080 GBHBM37B to 32B FP16, 70B INT4Tensor parallelism across two or more cards for 70B FP16
NVIDIA H200141 GBHBM3e7B to 70B INT8, 70B INT4 (large context)A pair of cards for 70B FP16 with 64K+ context
NVIDIA B200192 GBHBM3e70B FP16 baseline servingScale-out across a node for 405B models or high concurrency

When serving unquantized 70B models or extended context windows where memory requirements exceed 141 GB, infrastructure architectures rely on high-speed NVLink interconnects to distribute tensor operations across cards with minimal synchronization delay. Sizing hardware directly against production memory footprints ensures stable latency without paying for unutilized compute capacity.

Frequently asked questions

What is the primary consumer of GPU memory during LLM inference?

Model weights create the largest static footprint, but the Key-Value (KV) cache is the largest dynamic consumer. The KV cache grows linearly with context length and batch size, requiring significant VRAM headroom beyond the base weights.

How much VRAM does a 70B parameter model require?

At FP16 precision, a 70B model requires roughly 140 GB of VRAM just for its weights, and 168 to 172 GB in total when accounting for the KV cache and framework overhead. Quantizing to INT4 can reduce the weight footprint to approximately 35 GB.

How does quantization affect GPU memory usage?

Quantization reduces the bit precision of model weights, drastically lowering VRAM requirements. Moving from 16-bit float (FP16) to 4-bit integer (INT4) cuts the weight memory footprint by 75 percent, allowing larger models to fit on fewer GPUs.

Why does the KV cache cause out-of-memory errors?

The KV cache stores intermediate key and value vectors to avoid recomputing past tokens. Because it scales linearly with sequence length and batch size, processing long prompts or serving multiple concurrent users can rapidly exhaust available VRAM.

What role does JEDEC play in AI inference hardware?

JEDEC develops open global standards for microelectronics, including High Bandwidth Memory (HBM). These standards define the memory architectures that GPUs rely on to achieve the massive bandwidth required for efficient AI inference.

How much VRAM does the NVIDIA H200 have?

The NVIDIA H200 GPU offers 141 GB of HBM3e memory with 4.8 TB/s of bandwidth. This increased capacity allows it to host larger models and accommodate longer context windows compared to older 80 GB hardware limits.

Sources

  1. sitepoint.com
  2. arxiv.org
  3. developers.redhat.com
  4. jedec.org

Rankings and scores on Optinest cannot be bought — no commercial relationship changes how a provider is assessed. How we score

Related reading

All Memory →

The memory wall now sizes the hardware

Calculate the computational power limits of LLM inference. Discover why the memory wall dictates hardware sizing and how to bypass DRAM bandwidth limits.

Close-up of an SK Hynix DDR3 memory module showing its individual DRAM chips