Skip to content
Gemma 3n 4B logo

Gemma 3n 4B

Verified

Google's open-weight LLM for efficient text tasks.

GoogleLanguage ModelsOpen
Model page
Updated 2026-06-15

About Gemma 3n 4B

Gemma 3n 4B follows Google's approach to releasing capable yet compact language models. Its architecture emphasizes efficiency while maintaining strong performance on general text processing. Open weights allow researchers and engineers to inspect, fine-tune, and deploy the model locally or in the cloud.

The model excels at tasks such as summarization, question answering, and code-related text generation. Its 32k context length accommodates longer documents without truncation. Because the weights are freely available, teams can adapt it to domain-specific data without vendor lock-in.

Typical usage includes prototyping chat interfaces, powering internal knowledge tools, and experimenting with retrieval-augmented generation pipelines. Developers often run it on consumer GPUs or edge hardware thanks to its modest size. Google provides the model under an open license that encourages both research and commercial use.

Capabilities

Instruction following
Code generation
Logical reasoning
Long-context understanding
Text summarization
Question answering

How Gemma 3n 4B compares

Gemma 3n 4B (striped bar) vs other language models on intelligence, speed and price.

Price

USD per 1M output tokens · Lower is better · Gemma 3n 4B ranks #7 of 98

$0.03
Ling-2.6-flash
$0.10
Qwen3 235B A22B Thinking 2507
$0.10
Qwen3 235B A22B Instruct 2507
$0.10
Granite 4.1 8B
$0.11
Granite 4.0 Micro
$0.12
LFM2-24B-A2B
$0.12
Gemma 3n 4B
$0.14
gpt-oss-20b
$0.15
Trinity Mini
$0.15
Rnj 1 Instruct
$0.18
DeepSeek V4 Flash
$0.18
gpt-oss-120b
$0.19
Qwen3 30B A3B Instruct 2507

Sources: Artificial Analysis (intelligence, speed) · OpenRouter (price).

Best for

Summarizing extensive documents

Gemma 3n 4B leverages its 32768-token context and long-context understanding to condense lengthy reports or articles while preserving key details.

Generating and debugging code

Its code generation and logical reasoning capabilities support writing functional scripts and identifying errors in programming tasks.

Handling instruction-based queries

Strong instruction following and question answering allow the model to deliver precise responses to multi-step user requests.

Strengths & limitations

Strengths

  • +Efficient inference on modest hardware
  • +Strong performance for its size class
  • +32k token context window
  • +Open weights enabling customization

Limitations

  • Text-only modality
  • Smaller scale limits depth on complex tasks
  • Weaker on highly specialized domains

Cost calculator

Estimate what Gemma 3n 4B would cost for your usage.

$0.00012
per request
$1.2
estimated / month

Based on Gemma 3n 4B's $0.06/1M input · $0.12/1M output. Estimate only — actual cost varies by provider and caching.

Quick start

OpenRouter's API is OpenAI-compatible — most SDKs work by just swapping the base URL. Only the model slug changes between models.

JavaScript · openai
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://openrouter.ai/api/v1",
  apiKey: process.env.OPENROUTER_API_KEY,
});

const completion = await client.chat.completions.create({
  model: "google/gemma-3n-e4b-it",
  messages: [{ role: "user", content: "Hello!" }],
});

console.log(completion.choices[0].message.content);

Model slug: google/gemma-3n-e4b-it

Editor's verdict

Our take on Gemma 3n 4B

Gemma 3n 4B is Google's open-weight language models with a 33K-token context window.

At $0.12 per 1M output tokens, it is very cost-efficient for its class.

As an open-weight model you can self-host it or call it through a hosted API.

Best suited to efficient inference on modest hardware and strong performance for its size class.

Did you find this helpful?

Frequently asked questions

The model provides a context window of 32768 tokens.

User reviews

Real, verified reviews from the community shape this model's rating.

Loading reviews…

Sign in to review

Other Gemma models

Sibling versions in the Gemma family from Google.

Promote Gemma 3n 4B

Add this badge to your website, or share the tool.

DFeatured on DhanasviGemma 3n 4B 0