ModelAtlas
Guides

How much RAM or VRAM do local AI models need?

Start with the model’s file size, then budget for context, the runtime, and other programs. There is no single RAM threshold for all 7B or 20B models.

Separate three quantities

Disk holds the downloaded weights and possibly multiple versions. GPU VRAM holds data placed on a discrete GPU. System RAM serves the operating system, background apps and any model data placed on the CPU; Apple Silicon instead shares unified memory across CPU and GPU. Do not add advertised Mac unified memory and GPU memory as if they were separate pools.

Build an estimate you can test

Record the size of the exact quantized artifact and pick an initial context length, for example 4,096 tokens. The artifact size is a starting point, not a guarantee: inference also needs working buffers and a KV cache, and the memory cost varies by architecture, context length, batch size and runtime. Leave headroom for the OS and check free memory before launching. CPU offloading can make some models usable with less VRAM, but may slow generation; it is not free extra capacity.

Use broad bands only as starting points

On a machine with 8 GB of total RAM, try a small quantized model and keep other apps and context small; success depends on available memory. At 16 GB, compare a small model with a larger one only if there is free headroom. OpenAI describes gpt-oss-20b as able to run with as little as 16 GB of memory under supported conditions, not on every 16 GB laptop at every context length. At 32 GB, you may have space for larger variants or more context; verify both separately rather than assuming twice the context.

Verify fit before comparing speed

Run a short prompt, then inspect runtime and system memory. In Ollama, `ollama ps` can show CPU/GPU split. Repeat with a representative document or longer chat; if the machine starts swapping, the runtime reports an allocation error, or the response is too slow, reduce context or choose smaller weights. Only call a configuration “tested” after recording the exact OS, device, software, context and outcome.

Sources