TL;DR
Google DeepMind has released Gemma, a family of open, lightweight language models derived from their state-of-the-art Gemini research. These models, available in 2B and 7B parameter sizes, offer strong performance on academic benchmarks, outperforming similarly sized open models on many tasks, and come with comprehensive safety evaluations.
What Problem Does This Paper Address?
The rapid advancement of large language models (LLMs) has led to increasingly powerful capabilities, but also to concerns about safety, accessibility, and responsible development. While many cutting-edge models are proprietary, there's a growing need for open-source alternatives that enable broader research, innovation, and scrutiny. This paper addresses this by releasing Gemma, a family of open models built on Google's advanced Gemini research, aiming to democratize access to high-performance LLMs while prioritizing safety and responsible deployment.
Methods
Gemma models are built using architectures, data, and training recipes inspired by Google's Gemini models. Key architectural components include:
- Transformer Decoder: The core architecture is based on the standard transformer decoder.
- Context Length: Models are trained with a context length of 8192 tokens.
- Multi-Query Attention (MQA): The 7B model uses MQA, while the 2B model uses multi-query attention (with
num_kv_heads = 1), a choice supported by ablations showing its effectiveness at smaller scales. - Rotary Positional Embeddings (RoPE): Instead of absolute positional embeddings, RoPE is used, with shared embeddings for inputs and outputs to reduce model size.
- GeGLU Activations: An approximated version of the GeGLU activation function is employed.
- RMSNorm: Input normalization is applied to transformer sub-layers, attention layers, and feed-forward layers to stabilize training.
The training infrastructure leverages TPUv5e pods, employing techniques like model sharding and data replication. Instruction tuning involves both supervised fine-tuning (SFT) and reinforcement learning from human feedback (RLHF), using a carefully curated dataset and an LM-based side-by-side evaluation for data selection.
Datasets
- Training Data: Gemma models were trained on up to 6T tokens of primarily English text data, including web documents, mathematics, and code. This data was filtered to reduce risks of unwanted or unsafe content, personal information, and to minimize recitation.
- Evaluation Datasets: A broad range of standard academic benchmarks were used for evaluation, including:
- Physical reasoning (Bisk et al., 2019)
- Social reasoning (Sap et al., 2019)
- Question answering (Clark et al., 2019; Kwiatkowski et al., 2019)
- Coding (Austin et al., 2021; Chen et al., 2021)
- Mathematics (Cobbe et al., 2021)
- Commonsense reasoning (Sakaguchi et al., 2019)
- Language modeling (Paperno et al., 2016)
- Reading comprehension (Joshi et al., 2017)
- Safety benchmarks (e.g., RealToxicity, BOLD, CrowS-Pairs, TruthfulQA)
- Memorization benchmarks.
Key Insights and Ideas
- Democratizing Gemini's Power: The core idea is to bring the advancements from Google's proprietary Gemini research to the open-source community in a more accessible format.
- Balancing Performance and Accessibility: Gemma models are designed to be lightweight, enabling deployment on a wider range of hardware, including on-device applications for the 2B model.
- Emphasis on Safety and Responsibility: A significant portion of the paper is dedicated to evaluating and discussing safety aspects, including filtering, bias assessment, and responsible deployment strategies. This highlights a commitment to mitigating potential harms from open models.
- Instruction Tuning is Crucial: Both SFT and RLHF stages were found to be important for improving downstream performance and human preference evaluations.
- Open Models as a Catalyst for Research: The release of open models is seen as critical for advancing AI safety research, enabling rigorous evaluation, and fostering the next wave of LLM innovations.
Key Results
- Benchmark Performance: Gemma 7B outperforms similarly sized open models on 11 out of 18 text-based tasks.
- Human Preference: Gemma 7B IT achieved a 61.2% win rate and Gemma 2B IT a 45% win rate against Mistral v0.2 7B Instruct on instruction-following tasks. For safety protocols, Gemma 7B IT had a 63.5% win rate and Gemma 2B IT a 60.1% win rate.
- Specific Domain Strengths: Gemma models show particularly strong performance on mathematics and coding benchmarks, outperforming other models by significant margins on tasks like GSM8K and MATH.
- Safety Benchmarks: Gemma models outperform competitors on 6 standard safety benchmarks.
- Memorization: Gemma models exhibit low rates of verbatim memorization, comparable to PaLM and PaLM 2, with no observed memorization of sensitive personal data.
- Carbon Footprint: Pretraining the Gemma models is estimated to have a carbon footprint of approximately 131 tCO2eq.
Limitations and Future Work
- Testing Limitations: The authors acknowledge that testing cannot cover all applications and scenarios, urging users to conduct rigorous safety testing specific to their use cases.
- Malicious Use: The release of open weights models means that bad actors could fine-tune Gemma for malicious intent, despite terms of use. Further work is needed on robust mitigation strategies.
- Unintended Behaviors: Risks such as toxic language generation, perpetuation of discriminatory harms, hallucinations, and data leakage remain challenges for open models.
- Novelty of Open Weights: The full spectrum of uses and misuses of open-weight models is still being discovered, necessitating continuous research and development of mitigation strategies.
- Future Research: The paper points to the need for further research in areas like factuality, alignment, complex reasoning, and robustness to adversarial input, as well as the development of more challenging and robust benchmarks. Google DeepMind will continue to explore responsible deployment and safety mitigations.
Summary updated