Chat

Apache 2.0Open weightsUpdated June 2026

Gemma 4 31B

Google's largest Gemma 4 - dense 32.7B parameters (marketed as 31B) with a 256K context window under Apache 2.0.

Google · Gemma

Editorial review

Reviewed byOpenSourcesAI EditorialLast updatedJune 2026SourcesHugging Face

Model checkpoints, context windows, provider support, local runtime compatibility, and license terms can change quickly. Verify the exact model card before production or commercial use.

Best for

Maximum Gemma quality for local chat, reasoning, and long-context work on 24 GB cards.

Who should use it

  • Maximum Gemma quality for local chat, reasoning, and long-context work on 24 GB cards.
  • Teams with access to hosted inference or server-class deployment paths.

Common workflows

  • Large open-weight chat, reasoning, and long-context workflows

Deployment and hardware notes

Ollama Q4_K_M is ~18 GB (26B A4B) / ~20 GB (31B): full-GPU on 24 GB cards, split placement with reduced throughput on smaller GPUs.

License and usage notes

Apache 2.0. Open weights. Verify the exact model card and license terms for the checkpoint or hosted provider you use.

Strengths

  • Open weights model option for Gemma workflows.
  • Maximum Gemma quality for local chat, reasoning, and long-context work on 24 GB cards.

Limitations

  • Q4 weights need a 24 GB card for full-GPU placement; below that Ollama splits across VRAM and system RAM. Verified against the HF config and Ollama library 2026-08-01.
  • Ollama Q4_K_M is ~18 GB (26B A4B) / ~20 GB (31B): full-GPU on 24 GB cards, split placement with reduced throughput on smaller GPUs.
  • Context window and limits: 256K tokens (max_position_embeddings 262144).
  • Verify the exact model card, provider docs, license, and serving support before production use.

Will Gemma 4 31B run on your machine?

Gemma 4 31B is 31B parameters and needs 21.5 GB of VRAM at Q4_K_M20 GB of weights plus 1.5 GB of runtime overhead for the inference server itself.

VRAM by quantization

QuantizationWeightsNeeds (with overhead)Quality
Q4_K_M20 GB21.5 GBgood

Fit on common hardware at Q4_K_M

HardwareMemory the model can useSystem RAMVerdict
CPU OnlyNone (CPU only)16 GBToo large
RTX 4060 Laptop8 GB16 GBToo large
RTX 3060 (12GB)12 GB32 GBCPU offload
RTX 4060 Ti (16GB)16 GB32 GBCPU offload
RTX 309024 GB64 GBComfortable
Apple Silicon (Unified Memory) 36 GB27 GB of 36 GB36 GBComfortable
RTX 509032 GB64 GBComfortable

Comfortable means VRAM clears the requirement by 2 GB or more. Tight means it covers the requirement with no margin. CPU offload means the model does not fit in VRAM but system RAM is at least 1.6× the weights, so it will run at reduced speed — expect roughly 1–5 tokens per second. Figures are weights plus a fixed runtime overhead and exclude KV-cache growth, which scales with context length.

Apple Silicon shares one pool of memory between the system and the GPU, so a model cannot use all of it. These rows apply the same 75% usable fraction the Compatibility Checker uses, which is why a 36 GB Mac is graded on less than 36 GB.

VRAM fit by quantization level

Enter your GPU VRAM below to see which quantization of Gemma 4 31B fits and get the Ollama run command.

Sources to verify

Related resources

Continue with model source notes, local tools, and implementation guides related to this model.

HardwareRuntimeContext256K tokens (max_position_embeddings 262144)Last updated2026

Model ecosystem connections

Use these next-step links to move from this profile into related tools, comparisons, guides, stacks, and curated shortlists.