AI Hardware Sizing Guide: Match GPUs to Models

AI Hardware Sizing Guide: Match GPUs to Models

What happens when a team buys a top-tier GPU and the model still runs out of memory on day one? It happens constantly, and it almost always traces back to sizing done by guesswork instead of arithmetic. Picking hardware for AI workloads is not about buying the biggest card on the market. It is a matching problem: model size, context length, batch size and latency targets all push on the same scarce resource, which is memory. This guide walks through the math, the trade-offs and the practical traps so the next purchase or cloud reservation fits the workload instead of fighting it.

Start With the Hard Constraint: Memory

Every sizing conversation should begin with a single question: does the model fit? Model weights are the first line item. In FP16 precision, each parameter takes roughly two bytes, so a 7B model needs about 14 GB just to hold its weights. FP8 halves that, and INT4 quarters it. A 70B model in FP16 lands near 140 GB, which no single mainstream data-center GPU holds comfortably.

That arithmetic is the easy part. The trouble is everything stacked on top: activations, framework overhead and, above all, the KV cache. During inference, the model stores key and value tensors for every token in context, for every request in flight. The cache scales with layer count, KV head count, head dimension, sequence length, batch size and bytes per element. A rough formula looks like this:

KV cache bytes ≈ 2 × layers × KV heads × head dimension × sequence length × batch size × bytes per element

The practical consequence is that long-context serving is often KV-cache-bound rather than weight-bound. A model that fits neatly at 4K context can blow past memory limits at 128K. The vLLM project documented this problem in detail in its paper on efficient memory management for LLM serving with PagedAttention, which explains why naive KV-cache allocation wastes so much memory and how paging fixes it.

A worked example helps. Take a 13B model in FP16: weights alone are about 26 GB. Add 20% overhead for activations and framework buffers, and the floor is roughly 31 GB before any cache. On an 80 GB card, that leaves about 49 GB for KV cache and batching. Whether that is generous or tight depends entirely on context length and how many users you plan to serve at once.

Know Your Accelerator Options

Know Your Accelerator Options

The hardware market offers four broad families, each with a different sizing logic.

Accelerator family Memory per device Strength Sizing note
NVIDIA H100 80 GB HBM3 Mature software stack Multiple GPUs needed for 70B FP16
NVIDIA H200 141 GB HBM3e Large single-device memory Fits bigger models without sharding
AMD MI300X 192 GB HBM3 High memory capacity Strong for large-model inference
Google TPU (v5e, v5p, Trillium) Varies by generation Cloud-native scaling Sizing tied to Google Cloud shapes
Apple Silicon (Mac Studio) 64–192 GB unified Local and edge work Lower bandwidth than data-center parts

NVIDIA’s data-center lineup moved quickly through 2024 and 2025. The H100 arrived in 2022 with 80 GB of HBM3. The H200 followed with 141 GB of HBM3e, and the Blackwell-generation B200 was announced in March 2024, shipping across 2024 and 2025. Exact specs and ship dates vary by SKU, so always check the vendor datasheet for the specific part rather than the family name. (NVIDIA HGX AI data center platform overview)

AMD’s MI300X launched in December 2023 with 192 GB of HBM3, and the MI325X was announced in 2024. Memory capacity per GPU is AMD’s clearest differentiator for large-model inference, because more memory per device means fewer devices to shard across.

Google’s TPUs are rented through Google Cloud rather than bought. TPU v5e and v5p arrived in 2023, and Trillium (TPU v6e) was announced at Google I/O in May 2024. Generations change fast, so sizing decisions should reference current cloud documentation, not last year’s blog posts.

Apple Silicon sits in a different category. Because it uses unified memory, a Mac Studio with 64–192 GB can hold models that would otherwise need several discrete GPUs. The catch is memory bandwidth, which is far below data-center parts. That makes it excellent for local development and edge inference, and a poor fit for high-throughput serving.

Decide What You Are Optimizing For

Here is where most sizing exercises go wrong. Teams size for “fast” without defining fast. Throughput (tokens per second across all users) and latency (seconds per response for one user) pull in opposite directions. Batching raises throughput but increases per-request latency, sometimes dramatically. (Graphics processing unit (Wikipedia))

Write the target down before touching a spec sheet:

  • Define the workload: interactive chat, batch document processing, code completion, or retrieval-augmented search.

  • Set a latency budget per request, such as first token under 500 ms and full response under three seconds.

  • Estimate peak concurrent users and average prompt plus response length.

  • Calculate KV cache for that concurrency at that context length.

  • Add weights and overhead, then divide by usable memory per GPU.

  • Round up, and add headroom for traffic spikes.

An interactive assistant and a nightly summarization job with identical models can need wildly different hardware counts. The chat service is latency-bound and may sit on a single large-memory GPU with modest batching. The batch job is throughput-bound and may prefer many smaller GPUs running large batches. A sizing guide that does not state which target it assumes is not a sizing guide at all.

Quantization: The Memory Lever With a Cost

Quantization reduces the number of bits used per weight, shrinking memory and often speeding inference. The common formats are GPTQ, AWQ, GGUF for llama.cpp, and bitsandbytes. Hugging Face maintains a quantization overview explaining GPTQ, AWQ and bitsandbytes trade-offs that is worth reading before committing to a format.

4-bit quantization is the default choice for local deployment because it can cut memory by roughly four times versus FP16. The trade-off is accuracy, and there is no universal rule for how much is lost. Quality degradation varies by model, task and calibration data. A coding assistant might tolerate 4-bit fine; a medical summarizer might not. Test on your own evaluation set rather than trusting a leaderboard.

