MorseSign inOpen Morse

Gemma 4: Google's five open sizes, 256K context, image input, and a call we ran

The Morse teamPublished Facts checked 7 min read

Gemma 4 is Google's fourth generation of open-weight models: five sizes from E2B, small enough for a phone, up to a 31B dense model, all of them reading images, with context windows up to 256K tokens and an Apache 2.0 license. Google DeepMind built it from the same research as Gemini 3 and calls it "byte for byte, the most capable open models." Morse serves the 31B and the 26B A4B on a private, OpenAI-compatible API, plus an abliterated, uncensored build of the 26B A4B.

We read Google's Gemma 4 model card, its launch post, and the Gemma release log on December 3, 2026, and sent the calls below to Morse's live API that day. Every score on this page is Google's.

The five Gemma 4 sizes

Google ships two kinds of model in the family. Four are dense, where every parameter works on every token. One, the 26B A4B, is a mixture of experts that picks 8 of its 128 experts, plus one shared, for each token. From the card:

SizeParametersLayersContextReads
E2B2.3B effective (5.1B with embeddings)35128KText, images, audio
E4B4.5B effective (8B with embeddings)42128KText, images, audio
12B Unified11.95B48256KText, images, audio
26B A4B25.2B total, 3.8B active30256KText, images
31B30.7B60256KText, images

Source: Gemma 4 31B model card, read December 3, 2026.

The small sizes count "effective" parameters because of Per-Layer Embeddings: each layer gets its own lookup table for every token, which adds a lot of stored weights but little work per token. The 12B is called Unified because it has no separate vision or audio encoder at all; image patches and audio waveforms go straight into the language model through thin linear layers. The 31B and 26B A4B carry a vision encoder of about 550M parameters, and the 26B A4B, Google says, "runs almost as fast as a 4B-parameter model."

Every size mixes sliding-window attention, over 512 or 1,024 tokens, with full global attention, and the last layer is always global. That's how Gemma 4 keeps memory low over a long context without losing track of the start of it.

When Gemma 4 came out

  • March 31, 2026: weights for E2B, E4B, 26B A4B, and 31B, by Google's release log.
  • April 2, 2026: the public announcement, with the move to the Apache 2.0 license, a first for Gemma.
  • April 16, 2026: multi-token prediction versions of the four first sizes.
  • June 3, 2026: Gemma 4 12B Unified, the encoder-free model, with its own launch post.

Google's pre-training data has a cutoff of January 2025, so Gemma 4 knows nothing after that on its own.

What changed from Gemma 3

The license is the change most teams notice first. Gemma 3 came under Google's own Gemma terms; Gemma 4 is Apache 2.0, the license most open-source code already uses. The rest, from the card:

  • A real system role. Gemma 4 uses the standard system, user, and assistant roles. Gemma 3 had no system role of its own.
  • Thinking you switch on. Put the <|think|> token at the start of the system prompt and the model reasons before answering; leave it out and it doesn't. Libraries such as Transformers and llama.cpp handle the token for you, and on an API it becomes the reasoning effort.
  • Native function calling. Tool use is built into the chat format, not bolted on with a prompt.
  • Images at any shape. Gemma 3 squared every picture to 896 pixels (our Gemma 3 guide has the details). Gemma 4 keeps the aspect ratio and lets you pick a visual budget of 70, 140, 280, 560, or 1,120 tokens per image: low for captions and video frames, high for OCR and small print.
  • Audio and video. Audio clips of up to 30 seconds on E2B, E4B, and the 12B, and video as frames, up to 60 seconds at one frame a second.

Gemma 4 benchmarks across the sizes

Google tested the instruction-tuned models on dozens of sets. These rows show how quality falls off as the model shrinks:

Benchmark31B26B A4B12BE4BE2B
AIME 2026, no tools89.2%88.3%77.5%42.5%37.5%
BigBench Extra Hard74.4%64.8%53.0%33.1%21.9%
MMMLU (multilingual)88.4%86.3%83.4%76.6%67.4%
MATH-Vision85.6%82.4%79.7%59.5%52.4%
MRCR v2, 8 needles at 128K66.4%44.1%43.4%25.4%19.1%
HLE, no tools19.5%8.7%5.2%n/an/a

