Local LLM Deployment: Hardware Configuration and Selection Guide
Deploying large language models locally is more than downloading weights and starting inference. It requires a system-level hardware decision involving VRAM, system memory, storage, quantization strategy, inference runtime, and latency targets. This guide explains how to estimate VRAM, choose a hardware tier, plan memory and storage, evaluate new offloading and unified-memory approaches, and follow a practical deployment and tuning workflow.
Local LLM deployment is not simply downloading a model file and starting inference. It is a system-level selection problem involving VRAM, system memory, storage, quantization strategy, inference runtime, and business latency targets. Many developers focus only on GPU memory, but in practice: VRAM determines the upper limit, memory determines what can be loaded, storage determines cold-start and swapping efficiency, and quantization plus layer-wise offloading determine the cost and speed balance. This article presents a practical, reusable hardware configuration and selection method from an engineering perspective.
VRAM remains central, but it is not the only variable
In most local inference scenarios, VRAM is still the most important hardware constraint. Model weights, KV Cache, intermediate activations, and inference runtime overhead all consume VRAM. If VRAM is insufficient, the system may swap frequently or fail to load the model entirely. There is an important gap between “can run” and “usable”: a model may start on a small GPU through quantization or layer offloading, but response speed, concurrency, and long-context behavior may not meet production requirements.
That said, quantization compression, Mixture-of-Experts (MoE) architectures, weight offloading, and unified memory architectures have allowed system memory and SSDs to extend VRAM in practice. They do not replace VRAM, but they reduce the hard requirement for an extremely large VRAM card. From an engineering perspective, treat the hardware as one system: VRAM handles high-frequency access, memory holds some weights and caches, and storage holds model files and cold data. When selecting hardware, first make VRAM and system memory capacity match, then evaluate storage bandwidth and capacity.
Estimating VRAM before buying hardware
A practical VRAM estimation formula is:
Total VRAM requirement ≈ weight memory + KV Cache + activations/intermediate tensors + runtime overheadWeight memory ≈ parameter count × bytes per parameterKV Cache ≈ layers × attention head dimension × sequence length × batch size × precision bytes × coefficient
Bytes per parameter depend on quantization precision. FP16 is roughly 2 bytes per parameter, 8-bit is roughly 1 byte per parameter, and 4-bit is theoretically about 0.5 bytes per parameter. In practice, real 4-bit quantized models also need additional memory for scaling factors, group quantization, and runtime layout. Therefore, do not simply calculate final VRAM usage as “parameter count × 0.5.” Reserve 15–30% extra overhead.
The following pseudocode is not a precise estimator, but it shows how parameter count, quantization bit width, context length, and batch size all affect final VRAM usage.
def estimate_vram(params_b, bits_per_param, seq_len, batch_size, overhead_ratio=1.25):bytes_per_param = bits_per_param / 8weight_gb = params_b * 1_000_000_000 * bytes_per_param / (1024 ** 3)kv_cache_gb = 0.05 * (seq_len / 4096) * batch_size # order-of-magnitude estimate; calibrate per model architecturebase = weight_gb + kv_cache_gbreturn base * overhead_ratioprint(estimate_vram(params_b=9, bits_per_param=4, seq_len=4096, batch_size=1))
In long-context and high-concurrency scenarios, KV Cache growth cannot be ignored.
VRAM tier quick reference
The table below gives a practical reference for common VRAM/memory tiers and the model ranges they can reasonably support. “Can run” usually means the model can load with quantization on a single stream and a relatively short context. “Comfortable” means response speed, stability, and context length are more suitable for daily use.
| VRAM / memory tier | Typical model range after quantization | Common hardware form | Usage recommendation |
|---|---|---|---|
| 8 GB | 4B–9B small models, or some small-activation MoE models | Entry-level discrete GPU, thin-and-light laptop GPU | Learning, lightweight Q&A, offline summarization; be careful with long context and concurrency |
| 12 GB | 9B–14B quantized models, some medium-size MoE models | Mainstream discrete GPU | Daily development and personal assistant; models above 27B usually need layer-wise offloading |
| 16 GB | 14B–27B low-bit quantized models; 9B models are comfortable | Mid-to-high discrete GPU | Balanced capability and speed; suitable for local knowledge-base Q&A and code assistance |
| 24 GB | 27B–32B quantized models; larger models can try low-bit quantization | High-end discrete GPU | Higher-quality inference, longer context, and light concurrency |
| Larger unified memory | Larger parameter models or multiple parallel models | Unified memory device, workstation | Focus on memory bandwidth and inference runtime optimization, not just capacity |
For MoE models, total parameter count is not the only metric. Total parameters determine weight storage, while active parameters determine per-token compute. If VRAM is insufficient, even a model with small active parameters may still require memory or storage participation because of its large total weights, leading to higher time-to-first-token and lower throughput.
Memory and storage: from supporting roles to important buffers
When full model weights cannot fit into VRAM, a common approach is layer-wise offloading: high-frequency or hot layers stay in VRAM, less frequently used layers go to system memory, and some cold data may be read from SSD when needed. This changes “cannot load” into “can run,” but with swapping overhead.
System memory should cover at least one to two times the quantized weight size, or should provide enough space for the chosen offloading strategy. For storage, choose SSDs with high sequential read bandwidth and good random read performance, because model loading and swapping mix large sequential reads with random access.
Storage capacity planning should account for not only model files, but also quantized versions, adapter weights, vector indexes, logs, and caches. For local knowledge-base Q&A, vector databases and document indexes also consume significant space. It is advisable to separate model files from business data to avoid disk contention during cold start.
What has changed: layer-wise offloading, unified memory, and smaller models
A major trend in local deployment is “if VRAM is not enough, let the system compensate.” Key ideas include weight offloading, on-demand loading, unified memory addressing, and more aggressive quantization compression. These approaches allow 12 GB or 16 GB GPUs to run larger models under certain conditions, but developers must distinguish between “deployable” and “usable.” If generating every token requires heavy swapping, the interactive experience will degrade significantly.
Another trend is the engineering optimization of small models and MoE architectures. Small models can be tried on 4–8 GB VRAM and are suitable for edge devices, offline tools, and low-concurrency services. MoE models reduce per-token compute through sparse activation, but they place higher demands on memory capacity and scheduling strategy. Hardware selection should be driven by business latency, context length, concurrency, and answer quality, not simply by parameter count.
Deployment workflow and tuning recommendations
A practical local deployment workflow can be summarized as follows:
- Define the business goal: offline Q&A, code assistance, document summarization, or batch processing. This determines the model scale and quantization level.
- Estimate resources: estimate VRAM for weights, KV Cache, activations, and runtime overhead, then leave margin for system memory and storage.
- Choose a quantization strategy: prioritize well-validated quantized versions with acceptable quality loss, and test long-context scenarios separately.
- Configure the inference runtime: set context length, batch size, concurrency, and cache strategy deliberately; avoid default parameters that consume all available VRAM.
- Establish monitoring: record time-to-first-token, tokens per second, VRAM usage, memory swapping, and error rate. If swapping is frequent, reduce context length or concurrency first.
- Use cloud services for surrounding workflows where appropriate: general cloud object storage, container platforms, and monitoring/alerting can be used for model distribution, version management, and log collection. Local inference capacity planning still depends on local hardware constraints.
When tuning, follow this order: first reduce context length, then reduce concurrency, and only then consider lowering quantization precision. Context length has a large impact on KV Cache, so blindly enabling very long context can dramatically increase VRAM pressure. Higher concurrency amplifies cache and intermediate tensor usage. Quantization that is too aggressive may degrade output quality and should be validated with a business-specific evaluation set.
Selection summary
For learning and lightweight use, 8–12 GB VRAM with 4B–14B quantized models is a reasonable starting point. For stable local knowledge-base Q&A and code assistance, 16–24 GB VRAM is more reliable. For larger models or higher concurrency, consider larger VRAM or unified-memory devices with sufficient system memory and fast SSDs.
New techniques do make it possible to run larger models on limited VRAM, but they should be treated as a cost-optimization measure, not as a replacement for capacity planning. Final hardware selection should answer three questions: can the model load and run stably, is interactive speed acceptable, and does output quality meet business requirements? Only when all three are satisfied does local deployment have real production value.
