gemma4.devgemma4.dev
MkSaaS文档
gemma4.devgemma4.dev
MkSaaS文档
首页Gemma 4 Developer Hub
Getting StartedQuickstart — OllamaHardware Requirements
X (Twitter)
Getting Started

Quickstart — Ollama

Run Gemma 4 E4B locally in 3 commands using Ollama.

Quickstart — Ollama

The fastest path to a running Gemma 4 model.

Prerequisites

  • macOS, Linux, or Windows (WSL2)
  • 8 GB RAM minimum (16 GB recommended for E4B)
  • Ollama installed

Step 1 — Install Ollama

Download Ollama

Visit ollama.ai and download the installer for your platform. On macOS:

brew install ollama

On Linux:

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

Start the Ollama daemon

ollama serve

Leave this terminal open. Ollama runs a local API server on port 11434.

Pull and run Gemma 4 E4B

ollama run gemma4:4b

First run downloads ~2.5 GB. Subsequent runs start in under 2 seconds.

Verify it works

curl http://localhost:11434/api/generate \
  -d '{"model":"gemma4:4b","prompt":"What is Gemma 4?"}'

You should see a streaming JSON response.

Available Gemma 4 tags

TagModelVRAM
gemma4:2bE2B1.4 GB
gemma4:4bE4B3.2 GB
gemma4:27b26B A4B16 GB

The 31B model is not available through Ollama at this time. Use llama.cpp or vLLM for the full 31B variant.

Next steps

  • Enable thinking mode for complex reasoning tasks
  • Use the OpenAI-compatible API with your existing code
  • Switch to a larger model once you've validated the setup

Getting Started

Run your first Gemma 4 model in under 5 minutes.

Hardware Requirements

VRAM, RAM, and storage requirements for all Gemma 4 model variants across runtimes.

目录

Quickstart — Ollama
Prerequisites
Step 1 — Install Ollama
Verify it works
Available Gemma 4 tags
Next steps