Part of AI in CanadaAI · Inference on processors

CPU-only LLM inference: what processors can and can’t do.

Language models run on ordinary server processors, without a GPU. That works well for embeddings, classification, extraction and short answers that can take tens of seconds, and badly for chat with many users, long documents and coding agents. The limit is memory bandwidth, not cores. Canner’s AI endpoints serve open models this way, in Montréal; this is what we learned running them.

Facts checked

Memory bandwidth sets the generation speed

To write each new token, a dense model reads every one of its weights from memory. A model file of several gigabytes is read once per token, so the ceiling on generation speed is roughly the memory bandwidth divided by the size of the weights. Faster cores and tuning don’t move that ceiling; only faster memory or smaller weights do.

That is the whole difference between a server processor and a GPU for this job. A GPU’s memory is built for bandwidth:

  • More RAM buys capacity, not speed. It lets a bigger model fit; it doesn’t make it generate faster. Speed needs more memory channels or a GPU.
  • More threads didn’t help us. Beyond the physical cores, the extra hardware threads only compete for the same memory.
MemoryBandwidth
Two channels of DDR5-4800 (a typical single-socket server)About 77 GB/s in theory: 4,800 million transfers a second × 8 bytes × 2 channels. Real reads get less.
NVIDIA L4 (24 GB) †300 GB/s
NVIDIA H100 SXM (80 GB) †3.35 TB/s
NVIDIA H100 NVL (94 GB) †3.9 TB/s

† Competitor details come from each vendor’s own published pages on the dates shown; prices and plans change, so check the vendor before you decide. NVIDIA L4 (24 GB) (2026-11-23) · NVIDIA H100 SXM (80 GB) (2026-11-23) · NVIDIA H100 NVL (94 GB) (2026-11-23)

Mixture of experts changes the arithmetic

A mixture-of-experts model splits its layers into many small experts and uses only a few for each token. Google’s Gemma 4 26B-A4B has 25.2 billion parameters in total but 3.8 billion active per token (8 of 128 experts, plus one shared expert), and Google says it “runs almost as fast as a 4B-parameter model”. On a processor, that is the difference between a usable model and one that writes a word every few seconds.

The whole file still has to sit in memory, so a mixture-of-experts model needs the RAM of its total size and the bandwidth of its active size. Servers have plenty of RAM and little bandwidth, which is why this kind of model is the best fit for CPU inference. It is why Canner serves Gemma 4 26B-A4B for its best answers and the small dense Granite 4.2 3B for fast ones.

Gemma 4 26B-A4B, per Google’s model card
Total parameters †25.2B
Active parameters per token †3.8B
Experts †8 active of 128, plus 1 shared
Licence †Apache 2.0

† Competitor details come from each vendor’s own published pages on the dates shown; prices and plans change, so check the vendor before you decide. Total parameters (2026-11-23) · Active parameters per token (2026-11-23) · Experts (2026-11-23) · Licence (2026-11-23)

Reading the prompt and writing the answer are different work

A model reads your prompt in large batches, many tokens at once, so that part uses the processor’s arithmetic well and gets faster with more cores. It writes the answer one token at a time, which is the bandwidth-bound part. llama.cpp even has separate thread settings for the two: -t for generation and -tb for batch and prompt processing (server docs).

In practice: short prompts with short outputs (a label, a small JSON object) are quick. A long document in the prompt takes a long time before the first word appears, and a long answer takes a long time to finish. Measure prompt reading with a fresh prompt; a cached one looks far faster than it is.

Quantization: start at 4-bit

A GGUF file name says how the weights are stored. Since generation speed follows the size of the weights, a 4-bit file writes faster than an 8-bit one. llama.cpp’s own table for an 8-billion-parameter model:

  • On our tasks, 8-bit bought no quality we could measure over 4-bit. We tested a 13-item synthetic suite and 79 real build-failure diagnoses graded against what actually fixed them.
  • Start at `Q4_K_M`, or the vendor’s quantization-aware 4-bit build when there is one, and move up only if your own evaluation shows a difference.
FormatBits per weightFile size (Llama 3.1 8B)
F16 †16.014.96 GiB
Q8_0 †8.57.95 GiB
Q4_K_M †4.894.58 GiB

† Competitor details come from each vendor’s own published pages on the dates shown; prices and plans change, so check the vendor before you decide. `F16` (2026-11-23) · `Q8_0` (2026-11-23) · `Q4_K_M` (2026-11-23)

