# Local LLM VRAM Guide: How to Choose Model Parameter Size and GPU Memory
This guide explains how to size VRAM for running large language models locally, and why parameter count alone is a poor predictor. It covers the components that make up total memory demand (weights, KV cache, activations, runtime overhead), how to estimate weight memory at FP16, INT8, and 4-bit quantization, reference VRAM tiers for roughly 2B, 4B, 12B–16B, and 31B parameter models, and how quantization precision, context length, and concurrent requests shift the real requirement. It also compares discrete GPUs with unified memory systems and closes with a five-step selection process, common sizing mistakes, and recommended configurations by use case.
1. Why VRAM Sizing Is About More Than Parameter Count
When people plan to run a large language model locally, the first number they usually look at is parameter count: a 2B model, a 4B model, a model in the 10B-plus class. Parameter count does correlate with capability, but it does not map directly to VRAM consumption.
The factors that actually drive memory demand include at least the following:
- Parameter count — the total number of parameters sets the baseline weight footprint.
- Numerical precision — the same model consumes very different amounts of VRAM in 16-bit floating point, 8-bit integer, and 4-bit quantized form.
- Context length — long contexts add KV cache overhead on top of the weights.
- Concurrency and batching — serving multiple requests in parallel increases memory pressure substantially.
- Runtime framework overhead — the inference server itself needs memory and VRAM for scheduling, buffers, and temporary tensors.
- Whether you are fine-tuning or training — if the workload goes beyond inference, memory requirements rise further.
So the right questions are not “how big is this model?” but “can it run, will it be fast enough, and will it stay stable with long contexts?” A practical way to estimate is:
Total VRAM requirement ≈ model weight VRAM + KV cache VRAM + activation and temporary tensor VRAM + runtime overhead VRAM
This article focuses on local inference. Training, fine-tuning, and full parameter updates are out of scope: those workloads also have to store gradients, optimizer state, activations, and gradient checkpoints, which pushes memory demand far above ordinary inference.
2. Estimating Weight Memory
Model weights are the base consumer of VRAM. As a first approximation, you can multiply the parameter count by the number of bytes each parameter occupies.
Common precision levels and their approximate per-parameter cost:
| Precision | Approx. bytes per parameter | Characteristics |
|---|---|---|
| 16-bit floating point | ~2 bytes | High precision, heavy VRAM demand |
| 8-bit integer | ~1 byte | Balanced precision and memory use |
| 4-bit quantization | ~0.5 byte | Low memory use, but possible quality loss |
The simple estimate is:
Weight VRAM ≈ parameter count × bytes per parameter
For example:
- A ~2B parameter model in 16-bit floating point takes roughly 4GB of theoretical weight memory.
- A ~4B parameter model in 16-bit floating point takes roughly 8GB.
- A ~12B to 16B parameter model in 16-bit floating point takes roughly 24GB to 32GB.
- A ~31B parameter model in 16-bit floating point takes 60GB or more.
In practice, actual consumption is higher than the theoretical figure for several reasons:
- Quantization alignment and group scaling — 4-bit and 8-bit models typically store additional scale factors, zero points, or group parameters.
- Runtime buffers — inference engines pre-allocate buffers to avoid frequent memory allocation.
- KV cache — the longer the context, the larger the cache.
- Temporary tensors — matrix multiplications, attention computation, normalization, and similar operations produce intermediate results.
- Framework scheduling overhead — request scheduling, logging, metrics collection, and error handling all consume some resources.
For engineering work, then, do not provision hardware against the theoretical weight figure alone. Reserve at least 20% to 50% extra VRAM, depending on context length, concurrency, and model architecture.
3. Reference VRAM Tiers by Parameter Scale
The table below assumes local inference with a quantized deployment and gives reference ranges by parameter scale. The scales are generic; they do not point to any specific model product.
| Parameter scale | VRAM after quantization | Recommended hardware tier | Suitable scenarios | Notes |
|---|---|---|---|---|
| ~2B parameters | ~2–4GB | Lightweight devices with 4GB or less | Validating a local setup, simple Q&A | Keep context short; not suitable for high concurrency |
| ~4B parameters | ~4–6GB | Start at 6GB dedicated VRAM or 16GB unified memory | Most people’s first local experience | Watch context length and response speed |
| ~12B to 16B parameters | ~12–16GB | A 16GB tier is more comfortable | Stronger reasoning without the heaviest model | Leave headroom, or long text may overflow |
| ~31B parameters | ~20–24GB | 24GB or more is safer | Generation quality, coding ability, complex tasks, long context | Higher demands on memory bandwidth, system memory, and the inference runtime |
The “VRAM after quantization” column is not a fixed value. The same parameter scale can vary noticeably depending on the quantization scheme, context length, and concurrency settings.
4. Lightweight Tier: ~2B to 4B Parameters
4.1 The ~2B Parameter Class
Models around 2B parameters sit in the lightweight category. With 4-bit quantization, their footprint is roughly 2GB to 4GB, which makes them well suited to verifying whether a local environment works at all.
Good uses include:
- Validating the local inference pipeline;
- Checking that API calls behave as expected;
- Simple Q&A or text summarization;
- Prototype validation on low-resource devices.
The limitation matters just as much: lightweight models are not appropriate for complex reasoning, long-document analysis, high-quality multi-turn conversation, or code generation. With a long context, memory use can climb sharply and may even exhaust the memory available on the device.
4.2 The ~4B Parameter Class
Models around 4B parameters are a common entry point for local use. At 4-bit quantization they typically take about 4GB to 6GB, which covers most basic local scenarios.
A good fit for:
- Developers who want to try large model capabilities locally;
- Users who need offline text processing;
- Privacy-sensitive users who want data to stay on their own device;
- Teams building a local prototype validation system.
For this tier, plan on at least 6GB of dedicated VRAM or a 16GB unified memory device. If you want to run longer contexts reliably, 16GB or more of memory or VRAM is the safer choice.
5. Mid Tier: ~12B to 16B Parameters
Models in the ~12B to 16B range are generally considered a mainstream tier for local deployment. Under quantization, expect roughly 12GB to 16GB of VRAM.
The appeal of this tier is the balance: noticeably stronger comprehension, expression, and complex-task handling than lightweight models, without demanding extreme hardware.
Typical scenarios:
- More demanding knowledge Q&A;
- Multi-turn conversation;
- Summarizing medium-length text;
- Structured information extraction;
- Writing assistance;
- Basic code generation and explanation;
- Local knowledge base Q&A prototypes.
For this tier, prefer 16GB of dedicated VRAM or 16GB or more of unified memory. Sixteen gigabytes is a reasonable balanced starting point, but if you regularly handle long text, code files, or multi-turn conversations, leave more headroom.
One point deserves emphasis: this class of model can look fine at short context lengths, but as context grows the KV cache expands quickly. Weight footprint alone is not enough to plan around; the actual input length of your tasks matters too.
6. Higher Tier: ~31B Parameters
Models around 31B parameters generally represent the higher end of local deployment in terms of resource requirements. At 4-bit quantization, expect roughly 20GB to 24GB, and in some scenarios more.
This tier suits users with high expectations for generation quality, complex reasoning, long-text processing, and code comprehension.
Typical scenarios:
- High-quality content generation;
- Complex code understanding and refactoring suggestions;
- Long-document analysis;
- Multi-step task planning;
- High-quality multi-turn conversation;
- Local applications with strict demands on output consistency.
Note that the hardware requirement is not just “big enough VRAM.” Memory bandwidth, system memory capacity, inference runtime efficiency, and storage read speed all matter. If VRAM runs short, the system may be forced into swapping or offloading, and response times can drop noticeably.
For the ~31B class, prepare at least 24GB of VRAM or equivalent unified memory. If you also need long contexts or higher concurrency, add further headroom.
7. How Quantization Precision Affects the Real Experience
Quantization is one of the main levers for reducing VRAM consumption in local deployment. The core idea is to represent parameters at lower precision, cutting both storage and compute cost.
7.1 16-bit Floating Point Inference
16-bit floating point inference generally offers higher precision and suits scenarios with strict output quality requirements. The downside is heavier memory use. For models in the 10B-plus class, 16-bit is often not the first choice for consumer local deployment.
7.2 8-bit Integer Inference
8-bit integer inference balances precision and memory more evenly. It uses less VRAM than 16-bit floating point while usually preserving fairly stable output quality, which makes it attractive when memory is limited but quality loss should be minimized.
7.3 4-bit Quantized Inference
4-bit quantization cuts weight memory substantially and is one of the most common approaches in local deployment. It can bring models that would otherwise need a lot of VRAM down to more modest hardware.
4-bit quantization is not free, though:
- Some models show a slight quality drop;
- Complex mathematical reasoning, long chains of logic, and code generation may be affected to some degree;
- Different quantization methods differ considerably, so real results need to be validated against the task;
- Memory use goes down, but the runtime still needs additional cache and overhead.
Lower precision is not automatically better. Choose based on the goal: 4-bit when the aim is fast validation, 8-bit or 16-bit within the available memory when stable output quality is the priority.
8. Context Length: The Hidden Variable
Many configuration recommendations look only at model weights and ignore context length. In reality, long contexts add considerably to KV cache consumption.
The KV cache holds the keys and values of historical tokens used by the attention mechanism. The longer the context, the more history must be retained, and the larger the cache.
A simplified estimate:
KV cache VRAM ≈ 2 × number of layers × hidden dimension × context length × concurrency × bytes per parameter
The formula shows that KV cache depends on context length, model architecture, precision, and concurrency together.
For example, a model may need only a few gigabytes at short context lengths, but expanding the context from 2K to 32K can increase memory use several times over. For long-document analysis, code repository Q&A, and extended multi-turn conversations, budget the memory up front.
Practical guidelines:
- Do not enable maximum context by default — if a task does not need a very long context, cap the input length.
- Separate weights from context — weights are the fixed baseline; context is the dynamic variable.
- Prioritize memory headroom for long-context work — especially with batched or multi-user requests.
- Monitor peak VRAM — average usage is not enough; watch the highs.
- Split work when necessary — for very long documents, use general engineering approaches such as chunked summarization, retrieval augmentation, or sliding windows.
9. Concurrency and Batching Amplify Memory Pressure
In a single-user local setting, the model usually handles one request at a time. Real deployments differ: local services, internal tools, and multi-user systems often have to handle concurrent requests.
Raising concurrency brings several effects:
- More KV cache instances — each active request may hold its own cache space.
- Larger activation tensors — intermediate results from parallel requests stack up.
- More scheduling overhead — the inference runtime must maintain request queues, context management, and resource allocation.
- Higher latency — as VRAM approaches its limit, the system may schedule resources frequently, slowing responses.
So if the goal is a local service rather than a single one-shot inference, do not size VRAM from a single-request estimate. Scale up by some proportion of the concurrency level.
For instance, a ~4B parameter model may need 4GB to 6GB for one request, but serving several long-context requests concurrently can push the requirement above 10GB. For a ~12B to 16B parameter model, a scenario where 16GB was comfortable at low concurrency can become tight at high concurrency.
10. Unified Memory Devices vs. Discrete GPUs
Common local hardware options include discrete GPUs and unified memory devices. Both can run models, but their resource models differ.
10.1 Discrete GPUs
A discrete GPU has its own VRAM, usually with higher memory bandwidth, which suits inference workloads. When selecting one, look closely at:
- VRAM capacity;
- Memory bandwidth;
- Compute throughput;
- Driver and inference runtime compatibility;
- Power draw and thermal headroom.
For lightweight and mid-size models, a discrete GPU generally provides a more consistent inference experience.
10.2 Unified Memory Devices
On unified memory devices, memory is shared between the system and the graphics engine. The advantage is a typically larger memory pool and flexible device form factors, which fits some local deployment scenarios.
The caveat: unified memory does not mean performance equivalent to a discrete GPU. It can be constrained by memory bandwidth, scheduling behavior, and contention with other system resources. Beyond memory capacity, therefore, pay attention to bandwidth and inference runtime efficiency.
10.3 Memory Capacity vs. VRAM Capacity
A common misconception is that more system memory automatically means faster inference. In fact, memory capacity determines whether the model can be loaded, while memory bandwidth and compute capability determine how fast it runs.
If VRAM is insufficient, parts of the model may be offloaded to system memory, causing frequent data transfers and a marked drop in response speed. Recommended principles:
- Try to cover model weights and KV cache with VRAM capacity;
- Keep system memory larger than the VRAM requirement to avoid swapping;
- Allow extra memory headroom for long-context tasks;
- Reserve additional buffer when running tasks in parallel.
11. Choosing the Right VRAM Tier
A practical selection process:
Step 1: Define the task
Different tasks place very different demands on the model:
- Simple Q&A: a lightweight model is enough;
- Text summarization: a mid-size model is usually a better fit;
- Code generation: stronger comprehension is needed;
- Long-document analysis: needs larger context and more VRAM headroom;
- Complex multi-turn conversation: needs stable inference and higher output quality.
Step 2: Decide the quantization precision
With limited hardware, start with 4-bit or 8-bit quantization. With ample VRAM and high quality requirements, consider higher precision.
Step 3: Estimate the context length
Do not size based on the model alone; estimate the real input length. If the task involves long documents, code files, or conversation history, focus on KV cache consumption.
Step 4: Reserve runtime headroom
Add 20% to 50% on top of the theoretical estimate. Reserve more for long contexts, high concurrency, or complex inference services.
Step 5: Load test
Theoretical estimates are only a starting point; validate with real workloads. During load testing, watch:
- Peak VRAM usage;
- Average response time;
- Whether long contexts overflow;
- Whether concurrent requests cause noticeable stalls;
- Whether memory swapping occurs;
- Whether output quality meets expectations.
12. Common Misconceptions
Misconception 1: If the model loads, the configuration is sufficient.
Loading only means the weights fit in VRAM or memory. It says nothing about long contexts, concurrent requests, or stable service. Many memory problems appear during dynamic inference, not at load time.
Misconception 2: Bigger parameter count is always better.
Larger models generally express more capability, but they also cost more VRAM and more compute per inference. If the hardware cannot support them, a larger model may end up slower, less responsive, or impossible to deploy.
Misconception 3: 4-bit quantization has no cost.
It reduces VRAM use substantially, but can introduce quality variation on some complex tasks. Whether that is acceptable depends on validating against the specific workload.
Misconception 4: Enough VRAM means high speed.
VRAM only solves whether the model fits. Inference speed also depends on compute capability, memory bandwidth, model architecture, batching behavior, context length, and runtime efficiency.
Misconception 5: More system memory is always better.
Large memory helps avoid swapping, but insufficient memory bandwidth can still limit inference speed. Capacity and bandwidth need to be considered together.
13. Summary of Recommended Configurations
Overall, a sensible strategy for local deployment:
- Lightweight validation: a ~2B parameter model with roughly 2GB to 4GB of VRAM, focused on proving the pipeline works end to end.
- Personal local use: a ~4B parameter model with roughly 4GB to 6GB of VRAM, on 6GB of dedicated VRAM or a 16GB unified memory device.
- Mid-quality local applications: a ~12B to 16B parameter model with roughly 12GB to 16GB of VRAM; a 16GB tier is the safer choice.
- High-quality local inference: a ~31B parameter model with roughly 20GB to 24GB of VRAM; 24GB or more is recommended, with attention to long context and concurrency.
- Long context or high concurrency: do not size from weights alone; evaluate KV cache, runtime overhead, and peak VRAM instead.
- Production local services: reserve additional resources beyond a single-machine estimate, and add load testing and monitoring.
14. Closing Thoughts
Sizing VRAM for local LLMs is not a simple “bigger model, bigger card” calculation. It is an engineering problem spanning parameter scale, quantization precision, context length, concurrency, and runtime efficiency.
For most developers, a ~4B parameter model is a good starting point for a local experience. The ~12B to 16B range suits users who want more capability. The ~31B range fits scenarios with higher quality requirements and sufficient hardware. The sound approach is to estimate against your task goals, then validate peak VRAM and response behavior with real load testing.
Understand what goes into memory usage, learn the estimation methods, and you can pick the most appropriate local model for the hardware you have — avoiding both wasted resources and deployments that fail for lack of memory.
