Local LLM Deployment: VRAM Requirements and Hardware Selection Guide

    When you deploy an open-source LLM locally, the first question is almost always the same: how much VRAM does this model actually need? The figures published by model authors are theoretical values calculated from full-precision weights, and they are rarely useful for anyone planning a quantized deployment on consumer hardware. This guide explains why those numbers mislead, breaks down where VRAM actually goes during local inference, maps practical quantized VRAM footprints to common GPU tiers (6GB through 24GB+) and to unified-memory machines, and shows how to treat context length as its own VRAM variable. Use it to pick a model size and a hardware baseline that stay stable under real workloads rather than just getting a model to load.

    1. Why official VRAM numbers are only a rough reference

    When you move an open-source large language model to local hardware, almost every developer hits the same question: how much VRAM does this model really need?

    What model authors publish is usually a theoretical number derived from full-precision weights (BF16/FP16). The math is straightforward — each parameter takes roughly 2 bytes, so a 31B-parameter model needs about 62GB of VRAM for its weights alone. For the vast majority of developers who want to run a quantized build on consumer hardware, that figure has almost no direct practical value.

    There are three reasons:

    1. Real deployments rarely stay at full precision. Most local setups use INT8 or INT4 quantization, which cuts VRAM use by a large multiple.
    2. Weights are only one part of the picture. KV cache, activations, memory reserved by the framework, and the context window all consume VRAM on top of them.
    3. Inference frameworks, backends, and quantization formats differ significantly from one another. Swapping in a different quantization scheme for the same model can shift VRAM use by several GB.

    The more pragmatic approach: plan around the measured VRAM footprint of the quantized build, then leave headroom for runtime overhead.

    2. Where the VRAM actually goes

    Before choosing hardware, it helps to know what a single local inference run spends VRAM on. Total usage breaks down into roughly four parts:

    • Model weights. Still the dominant consumer even after quantization. INT4 quantization typically brings weight size down to about one quarter of BF16.
    • KV cache. Grows linearly with context length. Longer contexts and larger batch sizes both increase KV cache demand. In long-context scenarios this portion can even approach the size of the weights themselves.
    • Runtime activations and framework overhead. Fixed costs such as the inference engine itself, the CUDA context, and temporary buffers.
    • Safety margin. Mandatory to reserve, otherwise long inputs or concurrent requests can easily trigger out-of-memory (OOM) failures.

    One frequently overlooked point: “it loads” and “it runs stably” are not the same thing. If weights just barely fill the available VRAM, the moment the context or the generated output gets a little longer, the process can die outright.

    3. Quick reference for quantized VRAM usage

    The numbers below are empirical ranges for quantized deployments, provided as a selection reference. Actual figures fluctuate depending on the quantization scheme, the inference framework, and the context length:

    Parameter scale Quantized VRAM footprint (reference) Recommended VRAM tier Best for
    ~2B ~2–4GB Lightweight devices under 4GB Validating a minimal working pipeline
    ~4B ~4–6GB 6GB GPU or 16GB unified memory as a starting point Most people’s first local setup
    ~26B (sparse architecture with ~4B active) ~12–16GB 16GB tier, more comfortable headroom Stronger reasoning without going to the heaviest models
    ~31B ~20–24GB 24GB and above Quality, coding, and long context first

    Note that entries like “~26B with ~4B active” describe sparse (MoE) architectures — models with a large total parameter count that activate only a subset of them on each forward pass. Their VRAM use and inference speed often beat dense models with the same total parameter count.

    4. Choosing hardware by VRAM tier

    GPUs with around 6GB. Start honestly with models in the 4B range. Larger models are not impossible to attempt, but beginning at a heavy parameter count makes it very easy to blow up VRAM during loading or on the first inference pass. At this stage the goal is to get the pipeline working end to end, not to chase maximum quality.

    GPUs with 8GB–12GB. The 4B class runs comfortably here, and you can also evaluate low-bit quantized versions of larger models. The key reminder: do not spec your setup right at the limit. Context length and runtime overhead consume part of the usable VRAM, so it is worth reserving at least 1–2GB of headroom.

    GPUs with 12GB–16GB. This is the tier where ~26B sparse-architecture models become worth seriously attempting. Pay close attention here: being able to start does not mean it runs stably. Focus on actual inference throughput rather than nominal specifications, and stress-test with long inputs and multi-turn conversations.

    GPUs with 24GB and above. Higher-quality ~31B models are a better use of this capacity. The same caveat applies: the VRAM table is only a reference. Long contexts substantially increase KV cache usage, and inference speed declines as context grows.

    5. Evaluating unified memory devices

    Unified memory architecture devices follow a different evaluation logic than discrete GPUs. CPU and GPU share the same physical memory, so the question is not “is the dedicated VRAM enough” but rather total memory capacity and memory bandwidth.

    Unified memory capacity Recommended model scale Notes
    16GB 4B class to start; 26B runs but slowly Enough for everyday chat; large models are mainly constrained by bandwidth
    32GB 4B smooth, 26B worth trying A clear improvement over 16GB
    64GB Both 26B and 31B can be hosted Suited to users who value quality but do not want a discrete GPU

    On unified memory architectures the core bottleneck is usually not capacity but bandwidth. Given sufficient capacity, inference speed tends to be determined by memory bandwidth rather than compute peak. Evaluate bandwidth and capacity together when selecting hardware.

    6. Context length: the most underestimated variable

    On any hardware, context length is the factor most easily underestimated in VRAM planning. KV cache grows roughly linearly with context length, so a model that appears to fit can double its footprint at 32K context.

    Practical advice:

    • Validate stability at a shorter context first, then extend it gradually and watch for the point where VRAM usage inflects.
    • Use VRAM monitoring tools to observe the real peak rather than the static footprint right after loading.
    • Set batch size deliberately. Batched inference amplifies both the amortization benefit on weights and the KV cache overhead.
    • Prepare separate context configurations for different workloads, switching as needed between chat, code, and long-document summarization.

    7. Summary of recommendations

    1. Use the measured footprint of the quantized build, not the official theoretical number, as your planning baseline.
    2. Work backwards from your hardware VRAM tier to the model sizes you can run, and reserve 1–2GB of runtime headroom.
    3. Prioritize stable operation, verified with long-input stress tests, rather than whether the model merely starts.
    4. On unified memory architectures, weigh both capacity and bandwidth.
    5. Treat context length as an independent VRAM variable and evaluate it separately.

    Mapping this framework onto your own hardware is enough to find a reasonable balance between output quality and available resources — and to avoid a lot of dead ends.