Source: Gemma 4 31B model card, read December 3, 2026. We haven't rerun them.

Two things stand out. On contest math, the 26B A4B lands within one point of the 31B while doing a fraction of the work per token. On long-context recall (MRCR), the 31B pulls well clear of everything else, so if your job is finding facts deep in a 128K-token document, the dense model is the one to pick. For coding and agent scores against Gemma 3, see our Gemma 4 API guide.

Running Gemma 4 on your own machine

The weights are on Hugging Face, and Ollama's gemma4 library page lists ready-made downloads: E2B at 4.6 to 7.5 GB, E4B at 6.6 to 9.5 GB, the 12B at 7.7 to 8.0 GB, the 26B A4B at 16 to 19 GB, and the 31B at 19 to 20 GB, depending on the quantization. Those are file sizes, and a long conversation needs more memory on top. The E sizes fit a laptop. The 26B A4B and 31B want a 24 GB graphics card or a Mac with 32 GB or more.

Calling Gemma 4 on Morse

If you'd rather not host it, point any OpenAI client at https://inference.trymorse.ai/v1 with a Morse key:

Gemma 4 31BGemma 4 26B A4BGemma 4 26B A4B Uncensored
Model idgoogle/gemma-4-31b-itgoogle/gemma-4-26b-a4b-itgoogle/gemma-4-26b-a4b-uncensored
Context256K tokens256K tokens256K tokens
Longest reply16,384 tokens16,384 tokens262,144 tokens
Reasoning effort"none" or "high""none" or "high""high"
Privacy tiersPrivatePrivateTEE
Price$0.25 per million input tokens and $0.50 per million output tokens$0.15 per million input tokens and $0.60 per million output tokens$0.175 per million input tokens and $0.85 per million output tokens

Read from Morse's catalog when this page was built.

A screenshot, a schema, and the effort setting

We wanted to see Gemma 4 read an image and return structured data in one step, so we drew a 900 by 324 pixel screenshot of five inbound firewall rules, one of which opens RDP (port 3389) to the whole internet. The request asks the 31B to read every rule into a strict JSON schema and name the exposed one:

import base64, json, os
from openai import OpenAI

morse = OpenAI(api_key=os.environ["MORSE_API_KEY"], base_url="https://inference.trymorse.ai/v1")

shot = base64.b64encode(open("firewall.png", "rb").read()).decode()

review = {
    "type": "json_schema",
    "json_schema": {
        "name": "firewall_review",
        "strict": True,
        "schema": {
            "type": "object",
            "additionalProperties": False,
            "required": ["rules", "exposed_rule", "reason"],
            "properties": {
                "rules": {"type": "array", "items": {
                    "type": "object",
                    "additionalProperties": False,
                    "required": ["number", "action", "source", "port"],
                    "properties": {
                        "number": {"type": "integer"},
                        "action": {"type": "string", "enum": ["ALLOW", "DENY"]},
                        "source": {"type": "string"},
                        "port": {"type": "string"},
                    },
                }},
                "exposed_rule": {"type": "integer"},
                "reason": {"type": "string"},
            },
        },
    },
}

reply = morse.chat.completions.create(
    model="google/gemma-4-31b-it",
    reasoning_effort="high",
    max_tokens=2000,
    response_format=review,
    messages=[{"role": "user", "content": [
        {"type": "image_url", "image_url": {"url": "data:image/png;base64," + shot}},
        {"type": "text", "text": "Read every rule in this firewall screenshot, then name the one rule "
                                 "that exposes a service to the whole internet that shouldn't be, and why, in one sentence."},
    ]}],
)
print(json.loads(reply.choices[0].message.content))

The image goes first, as Google's card advises, and travels as a base64 data URI, since Morse doesn't fetch links for you. Here's what happened on December 3, 2026, with the same image, prompt and schema each time; the effort-none runs had 400 max_tokens, the high run 2,000:

