FitMyModel

Google

What runs Gemma 4 31B? 24–32 GB GPUs and mini PCs

Published Updated

We earn from qualifying purchases via affiliate links. Disclosure.

Verdict

Gemma 4 31B is a 19–20 GB download in Ollama, with a 256K context window and text and image input. It needs a 24–32 GB GPU or a unified-memory mini PC. On a smaller card, Gemma 4 12B (7.7–8.0 GB) fits the 12 GB tier.

Prices: Newegg checked Oct 27, 2026, about 12:35 PM CT; Minisforum checked Oct 27, 2026, 12:40 PM CT. New condition only.

Model memory at a glance

ModelMemory neededFormatContextSmallest tier (our estimate)Source
Gemma 4 31BGoogle · Text
19–20 GB Q4_K_M 256K 24–32 GB GPU24–32 GB GPU Ollama: gemma4 tags

Good, Better, Best for this model (24–32 GB tier)

Three new-retail picks, chosen from cited specs and prices. We do not test hardware ourselves. Prices show when we checked them.

Good ASRock Intel Arc Pro B60 Creator 24GB blower graphics card — illustrated product card

24 GB on one card

ASRock Intel Arc Pro B60 Creator 24GB

Price shown at Amazon

Enough VRAM for the 17–20 GB Q4 downloads of Qwen3.5 27B and Gemma 4 31B. Only third-party sellers when checked.

Sold at Amazon.

Check price at Amazon (opens in a new tab)
Better ASUS Turbo Radeon AI Pro R9700 32GB blower-style graphics card — illustrated product card

32 GB for longer context

ASUS Turbo Radeon AI Pro R9700 32GB

$1,999.99 Newegg · checked Oct 27, 2026, about 12:35 PM CT

Out of stock / unavailable

8 GB more headroom than 24 GB. Out of stock when checked; listed so you can watch it.

OUT OF STOCK when checked (search page)

Check price at Newegg (opens in a new tab)
Best Minisforum MS-S1 MAX mini workstation — illustrated product card

Or skip the GPU: a complete box

Minisforum MS-S1 MAX 64GB / 2TB (Ryzen AI Max+ 395)

$2,599 Minisforum · checked Oct 27, 2026, 12:40 PM CT

64 GB of unified memory holds the same 27B–35B models with room to spare, in a mini PC you do not have to build.

Listed as available in the store data

Check price at Minisforum (opens in a new tab)

The details

Gemma 4 sizes in Ollama

The Ollama tag page lists gemma4:31b at 19–20 GB, gemma4:26b at 16–19 GB and gemma4:12b at 7.7–8.0 GB. All three show a 256K context window. The ranges cover the different variants Ollama lists under each size.

Which GPU for 31B

With 19–20 GB of weights plus context, a 24 GB card is the floor and 32 GB is comfortable (our estimate). A 16 GB card can't hold the 31B on the GPU alone; the 26B is also too big for 16 GB at its upper size.

Complete systems

Prebuilt AI workstations with a 32 GB Radeon AI Pro R9700 showed up on Amazon search, but we did not open the product page. A Minisforum MS-S1 MAX 64 GB ($2,599) holds the 31B in unified memory with lots of room.

Install and run Gemma 4 31B

Steps and commands come from the official docs listed at the end of this section, checked Oct 27, 2026, 2:30 PM CT. We don't add flags the docs don't show. Commands can change, so check the linked page if one fails.

1. Before you start: GPU drivers

Your hardwareWhat the docs require
NVIDIA GeForce / RTXCompute capability 5.0 or newer and driver 550+ (Linux). Windows needs driver 551.61 or newer. Cards with compute capability 5.0–6.2 need driver 570+. On Linux, CUDA is an optional install; nvidia-smi should print your GPU. (Ollama hardware support, Ollama Windows)
AMD Radeon (RX 9000/7000/6000, AI PRO R9700)Linux: the ROCm v7 driver, installed with amdgpu-install. Ollama recommends AMD's latest Linux driver over the older in-kernel one. Windows: a ROCm v7 / HIP7 driver, or a Vulkan-capable Radeon driver. Ollama says some RX 6000 cards may not get ROCm v7 on Windows, so use Vulkan there; it's on by default.
Intel Arc (B580, Pro B60)Ollama supports Intel GPUs through Vulkan. Windows drivers include Vulkan; on Linux, follow Intel's client GPU driver guide. Intel also publishes an Ollama build for Arc GPUs (IPEX-LLM portable zip), tested on Arc A- and B-series.
Apple silicon MacmacOS 14 Sonoma or newer on an M-series chip. Ollama uses the GPU through Metal automatically; Intel Macs run on the CPU only.
Strix Halo mini PC (Ryzen AI Max+ 395)Ollama lists the Ryzen AI Max+ 395 (gfx1151) as a supported ROCm target on Linux. How much memory the GPU can use depends on settings; see the fixes below.

2. Install Ollama

Windows 10 22H2 or newer: download and run OllamaSetup.exe from ollama.com/download. It installs in your user account without admin rights and runs in the background. Then the ollama command works in PowerShell or cmd. You'll need at least 4 GB for the app, plus room for models.

macOS: open ollama.dmg and drag Ollama into Applications. On first start it offers to link the ollama command into /usr/local/bin.

Linux (one command):

curl -fsSL https://ollama.com/install.sh | sh

Linux, AMD GPU, manual install: extract the main package, then the extra ROCm package:

