HighVRAM Hardware Watch

VRAM vs unified memory: what matters for local AI

A local AI model needs room for its weights, the conversation it is processing, and the software running it. The useful question is how much memory your chosen setup can use for that whole workload. This guide focuses on running language models, also called inference.

Use Start Here for the broader buying process. Here, we will separate the memory numbers and explain why a model can load successfully but still struggle with a longer conversation.

VRAM, system RAM, and unified memory

  • Dedicated VRAM is memory on a discrete graphics card. The GPU uses it for model data and working buffers. System RAM is a separate pool.
  • System RAM supports the operating system, applications, and CPU-side work. A computer with 64GB RAM and a 24GB graphics card has two separate capacities; adding them does not create an 88GB dedicated GPU.
  • Apple unified memory is a shared pool accessible to the CPU and GPU. Apple silicon can share data without copying it between separate CPU RAM and graphics-card VRAM. Apple explains the architecture here.

A 64GB unified-memory Mac still has 64GB for the whole system. macOS and other apps use part of it, and the runtime must allocate its own working memory. Apple also exposes a recommended GPU working-set size. Treat the advertised capacity as a starting point, then check what your software can actually allocate. See our Mac Studio listings and unified-memory notes.

The words “shared memory” alone tell you little about performance. Check the actual processor, memory architecture, and supported runtime before comparing a shared-memory computer with a discrete GPU.

Build the memory budget in four parts

1. Model weights. These are the learned numerical values stored in the model. Quantization stores them at lower precision to reduce size, with possible quality tradeoffs. File labels such as Q4_K_M describe a format; they are not a promise that every parameter occupies exactly four bits. llama.cpp documents the formats and their differing sizes.

Illustrative calculation, not a benchmark: exactly 8 billion weights stored at exactly 4 bits each would occupy 8 billion × 4 ÷ 8 = 4 billion bytes, or 4GB (about 3.73GiB). At 16 bits, the same raw calculation gives 16GB. Real model files can add quantization metadata and use mixed precision. Neither calculation includes the context cache or runtime buffers, so it cannot establish which machine will run the model.

2. Context and KV cache. Context is the material available during a request, including prompts and responses. For many transformer models, the key/value, or KV, cache holds attention data from processed tokens. Increasing the configured context length can increase memory requirements even when the model file stays the same. Ollama documents that memory cost; LM Studio documents context and cache settings.

3. Concurrent work. Serving several requests at once needs additional context capacity. Keeping multiple models loaded also consumes memory. In Ollama, parallel requests increase context-related allocation; its concurrency documentation explains the relationship. A single-user chat test does not establish capacity for a multi-user server.

4. Runtime and other applications. Inference also needs temporary computation and output buffers. A llama.cpp maintainer explains these separate allocations. System memory must also cover other apps and the operating system; Apple’s Activity Monitor guide distinguishes those uses. Leave headroom based on your measured workload rather than applying a universal reserve percentage.

Three worked examples: download size and a memory budget

Repository metadata checked October 7, 2026. These examples use three files published by Qwen. We did not download or run the models. File sizes below are verified repository values; cache sizes are conditional calculations. Loaded memory, speed and hardware fit remain unmeasured. A GGUF file contains weights and format metadata, so its download size is not a measurement of resident weights or peak RAM.

Use consistent units: 1GB is 1,000,000,000 bytes; 1GiB is 1,073,741,824 bytes. The rounded figures below describe the same files.

1. Qwen3-4B, Q4_K_M: keep the known file size separate

Qwen3-4B-Q4_K_M.gguf at repository revision bc64014 is 2,497,280,256 bytes (2.497GB / 2.326GiB). That is the size of this one download, excluding the app, runtime and any other files.

For a worked cache calculation, the publisher’s source-model configuration has 36 layers, 8 KV heads and a head dimension of 128. Assume one sequence, 4,096 token slots and FP16 storage for both K and V, at 2 bytes per element. The raw cache tensor payload would be 2 × 36 × 8 × 128 × 4,096 × 2 = 603,979,776 bytes, or 0.5625GiB. The leading 2 counts K and V. This uses KV heads, not query heads.

This is tensor-payload arithmetic, not a runtime allocation estimate. It excludes cache padding, metadata and allocator overhead. Transformers explains the per-layer cache shapes; llama.cpp documents separate K/V cache precision settings. Neither the weight-file label nor these examples choose your actual cache precision. With the same assumptions at 8,192 slots, the payload doubles to 1,207,959,552 bytes, or 1.125GiB, while the model download stays unchanged.

2. Qwen3-4B, Q8_0: a different weight file, the same cache assumptions

