Hardware Selection Guide for Running LLMs Locally: VRAM Is the Deciding Factor
Learn how to choose the right hardware for running large language models locally. This guide explains why VRAM capacity is a hard requirement, how to estimate memory needs for model weights and KV cache, the trade-offs of quantization, and how compute and memory bandwidth affect generation speed—plus tiered configuration recommendations and a deployment checklist.
Bottom Line: VRAM Determines Whether a Model Runs, Compute Determines How Fast
When running large language models locally on a personal device, the single most important metric is VRAM capacity. Model weights must be fully loaded into the accelerator’s VRAM for efficient inference. If VRAM is insufficient, the model either fails to load or part of the data is offloaded to system memory, which significantly slows things down.
Compute power and memory bandwidth determine generation speed. More compute means faster processing of your input; higher memory bandwidth means more tokens generated per second. Therefore, the selection order should be: first confirm that VRAM can hold your target model, then compare compute and bandwidth, and finally consider everything else.
1. Why VRAM Is a Hard Requirement
During local inference, VRAM is consumed by three main categories of data.
1. Model weights. This is the bulk of the usage, determined by the parameter count and the number of bytes used to store each parameter.
2. KV cache. The model stores intermediate results of previous tokens during text generation to avoid redundant computation. Its footprint scales linearly with context length—the longer the conversation and the larger the context window, the more memory it takes.
3. Runtime overhead. This includes intermediate computation tensors, framework-internal buffers, and so on. It can typically be estimated at 10% to 20% of the weight footprint.
Many people focus only on parameter count and overlook the KV cache. In real deployments with long contexts, the cache can consume several gigabytes, so headroom must be reserved.
2. How to Estimate VRAM Requirements
You can use the following formulas (these are empirical estimates; actual usage should be verified at runtime):
def estimate_weight_vram_gb(params_billion: float, bits_per_param: int,overhead: float = 1.2) -> float:"""Estimate VRAM needed for model weights plus runtime overhead (GB).params_billion: parameter count in billions, e.g., 7 means 7 billion parameters.bits_per_param: bits per parameter after quantization, e.g., 16, 8, 4.overhead: runtime overhead factor, typically 1.1 to 1.2."""weight_gb = params_billion * bits_per_param / 8return round(weight_gb * overhead, 1)def kv_cache_gb(layers: int, kv_heads: int, head_dim: int,context_len: int, bytes_per_value: int = 2) -> float:"""Estimate KV cache usage (GB). The factor of 2 accounts for both K and V caches."""total_bytes = 2 * layers * kv_heads * head_dim * context_len * bytes_per_valuereturn round(total_bytes / 1024**3, 2)if __name__ == "__main__":# 7B parameters, 4-bit quantizationprint("Weight VRAM:", estimate_weight_vram_gb(7, 4), "GB")# 32 layers, 8 KV heads, head dim 128, context 8192, half-precision cacheprint("KV cache:", kv_cache_gb(32, 8, 128, 8192), "GB")
In the example above, a 7B-parameter model at 4-bit quantization needs roughly 4.2GB for weights plus overhead. With a context length of 8192, the cache adds about 1GB. After reserving room for the OS and other programs, 8GB of VRAM is generally just enough to run such a model, but long conversations will be tight.
3. Quantization: Trading Precision for Capacity
Quantization is the most effective way to reduce VRAM usage. It converts parameters from high precision (such as 16-bit floating point) to low precision (such as 8-bit or 4-bit integers), cutting memory usage proportionally.
- 16-bit (FP16): highest precision, largest footprint; suitable when VRAM is plentiful.
- 8-bit (INT8): roughly half the footprint of 16-bit, with minimal quality loss for most tasks.
- 4-bit (INT4): roughly a quarter of the 16-bit footprint. This is the most commonly used tier on personal devices. Quality loss is usually acceptable, but on precision-sensitive tasks such as math reasoning and code generation, the difference may be more noticeable.
The rule of thumb: among the quantization levels that fit, choose the highest precision available. Within the same VRAM budget, a larger model with heavier quantization often outperforms a smaller model at higher precision—but this should be validated on your specific tasks.
4. Compute and Memory Bandwidth: What Determines Generation Speed
LLM inference has two phases.
Prefill phase: processes the entire user input. This is compute-intensive and primarily limited by compute power. Longer inputs take longer to process.
Decode phase: generates output tokens one by one. Each token requires reading the full model weights, so this phase is typically limited by memory bandwidth. Higher bandwidth means more tokens per second.
As a result, devices with the same VRAM capacity can differ greatly in generation speed. If your main use cases are Q&A and writing—output-heavy workloads—prioritize memory bandwidth. If you frequently process long documents or large inputs, compute power becomes more important.
5. Configuration Tiers
The tiers below are grouped by VRAM capacity to build an intuitive picture. Specific models and prices change with the market, so always check actual specifications when purchasing.
Entry tier (~8GB VRAM)
Suitable for 4-bit quantized versions of small models (~7B class), used for simple Q&A, text polishing, and lightweight coding assistance. Long contexts will be constrained.
Mainstream tier (~16GB to 24GB VRAM)
Comfortably runs 4-bit quantized mid-size models (~13B to 34B class) with room to spare for context. This is the best price-performance range for most individual users.
High-end tier (48GB+ VRAM, or multi-GPU setups)
Can run ~70B-class 4-bit quantized models. Larger models usually offer a clear capability boost, but hardware cost, power draw, and cooling requirements rise accordingly.
If VRAM is insufficient, you can offload some layers to system memory. This gets the model running, but generation speed drops noticeably. It is fine for testing and low-frequency use, but not for real-time interactive scenarios.
6. Other Hardware and System Considerations
System memory: aim for at least twice the VRAM capacity, to support model loading, the OS, and partial offloading. Memory frequency and channel count affect performance when offloading.
Storage: model files typically range from several GB to tens of GB. An SSD noticeably shortens load times. Reserve enough free space and plan where to store multiple model versions.
Power and cooling: high-VRAM accelerators draw significant power. Verify your PSU wattage and case airflow. Under sustained full load, inadequate cooling leads to thermal throttling and lower real-world speed.
OS and drivers: choose an operating system with mature support for your accelerator, and keep driver versions compatible with your inference framework. Version mismatches are a common cause of failed local deployments.
7. Purchase and Deployment Checklist
- What is the parameter count of your target model, and what quantization level do you plan to use?
- Is the estimated weight VRAM plus KV cache and overhead below roughly 80% of the device’s VRAM?
- What context length do you expect? Do you need headroom for long conversations?
- Are your main tasks input-heavy or output-heavy? This determines whether to invest in compute or bandwidth.
- Does system memory meet offloading needs? Does the SSD have room for multiple models?
- Can the PSU and case cooling sustain long full-load sessions?
- Are driver and inference framework versions compatible?
8. Common Misconceptions
Misconception 1: Higher GPU compute means a smarter model. Model capability mainly depends on parameter scale, training quality, and post-quantization precision. Compute affects speed, not intelligence.
Misconception 2: If the parameters fit, it will run smoothly. Runtime cache and overhead also consume VRAM. Running right at the VRAM limit easily causes out-of-memory errors in long conversations.
Misconception 3: Heavier quantization is always easier, and quality loss is negligible. Lower quantization levels use less memory, but the impact on complex reasoning tasks is more pronounced. Compare on your actual tasks.
Misconception 4: System memory can replace VRAM without limits. Offloading to RAM expands what you can run, but memory bandwidth constraints mean speeds are far below having everything in VRAM.
9. Summary
Hardware selection for running LLMs locally can be reduced to one main thread: first estimate weight VRAM from parameter count and quantization precision, add the KV cache and runtime overhead, and confirm it fits; then balance compute against memory bandwidth based on your primary use cases; finally cover the supporting pieces—system memory, storage, power, and cooling. Following this order will give you clear answers to most purchasing and deployment questions.