RunEffortTimeTokens out (reasoning)Result
31Bhigh31.2 s900 (556)All five rules read correctly; rule 3 named as RDP open to 0.0.0.0/0
31B, first trynone16.0 s400 (0)Stalled at the first rule's port and filled the reply with blank space until it hit the limit
31B, second trynone11.8 s400 (0)Same stall at the same field
26B A4Bnone3.2 s243 (0)Valid JSON and rule 3 named, but rule 1's port came back as a comma instead of 443

So the effort setting decided the result here. With reasoning on, the 31B read the picture into the schema without a mistake. With it off, both originals tripped over the same field, once silently with a wrong value. These are single runs on one image, not a benchmark, but the lesson is practical: when Gemma 4 has to read an image into a strict schema, leave the effort at high and give max_tokens room for the reasoning, then check the parsed values. For text-only extraction, effort none answered a schema call in 1.7 seconds in our Gemma 4 API guide.

Effort settings, briefly

  • none skips reasoning. Use it for chat, short rewrites, and classification where speed matters.
  • high is the default when you send nothing. Use it for images, math, code, and anything parsed into a schema.
  • On Morse, the 31B and 26B A4B take "none" or "high". The uncensored build takes only "high", so it always thinks.

Google's card adds one rule for long chats: don't send earlier turns' reasoning back in the history, except around tool calls, where it should stay.

The uncensored Gemma 4

Google's originals decline some requests. Gemma 4 26B A4B Uncensored is an abliterated build of the 26B A4B, made by removing the direction in its weights that drives those refusals (what that means). It keeps the original's 256K window and image input, runs only on the TEE tier inside attested hardware, and lets one reply run to 262,144 tokens.

Morse serves it for four kinds of work: cybersecurity, to test, monitor, and defend your systems; agent security, to stress-test AI agents for prompt injection, jailbreak, and tool misuse; AI and ML research; and training data, to build training sets, eval suites, and classifiers for sensitive data. Its full guide, with a coding-agent setup, is Gemma 4 26B A4B Uncensored.

Privacy and paying

It runs under zero-data-retention terms, and the provider sees Morse as the customer, not you. The privacy page sets out what each tier lets a provider and Morse see. The API bills per token from prepaid credits, with no subscription, and images count as input tokens. Get an API key and send the screenshot call above.

Common questions

What sizes does Gemma 4 come in?

Five, by Google's model card: E2B and E4B for phones and laptops, a 12B Unified model, the 26B A4B mixture of experts, and the 31B dense model. The E in E2B and E4B means effective parameters, and the A in 26B A4B means about 4 billion parameters are active for each token.

When was Gemma 4 released?

Google's release log dates the first Gemma 4 weights, E2B, E4B, 26B A4B, and 31B, to March 31, 2026, and Google announced the family on April 2, 2026. The 12B Unified model followed on June 3, 2026.

What is Gemma 4's context length?

256K tokens on the 12B, 26B A4B, and 31B, and 128K on E2B and E4B, by Google's card. On Morse, the 31B holds 256K tokens and one reply can run to 16,384 tokens.

Can Gemma 4 read images and audio?

Every Gemma 4 size reads images, at variable resolution and aspect ratio. Audio is native on E2B, E4B, and the 12B only, with clips of up to 30 seconds; the 26B A4B and 31B read text and images.

Can I turn off Gemma 4's thinking?

Yes. Google switches thinking on with a control token in the system prompt. On Morse, the 31B and 26B A4B take a reasoning_effort of "none" or "high", so none turns it off. The uncensored 26B A4B build always thinks, at "high".

Is there an uncensored Gemma 4?

Yes. Gemma 4 26B A4B Uncensored is an abliterated build of Google's 26B A4B: the direction in its weights that makes it decline was removed. Morse serves it as google/gemma-4-26b-a4b-uncensored on the TEE tier.

Ask what you actually want to ask.

80+ models, uncensored ones included, plus images. Every chat is encrypted and stays on your device. Free to start.

Start a private chat

Read next