Local LLM Deployment: A Practical Guide to Hardware Requirements and VRAM Estimation
Deploying large language models locally requires understanding how VRAM, system memory, and storage shape what you can run. This guide explains how to estimate VRAM usage from model size and quantization precision, covers the roles of memory and storage, provides a VRAM-to-model-size reference table, and outlines a practical hardware selection workflow.
1. Why VRAM Is the Core Constraint for Local Deployment
During LLM inference, model weights must reside in the accelerator’s VRAM so they can be read efficiently during computation. VRAM capacity determines whether a model can be fully loaded, while VRAM bandwidth largely determines text generation speed. For this reason, the first step in local deployment is usually confirming that VRAM is sufficient, with other hardware choices built around that baseline.
When VRAM is insufficient, the model cannot fit entirely on the accelerator, and the inference framework will offload some layers to system memory. This gets the model running, but data must be moved back and forth between VRAM and memory, significantly reducing generation speed. In other words, “it launches” and “it runs smoothly” are two different standards—evaluate them separately when selecting hardware.
2. Estimating VRAM Usage from Parameter Count and Precision
2.1 The Basic Formula
VRAM used by model weights can be roughly estimated as:
Weight VRAM (GB) ≈ Parameters (billions) × bits per parameter ÷ 8
Bits per parameter depends on the precision. Common precisions and their bytes per parameter:
- 16-bit floating point (FP16): ~2 bytes per parameter. Suited to training or inference where maximum precision matters.
- 8-bit integer quantization (INT8): ~1 byte per parameter. Minor precision loss, half the VRAM.
- 4-bit quantization: ~0.5 bytes per parameter. The most common trade-off for local deployment.
2.2 Budgeting for Runtime Overhead
Weights are only part of the story. Inference also needs key-value caches for the attention mechanism, which grow with context length. The inference framework itself, activations, and temporary buffers also take up space. As a rule of thumb, reserve about 20% headroom on top of the weight estimate—more when contexts are long.
Here is a sample estimation function for quickly comparing different models:
def estimate_vram_gb(params_billion: float,bits_per_weight: float,overhead_ratio: float = 0.2) -> float:"""Estimate VRAM (GB) needed to load model weights.params_billion: parameter count in billionsbits_per_weight: bits per weight after quantization, e.g. 16, 8, 4overhead_ratio: reserved ratio for activations and runtime overhead"""weight_gb = params_billion * bits_per_weight / 8return weight_gb * (1 + overhead_ratio)if __name__ == "__main__":for size in (4, 9, 14, 27, 32, 70):print(f"{size}B model, 4-bit quantization: ~{estimate_vram_gb(size, 4):.1f} GB")
Note that this estimate only covers weights and typical overhead—it is no substitute for real testing. Different inference frameworks’ memory management, batch sizes, and context lengths all affect final usage.
2.3 The Special Case of Mixture-of-Experts Models
Some models use a mixture-of-experts (MoE) architecture with a very large total parameter count, but only activate a subset of experts per inference. Their compute cost is lower than a dense model of equivalent total size, yet VRAM must still hold all experts’ weights. VRAM requirements for MoE models are therefore usually estimated by total parameters, not active parameters.
3. Beyond VRAM: The Practical Roles of Memory and Storage
3.1 System Memory
System memory serves two purposes. First, during model loading, weight files pass through memory before being written to VRAM. Second, when VRAM is insufficient, some layers are offloaded to memory for computation. In that case, memory capacity determines how much can be offloaded, and memory bandwidth affects the speed of the offloaded portion. In practice, system memory should generally be at least as large as VRAM; extra headroom reduces loading waits and paging issues.
3.2 Unified Memory Architectures
Some devices use a unified memory architecture shared by CPU and GPU. These can allocate a large memory pool to the model, running models that a single card’s VRAM could not fit. The trade-off is that memory bandwidth is usually lower than dedicated VRAM bandwidth, limiting generation speed. Such setups are better suited to latency-insensitive scenarios like offline processing or personal experimentation.
3.3 Storage
Storage mainly affects model loading time. Large model weight files often run tens of gigabytes, so a fast SSD shortens cold start times. The impact is more noticeable if you switch models frequently. Storage doesn’t participate directly in inference, but it shapes the experience of starting services and switching models—don’t ignore it.
3.4 The Limits of “Substituting Memory and Storage for VRAM”
A recent claim suggests that with enough memory and storage, even small-VRAM machines can run extremely large models. In principle, tiered scheduling and on-demand swapping do let a model “run.” But moving data across memory tiers is expensive, and generation speed may drop to the point of being unusable interactively. To judge whether such a setup is viable, check two things: whether the model can load, and whether generation speed meets your actual needs.
4. Estimating Runnable Model Sizes by VRAM Tier
The table below applies the formula above with 4-bit quantization and 20% overhead reserved. Use it as a selection reference only—actual capacity depends on context length, inference framework, and model architecture.
| VRAM Capacity | Estimated Weights + Overhead at 4-bit | Suitable Model Sizes | Notes |
|---|---|---|---|
| 8 GB | 4B ~2.4 GB, 9B ~5.4 GB | 4B and below comfortable; 9B loadable | Little room left for context with 9B; keep context lengths short |
| 12 GB | 9B ~5.4 GB, 14B ~8.4 GB | 9B comfortable; 14B tight | 14B requires reduced context or lower concurrency |
| 16 GB | 14B ~8.4 GB, 27B ~16.2 GB | 14B comfortable; 27B needs layer offloading | 27B noticeably slower at this tier |
| 24 GB | 27B ~16.2 GB, 32B ~19.2 GB | 27B to 32B runs directly | Still reserve headroom for long contexts |
| 48 GB and above | 70B ~42 GB | 70B-class feasible | Multi-card or large-capacity single-card setups both work |
As an example, a 27B model needs roughly 54 GB of weight VRAM at FP16, but only about 13.5 GB at 4-bit quantization—a fourfold difference. This makes quantization the most direct way to cut VRAM requirements, though the precision loss must also be evaluated.
5. A Word on Ultra-Low-Bit Quantization
As quantization techniques advance, some approaches compress models to even lower bit widths. Higher compression means greater VRAM savings, but typically more noticeable precision loss. Judging whether a quantization scheme is usable shouldn’t rely on model size alone—check benchmark results on your target tasks, such as knowledge Q&A, code generation, and instruction following.
Different quantization methods can produce very different results for the same model. It’s best to run comparative tests on your own business data rather than relying on a single marketing metric. Advertised claims like “retains X% of capability” are often based on specific benchmarks and may not reflect real-world scenarios.
6. Selection Workflow and Practical Tips
A sensible selection process looks like this:
- Define your use case. Chat, coding assistance, text embeddings, and multimodal understanding each have different requirements for model size and hardware. Identify the task first, then choose a model tier.
- Estimate VRAM. Use the formula in Section 2 to compute weights plus overhead for your target model at candidate precisions.
- Budget for context. Your longest expected input and output lengths determine key-value cache size—calculate this separately.
- Check memory and storage. Verify that system memory is no smaller than VRAM, and confirm that storage read speed for model files is acceptable.
- Validate with real tests. Focus on first-token latency, sustained generation speed, and behavior under concurrency. Paper estimates only give you a range; actual measurements determine whether a setup works.
Common pitfalls include: focusing only on the parameter count in a model’s name while ignoring quantization; treating “it loads” as “it works”; and considering VRAM alone while overlooking how memory capacity affects offloading. Avoiding these mistakes can significantly reduce wasted hardware investment.