curl -fsSL https://ollama.com/download/ollama-linux-amd64.tar.zst \
    | sudo tar x -C /usr
curl -fsSL https://ollama.com/download/ollama-linux-amd64-rocm.tar.zst \
    | sudo tar x -C /usr

Linux, AMD ROCm driver (Ubuntu 24.04 example from AMD's quick start):

wget https://repo.radeon.com/amdgpu-install/7.2.4/ubuntu/noble/amdgpu-install_7.2.4.70204-1_all.deb
sudo apt install ./amdgpu-install_7.2.4.70204-1_all.deb
sudo apt update
sudo apt install "linux-headers-$(uname -r)" "linux-modules-extra-$(uname -r)"
sudo apt install amdgpu-dkms
sudo apt install python3-setuptools python3-wheel
sudo usermod -a -G render,video $LOGNAME
sudo apt install rocm

Then reboot. Other distros have their own commands on AMD's quick start page.

Intel Arc with Intel's Ollama build: download the IPEX-LLM Ollama portable zip (Windows) or tgz (Linux) and extract it. On Windows, open cmd in that folder and run start-ollama.bat, then run the ollama run command below from the same cmd window.

Check that Ollama is installed:

ollama -v

3. Download and run Gemma 4 31B

Gemma 4 31B

ollama run gemma4:31b

Smaller option: Gemma 4 26B-A4B

ollama run gemma4:26b-a4b

The first run downloads the model, then opens a chat prompt. Type /bye to exit. Ollama also serves an API at http://localhost:11434.

4. Check that it's running on the GPU

ollama ps

The PROCESSOR column should read 100% GPU. A CPU/GPU split means the model didn't fit in GPU memory. You can also watch GPU memory with:

nvidia-smi   # NVIDIA
rocm-smi     # AMD on Linux (ROCm)

Logs: on Linux, journalctl -u ollama --no-pager --follow --pager-end. On macOS, ~/.ollama/logs/server.log. On Windows, run explorer %LOCALAPPDATA%\Ollama and open server.log.

5. Common fixes

  • Out of memory, or part of the model runs on the CPU: pick a smaller tag, or shorten the context. Ollama's default context is 4096 tokens, and longer contexts use more memory. Set it for the server or inside a chat:
    OLLAMA_CONTEXT_LENGTH=8192 ollama serve
    /set parameter num_ctx 4096
    Flash Attention reduces memory use as context grows. Ollama turns it on automatically where supported; to force it on, set OLLAMA_FLASH_ATTENTION=1 when starting the server.
  • Strix Halo mini PC, GPU memory: on Windows, AMD's Variable Graphics Memory turns part of system RAM into dedicated graphics memory. Open AMD Software: Adrenalin Edition, then Performance, then Tuning, and pick a size; this needs a restart. On a 128 GB system up to 96 GB can be converted. On Linux, AMD's ROCm docs say GPU memory comes from GTT, which defaults to about 50% of RAM. You can raise what the GPU gets by increasing VRAM in the BIOS, or by reducing the GTT size so it's below the reserved amount.
  • NVIDIA on Linux falls back to CPU after sleep: reload the UVM driver: sudo rmmod nvidia_uvm && sudo modprobe nvidia_uvm.
  • AMD card not supported by ROCm on Linux: Ollama documents HSA_OVERRIDE_GFX_VERSION to try a close supported target (their example: HSA_OVERRIDE_GFX_VERSION="10.3.0" for an RX 5400). On some distros, add the ollama user to the render group for Vulkan.
  • Windows with both an iGPU and a dGPU picks the wrong one on Vulkan: set GGML_VK_VISIBLE_DEVICES to the discrete GPU's index.
  • Several GPUs: limit Ollama with CUDA_VISIBLE_DEVICES (NVIDIA) or ROCR_VISIBLE_DEVICES (AMD). nvidia-smi -L and rocminfo list the devices.
  • Not enough disk space: set OLLAMA_MODELS to store models on another drive. On Windows, set it in your account's environment variables, then quit and restart Ollama.

Other apps that run the same models

LM Studio is a desktop app. It needs an Apple silicon Mac on macOS 14+, or Windows (x64 with AVX2, or ARM), or Linux as an AppImage (Ubuntu 20.04+). LM Studio recommends 16 GB+ of RAM and at least 4 GB of dedicated VRAM on Windows. llama.cpp is the engine underneath many of these tools. Its README gives this install and usage (swap in a GGUF repo for the model you want):

# Linux/macOS
curl -LsSf https://llama.app/install.sh | sh
# Windows PowerShell
irm https://llama.app/install.ps1 | iex

llama cli -hf ggml-org/Qwen3.5-0.8B-GGUF
llama serve -hf ggml-org/Qwen3.5-0.8B-GGUF

Install sources (checked Oct 27, 2026, 2:30 PM CT)

Hardware that fits Gemma 4 31B

FAQ

How much VRAM does Gemma 4 31B need?

Ollama lists gemma4:31b at 19–20 GB. With context headroom, plan on a 24 GB GPU at minimum (our estimate).

Which Gemma 4 runs on a 12 GB GPU?

Gemma 4 12B, which Ollama lists at 7.7–8.0 GB, fits a 12 GB card with room for context.

Does Gemma 4 take images?

Ollama lists text and image input for the Gemma 4 sizes shown here.

Keep reading

Sources

Each source was opened on Oct 27, 2026.

  1. Ollama: gemma4 tags