AB
AiBoss
project

Gemma 3n - Google's edge-based multimodal AI model

Gemma 3n is an edge-based multimodal AI model introduced at Google I/O. Based on the Gemini Nano architecture, it employs a layer-by-layer embedding technique to compress memory usage to the level of a 2-4B parameter model. The number of model parameters is...

What is Gemma 3n?

Gemma 3n is an edge-based multimodal AI model introduced at Google I/O. Based on the Gemini Nano architecture, it employs layer-by-layer embedding technology to compress memory usage to the level of 2-4B parameter models. The model parameters are 5B and 8B respectively, while the memory usage is equivalent to that of 2B and 4B models. Gemma 3n supports text, images, short videos, and audio input, and can generate structured text output. The newly added audio processing capabilities can transcribe speech in real time, recognize background noise, or analyze audio emotions. It can be used directly in a browser through Google AI Studio.

Main functions of Gemma 3n

  • Optimized edge performance and efficiencyGemma 3n offers approximately 1.5 times faster response times on mobile devices compared to Gemma 3 4B, and achieves a smaller memory footprint through technologies such as Per-Layer Embedding (PLE), KVC sharing, and Advanced Activation Quantization.
  • Multimodal input supportIt supports the understanding and processing of text, images, audio, and video, and can handle complex multimodal interactions.
  • Privacy priority and offline availabilityAll calculations are performed on the local device without requiring an internet connection, and the data never leaves the device, thus protecting user privacy.
  • Flexible model architectureBased on the MatFormer architecture, it embeds an advanced 2B sub-model that can dynamically switch between performance and quality as needed.
  • Multilingual supportIt supports more than 140 languages, with excellent performance in languages such as Japanese, German, Korean, Spanish and French.
  • 32K Token Context WindowIt can handle input of up to 32,000 words or symbols, making it suitable for processing long texts.

Gemma 3n Technical Principles

  • Based on Gemini Nano architectureGemma 3n inherits the lightweight architecture of Gemini Nano and is optimized for mobile devices. Through knowledge distillation and quantization-aware training (QAT), it significantly reduces resource requirements while maintaining high performance.
  • Layer-by-layer embedding technologyEmploying per-layer embeddings (PLE) technology significantly reduces the model's memory requirements. The original parameter counts of the models are 5B and 8B, respectively, with memory usage equivalent to 2B and 4B models, requiring only 2GB or 3GB of dynamic memory to run.
  • Multimodal fusionIt combines the word segmenter of Gemini 2.0 with enhanced data mixing, supports text and visual processing in more than 140 languages, and covers the needs of users worldwide.
  • Local/global layer staggered designA 5:1 local/global layer interleaving mechanism is adopted, with every 5 local layers followed by 1 global layer, and the calculation starts from the local layer as the first layer of the model. This helps to reduce the key-value cache explosion problem in long contexts.

Gemma 3n project address

Application scenarios of Gemma 3n

  • Speech transcription and sentiment analysisIt can transcribe speech in real time, recognize background noise, or analyze audio emotions, making it suitable for voice assistants and accessibility applications.
  • Content generationIt supports generating image descriptions, video summaries, or voice transcriptions on mobile phones, making it suitable for content creators to quickly edit short videos or social media materials.
  • Academic Task CustomizationDevelopers can use Gemma 3n's fine-tuning capabilities to customize models for academic tasks on Colab, such as analyzing experimental images or transcribing lecture audio.
  • Low-resource equipmentDesigned for low-resource devices, it only requires 2GB of RAM to run smoothly on phones, tablets, and laptops.