Skip to content
Codewilds

Lesson 25 of 31 · The Right PC for the Job

PC for AI: Run Models Locally

Quizmedium10 XP3 min read

Running AI models on your own PC keeps your data private, works offline and costs nothing per question. One number decides which models you can run at all: the graphics card's memory, VRAM. Choose it first, then build the rest of the PC around it.

Why VRAM decides

To produce each word, a model reads its weights — billions of numbers — from memory. To run fast, all of them must sit in VRAM, together with working memory for your conversation (the KV cache, which grows with the context length). A quick estimate:

memory ≈ parameters × bytes per parameter + overhead for the context

The bytes per parameter depend on the precision: 16-bit ≈ 2 bytes, 8-bit ≈ 1 byte, 4-bit ≈ 0.5 bytes. Models quantized to 4-bit lose little quality, which is why they're the usual choice at home.

Model at 4-bit Weights With context Graphics card that runs it fully
8B (8 billion parameters) ≈ 4 GB ≈ 5 GB 8 GB
32B ≈ 16 GB ≈ 18–20 GB 24 GB or more
70B ≈ 35 GB ≈ 40 GB or more 48 GB, or several GPUs

The same 8B model at 16-bit needs about 16 GB for the weights alone, so precision matters as much as size. Long contexts make the KV cache grow, so leave a few GB spare.

NVIDIA, AMD or Intel?

NVIDIA's CUDA has the widest support: nearly every AI tool runs on it first. AMD's ROCm is improving, and popular local tools run on recent Radeon cards; Intel Arc works with fewer tools. If you haven't settled on your tools, an NVIDIA card is the safe choice — otherwise, check each tool's supported hardware.

Image generation follows the same memory rule: older image models run in 8–12 GB, while newer, larger ones want 16 GB or more (or a quantized version).

The rest of the PC

  • System RAM at least equal to VRAM, ideally twice as much: models load through system memory, and you still run other apps. A 32 GB card calls for 64 GB of RAM.
  • A fast NVMe SSD: model files are large (a 70B model at 4-bit is about 40 GB) and collections grow quickly, so start at 2 TB.
  • Offloading: tools can keep part of a model in system RAM when VRAM runs out, but it's much slower. Dual-channel DDR5 moves around 100 GB/s; a high-end card's VRAM moves 1,000 GB/s or more.
  • Several GPUs can split one model between them, but each card needs a slot with enough space around it, the PSU must feed both, and the case must cool both. One card with more VRAM is simpler and faster.
  • Long full-load sessions: AI work can keep the graphics card at full power for hours. Size the PSU with the formula (at least 1.3 × the estimated load), use a native cable for the card's power connector, and choose a case with strong airflow.

Unified memory: capacity over speed

Apple silicon Macs and mini PCs with AMD's Ryzen AI Max let the GPU use most of the system memory — 128 GB or more on some models — so they can load models no consumer graphics card can hold. The trade-off is speed: their memory is slower than a high-end card's VRAM, so they generate text more slowly, and long prompts take much longer to process.

Running vs training

Everything above is about inference — running a model. Training needs far more memory, because the gradients and optimizer states sit next to the weights. Fully fine-tuning even an 8B model is beyond a single consumer card, while lighter methods such as LoRA and QLoRA fine-tune small models on 16–24 GB cards. Training a model from scratch is data-center work.

Premium lesson

Unlock the full Learn PC Building course

  • All 31 lessons, bosses and quizzes — lifetime access
  • One payment of $35, no subscription
  • Finish within 30 days and claim $10.50 (30%) back
Play the 5 free lessons

Want more than one course?

The All-Access Pass unlocks all 8 courses and every new one we release, for $120 once.

Keep learning

Lesson last updated on .

Take the quiz ↓
Quiz+10 XP

Lesson 25 is part of the full course. The first 5 lessons are free.

Premium lesson

Unlock the full Learn PC Building course

  • All 31 lessons, bosses and quizzes — lifetime access
  • One payment of $35, no subscription
  • Finish within 30 days and claim $10.50 (30%) back
Play the 5 free lessons

Want more than one course?

The All-Access Pass unlocks all 8 courses and every new one we release, for $120 once.