GPU Selection for Local LLMs: VRAM Planning and Memory Upgrade Risks
Learn how to size GPU memory for local LLM workloads, evaluate inference performance and software compatibility, and assess the risks of VRAM-modified graphics cards. This guide covers memory budgeting, reproducible testing, whole-system requirements, and when a hardware upgrade can make a meaningful difference.
1. Start with the Workload, Not the Highest-Spec GPU
Running large language models locally keeps data on your machine, gives you control over the software environment, and makes repeated inference experiments easier. But hardware selection should begin with what you intend to run—not which GPU appears to offer the best deal.
Everyday chat, long-document analysis, batch content processing, image generation, and model fine-tuning have different hardware requirements. Even with the same model, a single short conversation can use substantially less VRAM than long-context inference with concurrent requests.
A practical selection sequence is:
Workload → model size and precision → context length and concurrency → VRAM budget → software compatibility → total system cost.
GPUs with roughly 20 GB of VRAM provide a useful capacity range for discussing local inference. This is not a universal sweet spot, however. Its value depends on whether the target model runs reliably and whether acquiring the hardware introduces additional risks.
A dedicated GPU is not strictly required to run an LLM locally. CPUs can also perform inference, although response speed, energy efficiency, and practical model size are often more constrained. Whether you need a GPU ultimately depends on the response times you can accept.
2. VRAM Budgeting: Weights Are Only Part of the Cost
A model’s file size does not tell you whether it will fit in VRAM during inference. A useful approximation is:
Total VRAM ≈ model weights + attention key-value cache + intermediate computation buffers + runtime and other overhead.
These components scale differently and should be estimated separately.
Model Weights Set the Baseline
A simplified formula for weight storage is:
Weight storage in bytes ≈ parameter count × bits per parameter ÷ 8.
For example, a model with approximately 14 billion parameters requires about 28 billion bytes for weights alone if all weights use 16-bit storage. If most weights use 4-bit quantization, the theoretical data size falls to approximately 7 billion bytes.
The theoretical figure is not the same as actual VRAM usage. Quantization generally requires scaling factors, grouping information, and metadata. Some layers may remain at higher precision, and inference also requires computation buffers. Multiplying the parameter count by half a byte is therefore not enough to establish that a 4-bit model will run.
Capacity units also matter. Storage and memory figures may use decimal or binary units. Use consistent units when comparing model sizes with available VRAM, especially near the capacity limit.
Context Length Drives Dynamic Memory Growth
Generative text models typically cache the keys and values associated with previous tokens to avoid repeating computation during subsequent generation. This cache generally grows as the context becomes longer.
For a decoder architecture using standard dense attention, KV cache storage can be approximated as:
KV cache bytes ≈ 2 × number of layers × batch size × cached sequence length × number of KV heads × head dimension × bytes per element.
The factor of two accounts for both keys and values. This is a planning estimate: model architecture, cache allocation strategy, and implementation details can change actual usage.
The implications are important:
- Loading a model successfully does not mean it can run at your target context length.
- Running one request does not mean multiple requests will fit concurrently.
- Quantizing weights does not automatically shrink the KV cache by the same proportion.
- Architectures with fewer KV heads may require less cache memory for long-context workloads.
Define the context length you actually need before buying hardware, rather than relying only on a model’s advertised maximum context window.
Leave Headroom for Runtime Variation
Desktop rendering, background applications, compute-library workspaces, and temporary tensors can all consume additional VRAM. Memory fragmentation can also cause allocations to fail even when the reported free capacity appears sufficient.
Do not plan around a model barely fitting. A more reliable approach is to measure peak VRAM usage at the longest expected input, maximum output length, and target concurrency, then leave headroom. Memory usage immediately after loading the model is not a sufficient basis for capacity planning.
3. What Roughly 20 GB of VRAM Can—and Cannot—Do
This capacity range can allow more medium-sized quantized models to keep their main computation in GPU memory, reducing repeated data transfers. The model size it can accommodate still depends on architecture, quantization format, context length, and inference implementation.
| Workload | What to check | Common limitation |
|---|---|---|
| Higher-precision inference with smaller models | Weights and runtime buffers | Long contexts can still exhaust VRAM |
| Quantized inference with medium-sized models | Quantization format, cache requirements, and operator support | Sufficient capacity does not guarantee good speed |
| Larger models with partial offloading | System RAM, interconnect, and transfer overhead | A model that runs may still be too slow for interactive use |
| Image generation | Resolution, batch size, and intermediate activations | Text-model memory estimates do not transfer directly |
| Parameter-efficient fine-tuning | Gradients, activations, and optimizer states | A model that fits for inference may not fit for training |
Keeping most weights in VRAM is not the same as completing the entire workload without using system memory. A framework may automatically offload data rather than fail, but performance can drop substantially.
Validation should therefore check both whether the task completes and where the data actually resides.
4. Evaluate Performance Beyond Peak Compute
Theoretical compute figures do not translate directly into text-generation speed. Inference usually has two distinct phases.
Input Processing: Prefill
The system first processes the input text and builds the corresponding cache. With long inputs or higher parallelism, this phase can involve substantial matrix computation.
Performance is sensitive to compute throughput, operator implementations, and attention efficiency.
Token-by-Token Generation: Decode
The model then typically generates one token at a time. In low-concurrency interactive workloads, reading weights and accessing the cache can become major bottlenecks.
Memory bandwidth, memory-access efficiency, and execution overhead may matter more here than peak compute.
As a result, a GPU may process long prompts well without delivering an equally strong advantage in token generation. Another may feel responsive in short conversations but slow down significantly as the context grows.
At minimum, measure:
- Time to first token.
- Input-processing throughput.
- Sustained token-generation throughput.
- Latency changes at longer context lengths.
- Aggregate throughput and per-request latency under concurrency.
Counts of specialized matrix-compute units also cannot be compared directly across hardware generations. Supported precision, accumulation behavior, sparsity assumptions, and operator implementations all affect what the theoretical figures mean.
5. Compatibility Is an End-to-End Requirement
Hardware comparison tables often reduce support to a yes-or-no entry. Actual compatibility is usually more complicated.
Whether an optimized kernel can run may depend on all of the following:
- GPU generation and instruction support.
- Driver and compute-runtime versions.
- The inference program’s compilation targets.
- Numerical precision and quantization format.
- The model’s attention architecture and tensor layout.
- The input shapes supported by the kernel.
Hardware support for a low-precision format does not guarantee that the current software can use it. Conversely, an unavailable optimized attention kernel does not necessarily prevent inference. The software may fall back to another implementation, with different performance or memory requirements.
The safest selection principle is straightforward: validate the model, precision, and software versions you intend to deploy instead of inferring compatibility from hardware specifications alone.
6. VRAM-Modified GPUs: Capacity Gains Come with Engineering Risks
Aftermarket VRAM upgrades may involve replacing memory chips, soldering, changing board-level configuration, or adapting firmware. A card reporting a larger memory capacity is not proof of long-term reliability.
Recognized Capacity Does Not Prove Full-Capacity Stability
Some faults appear only when higher memory addresses are accessed, under sustained load, or after repeated heating and cooling. Passing light everyday workloads does not replace integrity testing across most of the allocatable VRAM.
Acceptance testing should verify computation results, not merely check whether the system crashes. Silent data corruption may not trigger an immediate error, but it can affect inference outputs or other computations.
Cooling Must Cover More Than the GPU Core
A normal core temperature does not establish that the memory chips and power-delivery components are operating within acceptable limits.
Sensor coverage also varies. If the hardware does not expose memory temperatures, the absence of a temperature warning is not evidence that the memory is cool.
Assess sustained clock speeds, power draw, fan speeds, case exhaust, and stability together. Poor thermal-pad contact, heat buildup inside the case, or inadequate cooling around the power-delivery circuitry can cause failures that appear only after extended operation.
Driver Maintenance and Support Are Part of the Cost
Nonstandard hardware configurations may complicate system updates, sleep and resume behavior, and troubleshooting. Used-hardware provenance, repair history, memory-replacement quality, and return terms all affect the real cost of ownership.
These risks may be acceptable for personal experiments that can tolerate interruptions. Systems providing an ongoing service should place greater weight on maintainability, replacement options, and downtime costs.
7. Build a Reproducible Acceptance and Testing Process
Testing should establish whether the system runs the target workload correctly, reliably, and sustainably—not just produce a single speed measurement.
Step 1: Fix the Test Conditions
Record model size, quantization method, input length, output length, concurrency, software versions, and power settings.
Change only a small number of variables at a time. Changing several settings simultaneously makes results difficult to interpret.
Step 2: Check Basic Hardware Health
Verify the detected VRAM capacity, power connections, device enumeration, and physical interfaces.
Then progressively increase memory allocation and run write, read, and result-verification tests. Watch for computation errors, driver resets, and the device becoming unavailable.
Step 3: Cover Typical and Boundary Workloads
Include at least:
- Short inputs with short outputs.
- Long inputs.
- Sustained generation.
- The intended level of concurrency.
If the system will also handle image generation or other workloads, create separate tests. Their bottlenecks are not necessarily the same as those of text inference.
Step 4: Test Sustained Operation and Thermal Transitions
After warm-up, repeat a fixed workload. Check for declining performance, abnormal clock fluctuations, and whether temperatures reach a stable range.
Also test cold starts, restarts, and a return to load after a long idle period.
Step 5: Keep Comparable Records
Use a consistent results table:
| Category | What to record |
|---|---|
| Model configuration | Parameter count, precision, or quantization method |
| Request configuration | Input length, output length, and concurrency |
| Performance | Time to first token, input-processing throughput, and generation throughput |
| Peak resource usage | VRAM, system RAM, and power draw |
| Stability | Errors, resets, unexpected exits, and repeated-test results |
Results are meaningfully comparable only when the test conditions match.
8. Consider the Whole System Before Upgrading
Local inference depends on more than the GPU. System RAM must accommodate model loading, preprocessing, and any offloaded data. Storage performance affects model loading and switching. Power delivery and case cooling determine whether sustained workloads remain stable.
If you must offload to system RAM, pay particular attention to transfers between the host and GPU. Offloading can address a VRAM shortfall, but it does not guarantee acceptable interactive performance.
Instead of pushing toward a larger model, a smaller, more efficient model suited to the task may deliver a better overall experience.
Before upgrading, ask three questions.
1. Does the Workload Fail to Fit, or Does It Run Too Slowly?
If it does not fit, examine weights, cache requirements, and concurrency.
If it is slow, distinguish between compute limits, memory bandwidth, offloading overhead, and thermal constraints.
2. Is This an Occasional Requirement or a Daily Workload?
Frequent use makes performance improvements easier to justify. Occasional experimentation calls for a more cautious assessment of the investment.
3. Will More Capacity Cross a Meaningful Threshold?
An upgrade can have a substantial effect if it allows the target model to remain fully in VRAM.
A small capacity increase that does not change how the workload runs may offer only limited improvement.
Hardware gains are therefore not always linear, nor is every upgrade necessarily subject to diminishing returns. The key question is whether the upgrade removes the system’s primary constraint.
Conclusion: Let Validation Define the Right Configuration
Choosing hardware for local LLMs should begin with a VRAM budget, but it should not end with memory capacity. Compute performance, memory bandwidth, software support, power delivery, cooling, and maintenance risks all shape the final experience.
For VRAM-modified hardware in particular, treat detected capacity, successful execution, and long-term stability as three separate milestones.
A configuration is suitable only when it passes complete testing with the intended workload, has an acceptable total cost, and keeps failure risks within tolerable limits. The right balance of performance and cost is not a fixed point on a specification sheet. It is determined by your requirements, budget, and validation results.
