Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To choose GPU memory for LLM inference, budget for four things: model weights, the key-value (KV) cache, runtime allocations, and headroom. The right capacity depends on the exact model, its weight and cache precision, the maximum prompt-plus-output length, concurrent requests, and the inference engine—not just the model’s parameter count.

What determines how much GPU memory an LLM needs?

A useful estimate separates memory into weights, KV cache, runtime overhead, and headroom. The first two are workload-dependent; the latter two depend heavily on the inference software and configuration.

  • Weights: the model parameters loaded in the selected format, such as BF16 or a quantized representation.
  • KV cache: stored attention keys and values for tokens in active sequences. It grows with sequence length and concurrency.
  • Runtime allocations: memory for activations, CUDA context and graphs, communication buffers, adapters, and modality-specific state where applicable.
  • Headroom: space for allocation peaks and memory use that profiling or a simple estimate may not capture.

NVIDIA’s NIM memory troubleshooting guide describes a budget that accounts for weights, non-Torch overhead, peak activations, KV cache, and separate allocation headroom. A checkpoint loading successfully does not prove a serving workload will fit: TensorRT-LLM documents cases where engine building succeeds but runtime allocation of large I/O tensors, including KV cache, can fail.

How to estimate memory for your model and workload

1. Identify the exact model configuration

Record the parameter count, number of layers, hidden size or KV-head dimensions, and any multimodal or adapter components. Check the model card and configuration rather than relying on a model-family label. NVIDIA notes that parameter counts may also be available in safetensors index metadata.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.

2. Estimate weight memory at your chosen precision

For a first estimate, use:

weight memory per GPU ≈ total parameters × bytes per parameter ÷ tensor-parallel degree

NVIDIA’s rough values are about 2 bytes per parameter for BF16/FP16, 1 byte for FP8, and 0.5 byte for INT4. These are estimates, not exact checkpoint sizes: quantization scales, alignment, implementation details, and other allocations affect actual use. Tensor parallelism distributes weights across devices, so dividing by its degree gives a rough per-GPU weight estimate, not a full deployment-memory guarantee.

Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.

For example, NVIDIA estimates that an 8-billion-parameter BF16 model needs about 16 GB for weights. Its guide says this can fit on one 24 GB GPU, such as a GeForce RTX 4090, with some room for cache and overhead. The remaining capacity depends on the request lengths, serving configuration, and runtime allocations.

3. Estimate KV cache for context and concurrency

For common transformer architectures, NVIDIA gives this estimate:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.

KV cache bytes ≈ batch size × sequence length × 2 × number of layers × hidden size × bytes per cache value

The factor of two represents keys and values. Sequence length includes input and generated tokens, and cache demand in this estimate grows with both sequence length and batch size. NVIDIA’s worked Llama 2 7B illustration estimates about 2 GB at batch size 1, sequence length 4096, and half-precision cache values. Treat that as a model-specific illustration, not a universal allowance.

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft

Some architectures, including grouped-query attention, use a different number of KV heads. In those cases, use the model’s actual KV layout and the runtime’s cache dtype and allocation method rather than assuming hidden size alone gives an exact result. Current vLLM serving documentation and TensorRT-LLM documentation describe cache controls and options, but support depends on the model, runtime, and hardware.

4. Add runtime needs and headroom

Allow memory beyond the weight and cache estimates for activations, CUDA graphs, communication buffers, LoRA adapters, or multimodal state when those apply. Actual allocation behavior varies by backend, so a calculation based only on parameter count and cache size can understate the requirement.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.

5. Check the serving engine’s memory settings

In vLLM, the documented serving controls include GPU-memory-utilization-based budgeting, explicit KV-cache sizing, cache data types, and CPU offload. Review the options for the version you run; defaults and available controls can change. vLLM’s CLI guidance cautions that CPU offload relies on a fast CPU–GPU interconnect, so it is not a cost-free substitute for GPU memory.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

How much VRAM do common model sizes need?

There is no reliable universal VRAM number for a parameter count alone. Weight-only estimates are a starting point; they exclude cache, runtime allocations, and headroom. The examples below show how precision and device distribution change the weight estimate, not how much every serving workload requires.

Example Estimated weight memory What the figure means
8B model, BF16 About 16 GB NVIDIA NIM’s estimate for an 8-billion-parameter BF16 model; it may fit on one 24 GB GPU with some remaining room, depending on cache and overhead.
70B model, BF16, 4-way tensor parallelism About 35 GB per GPU NVIDIA NIM’s estimate for distributed weights: 70 billion parameters × 2 bytes ÷ 4 GPUs. It is not a complete per-GPU serving budget.
70B Llama 2, full precision 256 GB Weight-memory figure stated in Hugging Face’s Transformers inference guide; workload cache and runtime needs are additional.
70B Llama 2, half precision 128 GB Weight-memory figure stated in the same guide; it does not include a serving workload’s full memory budget.

The 70B examples are not contradictory: they describe different precision assumptions and, in NVIDIA’s example, weight distribution over four GPUs. For any row, the actual model configuration and inference setup determine whether the full workload fits.

How to choose between a larger GPU, quantization, and multiple GPUs

Compare options against the same model and serving target. Changing the hardware while also changing context length, concurrency, precision, and runtime makes the comparison difficult to interpret.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • More VRAM in one GPU: avoids splitting weights across devices, but the card still needs room for cache and runtime use. A 24 GB card is only an illustration for the 8B BF16 example, not a general recommendation.
  • Lower-precision weights: reduce the weight estimate. Check that the chosen model and runtime support the representation, and validate quality and performance for your use. Hugging Face notes that quantization can slightly increase latency in some cases.
  • Tensor or pipeline parallelism: distribute model weights across devices. This changes the deployment topology; consider the runtime and interconnect requirements as well as per-device memory.
  • CPU offload: can reduce what must remain resident in GPU memory, but may affect performance and, in vLLM’s guidance, depends on a fast CPU–GPU interconnect.
  • Shorter context or fewer simultaneous requests: reduce KV-cache demand in the common estimate. This is a serving-capacity trade-off: make sure the reduced limits still meet the application’s needs.

A practical checklist before selecting GPU capacity

  1. Pin down the model: use its actual configuration, parameter count, layer count, KV-head layout, and any adapters or multimodal components.
  2. Set the representation: identify weight precision and, separately, KV-cache dtype. Do not assume they are the same.
  3. Define the workload: specify maximum prompt plus output tokens and the intended concurrent requests or batch size.
  4. Choose the runtime: check its memory budgeting, cache allocation, supported dtypes, and offload controls for the version and hardware you plan to use.
  5. Calculate per-device needs: estimate weights after any distribution across GPUs, then add cache, runtime allocations, and headroom.
  6. Validate at the target settings: confirm the model runs under the intended context and concurrency; a successful load or engine build alone does not establish that runtime allocations will fit.

A reader-specific recommendation therefore needs the exact model and configuration, weight and cache precision, maximum prompt-plus-output length, concurrency target, inference runtime and version, other GPU workloads, and whether multiple GPUs or CPU offload are acceptable.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.