Doc. CVG-01An interactive explainerRev. B
Processor family comparisonSilicon, 2 dies

CPUversusGPU

Parameter
CPU
GPU
Cores
8–24
~16,000
Clock
~5 GHz
~2.5 GHz
Memory speed
~80 GB/s
~1–3 TB/s
Optimised for
latency
throughput

Both are chips made of billions of transistors, and both do arithmetic. They are built for opposite jobs. This page shows the difference, then explains why Bitcoin miners and AI chatbots ended up buying graphics cards.

×8A CPU is a few professorsEach one is brilliant and fast and can handle any problem you throw at them, including tricky ones with lots of "if this, then that".
×10,000A GPU is a stadium of studentsEach one is slower and can only follow simple instructions, but there are thousands of them and they all work at once.
01

Inside the chips

Every chip has a fixed amount of space, called its die area, to spend on transistors. What makes CPUs and GPUs different is how they spend it.

A CPU has a small number of big, powerful cores, usually 4 to 24 in a laptop or desktop. Much of each core is control logic. This logic predicts which way your code will branch, reorders instructions so nothing waits, and starts on work it guesses you'll need next. Around the cores sit large caches, small pools of very fast memory that hide how slow main memory is. Only a small part of the chip does the actual arithmetic.

A GPU turns that around. It packs in thousands of small, simple arithmetic units, grouped into blocks. A block shares one small control unit, so every unit in it runs the same instruction at the same moment, each on different data.

Two dies, built to different plans
drag to rotate
The 3D view couldn't load. Your browser may have WebGL turned off.
Arithmetic units (ALUs): do the actual maths Control logic: decides what to do next Cache: fast on-chip memory
CPU
ALUctrlcache
GPU
ALUctrlcache

The layouts and proportions are illustrative. Real dies vary a lot, but the trade-off is real: a CPU spends its area on making one stream of instructions fast, and a GPU spends it on running many streams at once.

Latency vs throughput. A CPU is designed for low latency: finish this one task as soon as possible. A GPU is designed for high throughput: finish as many tasks per second as possible, even if each one takes longer.

GPUs were invented for graphics, where this is a perfect fit. A 4K screen has about 8 million pixels, and the colour of each one is worked out with the same short recipe of maths. No pixel needs to wait for its neighbour, so you can hand one pixel to each worker and run them all at once.

02

The paint race

Let's race them. Each chip has to work out the colour of 2,560 pixels. The CPU has 8 fast cores. The GPU has 512 cores, but each one takes four times as long per pixel.

The slider controls how much of the job can run in parallel. At 100%, every pixel is independent. Lower it and part of the work becomes a chain, where each step needs the answer to the step before. A chain can only run on one core at a time, however many you have.

2,560 pixels, two chips

CPUready

8 cores · 1 time unit per pixel
0 time units

GPUready

512 cores · 4 time units per pixel
0 time units
Share of the work that can run in parallel 100%

The dots under each picture are the cores, and a lit dot is busy. While the work is a chain, only one dot lights up, and the GPU's slower single core holds everything up.

This is Amdahl's law: the part of a job that can't be split up limits how much faster extra workers can make it. Try 90%: just one tenth of the work in a chain wipes out most of the GPU's lead.

That's why your computer has both. The operating system, web browser and game logic are full of branching, step-by-step code, so they run on the CPU. Drawing frames, editing video and, as we'll see, mining and AI are huge piles of identical, independent sums, so they run on the GPU.

03

Why crypto mining wanted GPUs

Bitcoin and similar cryptocurrencies use proof of work. To add a new block of transactions to the shared ledger, a miner has to find a number, called a nonce, that makes the block's hash come out below a target. In practice that means the hash has to start with a certain number of zeros.

A hash function such as SHA-256 scrambles its input into a fixed-length fingerprint. Change one character and the output changes completely and unpredictably. So there's no clever shortcut: you just keep guessing. Try it.

Guess a nonce by hand
real SHA-256, computed in your browser
You need the hash to start with 4 zeros. Each try has about a 1 in 65,536 chance. Good luck clicking.

Every guess is independent of every other guess. Nonce 7 doesn't need the answer from nonce 6. That is exactly the kind of work GPUs are built for: give each core its own nonce, have them all hash at once, and repeat.

Mining race: 8 CPU lanes vs 1,024 GPU lanes
drag to rotate
The 3D view couldn't load. Your browser may have WebGL turned off.

CPU · 8 lanes

0 hashes
waiting

GPU · 1,024 lanes

