· Datacenter

The integrated GPU ran my model at the same speed as the CPU

A small model on my inference machine generated 34.6 tokens per second on the integrated GPU and 33.2 on the CPU. Both processors read the weights through the same two memory channels, and the memory sets the speed.

A small model on my inference machine generated 34.6 tokens per second on the integrated GPU. The same model on the CPU generated 33.2. I have stopped trying to get the GPU working on that machine, because the most it could give me back is about 4 percent.

Where the two numbers came from

The machine is the first of the three mini PCs I described in April. It has a laptop-class AMD processor with 12 cores and 24 threads, graphics built into the same chip, and 64 GB of DDR5-5600 in two sticks. It runs a model server, Ollama, directly on Linux and does nothing else.

On August 10 I upgraded Ollama across a long gap in versions. Under the old version, the runtime had been loading models onto the integrated GPU through AMD's ROCm library. My notes from before the upgrade show the small model, a 3-billion-parameter one in a 1.9 GB file, occupying 9.3 GiB of graphics memory and generating 34.6 tokens per second.

After the upgrade the runtime found no GPU it could use. The GPU library bundled with the new version has no support for this particular chip, and its list of usable devices came up empty. Every model loaded on the CPU. The ollama ps command shows where a model landed. Ollama's FAQ says its processor column reads 100% GPU when "the model was loaded entirely into the GPU" and 100% CPU when it "was loaded entirely in system memory." Mine read 100% CPU.

So I ran the same model on the same prompt and got 33.2 tokens per second.

One caveat on the comparison. The two figures come from two different versions of the runtime, so this is a before-and-after reading and falls short of a controlled test. A gap of 1.4 tokens per second is small enough that I would not claim either processor is the faster one.

Why they match

I went through this arithmetic in April, before I had a measurement of my own to put beside it. To produce one token, the machine reads the model's weights out of memory and does a small amount of arithmetic on each. An Arm engineering guide gives the relationship as a formula: decode tokens per second equals effective memory bandwidth divided by the bytes read per token. The same guide is direct about what follows from it: "Adding threads past the point where memory is saturated doesn't help decode."

An integrated GPU has no memory of its own. Wikipedia's article on shared graphics memory describes the design as one "in which the graphics chip does not include dedicated memory" and uses main system RAM in its place. It also names the cost, which is "lower performance because system RAM usually runs slower than dedicated graphics RAM."

So on my machine the GPU and the CPU read the same weights through the same two memory channels. The GPU can do more arithmetic per second than the CPU can, and the token rate was waiting on memory the whole time. Hiring a faster cook does nothing for a kitchen where both cooks fetch every ingredient through one narrow pantry door.

The numbers fit. Two channels of DDR5-5600 have a theoretical peak of 89.6 GB per second. Divide that by a 1.9 GB file and the ceiling is about 47 tokens per second. I measured 33.2, which is about 70 percent of the ceiling. A real system always comes in under the theoretical figure, and both of my readings sit in the same place under it.

File size did not predict speed

I timed the other models on the machine the same day, on the same prompt, all on the CPU.

| Model | File size | Tokens per second | |---|---|---| | gemma4:e2b | 7.2 GB | 36.3 | | qwen2.5:3b | 1.9 GB | 33.2 | | laguna-xs-2.1 | 20 GB | 25.2 |

The largest file is ten times the size of the smallest and runs at about three-quarters of its speed. If every byte of a 20 GB file were read for every token, the ceiling on this memory would be under 5 tokens per second.

The formula says bytes read per token, and for these models that is much less than the file. The 20 GB model is a mixture-of-experts design. Its library page describes it as "a 33B total parameter Mixture-of-Experts model with 3B activated parameters per token." The 7.2 GB model carries the same information in its name. Its page explains that the E in E2B stands for effective parameters, and lists about 2.3 billion of them.

So on a machine limited by memory bandwidth, the number to plan with is how many parameters the model touches per token. A large model that activates 3 billion parameters per token generates at roughly the speed of a 3-billion-parameter model. It still needs memory capacity for the whole file.

The 20 GB model is also a thinking model. With thinking turned off in the request, it ran at 27.2.

Three models on the same memory
Show
gemma4:e2b (7.2 GB)36.3 tokens/s
qwen2.5:3b (1.9 GB)33.2 tokens/s
laguna-xs-2.1 (20 GB)25.2 tokens/s

The 20 GB model is ten times the size of the 1.9 GB one and runs at about three-quarters of its speed.

Measured on the CPU of my inference machine. The file-size ceiling divides 89.6 GB per second by the size of the file.

What I changed and what I left alone

On August 10 I decided to leave the machine on the CPU.

Ollama's GPU documentation describes an environment variable that overrides the GPU version the ROCm library sees, for AMD chips outside the supported list. I tried it. On my chip it made things worse: device discovery hung for 30 seconds at startup. I did not keep it.

My configuration still carries the setting that allows the integrated GPU. On August 10 it had nothing to act on.

One thing has changed since April. I wrote then that the firmware had reserved about 48 GB of the 64 for the integrated graphics, which left the operating system 16. I have lowered that reservation, and the operating system now sees about 54 GB. On a machine that runs its models on the CPU, memory set aside for graphics is memory the models cannot use.

What I would check before buying

Whether the GPU has its own memory. A discrete card brings fast memory with it, and that memory is most of the reason it is fast at this work. An integrated one borrows yours.

How many memory channels the machine has and how fast they run. Channels multiplied by transfer rate multiplied by eight bytes gives the theoretical bandwidth. Divide by the bytes your model reads per token. That is the best the machine can do on either processor.

What the model activates per token. Read the model's page for active or effective parameters before you rule out a large model on file size.

Your own prompt, on both processors if the runtime allows it. I got my comparison by accident, through an upgrade that took the GPU away. A deliberate test would have told me the same thing months earlier.

The same reasoning applies to a server quote at work. For a node that will run inference on its CPUs, the memory configuration deserves more attention than the core count, for the reason the Arm guide gives. I said in April that a server with eight or twelve memory channels generates faster than a desktop with two. A server with only some of those channels populated has given part of that advantage back.

This is one machine and one day of measurements. A chip with a different memory layout, or a runtime that divides the work differently, will produce different numbers. I would still start from the formula and then measure.

Views are my own.