Local AI Deployment: How to Choose VRAM, RAM, and Disk
Choosing hardware for local AI deployment involves more than VRAM. This guide explains how VRAM, system RAM, and disk storage each shape real-world performance, when it makes sense to add a GPU, how long context and the KV cache consume memory, why SSDs matter for load and switch times, and how to configure hardware for different workloads. It also covers the trade-offs of quantization and the risks worth planning for.
1. Why Focusing Only on VRAM Leads to Common Pitfalls
When people discuss local AI deployment, the first reaction is often: “Just get enough VRAM, right?” That’s only partly true. The real experience isn’t determined by VRAM alone, but by three storage layers working together: VRAM, system RAM, and disk.
This becomes especially clear as you move beyond simple Q&A to longer context, code completion, switching between multiple models, image generation, or local knowledge-base question answering. At that point, the bottleneck shifts from VRAM to RAM, disk I/O, or data-loading speed. A more practical approach is to first determine your inference path—pure GPU inference, CPU inference, or weight offload—and then decide how to balance VRAM, RAM, and disk.
There are three common mistakes:
- Looking only at VRAM capacity while ignoring context length and KV cache usage.
- Assuming that if a model can start, it can run stably over the long term.
- Ignoring disk speed, so every model load takes a long time.
This article addresses the questions of how to choose hardware for local AI deployment, whether you need more VRAM, how much RAM is appropriate, whether an SSD is mandatory, and what to do when loading is slow—offering a more complete selection framework.
2. How to Choose VRAM, and When to Add a GPU
VRAM is the most rigid constraint in local AI deployment. It’s physically bound to the graphics card and can’t be added separately like a RAM stick. If VRAM is insufficient, you usually have only two options: reduce model size, or replace/add a GPU.
2.1 Why VRAM Is Expensive
The cost isn’t just the memory chips themselves—it includes the entire card: the GPU core, memory bus width, cooling, power delivery, PCB, driver ecosystem, and framework support. For local deployment, what actually affects the experience is often not peak compute power, but whether VRAM capacity is enough to hold both the model weights and the inference cache.
2.2 When Do You Need to Add a GPU?
You can reason through it this way:
- If you mainly run pure GPU inference and want the model to stay resident in VRAM, VRAM capacity is your top priority.
- If you frequently run models of 7B, 13B, or larger with longer context, VRAM should be scaled up accordingly.
- If you only do occasional local Q&A, start with a smaller-VRAM card—don’t stack multiple GPUs from the outset.
- If you plan to expand to multiple GPUs, confirm your motherboard’s PCIe lanes, power supply capacity, chassis cooling, and framework support in advance.
2.3 Common VRAM Reference
The following is only a general reference. Actual requirements depend on the quantization method, context length, concurrent requests, and inference framework:
| Model size | Common quantization | VRAM reference | Notes |
|---|---|---|---|
| ~7B | INT4/4-bit | 8GB min, 12GB more stable | Suitable for local Q&A and light tasks |
| ~13B | INT4/4-bit | 12GB–16GB | Better for daily inference and slightly longer context |
| ~30B | INT4/4-bit | 20GB–24GB, or consider offload | Higher VRAM and RAM requirements |
| 30B+ | INT4/INT8 | 24GB+, multi-GPU or offload | Requires considering RAM and disk together |
The takeaway: VRAM isn’t about being as large as possible—it’s about having enough with some headroom. Insufficient VRAM directly limits which models you can run and how long a context you can use. Conversely, excess VRAM paired with mismatched RAM and disk can still lead to long wait times and slow switching.
3. When Does RAM Become the Context Bottleneck?
A common misconception needs clearing up here: it’s not accurate to simply assume that “longer context always consumes more RAM.”
The precise statement is: during pure GPU inference, context is primarily limited by VRAM; only when using CPU inference, weight offload, or a unified memory architecture does system RAM become the main bottleneck.
3.1 Where Does the KV Cache Actually Live?
In Transformer inference, longer context increases KV cache usage. But where the KV cache resides depends on the inference path:
- Pure GPU inference: the KV cache primarily occupies VRAM.
- CPU inference: both weights and the KV cache can occupy system RAM.
- Weight offload: part of the weights or cache may reside in system RAM.
- Unified memory architecture: CPU and GPU share a memory pool, so system RAM takes on a VRAM-like role at the same time.
Therefore, you can’t talk about “RAM determining context” without the specific scenario. More accurately, whether RAM becomes a bottleneck depends on whether you place compute and cache on the memory side.
3.2 How to Estimate the KV Cache
You can build an intuition with a rough formula:
KV cache size ≈ 2 × layers × KV heads × head_dim × context length × bytes per element
If there are multiple requests or batching, multiply by the concurrency count.
For example, assume a 7B-class model with a common grouped-query attention design—roughly 32 layers, 8 KV heads, head_dim of 128, and FP16 precision:
- At 4K context, the KV cache is roughly a few hundred MiB.
- At 32K context, the KV cache can approach several GiB.
- If you use 32 KV heads, longer context, or higher precision, usage rises noticeably.
This means that when you notice “RAM usage ballooning,” you should first determine whether you’re running pure GPU inference or CPU/offload inference. For pure GPU inference, check first whether VRAM is sufficient; for CPU/offload, system RAM and memory bandwidth are what matter.
3.3 How Should You Configure RAM?
A more sensible recommendation is conditional configuration:
- If using CPU inference or offload, RAM should be significantly larger than the model weights, with headroom reserved for context, the OS, and caching.
- For pure GPU inference, prioritize expanding VRAM; you don’t need to blindly pursue huge system RAM, but it must still meet the needs of the OS, browser, development tools, and model-loading cache.
- If you frequently switch among multiple models, leave room for multiple models to stay resident.
- Don’t rely on virtual memory or swap to make up for insufficient physical RAM, because the gap in bandwidth and latency is large.
4. Why Disk Determines the Loading Experience
Model files are often anywhere from a few GB to tens of GB. They normally sit on disk and only enter RAM or VRAM when loaded. Disk speed directly affects cold-start time—the wait from clicking launch to being able to chat.
4.1 A Rough Formula for Load Time
You can first estimate the lower bound of sequential read with a simple formula:
Load time (seconds) ≈ S × 1024 / V
Here, S is the model file size in GB, and V is the effective disk read speed in MB/s.
Note: this formula is only the sequential-read lower bound. Actual loading is also affected by random reads, file addressing, weight copying, dequantization, memory bandwidth, and caching.
4.2 Load Examples for Different Model Sizes
The following are theoretical sequential-read estimates. Actual times are affected by hardware, file format, quantization, dequantization, framework, and caching.
| Model size | Common footprint | SSD at 500MB/s (theoretical) | HDD at 120MB/s (theoretical) | Practical recommendation |
|---|---|---|---|---|
| 7B, FP16 | ~14GB | ~29s | ~2min | Prefer SATA SSD or NVMe |
| 7B, INT4 | ~4GB | ~8s | ~34s | Still recommend SSD for faster daily switching |
| 13B, FP16 | ~26GB | ~53s | ~3.6min | Recommend NVMe SSD |
| 13B, INT4 | ~7GB | ~14s | ~1min | Suitable for local residency |
| 30B, FP16 | ~60GB | ~2min | ~8.5min | Strongly recommend NVMe SSD |
| 30B, INT4 | ~16GB | ~33s | ~2.3min | Still need an SSD and larger capacity |
What to do if loading is slow? The usual priority order is:
- Move the model repository from an HDD to an SSD.
- Use a more efficient quantization format.
- Keep frequently used models resident to avoid repeated loading and unloading.
- Check whether random reads, decompression, or dequantization are the limiting factors.
- Reserve enough RAM and cache to reduce secondary I/O.
The takeaway: as long as your machine is also used for development, browsing, compiling, or office work, keeping model files on an HDD is usually a poor choice. HDDs are better suited for cold backups and archiving, not as a frequently accessed loading drive.
5. Why Task Switching Matters More Than Just “Fitting”
Local deployment often isn’t about running a single model, but switching among multiple tasks: a Q&A model, a code model, an image model, an embedding model, a reranking model, and so on. Each switch incurs additional overhead.
Switching cost isn’t only about storage capacity—it shows up in several stages:
5.1 A Checklist of Switching Costs
- Unloading the current model: releasing VRAM or RAM resources.
- Loading the new model: reading weights, parsing files, dequantizing, copying to the device.
- Rebuilding the KV cache: a new session or task requires regenerating the context cache.
- Cache warm-up: the framework may need to initialize operators, graph caches, or the scheduler.
- Memory cleanup: after long-running periods, fragmentation and cached allocations may exist.
- Disk I/O spikes: when multiple models read and write simultaneously, random I/O increases noticeably.
5.2 Differences Across Use Cases
If you have a dedicated inference machine where the model is loaded once and stays resident long-term, cold-start wait times are acceptable. But if you have a general-purpose workstation that also runs an IDE, browser, compilation, and VMs during the day, the model can’t monopolize resources continuously and must be repeatedly loaded and unloaded—amplifying wait times into a daily pain point.
5.3 A Checklist for Reducing Switching Costs
- Identify your high-frequency models and set them as default-resident.
- Avoid frequently switching between different quantization versions of the same model.
- Try to use a unified model repository and a unified inference framework.
- Use on-demand loading for low-frequency models rather than preloading everything.
- Monitor VRAM, RAM, disk queue length, and load times.
- If the framework supports it, prefer caching, mmap, persistent loading, and similar mechanisms.
- In multi-model environments, don’t look only at total capacity—also look at per-model load time and switching frequency.
6. Configuration for Three Types of Workloads
Below is a more engineering-oriented set of configuration recommendations. Specific numbers vary with model architecture, context length, concurrency, and quantization method, but this can serve as a starting reference.
| Workload type | VRAM recommendation | RAM recommendation | Disk recommendation | Key strategy |
|---|---|---|---|---|
| Dedicated inference machine | 12GB–24GB, scale up by model | ~32GB or higher | 1TB NVMe SSD+ | Keep common models resident, reduce switching |
| General workstation | 12GB–20GB | 32GB–64GB | 1TB–2TB SSD | Model repo on SSD, avoid over-allocating RAM |
| Multi-model switching | 20GB–24GB, or offload | 64GB+ more stable | 2TB NVMe SSD | Keep high-frequency models resident, load low-frequency ones on demand |
If your budget is limited, follow this order:
- First ensure VRAM can cover your main models.
- Then ensure SSD capacity and read speed.
- Then top up RAM based on CPU/offload needs.
- Don’t buy multiple GPUs just for the sake of it—first confirm that the single-GPU experience is adequate.
7. Quantization, Precision, and Risks: Don’t Look Only at Speed
Quantization is the most common cost-saving technique in local deployment, but it isn’t without trade-offs.
7.1 Precision Loss from Quantization
Low-bit quantization can significantly reduce VRAM, RAM, and disk usage, but it may affect output quality. Generally, chat and summarization tasks may be less affected, while code generation, math reasoning, multilingual tasks, and long-text consistency may be more sensitive.
Recommendations:
- Test your target task on a small sample first.
- Compare output differences across INT4, INT8, and FP16/BF16.
- For high-precision scenarios, don’t blindly use the lowest bit quantization.
7.2 SSD Capacity and Endurance
As model files grow larger, SSD capacity needs rise quickly. Beyond capacity, pay attention to:
- Whether there is independent DRAM cache.
- Sustained write and random read/write performance.
- TBW (terabytes written) endurance rating.
- Cooling design.
- Whether performance degrades when the drive is nearly full.
7.3 Cooling and Power
Local deployment doesn’t only produce heat from the GPU. The CPU, RAM, and NVMe SSD can all heat up during long loading and inference sessions. If the chassis airflow is inadequate, it can lead to throttling, slower loading, or system instability.
7.4 Data Migration and Backup
Model files, quantization versions, launch scripts, and configuration environments are all worth backing up. Otherwise, a disk failure or system reinstall means high costs to re-download and re-tune. HDDs can be used for cold backups, but not recommended as a primary model repository.
8. Conclusion: Local AI Is About Matching Workloads, Not Piling on Hardware
The core of local AI deployment isn’t simply stacking GPUs or looking only at VRAM size—it’s configuring VRAM, RAM, and disk appropriately based on your workload.
- VRAM determines whether you can run it at all.
- RAM and VRAM together determine how deep your context can go.
- Disk determines how long you wait on each launch and switch.
- Quantization determines how large a model you can fit within limited hardware.
- The shape of your workload determines whether you should keep models resident, which ones, and when to switch.
A more mature selection approach: first determine whether you’re doing pure GPU inference, CPU inference, or offload; then estimate context and concurrency; then decide VRAM, RAM, and SSD capacity; and finally optimize the experience with quantization, residency, and caching strategies. Understanding this set of trade-offs is what lets you spend a limited budget where it matters, taking local AI deployment from “it runs” to genuinely “it’s good to use.”
