Hardware
How Much RAM for AI? What Local LLMs Really Need
How much RAM for AI do you need? A guide by task, how to estimate RAM for local LLMs, why bandwidth matters on CPUs, and when 32, 64 or 128 GB makes sense.
How much RAM for AI do you actually need? It depends on what you mean by "AI." Using ChatGPT in a browser needs almost nothing. Running language models on your own computer can need anywhere from 16 GB to 128 GB or more, depending on the model size, whether you have a graphics card, and whether you use a Mac or a PC. Buy too little and models won't load or crawl along; buy too much and you've spent money that could have gone on a better GPU.
This guide gives a quick answer by task, shows how to estimate RAM for a local LLM yourself, explains why memory bandwidth decides speed when the CPU does the work, covers mixture-of-experts models and Macs, and compares 16, 32, 64 and 128 GB.
How Much RAM for AI: The Quick Answer
| What you want to do | RAM to aim for |
|---|---|
| Use cloud AI (ChatGPT, Claude, Gemini) in a browser | 8–16 GB is plenty |
| Run small local models (3–8B) on the CPU only | 16 GB minimum, 32 GB comfortable |
| Run local models on a GPU | At least as much RAM as VRAM, ideally double |
| Run mid-size models (14–32B) on the CPU or split with a GPU | 32–64 GB |
| Run 70B models or large mixture-of-experts models partly on the CPU | 128 GB or more |
| Generate images with a GPU (e.g. Stable Diffusion, ComfyUI) | 16–32 GB |
| Generate AI video locally with a GPU | 32–64 GB |
| Run a local coding model alongside your IDE and browser | 32–64 GB |
| Fine-tune small models locally | 32–64 GB or more |
If you're unsure, 32 GB is the sensible minimum for a PC you'll use for local AI, and 64 GB is a strong default for an AI workstation.
RAM vs VRAM: Why Both Matter
VRAM is the memory on your graphics card. RAM is your computer's main system memory. For AI, VRAM is where you want the model to live, because the GPU reads it many times faster. Our guide to VRAM for AI explains how to size it.
System RAM still matters in three ways:
- Loading. Models usually pass through system RAM on their way to the GPU.
- Overflow. Tools like Ollama, LM Studio and llama.cpp can put the part of a model that doesn't fit in VRAM into system RAM. It's slower, but it works.
- CPU-only use. Without a capable GPU, the whole model runs from system RAM.
So the real RAM vs VRAM question isn't which one you need. It's how to balance them for the models you want to run.
How to Estimate RAM for an LLM
You can estimate the RAM for LLM use with simple maths.
Step 1: Model weights. Multiply the number of parameters by the bytes per parameter:
- 16-bit (FP16): about 2 bytes per parameter
- 8-bit: about 1 byte
- 4-bit (the most common for local use): about 0.5–0.6 bytes
Step 2: Context. Add room for the KV cache, which stores the conversation so far. It grows with context length and can add a few gigabytes for long chats.
Step 3: Everything else. Leave 4–8 GB for your operating system, browser and other apps.
Examples
- 8B model at 4-bit: about 5 GB of weights. With context and the OS, 16 GB works; 32 GB is comfortable.
- 32B model at 4-bit: about 18–20 GB. Running mostly from system RAM, plan for 32–64 GB.
- 70B model at 4-bit: about 40 GB. Running from system RAM, 64 GB is the bare minimum and 96–128 GB is more realistic.
If the model runs fully on a GPU, the weights live in VRAM, and system RAM mainly needs to cover loading and everything else on the machine.
Running AI on the CPU: Bandwidth Is the Speed Limit
Having enough RAM lets a model run. How fast it runs on a CPU depends mostly on memory bandwidth, because generating each token means reading through the model's weights.
Typical desktop PCs use two memory channels. Dual-channel DDR5-5600 gives about 89.6 GB/s (5,600 million transfers per second × 8 bytes × 2 channels). High-end graphics cards reach roughly 1 TB/s or more, more than ten times faster.
A rough upper bound for generation speed is bandwidth ÷ model size:
- 8B model at about 5 GB: up to roughly 18 tokens per second on 89.6 GB/s. Usable.
- 70B model at about 40 GB: around 2 tokens per second at best. Painfully slow for chat.
That's why adding RAM lets you run bigger models but doesn't make them fast. Workstation and server platforms with more memory channels, and Apple and AMD chips with wide unified memory buses, run large models on the CPU or integrated GPU much faster than a typical dual-channel desktop.
Mixture-of-Experts Models Change the Maths
Mixture-of-experts (MoE) models contain many "expert" sub-networks but only use a few of them for each token. A model with over 100 billion total parameters might only use a small fraction per token. Our mixture of experts guide explains how they work.
That makes a hybrid setup attractive: keep the shared layers on the GPU and the large expert weights in system RAM. llama.cpp supports this directly: its --cpu-moe option keeps all MoE weights on the CPU, and --n-cpu-moe N does this for the first N layers. With one decent GPU and 64–128 GB of system RAM, large MoE models become usable at home at reasonable speeds.
If you're planning for big MoE models, system RAM capacity matters a lot more than it does for dense models that fit on the GPU.
Macs and Unified Memory
Apple Silicon Macs use unified memory: one pool shared by the CPU and GPU. There's no separate VRAM, so the memory you buy is what the model can use, minus what macOS and your apps need.
That's why Macs with lots of memory are popular for local AI. A Mac with 64 GB of unified memory can run models that would need a very expensive graphics card on a PC, at decent speeds thanks to wide memory buses. Memory can't be upgraded later, so buy for the largest models you expect to run. The same logic applies to PCs and mini PCs built on chips with large unified memory pools.
How Much RAM for AI: 16 GB vs 32 GB vs 64 GB vs 128 GB
16 GB
Fine for cloud AI tools and small local models (3–8B at 4-bit) if you close other apps. Tight for anything more, and too little alongside a GPU with 16 GB or more of VRAM.
32 GB
The sensible minimum for local AI on a PC. Runs small and some mid-size models comfortably, pairs well with GPUs up to 16 GB, and handles image generation.
64 GB
A strong default for AI workstations. Pairs with 24–32 GB GPUs, allows offloading for larger models, runs 30B-class models from system RAM, and gives room for fine-tuning small models. In the 32GB vs 64GB choice, pick 64 GB if you plan to run models larger than your GPU can hold or want headroom for the next few years.
128 GB or more
For running 70B models or large MoE models with heavy CPU offload, multiple models at once, or serious data work. On unified memory machines, 128 GB opens up some of the largest open models.
RAM Speed, Channels and Upgrades
- Channels matter more than you'd think. Fill the slots your platform needs for dual-channel (or more) operation. One stick on its own halves bandwidth.
- Four sticks can mean lower speeds. Many desktop platforms run memory slower with four modules than with two. Two larger modules are often better than four small ones.
- Laptops and mini PCs are often soldered. You can't add RAM later, so buy enough on day one.
- Check your motherboard's memory support list when buying large kits.
Our guide to building an AI PC covers how RAM fits with the GPU, CPU and power supply.
FAQ
How much RAM do I need for AI?
For using cloud AI tools, 8–16 GB is fine. For running local language models, 32 GB is a sensible minimum on a PC and 64 GB is a strong default. To run 70B models or large mixture-of-experts models partly from system RAM, aim for 128 GB or more.
Is 16 GB of RAM enough for AI?
For cloud tools and small local models of up to about 8 billion parameters at 4-bit, yes. It becomes tight with larger models, longer contexts or when you run other apps, and it's too little to pair with a modern graphics card for local AI work.
Is VRAM better than RAM for AI?
For speed, yes. VRAM is much faster for the GPU to read, so models run far quicker when they fit entirely in VRAM. System RAM is larger and cheaper, and matters for loading models, holding parts that don't fit in VRAM, and CPU-only use. Aim for at least as much RAM as VRAM.
How much RAM do I need to run a 70B model?
At 4-bit, a 70B model needs about 40 GB for its weights alone. Running it mostly from system RAM needs at least 64 GB, and 96–128 GB is more realistic. Expect slow speeds on a typical dual-channel desktop; a large GPU or a unified memory machine runs it much faster.
Can you use normal RAM as VRAM?
Partly. AI tools like Ollama and llama.cpp can place layers that don't fit in VRAM into system RAM, and some GPU drivers can spill into system memory when VRAM runs out, but both are much slower than real VRAM. Integrated GPUs and unified memory chips, like Apple Silicon, do use system RAM as graphics memory, which is why memory size matters so much on those machines.