Study · Code, inputs, and results
What fits in GPU memory? A reproducible capacity study
A GPU's hourly price only tells part of the story. First, the model has to fit. This study makes that first calculation explicit, with every input and result available to download.
These are memory and rental-cost estimates. They do not measure throughput, latency, model quality, or a successful deployment.
The question
How does changing weight precision affect the memory budget and the number of GPUs needed for the same parameter count? I compare 8B, 32B, 70B, 123B, and 405B models at FP16, FP8, and INT4 across the seven GPUs in the GPU guide.
A small model with visible assumptions
The starting calculation uses decimal gigabytes:
weights_GB = parameters_in_billions × bytes_per_parameter
planning_memory_GB = weights_GB × 1.20
estimated_hourly_cost = candidate_GPU_count × listed_GPU_hourly_rate
I use 2 bytes per parameter for FP16, 1 for FP8, and 0.5 for INT4. The extra 20% is a planning allowance for runtime memory. It is an assumption, not a calculation of the KV cache. Quantization scales, metadata, mixed-precision layers, activations, and framework allocations can change the real requirement.
Candidate GPU counts round up to powers of two: 1, 2, 4, 8, and so on. This keeps the worksheet consistent with the calculator's candidate configurations. It does not prove that a particular model supports that tensor-parallel degree, or that several GPUs will perform well together.
One 70B model, three memory budgets
For the 70B example, the FP16 weight estimate is 140 GB, followed by a 28 GB allowance. Changing the weight format to FP8 halves those two numbers in this model. INT4 halves them again. A smaller weight budget leaves more room, but says nothing about the quality or speed of that quantized model.
Why capacity changes the hourly comparison
At FP16, this worksheet budgets 168 GB for the 70B example. Here are three rows from the downloadable results:
| GPU | Candidate count | Est. per hour |
|---|---|---|
| NVIDIA H100 | 4 | $7.20 |
| NVIDIA H200 | 2 | $4.18 |
| AMD MI300X | 1 | $1.99 |
The H100 candidate rounds from a three-GPU memory minimum to four GPUs under the worksheet's power-of-two rule. A different parallelism strategy could change that choice. The rates are the site's Nov 9, 2026 snapshot; node minimums, availability, networking, and utilization are outside this calculation.
Reproduce all 105 scenarios
Download these three small files into one folder. The configuration records the model sizes, bytes per parameter, headroom, GPU capacities, and dated prices. The CSV contains the full scenario matrix.
python3 memory-study.py --output reproduced.csv
# No packages, API key, or GPU required.
With the supplied inputs, the generated CSV matches the published results. Change the headroom or a rental rate in the JSON and rerun it to explore a different assumption. The source lives in this website's repository.
What to measure before renting for production
The next step is a serving experiment with the actual model, quantization implementation, prompt lengths, output lengths, and expected concurrency. Record time to first token, inter-token latency, completed requests, memory use, and any failed requests under that workload.
vLLM's documentation explains how KV-cache pressure can cause preemption and how concurrency and parallelism affect that pressure. That workload-dependent behavior is why this worksheet's flat 20% allowance cannot guarantee a deployment will fit.
Check the capacity in your runtime's units too: this worksheet uses decimal GB, while tools may report binary GiB. Hardware support for a weight format and the availability of appropriate kernels also need verification.
Use the interactive calculator to shortlist configurations. Use measured serving results to choose between them.
Inputs and references
- GPU guide: the capacities and dated rental-price snapshot used in the worksheet.
- getdeploying.com: source of the listed on-demand prices, checked Nov 9, 2026.
- vLLM: Optimization and Tuning: runtime memory, preemption, and parallelism considerations.
