google / recurrentgemma-2b

RecurrentGemma Model card

Model Information

Model Summary

Authors: Google

Description

RecurrentGemma is a family of open language models built on a novel recurrent
architecture
developed at Google. Both
pre-trained and instruction-tuned versions are available in English.

Like Gemma, RecurrentGemma models are well-suited for a variety of text
generation tasks, including question answering, summarization, and reasoning.
Because of its novel architecture, RecurrentGemma requires less memory than
Gemma and achieves faster inference when generating long sequences. This model is ready for commercial use.

Third-Party Community Consideration

This model is not owned or developed by NVIDIA. This model has been developed and built to a third-party’s requirements for this application and use case; see link to the Non-NVIDIA Model Card.

Terms of Use

Terms of Use

References:

@article{recurrentgemma_2024,
    title={RecurrentGemma},
    url={},
    DOI={},
    publisher={Kaggle},
    author={Griffin Team, Soham De, Samuel L Smith, Anushan Fernando, Alex Botev, George-Christian Muraru, Ruba Haroun, Leonard Berrada et al.},
    year={2024}
}

Resources and Technical Documentation

Model Architecture:

Architecture Type: Transformer Decoder Network

Network Architecture: Real-Gated Linear Recurrent Unit (RG-LRU)

Inputs and outputs

Input:

Input Type(s): Text

Input Format(s): String

Input Parameters: One-Dimensional (1D)

Other Properties Related to Output: Text can be question, a prompt, or a document to be
summarized.

Output:

Input Type(s): Text

Input Format(s): String

Input Parameters: One-Dimensional (1D)

Other Properties Related to Output: Generated English-language text in response to the input (e.g.,
an answer to the question, a summary of the document).

Intended Usage

Application

Open Large Language Models (LLMs) have a wide range of applications across
various industries and domains. The following list of potential uses is not
comprehensive. The purpose of this list is to provide contextual information
about the possible use-cases that the model creators considered as part of model
training and development.

  • Content creation and communication
    • Text generation: These models can be used to generate creative text
      formats like poems, scripts, code, marketing copy, email drafts, etc.
    • Chatbots and conversational AI: Power conversational interfaces for
      customer service, virtual assistants, or interactive applications.
    • Text summarization: Generate concise summaries of a text corpus,
      research papers, or reports.
  • Research and education
    • Natural Language Processing (NLP) research: These models can serve
      as a foundation for researchers to experiment with NLP techniques,
      develop algorithms, and contribute to the advancement of the field.
    • Language Learning Tools: Support interactive language learning
      experiences, aiding in grammar correction or providing writing practice.
    • Knowledge Exploration: Assist researchers in exploring large bodies
      of text by generating summaries or answering questions about specific
      topics.

Model Usage and Limitations

Known Limitations

These models have certain limitations that users should be aware of:

  • Training data
    • The quality and diversity of the training data significantly influence
      the model's capabilities. Biases or gaps in the training data can lead
      to limitations in the model's responses.
    • The scope of the training dataset determines the subject areas the model
      can handle effectively.
  • Context and task complexity
    • LLMs are better at tasks that can be framed with clear prompts and
      instructions. Open-ended or highly complex tasks might be challenging.
    • A model's performance can be influenced by the amount of context
      provided (longer context generally leads to better outputs, up to a
      certain point).
  • Language ambiguity and nuance
    • Natural language is inherently complex. LLMs might struggle to grasp
      subtle nuances, sarcasm, or figurative language.
  • Factual accuracy
    • LLMs generate responses based on information they learned from their
      training datasets, but they are not knowledge bases. They may generate
      incorrect or outdated factual statements.
  • Common sense
    • LLMs rely on statistical patterns in language. They might lack the
      ability to apply common sense reasoning in certain situations.

Model Data

Training Dataset and Data Processing

RecurrentGemma uses the same training data and data processing as used by the
Gemma model family. A full description can be found on the Gemma model
card
.

Implementation Information

Hardware and Frameworks used during training

Like
Gemma,
RecurrentGemma was trained on
TPUv5e,
using JAX and ML Pathways.

Evaluation Information

Benchmark Results

Evaluation approach

These models were evaluated against a large collection of different datasets and
metrics to cover different aspects of text generation:

Evaluation results

