preloader
post-thumb

Last Update: March 2, 2025 8 min read


BYauthor-thumberic

|Loading...

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:

Quantisation
Approx. GB per billion params
8B model
70B model
671B (DeepSeek-R1)
4-bit (Q4_K_M, Ollama's default)
~0.6
~5 GB
~43 GB
~400 GB
8-bit (Q8_0)
~1.1
~8.5 GB
~75 GB
~710 GB
16-bit (FP16/BF16)
~2
~16 GB
~140 GB
~1.3 TB (FP8 original ~700 GB)

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:

What you want to run
Model at 4-bit
System RAM to aim for
7B–14B (Llama 3.1 8B, Qwen 14B)
5–9 GB
32 GB (fits in a 12–16 GB GPU anyway)
27B–34B
16–20 GB
64 GB
70B (Llama 3.3 70B)
~43 GB
64 GB minimum, 96–128 GB comfortable
100B–120B class
60–75 GB
128 GB
Llama 3.1 405B
~230–245 GB
256 GB minimum, 384 GB comfortable
DeepSeek-R1 / V3 671B
~400 GB
512 GB

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.

Memory setup
Theoretical bandwidth
Ceiling for a 70B Q4 (~43 GB)
Desktop, 2 × DDR4-3200
51 GB/s
~1 token/s
Desktop, 2 × DDR5-5600
90 GB/s
~2 tokens/s
Xeon W-2400, 4 × DDR5-4800
154 GB/s
~3.5 tokens/s
EPYC 7002/7003, 8 × DDR4-3200
205 GB/s
~5 tokens/s
Threadripper PRO 7000 / Xeon W-3400, 8 × DDR5-4800
307 GB/s
~7 tokens/s
EPYC 9004, 12 × DDR5-4800
461 GB/s
~11 tokens/s
RTX 3090 / 4090 VRAM (24 GB, so the model won't fit)
~940–1,000 GB/s
n/a

Two things follow from this:

  1. 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".
  2. 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

Platform
Memory channels
Max RAM
Memory type
AMD Ryzen 7000/9000 (AM5)
2
192 GB; 256 GB on many boards with 64 GB DIMMs and a recent BIOS
DDR5 UDIMM
Intel Core 12th–14th Gen (LGA1700, DDR4 boards)
2
128 GB
DDR4 UDIMM
Intel Core 12th–14th Gen / Core Ultra 200S (DDR5 boards)
2
192 GB; 256 GB on many boards with 64 GB DIMMs and a recent BIOS
DDR5 UDIMM
AMD Threadripper 7000 (TRX50)
4
1 TB
DDR5 RDIMM (ECC)
Intel Xeon W-2400 (W790)
4
2 TB
DDR5 RDIMM (ECC)
AMD Threadripper PRO 7000WX (WRX90)
8
2 TB
DDR5 RDIMM (ECC)
Intel Xeon W-3400 (W790)
8
4 TB
DDR5 RDIMM (ECC)
AMD EPYC 7002/7003 (SP3)
8
4 TB per socket
DDR4 RDIMM/LRDIMM (ECC)
AMD EPYC 9004/9005 (SP5)
12
6 TB per socket
DDR5 RDIMM (ECC)

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

Goal
Sensible build
Coding assistant / chat with 7B–14B models
Any desktop, 32–64 GB RAM, a 12–16 GB GPU
30B-class models at good speed
Desktop, 64 GB RAM, 24 GB GPU (used RTX 3090 or better)
70B models
Two 24 GB GPUs, or a 128 GB unified-memory machine; 128 GB system RAM if you'll offload
DeepSeek-R1 671B at 4-bit
EPYC with 512 GB in all channels, plus one GPU for the shared layers, or a 512 GB Mac Studio
Training or fine-tuning large models
Rent GPUs; buy only if you're using them every day

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
Your email won't be published. We'll only use it to notify you of replies to your comment.
Loading comments...
Previous Article
post-thumb

Mar 06, 2025

Budget 256GB–512GB RAM AI Workstation: Used EPYC 7002/7003 vs Xeon W3-2400

Two cheap ways to build a workstation with 256GB to 1TB of RAM for local AI: a used AMD EPYC 7002/7003 server platform or a new Intel Xeon W3 on W790. Parts, March 2025 prices, memory bandwidth and the gotchas.

Next Article
post-thumb

Feb 28, 2025

I Tested 15 Open-Source LLM Chat UIs: What Actually Worked

I installed 15 free, open-source chat UIs for local and cloud LLMs on my own Linux machine. Here is what worked, what broke, and which ones I would actually use.

agico

We transform visions into reality. We specializes in crafting digital experiences that captivate, engage, and innovate. With a fusion of creativity and expertise, we bring your ideas to life, one pixel at a time. Let's build the future together.

Copyright ©  2026  TYO Lab · v0.0.39