How to Choose Hardware for Running LLMs Locally: VRAM First, Then Compute
This guide explains how to choose a PC for running large language models locally. It separates two independent thresholds: VRAM capacity determines whether a model can load at all, while compute and memory bandwidth determine how fast it runs. You will find a rough formula for estimating VRAM from parameter count and precision, notes on context cache and runtime overhead, guidance on RAM, storage, power, cooling, and expansion, budget-tiered build ideas, a four-step validation method for quantization, and common mistakes to avoid.
Running large language models locally, many people assume “the stronger the GPU, the better” and put the entire budget into compute, only to find the model won’t even load. Others look at VRAM size alone and end up with a setup too slow to use. In reality, VRAM capacity determines whether a model can run, while compute and memory bandwidth determine how fast it runs. These are two independent thresholds. This article follows that main thread to lay out a practical methodology for choosing hardware.
1. Start with the Conclusion: Two Thresholds, Don’t Confuse Them
To judge whether a machine can run a given model locally, the first step is not to look at compute benchmarks but to estimate how much VRAM the weights need to load. If VRAM is insufficient, the program fails outright during loading, and no amount of compute helps. If VRAM is enough but compute or bandwidth is lacking, the result is “usable but painful,” with generation so slow it hurts interaction. Separating these two questions resolves most purchasing dilemmas.
2. Estimating VRAM Requirements: From Parameter Count to Actual Usage
Model size is usually described by parameter count, and the bytes each parameter occupies during inference depends on numerical precision. A common rough conversion in the industry: half precision uses about 2 bytes per parameter, 8-bit quantization about 1 byte, and 4-bit quantization about 0.5 byte. From this you can quickly get the weight size:
Weight VRAM ≈ parameter count × bytes per parameter7B half precision ≈ 7e9 × 2B ≈ 14 GB7B 8-bit ≈ 7 GB7B 4-bit ≈ 3.5 GB
But weights are only the lower bound. Actual inference requires reserving three additional types of overhead: first, the context cache, whose usage grows faster with longer sequences and higher concurrency; second, the runtime framework and VRAM fragmentation; third, communication buffers in multi-GPU setups. In engineering practice, it is advisable to leave 30%–50% headroom above the estimate, otherwise you may hit “the parameters just fit, but a long input overflows.”
3. Compute and Bandwidth: The Two Variables That Decide Speed
LLM inference is dominated by token-by-token generation and is a memory-access-intensive workload, so memory bandwidth often matters more than peak compute. In batch processing and long-context prefill stages, however, compute becomes the main bottleneck. When choosing hardware, watch both the rated compute and the VRAM bandwidth rather than a single metric. In addition, general optimization techniques such as low-precision computation, operator fusion, and chunked batching can significantly improve throughput without changing hardware, and are part of what you must master beyond configuration.
4. Supporting Hardware: Don’t Skimp on Non-Bottlenecks, and Don’t Overspend
- Memory: 1.5–2x or more of VRAM capacity is recommended. Model loading, data preprocessing, and multitasking all depend on it; insufficient memory triggers frequent paging.
- Storage: prioritize an SSD and pay attention to sequential read performance. Large models can be tens of GB, and load time is almost entirely determined by storage bandwidth.
- Power and cooling: sustained full-load inference demands stable power delivery and cooling. Insufficient power causes throttling or even reboots.
- Motherboard and expansion: leave enough slots and power connectors for adding cards later, which is more economical than loading up on everything at once.
5. Budget-Tiered Configuration Ideas
- Entry validation tier: a single GPU with 8–12 GB VRAM, paired with 32 GB memory and an SSD, can run small and mid-sized models after 4-bit quantization, suitable for learning and technical validation.
- Main development tier: a single GPU with 16–24 GB VRAM and higher bandwidth can smoothly run 7B-level half-precision models or larger quantized models, meeting everyday application development needs.
- High-performance tier: multi-GPU parallelism, with pooled VRAM, can handle larger parameter scales and longer contexts, suitable for team environments needing stable throughput.
If local conditions are truly insufficient, a hybrid approach works: put heavy inference workloads in the cloud, using general container platforms, object storage, and monitoring and alerting to build an elastic environment, keeping only lightweight tasks and debugging locally, which is more cost-controllable.
6. Always Test Before and After Quantization: A Four-Step Validation Method
- Record a baseline: before quantization, measure load time, peak VRAM, and time per generated token.
- Adjust one variable at a time: change only precision or context length per run, so results can be attributed.
- Observe stability: run continuously for 30 minutes or more and check for VRAM overflow or noticeable throttling.
- Evaluate quality: compare output quality on a fixed set of questions to confirm the precision loss is acceptable.
7. Common Mistakes
The first is looking only at compute while ignoring VRAM, so the model can’t load. The second is treating system memory as VRAM, assuming large memory means large models can run. The third is overlooking VRAM growth from context length. The fourth is blindly chasing multi-GPU setups while bandwidth and scheduling become the new bottleneck.
In summary, the correct order for configuring a local LLM is: first estimate VRAM by precision and leave enough headroom, then compare bandwidth and compute within the same VRAM tier, and finally fill in memory, storage, power, and cooling. Baidu AI Cloud also emphasizes in related practice clarifying workload characteristics before selecting resources, an approach that applies equally to local environment planning.
