Local LLM Deployment: A Practical Guide to VRAM Tiers and Quantization

    This guide explains why VRAM remains the first constraint in local LLM deployment, covering the three dimensions that matter (capacity, bandwidth, and KV cache), a formula and sample code for estimating requirements, and the key techniques that lower the VRAM threshold (quantization, MoE sparse activation, architectural efficiency, KV cache optimization, and memory offloading). It includes a cheat sheet for what fits on 8GB, 12GB, 16GB, 24GB, and 48GB GPUs, deployment options and tuning steps, and a checklist for cutting through vendor claims. Follow "define the use case, estimate VRAM, pick a tier, build your own evaluation, monitor continuously" to avoid setups that deploy but fall short in real use.

    Introduction: The VRAM bar is dropping, but “it runs” is not the same as “it works”

    Running large language models (LLMs) locally is moving from hobbyist experiment to routine requirement. It happens on personal mini-PCs, on corporate intranet servers, and in offline environments where data cannot leave the premises. Privacy compliance, keeping data on-premises, no network dependency, and predictable long-term costs are the usual reasons to go local.

    Still, almost everyone hits the same wall the first time: the GPU does not have enough VRAM, and the model will not fit. The rule of thumb you hear most often is “a 27B model needs at least 24GB of VRAM, so a 16GB card is out of the question.” For mainstream quantization schemes, that rule is roughly right. But the recent discussion around local models has surfaced a series of counter-intuitive results:

    • Someone is running a sparsely activated model with a total parameter count in the hundreds of billions on a 12GB consumer GPU.
    • Someone has squeezed a 27B-class model down to about 6GB and claims it retains over 90% of the original model’s capability on public benchmarks.
    • There are models with only about 4B parameters that, once quantized, weigh just over 2GB. They run not only on an older 4GB card but even on CPU alone.

    Are these real engineering progress or marketing noise? Taking them apart one by one, they represent three distinct routes: compression, architecture, and small models. What they have in common is that the absolute VRAM floor is being pushed down systematically.

    That said, VRAM is still the first constraint in local deployment. What has changed is that we now have a fairly mature “VRAM economics” to work with: quantize the weights to compress them, optimize the architecture to shrink the KV cache, and offload part of the data to host memory. This guide walks through that toolkit in five steps: locate the bottleneck, estimate the requirement, understand the techniques, pick a tier, and validate in production.

    1. Why VRAM is the first constraint: capacity, bandwidth, and the KV cache

    Whether a given GPU can handle local inference depends on at least three things at once.

    1.1 Capacity decides whether the model fits

    The model weights have to live entirely in VRAM for inference to be efficient. When the sum of weights, KV cache, and framework overhead exceeds available VRAM, the mild outcome is an out-of-memory error. The worse outcome is the system silently swapping part of the model out to system memory or even disk, and speed falls off a cliff. Capacity is the hard floor.

    1.2 Bandwidth decides how fast decoding goes

    LLM inference has two phases:

    • Prefill: the entire prompt is processed in one pass. This is compute-bound, so speed is mainly limited by the GPU’s raw compute.
    • Decode: tokens are generated one at a time, and every generated token requires reading all the weights from VRAM again. This is memory-bound, so speed is mainly limited by VRAM bandwidth.

    That gives a handy approximation for estimation:

    1. Decode speed (tokens/s) ≈ effective VRAM bandwidth ÷ bytes read per token

    Take a card with roughly 500GB/s of VRAM bandwidth running a 4-bit quantized model with about 3B active parameters. The theoretical decode speed is about 500 ÷ 3 ≈ 166 tokens/s. Real-world speed will be discounted by framework overhead, attention computation, and sampling strategy, but the order of magnitude holds.

    This also explains an important phenomenon. For sparsely activated models, the total parameter count can be huge, while each token requires reading only the parameters that were actually activated. That is the real reason “small VRAM, big model” works in the decode phase.

    1.3 The KV cache: the invisible heavyweight

    The longer the context and the higher the concurrency, the more VRAM the KV cache consumes. Many people hit “the model loads, then crashes after a few sentences” during debugging, and the cause is usually right here.

    2. How to estimate VRAM needs: weights, KV cache, and runtime overhead

    Local VRAM usage breaks down into three parts:

    1. VRAM usage ≈ weights + KV cache + runtime overhead

    2.1 Weights: parameter count × bytes per parameter

    • FP16/BF16: 2 bytes per parameter
    • 8-bit quantization: about 1 byte per parameter
    • 4-bit quantization: about 0.5 bytes per parameter, slightly higher in practice once group metadata and any layers kept at higher precision are counted

    For a 27B model, that works out to roughly 54GB at FP16, about 27GB at INT8, and 14–18GB at 4-bit. That is exactly why the “24GB to start” rule of thumb exists.

    2.2 KV cache: the second cost, unrelated to parameter count

    KV cache size is determined by the number of layers, number of KV heads, head dimension, context length, batch size, and cache precision. Note that it has no direct relationship with parameter count. A 30B model and a 4B model can easily have very similar KV cache footprints.

    • Grouped-query attention (GQA): several query heads share one set of key/value heads. This design is now common in mainstream models and shrinks the KV cache to a fraction of its original size.
    • Query and key-value sharing attention (a design used by some models): merges the key and value projections further for a higher compression ratio.
    • Cache quantization: quantizing the KV cache to 8-bit or even 4-bit saves more than half the space on top of that.

    2.3 Runtime overhead: always leave headroom

    Framework memory usage, inference context, and temporary buffers for attention computation typically need 0.5–2GB reserved. Concurrent requests and long contexts need more.

    The snippet below lets you estimate VRAM needs quickly before you buy:

    1. import math
    2. # Bytes per parameter at each precision level
    3. PARAM_BYTES = {"fp16": 2.0, "int8": 1.0, "int4": 0.55} # int4 includes grouped-scaling metadata
    4. def estimate_vram(param_count_b, quant="int4", layers=64, kv_heads=8,
    5. head_dim=128, ctx=4096, overhead_gib=1.5):
    6. """
    7. Estimate the VRAM required for inference, in GiB.
    8. param_count_b: parameters participating in the forward pass (in billions).
    9. For sparse models, use the active parameter count.
    10. """
    11. weights = param_count_b * PARAM_BYTES[quant] * (1024 ** 3) / (1024 ** 3)
    12. # KV cache = 2 (K and V) × layers × kv_heads × head_dim × ctx × bytes per element
    13. kv_cache = 2 * layers * kv_heads * head_dim * ctx * 2 / (1024 ** 3)
    14. return {"weights(GiB)": round(weights, 1),
    15. "KV_cache(GiB)": round(kv_cache, 1),
    16. "total_estimate(GiB)": round(weights + kv_cache + overhead_gib, 1)}
    17. print(estimate_vram(27)) # ~14.9 GiB of weights, ~17.9 GiB total
    18. print(estimate_vram(27, ctx=32768)) # 8x the context, ~21.4 GiB total
    19. print(estimate_vram(3, ctx=8192)) # sparse model with ~3B active, ~3.0 GiB total

    The snippet ignores structural differences between models, such as layer counts and KV head counts, so treat the output as an order-of-magnitude check. Take a 27B model at 4-bit. At a 4K context, including overhead, you need about 18GB. A 16GB card is tight, while a 24GB card has plenty of room. Stretch the context to 32K and the KV cache grows from about 0.5GB to about 4GB, pushing total demand close to 22GB and eating up most of your headroom.

    3. What makes large VRAM optional

    Back to the opening question: why can 12GB of VRAM run a model with hundreds of billions of parameters, and why can a 27B model be squeezed into 6GB? At least five techniques are at work.

    3.1 Quantization: the most direct weight compression

    Quantization approximates weights with lower numerical precision. It trades a small loss in accuracy for several times the memory savings and better memory-bandwidth efficiency.

    • Post-training quantization (PTQ): compress the model after training, with no retraining. It is the fastest route to production.
    • Group-wise quantization: split the weights into groups along the columns and give each group its own scale factor. It balances accuracy against size.
    • Quantization-aware training (QAT): simulate quantization error during training. It recovers quality best, but costs the most.

    There is really only one decision criterion: does it hold up on your own business evaluation set? Public leaderboards are a reference at best. Tasks like code generation, math reasoning, and long-document summarization are often far more sensitive to quantization error than casual chat.

    3.2 Sparse activation (MoE): many parameters, only some used per token

    Mixture-of-experts (MoE) architectures split the feed-forward layers into multiple “expert” subnetworks. Each token is routed to only a few of them.

    • Total parameter count determines the model’s knowledge capacity.
    • Active parameter count determines how many parameters are read from VRAM per token during single-card decoding.

    As a result, a model with hundreds of billions of total parameters but only a few to low-teens billions of active parameters needs just a few GB of resident weights at 4-bit. Experts that stay resident or are swapped in depend on the framework’s strategy. This is the architectural basis for “hundreds of billions of parameters on 12GB of VRAM.”

    It is worth being clear-eyed about the trade-offs:

    • Switching between experts adds extra data movement.
    • The larger the total parameter count, the more VRAM you need if you want all weights resident.
    • The actual experience depends much more on the active parameter scale, memory bandwidth, and the inference framework’s scheduling policy.

    3.3 Extreme compression and architectural efficiency

    Back to the 27B model squeezed into about 6GB. There are two possible sources:

    • Extreme compression: if it is not plain 4-bit quantization, but a mix of lower bit widths, sparsification, weight trimming, or structural pruning, the size can drop to roughly one-ninth of the original. This kind of compression usually comes at the cost of perceptible quality loss. Any claimed retention rate has to be verified item by item on your own evaluations.
    • Architectural efficiency: high-density architectures reuse parameters more deeply, share attention projections, and so on, reaching comparable capability with fewer parameters. Here, the size drop comes from the parameter count itself, not from compression.

    These two routes have very different engineering implications. Before picking a model, work out where the size reduction actually comes from.

    3.4 KV cache optimization: making room for long contexts

    Shared-attention designs like GQA, paged KV cache management, cache quantization, and sliding-window attention are taking the “VRAM killer” edge off long contexts. The space they free up can go directly into a larger context window or higher concurrency.

    3.5 Memory/disk offloading: borrowing host memory when capacity runs out

    When a model genuinely will not fit in VRAM, some layers or expert weights can be offloaded to host memory, or even to disk. They are then moved into VRAM on demand when computation needs them. This lets low-VRAM devices run large models, at the cost of significantly higher latency and a heavy dependence on host memory bandwidth and capacity.

    The same is true of extreme demos like “hundreds of billions of parameters in 12GB of VRAM.” They usually rely on unified memory architectures (CPU and GPU share an address space) or aggressive offloading. Those configurations are mostly about proving technical feasibility. The moment real workloads are involved, throughput, time to first token, and stability all need serious load testing.

    4. VRAM tier cheat sheet: what runs on 8GB, 12GB, 16GB, and 24GB

    The table below assumes 4-bit quantization, a GQA-style architecture, and single-request workloads. What actually fits varies with context length, the inference framework’s implementation, and model architecture, so measure before you commit.

    VRAM tier Models that fit (4-bit) Typical hardware Typical use cases
    8GB Dense 3B–9B; sparse models with ~3B active Entry-level mainstream consumer GPU Local assistants, code completion, lightweight Q&A
    12GB Dense 9B–14B; sparse models with a few to low-teens billions active Previous- and current-gen mid-to-upper consumer GPU Moderately complex chat, RAG knowledge Q&A
    16GB Dense ~14B; sparse models with tens of billions of total parameters and a few billion active Mid-to-upper consumer GPU Primary personal development machine, longer-context applications
    24GB Dense 27B (4K–8K context); larger sparse models with more active parameters High-end consumer GPU, entry-level professional GPU High-quality chat, shared use by small teams
    48GB Dense 32B–34B; 70B-class models need 2–3-bit quantization and a drastically shortened context Professional inference GPU On-premises enterprise deployments

    Before buying a card, work through three steps:

    1. Nail down your typical context length. System prompts, retrieved document chunks, and multi-turn history all consume context, so planning for 32K or more is the safer bet.
    2. Estimate your target concurrency. For personal use you can ignore it. For a shared team setup, you have to account for it.
    3. Run the numbers. Use the formula and snippet from section 2, then compare them against the actual card you are considering. That way you avoid “it boots on the card but the workload crawls.”

    As for claims like “hundreds of billions of parameters on 12GB will crash GPU prices,” the technical picture is this. Sparse activation and unified memory architectures do make it possible for very large models to run on low-VRAM devices. But those demos optimize for feasibility, not cost-efficiency. VRAM remains a hard requirement for sampling rate, long context, and high concurrency, and it does not lose value because of a single demo. The fundamentals of the hardware market will not change either.

    5. Deployment practice: choosing a topology and tuning it

    5.1 Choose a deployment topology that matches your use case

    • Single-GPU local inference: suited to personal development and privacy-sensitive internal tools. A 4-bit quantized model in the 7B–27B range is the sweet spot.
    • CPU + GPU hybrid inference: offload some layers when VRAM is short. It fits offline batch jobs where lower speed is acceptable.
    • Multi-GPU tensor parallelism: split the model across cards. It suits models above 32B or high-concurrency serving, but watch inter-GPU communication overhead.
    • Elastic cloud deployment: when traffic has obvious peaks, use the cloud platform’s container services to scale in and out on demand. Distribute model files via object storage, and track VRAM usage and inference latency continuously with monitoring and alerts.

    Inference engines generally come in two flavors:

    • Lightweight local route: low resource footprint and good cross-platform support. It fits single-machine, single-user setups.
    • High-throughput serving route: continuous batching, paged KV cache management, and efficient attention kernels raise concurrency. It suits multi-user private deployments.

    Reference configuration:

    1. model:
    2. quantization: 4bit # evaluate 3bit first on 8GB or smaller cards
    3. context_length: 8192 # adjust as needed; long contexts scale the KV cache linearly
    4. service:
    5. max_batch_size: 8 # lower this first when VRAM is tight, then shorten the context
    6. kv_cache_dtype: fp8 # enable when supported; halves KV cache usage
    7. gpu_layers: -1 # all layers on GPU; offload some layers to CPU when VRAM is short

    Tuning follows the principle of “fit first, then go fast”:

    1. Shorten the context first. Compared with dropping quantization precision, this usually costs the model less quality.
    2. Then adjust batch size and concurrency, balancing throughput against latency.
    3. Monitor VRAM usage and time to first token, keeping VRAM utilization below 80% to avoid paging and the sudden speed drop that comes with it.
    4. Run a quantization regression. After every quantizer or inference framework change, re-run a fixed evaluation set so you don’t ship “new version, worse output.”

    6. Reading the hype critically: three traps to watch

    1. “Deployable” is not “usable.” If generation runs at one or two tokens per second, or takes minutes to produce the first token, user retention is not a realistic conversation.
    2. Benchmark scores are not business capability. Public evaluations suffer from data contamination and leaderboard gaming. Verify retention rates on a test set close to your business, ideally with blind ratings from colleagues who were not involved in model selection.
    3. Extreme configurations are not everyday experience. Shared memory and aggressive offloading depend on specific hardware platforms and driver environments, and may not reproduce on another machine.

    Four questions to ask before adopting any local deployment technique:

    • On my own business evaluation set, is the quality loss acceptable?
    • Do time to first token and generation speed meet the interaction requirements?
    • Does it reproduce reliably on commodity hardware with ordinary memory configurations?
    • Are VRAM and memory usage stable under long-running load?

    Only when all four answers are yes is it a genuinely valuable step forward.

    Conclusion

    Back to the opening question: is VRAM the only core spec that matters for local LLM deployment? The answer is still yes. Capacity decides whether the model fits, bandwidth decides how fast it runs, and the KV cache decides how much context you get.

    What has changed is that quantization, sparse activation, architectural optimization, and memory offloading are pulling that floor down from tens of gigabytes to the mid-teens and below. An 8GB entry-level card runs models with billions of parameters smoothly. A 12GB card handles sparse models with a few to low-teens billions of active parameters. A 24GB card is enough to run a 27B-class model well.

    A lower technical barrier does not mean you can pick a card casually. Following the sequence of defining the use case, estimating VRAM, choosing a tier, building your own evaluation, and monitoring continuously is what keeps you out of the “deployed but unusable” trap. It is also what turns local LLMs into a reliable source of productivity.