0 hashes
waiting
Each cube is one lane, a core working through its own nonces. A cube flashes when it hashes, glows brighter the more leading zeros it finds, and turns gold when it wins. Both chips hash the same block above. To be fair, each lane does one hash per frame, so the only difference is the number of lanes.

From GPUs to custom chips

Real miners don't race 4 zeros. The Bitcoin network's target needs around 19 leading hex zeros, and the whole network tries hundreds of billions of billions of hashes every second. Roughly how fast different hardware runs Bitcoin's SHA-256:

Log scale: each step is 10× more. The figures are rough orders of magnitude for current hardware.

GPUs beat CPUs by about 100×, which is why mining moved to graphics cards around 2010. For SHA-256 the next step was the ASIC, a chip that can only mine Bitcoin, with almost no control logic at all: the GPU idea taken to its extreme. Bitcoin has been ASIC-only for years.

Other coins, most famously Ethereum, chose hash functions that need lots of fast memory so that ASICs wouldn't have a big edge. That kept graphics cards in demand, and it's why the 2017 and 2021 crypto booms emptied gaming GPU shelves. Ethereum dropped mining entirely in September 2022, when "The Merge" switched it to proof of stake.

04

Why large language models need GPUs

A large language model (LLM) such as ChatGPT or Claude is, underneath, a huge stack of numbers called weights, often tens or hundreds of billions of them. Turning your words into the next word of the reply means multiplying lists of numbers by those weights, layer after layer. Almost all of that work is one operation: matrix multiplication.

To multiply matrix A by matrix B, each cell of the result C is a dot product: you multiply a row of A by a column of B, number by number, and add the results up. The cells don't depend on each other at all. Below, every small cube is one multiply-add. A cube lights up while it's being computed, and its result drops into C at the front.

An 8×8 matrix multiplication = 512 multiply-adds
drag to rotate
The 3D view couldn't load. Your browser may have WebGL turned off.
A: the input (e.g. a word's vector) B: the model's weights C: the result
Choose a chip and press Multiply.

The CPU's 4 cores each take one cell of C and run through its 8 multiply-adds. The GPU gives every one of the 64 cells its own core. Each GPU step takes twice as long, and it still finishes 8× sooner. Real GPUs also have tensor cores, units that multiply whole small blocks of a matrix in one go.

Now scale it up. A model with 70 billion weights needs about 140 billion multiply-adds for every word it writes. Each word has to come before the next one, because the model reads its own output. Inside a single word, though, those billions of sums all run in parallel.

There's a second, less obvious reason GPUs win. To produce each word, the chip has to read every weight from memory once. For a single chat, that's usually the real bottleneck, more than the arithmetic. GPUs have very fast memory stacked right beside the chip. A data-centre GPU can read about 3,000 GB per second, about 40× faster than a desktop CPU reads its RAM.

How fast could this hardware run this model?
Memory the weights need
–
–
Sums per word
–
about 2 operations per weight (one multiply and one add)
Best-case writing speed
–
–
The white line marks a fast human reading speed, about 10 words a second.
These are upper limits for one user, from published memory speeds and compute figures. Real software reaches less, and servers handle many users at once by batching them together, which makes good use of all that GPU compute.

Training is far bigger still

Running a model is the easy part. Training one means passing trillions of words through it, forwards and backwards, and adjusting every weight each time. Training GPT-3 in 2020 took about 3×1023 operations: three hundred thousand billion billion. Here's roughly how long that would take:

Log scale. These assume about 40% of each chip's peak speed is used in practice: a desktop CPU at about 1 trillion operations a second and a data-centre GPU at about 400 trillion. Frontier models today need 100× or more again, which is why AI labs build data centres with hundreds of thousands of GPUs.

05

Summary

CPUGPU
CoresA few (4–24 in a desktop, up to ~200 in a server)Thousands of simple ones
Optimised forLatency: one task done fastThroughput: many tasks per second
Area spent onControl logic and big cachesArithmetic units
Great atBranching, step-by-step code: operating systems, browsers, game logic, databasesThe same sum on lots of data: graphics, video, simulations, hashing, AI
MemoryLots of it (tens to hundreds of GB), moderately fastLess of it (8–192 GB), extremely fast
Crypto miningFar too slowUsed to dominate; now mostly replaced by ASICs, and Ethereum no longer mines
LLMsCan run small models slowly; can't realistically train themWhere nearly all AI training and serving happens

If a job can be split into millions of identical, independent pieces, a GPU will usually win. Mining and AI are exactly that kind of job.