Gemma 4 Technical Report
arXiv · HuggingFace · ▲60
Abstract (verbatim)
We introduce Gemma 4, a new generation of open-weight, natively multimodal language models in the Gemma model family. Designed to advance compute efficiency and reasoning, the Gemma 4 model suite features dense and Mixture-of-Experts architectures, ranging from 2.3B to 31B parameters. Alongside improved vision and audio encoders for all model sizes, we propose a unified, encoder-free architecture for our 12B model, which ingests raw audio and image patches. Furthermore, we integrate a thinking mode, enabling Gemma models to generate reasoning traces prior to responding. We improve inference speed, memory, and compute efficiency, as well as long-context abilities through critical design choices. Gemma 4 establishes a leap in performance across STEM, multimodal, and long-context benchmarks, and rivals larger, frontier open models in human-rated tasks.
Background
Background Analysis
Technical Context: The rapid advancement of large language models (LLMs) has created a demand for open-weight models that excel in multimodal understanding, reasoning, and computational efficiency. These technologies are critical for applications like intelligent assistants, education, healthcare diagnostics, and content creation, where models must process text, images, and audio while performing complex tasks (e.g., math, coding) and handling long documents. However, traditional models often struggle with multimodal integration, long-context memory limitations, and computational inefficiency.
Previous Limitations: Earlier multimodal models relied on separate encoders (e.g., vision, audio), leading to memory fragmentation and high computational costs. Long-context tasks (e.g., document analysis) caused memory explosions in KV caches, slowing inference. Traditional reasoning methods underperformed in complex tasks, and computational constraints limited deployment on resource-constrained devices. Additionally, gaps existed between text and multimodal capabilities, hindering "native multimodal" performance.
Proposed Solutions: Gemma 4 addresses these issues through several innovations:
1. Unified Encoder Architecture: The 12B model processes raw audio and image data directly, eliminating separate encoders and reducing memory fragmentation.
2. Long-Context Optimization: Techniques like sliding-window attention, RoPE positional encoding, and KV cache sharing minimize memory usage for long inputs.
3. Reasoning Enhancement: A "thinking mode" generates step-by-step reasoning before responses, improving performance in math and coding tasks.
4. Computational Efficiency: Multi-token prediction drafting and quantization-aware training boost inference speed while reducing memory footprint.
Key Differences: Compared to prior work, Gemma 4 stands out by:
- Native Multimodal Support: All model sizes handle text, images, and audio seamlessly, rather than relying on post-hoc fusion.
- Efficient Long-Context Handling: Innovative attention mechanisms balance performance and memory usage.
- Openness and Practicality: Quantized versions and an Apache 2.0 license enable flexible deployment and customization.
These design choices make Gemma 4 competitive with state-of-the-art models in multimodal benchmarks and human evaluations while maintaining efficiency across diverse hardware environments.

