Gemma 3n 4B
VerifiedGoogle's open-weight LLM for efficient text tasks.
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
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
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.
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.
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
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.
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…
Other Gemma models
Sibling versions in the Gemma family from Google.