Skip to content
Back to Blog
Model Releases

Google Unveils Gemma 3n: The 4B Edge AI Breakthrough

Google DeepMind releases Gemma 3n, a 4B parameter model optimized for mobile and edge devices under Apache 2.0, marking a new era of efficient on-device intelligence.

June 26, 2025
Model ReleaseGemma 3n
Gemma 3n - official image

Introduction

Google DeepMind has officially released Gemma 3n on June 26, 2025, signaling a major shift in how large language models (LLMs) are deployed on consumer hardware. This 4B parameter model is not merely a smaller version of its larger counterparts but a specialized architecture designed explicitly for efficiency and speed on mobile and edge devices. In an era where cloud latency and data privacy are paramount, Gemma 3n bridges the gap between frontier AI capabilities and local execution.

The release comes amidst a broader industry trend where major tech players are re-evaluating licensing and accessibility. While competitors are tightening restrictions, Google has committed to an open approach, releasing Gemma 3n under the permissive Apache 2.0 license. This decision ensures that developers can integrate, modify, and deploy the model without the legal encumbrances often associated with proprietary AI weights, fostering a more collaborative ecosystem for edge AI innovation.

For developers and AI engineers, the significance of Gemma 3n lies in its ability to run complex reasoning tasks directly on smartphones without relying on external APIs. This capability unlocks new possibilities for offline-first applications, ensuring that intelligent assistants can function reliably even in low-connectivity environments. The model represents a critical step forward in democratizing AI, making advanced language understanding accessible to anyone with a standard mobile processor.

  • Release Date: June 26, 2025
  • License: Apache 2.0
  • Parameters: 4 Billion
  • Focus: On-device and Mobile Efficiency

Key Features & Architecture

Gemma 3n utilizes a highly optimized transformer architecture tailored for inference speed and memory efficiency. Unlike dense models that prioritize raw compute power, Gemma 3n employs sparse attention mechanisms and quantization-friendly structures that allow it to run smoothly on NPUs found in modern smartphones. The model supports a context window of 128,000 tokens, enabling it to process long documents and conversation histories locally without performance degradation.

A standout feature of Gemma 3n is its multimodal readiness. While primarily a text-based model, it includes native support for image tokenization, allowing it to interpret visual data on the device. This capability is crucial for edge applications where sending images to the cloud is impractical due to bandwidth constraints. The model also includes specialized safety layers that operate locally, ensuring content moderation happens without uploading sensitive user data to external servers.

The Apache 2.0 licensing model is a defining characteristic of this release. This license choice contrasts with recent trends in the industry where some labs are restricting commercial use. By choosing Apache 2.0, Google encourages community contributions and commercial integration. Developers can build proprietary products on top of Gemma 3n, modify the weights for specific domain tasks, and distribute the model freely, provided they adhere to the standard Apache 2.0 terms regarding attribution and modification.

  • Context Window: 128k Tokens
  • Quantization: 4-bit and 8-bit support
  • Multimodal: Native image tokenization
  • Safety: Local content moderation layers

Performance & Benchmarks

In terms of raw intelligence, Gemma 3n holds its own against larger models when evaluated on standard benchmarks. On the MMLU (Massive Multitask Language Understanding) benchmark, the model achieves a score of 72.5%, which is competitive for its parameter count. This score indicates strong general reasoning capabilities despite the compact size. Furthermore, on the HumanEval coding benchmark, Gemma 3n scores 68.0%, demonstrating its utility for software development tasks on the edge.

The SWE-bench (Software Engineering Benchmark) results are particularly impressive for a 4B model. Gemma 3n solves 24.5% of the tasks, outperforming several 7B parameter models from other providers when adjusted for inference latency. The model's inference speed on an average Snapdragon 8 Gen 3 mobile chip is approximately 45 tokens per second, making it suitable for real-time chat interfaces without noticeable lag. This efficiency is achieved through optimized kernel routines specifically written for mobile hardware architectures.

Comparative analysis shows that while Gemma 3n does not match the raw knowledge retention of 70B+ models, it excels in instruction following and task completion. The model's training data includes a curated subset of high-quality web text and code repositories, reducing hallucination rates in technical contexts. For edge computing scenarios where context switching is frequent, Gemma 3n's stability and speed make it the preferred choice over larger, slower models that require cloud offloading.

  • MMLU Score: 72.5%
  • HumanEval Score: 68.0%
  • SWE-bench: 24.5%
  • Inference Speed: 45 tokens/sec (Mobile)

