Local LLM Deployment Hardware Guide: From VRAM Estimation to Full System Selection

    This guide explains how to plan hardware for running large language models locally. It covers a practical formula for estimating VRAM requirements, why real-world memory usage exceeds the theoretical minimum, the trade-offs of quantization bit-widths, three tiers of builds matched to model sizes (7B–13B, 30B–70B, and 100B+), component selection logic for CPU, RAM, and storage, and a step-by-step method for sizing the power supply.

    1. Calculate VRAM First, Then Choose Hardware

    VRAM is the first bottleneck when running large models locally. Model weights must be loaded into VRAM, and inference also requires space for the context cache and intermediate computation results. The right order of operations is: decide which parameter size and quantization precision you want to run, estimate the VRAM requirement, and only then work backward to CPU, RAM, storage, power supply, and cooling.

    1.1 The VRAM Estimation Formula

    The VRAM occupied by model weights can be approximated with the following formula:

    VRAM (GB) ≈ Parameters (B) × Bit-width (bit) ÷ 8

    Taking a 70B model as an example: 16-bit half precision requires roughly 140GB, 8-bit quantization roughly 70GB, and 4-bit quantization roughly 35GB. This is the minimum footprint of the weights alone, not the actual total. The code below can batch-estimate VRAM needs across different model sizes and precisions:

    1. def estimate_vram_gb(params_b: float, bits: int, overhead_ratio: float = 0.2) -> float:
    2. """Estimate VRAM required for inference (GB).
    3. params_b: parameter count, in billions (B)
    4. bits: weight bit-width, e.g. 16, 8, 4
    5. overhead_ratio: estimated ratio for KV cache and runtime overhead
    6. """
    7. weight_gb = params_b * bits / 8
    8. return weight_gb * (1 + overhead_ratio)
    9. for size in (7, 13, 30, 70):
    10. for bits in (16, 8, 4):
    11. print(f"{size}B @ {bits}bit: ~{estimate_vram_gb(size, bits):.1f} GB")

    1.2 Why Real Usage Is Higher

    The formula only accounts for weights. Three additional categories of overhead apply at runtime:

    • KV cache: grows with input and output length. When processing long documents or multi-turn conversations, this can consume several GB and even approach a significant fraction of the weights themselves.
    • Runtime overhead: the inference framework, drivers, and intermediate tensors all consume VRAM.
    • Fragmentation and headroom: allocation failures are common when VRAM is nearly full. Always leave a margin for the system instead of configuring against the theoretical minimum.

    For these reasons, the default 20% overhead ratio in the code is only a conservative starting point. The actual value should be measured on your target model.

    1.3 Trade-offs in Quantization Bit-width

    Quantization compresses weights from 16-bit down to 8-bit or 4-bit, dramatically reducing VRAM usage. However, the precision loss depends on model size, quantization method, and task type—there is no universal answer. Larger models generally tolerate low-bit quantization better, while smaller models degrade more noticeably at low bit-widths.

    The recommended approach is to compare output quality across different precisions on your own tasks using the same set of samples, then decide on a quantization scheme. Don’t rely on hearsay claims that a given bit-width is “unusable” or “completely lossless.”

    2. Three Tiers of Builds by Use Case

    2.1 VRAM Requirements by Model Size

    Model size 4-bit weights 8-bit weights 16-bit weights Typical use cases
    7B ~3.5GB ~7GB ~14GB Personal experiments, lightweight tasks
    13B ~6.5GB ~13GB ~26GB Personal development, coding assistance
    30B ~15GB ~30GB ~60GB Day-to-day lab inference
    70B ~35GB ~70GB ~140GB Complex reasoning, research comparisons
    100B+ ~50GB+ ~100GB+ ~200GB+ Research-grade tasks, usually multi-GPU

    The values above are weight-only minimums. Leave additional room for context and runtime overhead when selecting hardware.

    2.2 Personal Experiment Tier (7B to 13B)

    The goal of this tier is to validate ideas at low cost. A single consumer GPU with 16GB of VRAM handles a 7B model at 8-bit, and a 13B model can run under 4-bit quantization.

    Suggested configuration:

    • CPU: a mainstream 8–12 core desktop processor is sufficient; inference relies primarily on the GPU.
    • RAM: 32GB, enough for data processing and the operating system.
    • Storage: a 1TB SSD, enough to hold several model files.
    • Power supply: estimate total system power draw and leave headroom; a mid-range PSU is usually adequate.

    2.3 Lab Workhorse Tier (30B to 70B)

    This tier must accommodate multiple models and concurrent tasks. The core question is whether a single GPU’s VRAM can hold the target model.

    • A single 24GB GPU: can run a 30B model at 4-bit or 8-bit. A 70B model at 4-bit takes about 35GB, which exceeds 24GB—it only runs by offloading some layers to system memory, with a noticeable speed penalty; going to even lower bit-widths increases precision loss.
    • Two 24GB GPUs or a single 48GB professional card: can hold a 70B model at 4-bit with room left for the context.
    • RAM: 64GB to 128GB is recommended, for data preprocessing and as offload buffer when VRAM runs short.
    • Storage: a 2TB SSD is appropriate. A 70B model at 4-bit is tens of GB per file, and multiple versions plus datasets fill space quickly.

    Multi-GPU setups require confirming the motherboard’s PCIe lane count, slot spacing, and power delivery in advance. Inter-card communication bandwidth also affects inference efficiency, and consumer multi-GPU solutions are often significantly limited here.

    2.4 Research-Grade Tier (100B+)

    At this tier, the bottleneck is usually not single-GPU performance but total VRAM, multi-GPU interconnect, and system stability.

    • CPU: choose a server-grade platform that provides enough PCIe lanes to mount multiple accelerator cards.
    • RAM: 128GB minimum, scaling with data size.
    • Accelerators: datacenter-grade cards offer more VRAM per card and more mature multi-GPU interconnects.
    • Storage: 4TB+ of fast SSD for active work, plus large-capacity HDDs or network storage for backups.
    • Chassis and power: a rackmount chassis with redundant power supplies is recommended.

    3. Component Selection Logic

    3.1 CPU

    In LLM inference, the CPU handles request scheduling, data preprocessing, tokenization, and computation for any offloaded layers. The heavy lifting is done by the GPU, so the CPU doesn’t need the highest clock speed, but core count should match your concurrency needs. If you run data cleaning, training scripts, and inference services simultaneously, more cores pay off.

    3.2 RAM

    System RAM serves as offload buffer when VRAM is insufficient and holds datasets and intermediate files. A common rule of thumb is that system RAM should be no less than total VRAM. When RAM is inadequate, the offload mechanism constantly reads and writes to disk, and inference latency increases dramatically.

    3.3 Storage

    Storage demand comes from three sources: model files, datasets, and logs. Model file size can be estimated directly as “parameters × bit-width ÷ 8”—for example, a 70B model at 4-bit is about 35GB, slightly more after metadata and auxiliary files. Datasets and multiple model versions grow quickly, so reserve expansion capacity and establish a backup strategy.

    4. Power Supply Configuration

    4.1 Power Estimation Steps

    Sizing the PSU follows three steps:

    1. Sum the rated power draw of major components: CPU, GPU, motherboard, RAM, storage, and cooling.
    2. Add the estimated draw of remaining components.
    3. Apply a headroom factor—commonly multiplying by 1.3 to 1.5.

    For example, in one build the CPU draws about 170W, a single flagship consumer GPU draws about 450W at full load, and other components about 100W, totaling roughly 720W. With a 1.5× margin that comes to about 1080W, so a PSU around 1200W is appropriate.

    1. def psu_watts(components_w: dict[str, float], margin: float = 1.5) -> float:
    2. """Estimate PSU wattage (W) from component power ratings."""
    3. total = sum(components_w.values())
    4. return total * margin
    5. build = {"CPU": 170, "GPU": 450, "other components": 100}
    6. print(f"Recommended PSU: ~{psu_watts(build):.0f} W")

    4.2 Other PSU Considerations

    • GPUs can produce transient power spikes when load changes abruptly, so the PSU should have enough instantaneous headroom to absorb them without triggering protection shutdowns.