
Last Update: March 2, 2025 8 min read
BY
eric
How Much RAM Do You Need for Local LLMs? Building an AI PC from 64GB to 512GB+
Short answer:
- Size: a 4-bit quantised model needs roughly 0.6 GB per billion parameters, plus a few GB for context and the OS. That's about 5 GB for an 8B model, 43 GB for a 70B model and about 400 GB for DeepSeek-R1 671B.
- Where it lives: whatever fits in your GPU's VRAM runs fast. Whatever spills into system RAM runs at the speed of your memory bus.
- Speed: for the part in system RAM, memory bandwidth (number of channels × speed) matters more than capacity or CPU cores. A desktop with two channels can hold a 70B model in 128 GB, but it will only manage a couple of tokens a second.
- Platforms: desktop CPUs top out at 192–256 GB on two channels. Past that you need a workstation or server CPU (Threadripper, Xeon W, EPYC) with registered ECC memory and 4–12 channels.
I wrote the first version of this post in March 2025. Earlier that year I'd tested DeepSeek-R1 with Ollama on a machine with 48 GB of RAM, which wasn't enough for the 70B model, so I tested the 32B one. That's what got me looking at how far you can push memory on each class of machine. This update corrects several mistakes in the original and adds numbers from my own home inference server.
Step 1: work out how much memory your model needs
Model files are mostly weights. Their size depends on parameter count and quantisation:
Then add:
- Context (KV cache). It grows with context length. On my 12 GB RTX 3060, 14B models at Q4_K_M only loaded once I cut the context from 8,192 to 4,096 tokens (benchmark post).
- Headroom for the OS and everything else you run. Keep at least 8–16 GB spare.
So a practical sizing guide for system RAM, assuming the model may not fit in VRAM:
An earlier version of this post quoted an old Ollama guideline (8 GB for 7B, 16 GB for 13B, 32 GB for 33B). Those are minimums with nothing else running. They're fine as a floor, but they don't leave room for a longer context or your desktop.
Very aggressive quantisations change the picture for the biggest models. Community 1.58-bit and 2-bit builds of DeepSeek-R1 come in well under 200 GB, at a real cost in quality. Mixture-of-experts models also help speed (see below), but not capacity: all the experts still have to sit in memory.
Step 2: understand why bandwidth decides speed
When a model generates a token, it has to read (almost) all of its active weights from memory. So the rough ceiling on generation speed is:
tokens per second ≈ memory bandwidth ÷ GB read per token
Real-world speed is usually well below the ceiling, but the ratio between platforms holds.
Two things follow from this:
- Adding more RAM to a desktop lets a bigger model load, but doesn't make it fast. You get from "won't run" to "runs slowly".
- Fill every channel. An 8-channel board with only four DIMMs has half the bandwidth. Buy smaller sticks in a full set rather than a few big ones.
Mixture-of-experts models are the exception that makes big-RAM machines worthwhile. DeepSeek-R1 has 671B parameters but only about 37B are active per token, so each token reads roughly 20 GB at 4-bit, not 400 GB. That's why people run it on 512 GB EPYC servers at usable speeds when a dense model that size would crawl.
What spilling into RAM looked like on my machine
My home inference server is an Intel Core i7-12700F with 64 GB of DDR4 and an RTX 3060 with 12 GB of VRAM, running llama.cpp on Debian. A few results from it:
- Models that fit entirely on the card were quick: Llama 3.1 8B at Q4_K_M ran at about 64 tokens/s, and the 14B Qwen models at about 33–36 tokens/s.
- gpt-oss-20b at Q4_K_M is about 11.5 GB, which left no room for the KV cache. It loaded with part of it on the CPU, but responses were too slow to be useful.
- A 27B model at 4-bit (about 18 GB) ran with roughly 57% on the card and the rest in system RAM. It worked, at about 4.7 words a second. A smaller quantisation of the same model that fitted entirely on the card ran about four times faster (27B on a 3060, the faster follow-up).
The lesson: system RAM is what lets the model load at all. VRAM and bandwidth are what make it pleasant.
Step 3: pick a platform for your memory target
Check your exact motherboard's manual and memory support list. The board, not the CPU, often sets the real limit.
64–192 GB (256 GB): a desktop PC
Good for: models up to about 34B at good speed with a decent GPU, 70B models slowly, Stable Diffusion and other image work, and small fine-tuning runs that fit in VRAM.
- DDR4 boards: two slots get you 64 GB (2 × 32 GB), four slots get 128 GB.
- DDR5 boards: four slots with 48 GB modules gets 192 GB. 64 GB DDR5 desktop modules now exist, so many recent AM5 and Intel boards reach 256 GB, or 128 GB from just two slots, after a BIOS update.
- Four DDR5 sticks run slower than two. With two DIMMs per channel, boards usually drop the memory speed well below the rated XMP/EXPO figure. For CPU inference that costs you bandwidth. If 96 or 128 GB in two sticks is enough, that's the faster option.
- Spend on the GPU first. VRAM is where the speed is. A used 24 GB RTX 3090 is still a popular choice for local LLMs. A 12 GB card like my RTX 3060 comfortably handles 8B–14B models.
- Power: size the PSU for the GPU. 850 W is a sensible figure for a high-end CPU with a 4090-class card.
For a real example, I helped a friend build an "entry-level AI-ready" machine in 2025: Intel Core i9-12900KS, 128 GB (4 × 32 GB) DDR5, RTX 4070, MSI PRO Z790-P WIFI, a 2 TB Samsung 990 Pro and a 750 W Gold PSU. The one gotcha was a no-boot problem with the CPU power cables, which I wrote up here.
Gaming desktops such as the Lenovo Legion Tower 5 or Dell Alienware towers can also work. Check that they have four DIMM slots and room for the GPU you want before buying.
256 GB to 2 TB: a workstation or single-socket server
Good for: Llama 405B-class models, DeepSeek-R1 at 4-bit (512 GB), running several large models at once, and multi-GPU setups that need lots of PCIe lanes.
- Cheapest route to lots of RAM: a used AMD EPYC 7002/7003 with a single-socket board. Server DDR4 RDIMMs are plentiful second-hand, and 8 × 32 GB (256 GB) or 8 × 64 GB (512 GB) fills every channel. Common boards include the Supermicro H12SSL, ASRock Rack ROMED8-2T and Tyan S8030 (8 slots each), or the Gigabyte MZ32-AR0 (16 slots).
- Newer and faster: Threadripper PRO 7000WX on a WRX90 board such as the ASUS Pro WS WRX90E-SAGE SE (8 slots, up to 2 TB), or Xeon W-3400 on a board like the Supermicro X13SWA-TF (16 slots).
- Best bandwidth per socket: EPYC 9004/9005 with all 12 channels populated. This is what most people running DeepSeek-R1 from RAM use.
- Budget Xeon W: the W-2400 series (for example the W3-2423) is cheap and takes up to 2 TB, but it has only 4 channels. My follow-up post looks at component choices for this tier.
Things that catch people out:
- You need registered ECC memory (RDIMMs). Desktop sticks won't work in these boards, and RDIMMs won't work in desktop boards.
- Two DIMMs per channel lowers memory speed on most of these platforms too. Check the board manual.
- Dual-socket boards double capacity but not single-model speed. Memory is split across the two CPUs (NUMA), and inference that crosses between them is slower than you'd expect.
- Server boards are loud and fussy: many expect server airflow and an E-ATX or SSI-EEB case, and some have BMC fan curves tuned for a rack.
512 GB+ with multiple data-centre GPUs
This is a different category. Training or fine-tuning large models happens in GPU memory, so it's about 4–8 data-centre GPUs (NVIDIA H100/H200/B200 or AMD MI300X) linked with NVLink or Infinity Fabric, in a rack server with redundant power and proper cooling. These systems cost well into six figures. Most individuals and small businesses rent this by the hour from a cloud provider instead of buying it.
Alternatives to a big-RAM PC
Since this post was first written, a few machines with large unified memory have become popular for local LLMs. The GPU reads the same pool as the CPU, with much more bandwidth than a desktop's two channels:
- Apple Mac Studio (M3 Ultra): up to 512 GB unified memory at about 800 GB/s. Expensive, but one of the simplest ways to run very large models at home.
- AMD Ryzen AI Max+ 395 mini PCs: up to 128 GB at about 256 GB/s.
- NVIDIA DGX Spark: 128 GB at about 273 GB/s.
These are great for inference. They're weaker for training, and you can't add a second GPU or more RAM later.
What I'd buy, by goal
Corrections in this update
- The old CPU table listed Ryzen 7000 and Core i9 as "128 GB (192 GB possible)". 192 GB is supported with 48 GB modules, and many boards now reach 256 GB with 64 GB modules.
- The workstation tier listed EPYC 7xxx with DDR5. EPYC 7002/7003 use DDR4, and DDR5 needs EPYC 9004 or later.
- The Gigabyte MZ32-AR0 was described as maxing out at 512 GB. That's only with 32 GB modules: it has 16 slots and takes larger RDIMMs.
- The old desktop board list mixed Intel Z690/B660 boards with an AMD Ryzen CPU. They're not compatible.
- AMD MI300X is a module-format data-centre GPU, not a workstation card.
- The old conclusion said "128 GB is sufficient for general AI tasks" and "512 GB+ is ideal for deep learning". Training is limited by GPU memory, not system RAM. And for inference, bandwidth matters as much as capacity.
- The enterprise tier was priced at "$50,000+". An 8-GPU H100 server costs several times that.









Comments (0)
Leave a Comment