the full guide

Hardware for AI

AI hardware is the set of processors and memory that run models. A CPU is a general-purpose processor with a few powerful cores. A GPU has thousands of simpler cores that work in parallel. TPUs and NPUs are chips built specifically for AI maths, in data centres and on devices respectively.

10 min Intermediate

What you need: The earlier topics of this module.

Definition

AI hardware is the set of processors and memory that run models. A CPU is a general-purpose processor with a few powerful cores. A GPU has thousands of simpler cores that work in parallel. TPUs and NPUs are chips built specifically for AI maths, in data centres and on devices respectively.

In simple words

A CPU is a brilliant professor who solves one hard problem at a time. A GPU is a hall of ten thousand students, each doing one small sum at the same moment. Training a network means billions of small sums, so the hall wins easily.

Why it matters

Hardware decides what you can train, how long it takes and what it costs. It's also why GPU makers became some of the world's most valuable companies. You don't need your own: Colab and cloud GPUs are enough to start.

How it works

ChipGood atUsed for
CPUVaried work, one step after anotherClassic ML, data prep, running apps
GPUThe same maths on many numbers at onceDeep learning training and inference
TPUTensor maths, at data-centre scaleGoogle's AI workloads
NPUAI tasks using little powerPhones and laptops

What to look at

  • GPU memory (VRAM) often matters most: the model must fit, or it won't run at all.
  • Moving data can slow everything down, so storage and memory speed matter as well.
  • Cost and electricity are real limits on what you can run.

Common mistakes

  • Buying an expensive GPU to start learning. Free notebooks with GPUs are enough for beginners.
  • Using a GPU for small classic ML jobs that run fine on a CPU.

Check yourself

Question 1

1. Why are GPUs better than CPUs for training neural networks?

Question 2

2. A model won't load on your GPU. What's the most likely limit?

Summary

  • CPU: a few strong cores for varied work. GPU: thousands of cores for parallel maths.
  • TPUs and NPUs are specialised AI chips.
  • VRAM usually sets what you can run.

Finished reading?