Google

Gemma 4 hardware requirements

Gemma 4 comes in five Ollama sizes, E2B, E4B, 12B, 26B and 31B, with Q4 files from 4.6 to 20 GB. Here is the memory each size needs and the smallest box in our catalog that holds it.

Find hardware for it
Five matte black mini PCs lined up from small to large on a dark surface, the largest with its lid open and green memory modules inside

Short answer

Every Gemma 4 size runs on a mini PC with enough GPU-usable memory; even the 26B and 31B fit a mid-size memory class.

Measured on our MacBook Pro M5

Our own Ollama runs on a MacBook Pro (Apple M5, 24 GB), median of all runs.

  • gemma4:e4b-it-q4_K_M: 59.5 tok/s at a short prompt, 39.2 tok/s with a 12,900-token prompt
  • gemma4:12b-it-q4_K_M: 27.5 tok/s at a short prompt, 18.4 tok/s with a 12,900-token prompt

All runs, method and raw data

Cheapest box per size

Holds the size at 8K context and answers at a usable pace, by our estimate.

Prices include VAT, as of Nov 30, 2026. Each box shows its cheapest offer including shipping; only shops with an affiliate program are listed. For purchases through “Ad” links we earn a commission; your price stays the same.

Memory per Gemma 4 size

One user, 8K context. The track is the smallest GPU-usable memory in our catalog that holds the size.

Memory per Gemma 4 size at 8K context and the smallest box memory that holds it. WeightsContext + reserveSmallest box that holds it
  1. E2Bgemma4:e2b-it-q4_K_M
    7.6 GB / 8 GB
    from 8 GB
  2. E4Bgemma4:e4b-it-q4_K_M
    9.6 GB / 12 GB
    from 12 GB
  3. 12Bgemma4:12b-it-q4_K_M
    11 GB / 12 GB
    from 12 GB
  4. 26B-A4Bgemma4:26b-a4b-it-q4_K_M
    21 GB / 24 GB
    from 24 GB
  5. 31Bgemma4:31b-it-q4_K_M
    23 GB / 24 GB
    from 24 GB

E2B and E4B: the name is not the file size

E2B and E4B are named by effective parameters, not by what you download: the E2B Q4 file is 4.6 GB and the E4B file 6.6 GB. Plan memory from the file, not from the “2B” or “4B” in the name.

26B A4B: all experts stay in memory

The 26B is a Mixture-of-Experts model with about 4B parameters active per token. All expert weights still have to sit in memory, so it needs 18 GB for weights, close to the dense 31B at 20 GB; the active part mainly affects speed.

Images and long documents need headroom

All five sizes take text and images. Images add context tokens, not weights, so plan with 32K for screenshots, scans or long documents. The context window is 128K for E2B and E4B and 256K for 12B, 26B and 31B. Qwen, Llama and Gemma compared shows where Gemma sits next to its rivals.

Questions and answers

How much RAM or VRAM does Gemma 4 need?

With 8K context and one user, plan this much GPU-usable memory for Gemma 4: 7.6 GB for E2B, 9.6 GB for E4B, 11 GB for 12B, 21 GB for 26B-A4B, 23 GB for 31B. 32K context adds about 4 GB.

Which mini PC runs Gemma 4?

By our estimate, the cheapest boxes in our catalog that hold each size and answer at a usable pace are: GMKtec M6 Ultra 16 GB for E2B; GMKtec M6 Ultra 32 GB for E4B; Apple Mac mini M6 16 GB for 12B; GMKtec EVO-X1 32 GB for 26B-A4B; GMKtec EVO-X2 64 GB for 31B. Prices change, so compare current offers on the device pages.

Can Gemma 4 read images in Ollama?

Yes. All five sizes we list, E2B, E4B, 12B, 26B and 31B, take text and image input. Images add tokens to the context, so plan more memory for screenshots, scans and long documents.

Why does Gemma 4 26B need almost as much memory as the 31B?

It is a Mixture-of-Experts model: all 26B parameters must stay in memory, even though only about 4B are active per token. The Q4 file is 18 GB against 20 GB for the dense 31B; the active part mainly affects speed.

Sources

Checked on Oct 15, 2026. Sizes are Ollama download sizes. How we calculate memory