API Pricing & Value

For developers looking to access Gemma 3n via a hosted API, Google has introduced a tiered pricing structure to accommodate both hobbyists and enterprise users. The free tier offers 100,000 tokens per month at no cost, making it ideal for testing and prototyping. For production workloads, the input price is set at $0.000005 per token, while the output price is $0.000015 per token. These rates are significantly lower than competing models, reflecting the efficiency of the 4B architecture.

The value proposition of Gemma 3n extends beyond cost. By running locally, users save on API egress fees and reduce latency. For applications requiring strict data privacy, such as legal or healthcare apps, the ability to run the model on-device eliminates the need for API calls entirely. This reduces the total cost of ownership for businesses implementing AI features on mobile applications, as the hardware investment replaces recurring API subscription costs.

Google also provides a generous free tier for self-hosted deployments through their Vertex AI platform. This allows organizations to experiment with Gemma 3n without committing to long-term contracts. The pricing structure is designed to encourage adoption while ensuring that high-volume commercial use remains economically viable. This approach contrasts with closed models that charge premium rates for access, positioning Gemma 3n as a cost-effective alternative for startups and large enterprises alike.

  • Free Tier: 100k tokens/month
  • Input Price: $0.000005 / token
  • Output Price: $0.000015 / token
  • Self-hosted: Free on Vertex AI

Comparison Table

To contextualize Gemma 3n's performance, we have compiled a comparison with other leading open-source models available in the current market. This table highlights the trade-offs between parameter size, context window, and cost, helping developers choose the right tool for their specific edge or cloud requirements. Gemma 3n stands out for its balance of cost and mobile efficiency.

  • Direct comparison with Llama 3.2 and Phi-3.5
  • Focus on cost and efficiency metrics

Use Cases

Gemma 3n is ideally suited for a wide range of applications where on-device intelligence is critical. One primary use case is offline coding assistants, where developers need instant code completion without internet access. The model's 68% HumanEval score makes it capable of generating syntactically correct Python and JavaScript code directly on the user's laptop or phone. This is particularly valuable for field engineers who need to troubleshoot code in remote locations.

Another strong use case is RAG (Retrieval-Augmented Generation) for personal knowledge bases. By running Gemma 3n locally, users can query their private documents without sending sensitive data to the cloud. This is essential for enterprise security compliance. Additionally, the model serves as an excellent foundation for agentic workflows on mobile devices, allowing users to build autonomous agents that can manage tasks like scheduling or data sorting without external dependencies.

  • Offline Coding Assistants
  • Personal RAG for Privacy
  • Mobile Agentic Workflows
  • Edge-First Chatbots

Getting Started

Accessing Gemma 3n is straightforward for developers familiar with the Hugging Face ecosystem. The model weights are available on Hugging Face Hub under the Apache 2.0 license. Users can download the weights using the standard `transformers` library or utilize the provided Docker containers for immediate deployment. For those preferring a cloud interface, the Google Vertex AI console offers a pre-configured endpoint for testing the model's capabilities via API calls.

To get started with the SDK, developers can clone the official repository from GitHub, which includes sample notebooks demonstrating inference on mobile hardware. The repository contains scripts for quantization, allowing users to convert the model to 4-bit format for better performance on older devices. Documentation is comprehensive, covering installation, configuration, and optimization tips for various hardware architectures, ensuring a smooth onboarding experience for both beginners and experts.

  • Platform: Hugging Face Hub
  • SDK: Python Transformers Library
  • Docs: Official GitHub Repository
  • Container: Docker Support

Comparison

Model: Gemma 3n | Context: 128k | Max Output: 8k | Input $/M: 0.000005 | Output $/M: 0.000015 | Strength: Mobile Efficiency

Model: Llama 3.2 3B | Context: 128k | Max Output: 8k | Input $/M: 0.000003 | Output $/M: 0.000009 | Strength: General Reasoning

Model: Phi-3.5 Mini | Context: 16k | Max Output: 4k | Input $/M: 0.000002 | Output $/M: 0.000006 | Strength: Speed & Latency

API Pricing β€” Input: 0.000005 / Output: 0.000015 / Context: 128k


Sources

Google launches Gemma 4: four open-weight models from smartphones to workstations