Never run two models at once on the same cores

This was our most expensive lesson. We once ran Gemma, Granite and an embedding server on the same four cores at the same time. All three fought over the same memory bandwidth, and an answer that normally took seconds took minutes. Parallel slots inside one model server behave much better than separate model processes.

So Canner’s AI endpoints answer one request at a time across the whole service: paid plans first, then Starter, with research requests last. If you run your own model server, do the same. If you call Canner’s endpoints, a queue in your app keeps you from stacking requests that would only wait; an organization can have 4 waiting, and beyond that gets 429 server_busy with a Retry-After header.

// One model call at a time from this app. On your own server it stops two
// models fighting over the same memory; against Canner's AI endpoints it keeps
// you from stacking up requests that only wait in line (and get 429 server_busy).
let tail: Promise<unknown> = Promise.resolve();

export function infer<T>(job: () => Promise<T>): Promise<T> {
  const run = tail.then(job, job);   // start after the previous call, even if it failed
  tail = run.catch(() => undefined);
  return run;
}

// usage
const label = await infer(() => classify(ticket.body));
const vectors = await infer(() => embed(chunks));

What CPU inference is good for

  • Embeddings. The output is one vector, so there is no slow writing phase. Embedding a short text takes about a second or less, and 128 texts go in one request (bge-m3 embeddings).
  • Classification and extraction. The output is a label or a small JSON object, so the prompt dominates. Keep it short. Canner’s /v1/classify returns a calibrated probability per label, and response_format with a JSON schema guarantees the shape of an extraction.
  • Short answers in a background job. A 300-word answer from Gemma takes about 30 seconds. Fine for a summary nobody is watching for; slow in a chat box. Run it in a queue (background jobs) and show the result when it’s ready, or stream it.
  • Data that shouldn’t leave the server. Nothing goes to an outside API, which can matter more than speed for Law 25 work.

What it isn’t good for

  • Chat with many users at once. Requests take turns, so the tenth user waits for the nine before them.
  • Long documents in one prompt. Reading tens of thousands of tokens takes minutes before the first word. Retrieve the relevant passages instead of sending the whole document; Canner’s chat endpoint caps context at 16,384 tokens anyway.
  • Coding agents. They send many long turns, the worst case for prompt reading.
  • Current library knowledge. All four small models we graded missed recent breaking changes, such as the Prisma 7 adapter. A small open model is no substitute for a frontier API on that kind of question.

How Canner’s AI endpoints use this

Canner’s AI endpoints serve three open models on processors on Canner’s own server in Montréal, through an API that works with the OpenAI SDKs: gemma-4-26b-a4b for the best answers, granite-4.2-3b for fast chat and classification, and bge-m3 for embeddings in English and French. Prompts and answers are processed in memory and never stored, nothing is sent to another company, and nothing is used for training. Usage is measured in model time against a monthly allowance per plan; see AI endpoints for current allowances.

Design for the speed described above: background jobs, streaming, caching repeated questions, and Granite wherever it’s good enough. A request waits up to 2 minutes for its turn.

Questions

Can you run an LLM on a CPU without a GPU?

Yes. Small dense models and mixture-of-experts models run well enough on server processors for embeddings, classification, extraction and short answers in background jobs. Generation is limited by memory bandwidth, so long answers and many simultaneous users are where a GPU wins.

Why is a GPU so much faster at generating text?

Generating each token reads the model’s weights from memory. NVIDIA lists 300 GB/s of memory bandwidth for an L4 and 3.35 TB/s for an H100 SXM, while two channels of DDR5-4800 top out around 77 GB/s in theory.

Is 4-bit quantization good enough?

On our tasks, yes: 8-bit gave no measurable quality gain over 4-bit, and the 4-bit file is about half the size, so it writes faster. Check on your own evaluation set before you decide.

Why does running two models at once slow everything down?

Both read their weights through the same memory channels, so each gets a fraction of the bandwidth. In our test, an answer that normally took seconds took minutes. Queue calls so only one model runs at a time.

Does Canner host language models?

Yes. Canner’s AI endpoints serve Gemma 4 26B-A4B, Granite 4.2 3B and bge-m3 on its own server in Montréal, through an OpenAI-compatible API. They run on processors, so they suit features that can take a few seconds rather than an instant chat window.

Open models, run in Montréal.

Create an AI endpoint, attach it to a project, and call it with any OpenAI SDK.