Parameters
4B
Context Length
131K
Modality
Multimodal
Architecture
Dense
License
Gemma License
Release Date
12 Mar 2025
Knowledge Cutoff
Aug 2024
VRAM requirements for different quantization methods and context sizes
1,024 tokens
Consumer
1x RTX 4090
24GB VRAM
Datacenter
1x NVIDIA A100
80GB VRAM
Apple Silicon
1x Apple M3 Max
128GB VRAM
131,072 tokens
Consumer
2x RTX 4090
24GB VRAM
Datacenter
1x NVIDIA A100
80GB VRAM
Apple Silicon
1x Apple M3 Max
128GB VRAM
Rank
#113
| Benchmark | Score | Rank |
|---|---|---|
General Text | 1303 | 121 |
Overall Rank
#113
Coding Rank
-
Gemma 3 4B is a foundational vision-language model developed by Google, designed to process both text and image inputs while generating textual outputs. It is part of the Gemma 3 family of lightweight, state-of-the-art models built upon the same research and technology that powers Google's Gemini models. The 4 billion parameter variant is optimized for efficient performance across diverse hardware environments, ranging from cloud-scale deployments to on-device execution on workstations, laptops, and mobile devices.
Architecturally, Gemma 3 4B employs a decoder-only transformer design. Key innovations include an optimized attention mechanism featuring a 5:1 interleaving ratio of local sliding window self-attention layers with global self-attention layers, coupled with a reduced window size for local attention. This architectural modification aims to decrease KV-cache memory overhead, enabling efficient processing of extended context lengths without degrading perplexity. The model utilizes a custom SigLIP vision encoder, which transforms 896x896 pixel square images into tokens for the language model, with a "Pan&Scan" algorithm employed to handle images of varying aspect ratios or higher resolutions.
Gemma 3 4B is engineered for a wide array of generative AI tasks, including question answering, summarization, and complex reasoning. Its multimodal capabilities allow for comprehensive understanding and analysis of visual data, such as object identification or text extraction from images. The model supports a context window of 128,000 tokens and offers broad multilingual capabilities, handling over 140 languages. Additionally, it integrates function calling, enabling the creation of intelligent agents that can interact with external tools and application programming interfaces.
Attention
Attention Structure
Grouped-Query Attention
Attention Heads
32
Key-Value Heads
8
Attention Head Dimension
-
Position Embedding
ROPE
RoPE Theta
-
Sliding Window Attention
-
Sliding Window Size
-
Sliding Window Ratio
-
Linear Attention
-
Linear Attention Ratio
-
Normalization
RMS Normalization
Activation Function
-
Dimensions
Hidden Dimension Size
2,048
Number of Layers
30
FFN Intermediate Size (Dense)
-
Multi-Token Prediction Heads
-
Tokenizer
Vocabulary Size
-
Gemma 3 is a family of open, lightweight models from Google. It introduces multimodal image and text processing, supports over 140 languages, and features extended context windows up to 128K tokens. Models are available in multiple parameter sizes for diverse applications.
APX AI
Online