Qwen3-4B-Q8_0.gguf at revision bc64014 is 4,280,404,704 bytes (4.280GB / 3.986GiB). It is 1,783,124,448 bytes larger than the Q4_K_M file above. Under the same source geometry and 4,096-slot FP16 assumptions, the raw KV payload remains 0.5625GiB. Changing the weight quantization does not, by itself, change the cache settings. The file-size difference does not establish an equal change in peak memory or an improvement in answer quality.

3. Qwen3-8B, Q4_K_M: model size alone does not determine cache size

Qwen3-8B-Q4_K_M.gguf at revision 7c41481 is 5,027,783,488 bytes (5.028GB / 4.682GiB). Its source-model configuration also specifies 36 layers, 8 KV heads and a head dimension of 128. The same illustrative calculation therefore gives 0.5625GiB for 4,096 FP16 token slots. The larger weight download does not imply a proportionally larger KV payload. Runtime buffers and actual memory use still require a test.

Complete the budget with measurements

For each example, track these separately:

  • Download bytes: known for the exact file linked above. Pure weight-tensor bytes and resident weight allocations have not been measured here.
  • KV cache: 0.5625GiB is a calculated raw payload under the stated assumptions. The actual allocated cache and its CPU/GPU placement are unknown.
  • Runtime buffers: unknown until measured with the selected runtime, context, batch size and offload settings.
  • OS, other apps and spare capacity: measure the normal workload and choose headroom for its variation. These examples assign no universal reserve percentage.

Illustrative budget: for each memory pool, allow for resident weights + actual cache allocation + runtime buffers + other use + chosen headroom. Keep system RAM and dedicated VRAM separate. On a unified-memory machine, account for the shared pool once and check the runtime’s allocation limits. Do not add the GGUF file size to an app’s reported total if that total already includes model memory.

Before drawing a fit conclusion, record the exact file and runtime version, configured context, cache precision, concurrency and offload settings. Use LM Studio’s pre-load memory estimate as an estimate, then measure a representative prompt and response with your usual apps open. The runtime’s load settings can change memory use. Until that test exists, leave the total and hardware verdict unknown.

What happens when the GPU is too small?

Some runtimes can split a model between the CPU and GPU. llama.cpp supports hybrid inference, and LM Studio provides GPU-offload controls. This can make a larger model usable, but CPU work and transfers can reduce performance. The result depends on the hardware, model, and split. Ollama recommends avoiding CPU offload for best performance.

Compare that compromise with running a smaller model fully on the GPU. Test both on your actual prompts. Extra memory can make a different model or quantization possible; judge that choice on the answers it gives you.

Capacity, speed, and quality are separate checks

Capacity measures how much memory is available. Memory bandwidth measures how quickly data can be read or written, while compute capability affects how quickly operations run. Apple explains these distinct performance limits. The capacity number alone cannot predict response speed. Compare prompt-processing time and generation speed at the same model settings, and assess answer quality with tasks you care about.

Check the configuration you will actually use

  • Record the exact model, quantization, runtime version, context length, and expected simultaneous requests.
  • Use the runtime’s estimate before loading. LM Studio’s memory estimator accounts for settings including context length and GPU offload. Treat its output as an estimate.
  • Run a representative long prompt and generate a useful-length response. Watch memory use, errors, responsiveness, and answer quality. Include the other apps you normally keep open.
  • Check where the model loaded. Ollama’s ollama ps output reports the CPU/GPU split. Recheck after changing context or concurrency.

For help deciding what to test first, use our local AI workload guide. Start with the job you need done, then choose enough usable memory for a configuration that performs well at that job.

Choosing between platforms? Read Mac Studio vs RTX 5090 for local AI for a capacity, bandwidth, CUDA-versus-MLX and whole-system comparison.

Estimate the memory tier for your workload

Translate model size, precision, context and concurrency into a planning range with the local AI hardware recommender. Then review the hardware guide before comparing screened offers.

Quantization changes the weight budget. Use the GGUF Q4/Q5/Q6/Q8 guide before converting a bit label into a VRAM assumption.

Buying a current Mac Studio? The M5 unified-memory configuration guide applies the shared-memory caveats to Apple’s 36GB-through-512GB options.

Multimodal planning example: the Llama 3.2 11B Vision VRAM guide combines Meta’s 21.34GB official checkpoint with text-cache, image and runtime allocations that share a unified pool.

Large unified-memory example: the Llama 3.2 90B Vision VRAM guide shows why a 177.187GB checkpoint still needs cache, vision and operating-system margin in a shared pool.

Multimodal shared-memory example: the vision LLM VRAM guide shows how projectors, encoders, images, cache and applications compete for the complete pool.

Compact multimodal example: the Qwen2.5-VL 7B VRAM guide shows how the projector, images, cache and applications compete for VRAM or a shared unified-memory pool.

Compact shared-memory example: the Qwen2.5-VL 3B guide shows how projector, image, cache and application memory combine even when the language file is under 2GB.