Skip to content
mentoor

Topic 3 of 5 · 5 min read

Choosing consumer and datacenter GPUs

Goal: Pick a GPU option for a stated model and budget and explain what limits it.

Choose a GPU by memory size first, memory bandwidth second and software support third; raw compute figures come last for local inference. The first two follow from the two earlier topics: the model must fit, and bandwidth sets the speed.

Check yourself · 1 of 3

For running a local model, which GPU spec should you check first?

Choose one answer

Why it matters

GPU spec sheets lead with compute numbers that matter more for training. For running models, a card with more memory and similar bandwidth beats a faster card that cannot hold the model.

How to choose

  1. Start from the model you want to run. Work out weights plus KV cache plus overhead, as in the memory estimate. That is the memory you need, not the memory you would like.
  2. Compare bandwidth. Divide it by the model size for a speed ceiling. Two cards with equal memory but different bandwidth give different speeds in proportion.
  3. Check software support. NVIDIA's CUDA is supported by essentially every engine and framework. AMD's ROCm and Vulkan backends work in llama.cpp and some other engines, but support varies by card and operating system, and new features often reach CUDA first. If you want to fine-tune or run the latest research code, CUDA saves time.
  4. Decide about several cards. Two 24 GB cards give 48 GB for a larger model, but they do not give twice the speed. Engines usually split layers across cards, so the cards take turns. Link speed (PCIe) matters little for this layer split but a lot for training or for splitting each layer across cards.
  5. Know the datacenter tier. Datacenter cards offer 40 to 192 GB per card, much higher bandwidth, error-correcting memory and fast links between cards. They cost many times more per gigabyte than consumer cards and are normally rented, not bought, unless you run them most of the day.

Worked comparison

You want a 32B model at 4-bit (about 18 GB) with an 8k context, which needs about 21 GB in total.

  • A 16 GB card cannot hold it without offloading to system RAM.
  • A 24 GB card holds it with a little room.
  • Two 16 GB cards hold it with a layer split, at roughly single-card speed.

Before and after

Weak: "Buy the newest card with the highest compute score." Fixed: "I need about 21 GB. I choose the cheapest 24 GB card with high bandwidth and a CUDA stack, then leave headroom for context growth."

What goes wrong

  • Buying for compute and ending with too little memory for the model you wanted.
  • Counting on multi-GPU for speed. It adds capacity, not generation speed, for a single stream.
  • Assuming every engine supports every card. Check your engine's backend list for your exact card.
  • Ignoring power, cooling and case size. Large cards draw several hundred watts and may need a bigger power supply.

Used cards and older generations are often the best value, since memory per dollar matters more than age. Dettmers' guide in the references explains these trade-offs in more detail.

Examples

Two builds for a 70B model at 4-bit

Need about 44 GB with an 8k context. Build one: two 24 GB consumer cards (48 GB), it fits with 4 GB spare and generates at roughly one card's speed. Build two: one 80 GB datacenter card, simpler and faster, but priced several times higher. For a hobbyist, build one; for a team serving users all day, rental of build two is usually worth pricing out.

The cheap card with the wrong memory

A 12 GB card and a 16 GB card have the same bandwidth. For an 8B model at 4-bit with 32k context (10.3 GB total), both work. For a 14B model at 4-bit with 16k context (about 8 GB weights, 3 GB cache, 1.5 GB overhead, so 12.5 GB), only the 16 GB card does.

Key points

  • For inference, rank GPUs by memory size, then bandwidth, then software support, then compute.
  • CUDA is supported everywhere; ROCm and Vulkan work in major engines but check the exact card and engine before buying.
  • Several cards add memory capacity but, with a layer split, do not multiply single-stream speed.
  • Datacenter cards add memory, bandwidth and fast links at a much higher price per gigabyte, so they are usually rented.
  • Work out the memory you need first, then choose the cheapest card that holds it with headroom.

Common mistakes

  • Comparing GPUs by compute benchmarks made for gaming or training.
  • Expecting two cards to double generation speed for one user.
  • Buying an AMD or older card without checking that the chosen engine supports it well.
  • Sizing the card to the weights only and leaving no room for the KV cache.

Check yourself · 2 of 3

You add a second identical GPU and split a model's layers across both. What do you mainly gain?

Choose one answer

Check yourself · 3 of 3

Why is a datacenter GPU usually rented rather than bought for occasional experiments?

Choose one answer

Practice items, not counted towards your mastery.

Start here

More for this topic