Two practical warnings. First, quantized weights still need KV cache in full or near-full precision, so quantization does not solve long-context memory pressure. Second, some quantization methods add decompression overhead that hurts latency at low batch sizes. Measure both memory and tokens per second after quantizing, not the file size alone.

Multi-GPU, Sharding and Interconnect

When a model does not fit on one device, it gets split. Tensor parallelism splits each layer across GPUs, which requires fast interconnect because the GPUs communicate constantly. Pipeline parallelism splits layers into stages, which is cheaper on bandwidth but introduces bubbles in the pipeline. For a 70B model in FP16 at roughly 140 GB of weights, four 80 GB GPUs with tensor parallelism is a common configuration, leaving room for cache and batching.

Interconnect matters more than people expect. NVLink-class links handle tensor parallelism well; PCIe-only setups often bottleneck. Before ordering a multi-GPU node, check how the GPUs talk to each other and how much memory each one has.

Power, Cooling and the Constraints Nobody Plans For

An H100 SXM is rated around 700 W thermal design power, and Blackwell-class parts are reported in the 1000 W range. Multiply by eight GPUs per node and add CPUs, networking and fans, and a single rack can draw tens of kilowatts. Rack power density is frequently the binding constraint in real data centers, not GPU supply.

The practical checklist before purchase:

  • Confirm the power budget per rack and per row.

  • Confirm cooling capacity for sustained load, not peak burst.

  • Check physical clearance and airflow for the chosen form factor.

  • Verify that the host CPU, RAM and storage can feed the GPUs fast enough.

  • Budget for networking if multi-node training or serving is on the roadmap.

Teams regularly spec the accelerators perfectly and then discover the facility cannot cool them. That mistake is expensive and entirely avoidable.

Cloud, Reserved and Local: Choosing the Buying Model

Sizing does not end with a part number. It ends with a deployment decision. Cloud on-demand suits experimentation and spiky demand. Reserved instances suit steady, predictable serving. Owned hardware suits long-running workloads where utilization stays high. Cloud TPU shapes and GPU instance types both come in fixed memory configurations, which means the sizing math happens before the reservation, not after.

For teams tracking how these infrastructure decisions play out in practice, the cloud coverage on 9481.org follows deployment and capacity trends, while the site’s news section tracks hardware announcements as they land. Both are useful for keeping a sizing model current, since vendor lineups shift faster than most procurement cycles.

Common Sizing Mistakes and What Works Instead

The same errors show up again and again. Here are the ones worth guarding against, with the fix that actually works.

Sizing on weights alone. The fix is to compute KV cache for your real context length and concurrency before choosing a GPU.

Ignoring context length. A model validated at 8K can fail at 32K on identical hardware. Test at production context lengths.

Assuming quantization is free. Validate quality on your own tasks, and measure latency alongside memory savings.

Forgetting overhead. Framework buffers, CUDA context and fragmentation can consume several gigabytes. Reserve 15–20% headroom.

Skipping the latency target. State whether you are optimizing for interactive users or batch throughput before comparing hardware.

Buying for peak, paying for idle. If average utilization is 20%, reserved cloud capacity or smaller instances often beat owned hardware.

What works in practice is unglamorous: build a spreadsheet, plug in the formulas, and validate with a real benchmark before committing budget. A single afternoon of measurement beats a month of speculation. The blog on 9481.org carries related write-ups on practical infrastructure decisions if you want to go deeper.

Conclusion

AI hardware sizing is arithmetic plus honesty about your workload. Weights set the floor, KV cache sets the ceiling, and your latency target decides where in between you land. Get the memory math right, define throughput and latency before comparing parts, treat quantization as a trade rather than a free lunch, and check power and cooling before the purchase order goes out. Do that, and the hardware you buy will fit the model you run, at the speed your users actually expect.

Frequently Asked Questions

How much GPU memory do I need for a 7B model?

In FP16, a 7B model needs about 14 GB for weights alone. Add 15–20% for activations and framework overhead, plus KV cache for your context length and batch size. A 24 GB card handles short-context, low-concurrency serving comfortably; long context or high concurrency pushes you toward 40–80 GB.

Is KV cache or model weight memory the bigger issue?

It depends on context length and concurrency. At short context and small batches, weights dominate. At long context with many simultaneous requests, the KV cache can exceed weight memory several times over. That is why long-context serving is often cache-bound rather than weight-bound.

Can I run large models on a Mac Studio instead of data-center GPUs?

Yes, for local development and low-concurrency inference. Unified memory of 64–192 GB holds models that would need multiple discrete GPUs. The limitation is memory bandwidth, which is far lower than HBM-based accelerators, so throughput per dollar falls short for production serving.

Does 4-bit quantization cut memory by exactly 75%?

Roughly, for weights only. FP16 to INT4 is a fourfold reduction in weight storage, but KV cache, activations and overhead are not reduced by the same factor. Real total memory savings are smaller, and accuracy loss varies by model and task, so benchmark before deploying.

How many GPUs do I need for a 70B model?

In FP16, 70B weights are about 140 GB. Four 80 GB GPUs with tensor parallelism is a common starting point, leaving roughly 180 GB for cache and batching. With 4-bit quantization, two 80 GB GPUs can work, though quality and latency need validation.

What is the most common sizing mistake?

Sizing on model weights alone. Teams pick a GPU that fits the weights, then hit out-of-memory errors the moment real context lengths and concurrent users arrive. Computing KV cache and adding headroom before purchase prevents almost all of these failures.

Latest articles

Scroll to Top