BenchmarkMetricRecurrentGemma 2B
MMLU5-shot, top-138.4
HellaSwag0-shot71.0
PIQA0-shot78.5
SocialIQA0-shot51.8
BoolQ0-shot71.3
WinoGrandepartial score67.8
CommonsenseQA7-shot63.7
OpenBookQA47.2
ARC-e72.9
ARC-c42.3
TriviaQA5-shot52.5
Natural Questions5-shot11.5
HumanEvalpass@121.3
MBPP3-shot28.8
GSM8Kmaj@113.4
MATH4-shot11.0
AGIEval23.8
BIG-Bench35.3
Average44.6

Ethics and Safety

Ethics and Safety Evaluations

Evaluations Approach

Our evaluation methods include structured evaluations and internal red-teaming
testing of relevant content policies. Red-teaming was conducted by a number of
different teams, each with different goals and human evaluation metrics. These
models were evaluated against a number of different categories relevant to
ethics and safety, including:

  • Text-to-text content safety: Human evaluation on prompts covering safety
    policies including child sexual abuse and exploitation, harassment, violence
    and gore, and hate speech.
  • Text-to-text representational harms: Benchmark against relevant academic
    datasets such as WinoBias and BBQ Dataset.
  • Memorization: Automated evaluation of memorization of training data,
    including the risk of personally identifiable information exposure.
  • Large-scale harm: Tests for “dangerous capabilities,” such as chemical,
    biological, radiological, and nuclear (CBRN) risks; as well as tests for
    persuasion and deception, cybersecurity, and autonomous replication.

Evaluation Results

The results of ethics and safety evaluations are within acceptable thresholds
for meeting internal
policies

for categories such as child safety, content safety, representational harms,
memorization, large-scale harms. On top of robust internal evaluations, the
results of well known safety benchmarks like BBQ, Winogender, Winobias,
RealToxicity, and TruthfulQA are shown here.

BenchmarkMetricRecurrentGemma 2BRecurrentGemma 2B IT
RealToxicityavg9.87.6
BOLD39.352.4
CrowS-Pairstop-141.143.4
BBQ Ambigtop-162.671.1
BBQ Disambigtop-158.450.8
Winogendertop-155.154.7
TruthfulQA35.142.7
Winobias 1_258.456.4
Winobias 2_290.075.4
Toxigen56.750.0

Ethical Considerations and Risks

The development of large language models (LLMs) raises several ethical concerns.
In creating an open model, we have carefully considered the following:

  • Bias and fairness
    • LLMs trained on large-scale, real-world text data can reflect
      socio-cultural biases embedded in the training material. These models
      underwent careful scrutiny, input data pre-processing described and
      posterior evaluations reported in this card.
  • Misinformation and misuse
    • LLMs can be misused to generate text that is false, misleading, or
      harmful.
    • Guidelines are provided for responsible use with the model, see the
      Responsible Generative AI
      Toolkit
      .
  • Transparency and accountability
    • This model card summarizes details on the models' architecture,
      capabilities, limitations, and evaluation processes.
    • A responsibly developed open model offers the opportunity to share
      innovation by making LLM technology accessible to developers and
      researchers across the AI ecosystem.

Risks Identified and Mitigations:

  • Perpetuation of biases: It's encouraged to perform continuous monitoring
    (using evaluation metrics, human review) and the exploration of de-biasing
    techniques during model training, fine-tuning, and other use cases.
  • Generation of harmful content: Mechanisms and guidelines for content
    safety are essential. Developers are encouraged to exercise caution and
    implement appropriate content safety safeguards based on their specific
    product policies and application use cases.
  • Misuse for malicious purposes: Technical limitations and developer and
    end-user education can help mitigate against malicious applications of LLMs.
    Educational resources and reporting mechanisms for users to flag misuse are
    provided. Prohibited uses of Gemma models are outlined in our terms of
    use
    .
  • Privacy violations: Models were trained on data filtered for removal of
    PII (Personally Identifiable Information). Developers are encouraged to
    adhere to privacy regulations with privacy-preserving techniques.

Benefits

At the time of release, this family of models provides high-performance open
large language model implementations designed from the ground up for Responsible
AI development compared to similarly sized models.

Using the benchmark evaluation metrics described in this document, these models
have shown to provide superior performance to other, comparably-sized open model
alternatives.

In particular, RecurrentGemma models achieve comparable performance to Gemma
models but are faster during inference and require less memory, especially on
long sequences.