google/gemma-7b-it

  • Modal Card
  • Files & version

Model Card for Gemma 7B Instruct

Table of Contents

TL;DR

Gemma 7B Instruct is part of Google’s open model family, optimized for following instructions in a variety of natural language tasks. Built to handle tasks such as question answering, summarization, and reasoning, this 7B parameter model provides high performance with a focus on ease of deployment across various environments, from personal devices to cloud infrastructure.


Model Details

Model Information

  • Model Type: Text-to-text, decoder-only large language model
  • Language(s): Primarily English
  • License: Terms of Use available on the Gemma model page
  • Related Models: Gemma 2B Base, Gemma 2B Instruct, Gemma 7B Base

Resources and Documentation


Usage

Inputs and Outputs

  • Input: Text string (e.g., a question, prompt, or document to summarize)
  • Output: Generated English text in response to the input, such as an answer or summary

Fine-tuning

Fine-tuning scripts are provided in the Gemma repository. Users can adapt these scripts to optimize the 7B Instruct model for specific datasets, such as UltraChat, and run in environments like Google Colab for further customization.

Hardware Compatibility

Gemma 7B Instruct is deployable across various devices, including CPUs and single or multi-GPU setups, with quantization options to enhance performance in constrained environments.


Uses

Direct Use and Downstream Use

Gemma 7B Instruct is tailored for:

  • Text Generation: Creating diverse formats like poems, scripts, code, and marketing copy.
  • Question Answering: Delivering accurate responses to inquiries.
  • Summarization: Generating concise summaries of lengthy documents or articles.
  • Conversational AI: Forming the foundation for chatbots and virtual assistants.

Bias, Risks, and Limitations

Ethical Considerations and Risks

Language models such as Gemma 7B Instruct can inherit biases from training data, posing risks of unintended or inappropriate outputs. Misuse of the model could result in misinformation or harmful text generation.

Known Limitations

  • Data Bias: Model outputs may reflect inherent biases in the training data.
  • Complex Task Handling: Performance may degrade in open-ended or complex tasks.
  • Factual Reliability: Outputs may sometimes be outdated or factually incorrect.

Training Details

Training Dataset

The Gemma models are trained on a dataset of text data totaling 6 trillion tokens, which includes diverse sources such as:

  • Web Documents: Exposure to various linguistic styles and topics.
  • Code: Knowledge of programming language syntax for code generation.
  • Mathematics: Familiarity with logical reasoning and mathematical text.

Data Preprocessing

Data preparation included rigorous filtering and quality control:

  • CSAM Filtering: Exclusion of harmful or illegal content.
  • Sensitive Data Filtering: Removal of personal and sensitive data.
  • Content Quality Filtering: Ensuring data meets quality and safety standards.

Hardware and Software

  • Hardware: Trained on TPUv5e, leveraging high computational power for efficient training.
  • Software: Utilized JAX and ML Pathways for scalability and simplified development.

Evaluation

Benchmark Results

Gemma models were tested on a variety of benchmarks to evaluate performance in text generation, factual accuracy, and reasoning tasks.

BenchmarkMetricGemma 2B InstructGemma 7B Instruct
MMLU5-shot, top-142.364.3
HellaSwag0-shot71.481.2
PIQA0-shot77.381.2
TriviaQA5-shot53.263.4
CommonsenseQA7-shot65.371.3
GSM8Kmaj@117.746.4
Average45.056.9

Ethics and Safety

Evaluation Approach

Gemma models underwent structured evaluations, including internal red-teaming and human evaluations on content safety. Tests addressed categories such as text-to-text content safety, representational harms, and memorization risks.

Evaluation Results

Gemma 7B Instruct met ethical standards in several key benchmarks for safe deployment.

BenchmarkMetricGemma 2B InstructGemma 7B Instruct
RealToxicityAverage6.867.90
BBQ Ambig1-shot, top-162.5892.54
WinogenderTop-151.2554.17
TruthfulQAAverage44.8431.81
ToxigenTop-129.7739.59

Intended Usage and Limitations

Intended Usage

Gemma models support a range of applications, including:

  • Content Creation: Generating text for creative and professional use cases.
  • Customer Service and Chatbots: Enabling conversational AI for improved user interactions.
  • Educational Tools: Aiding in grammar correction, summarization, and exploratory research.

Limitations

  • Bias: Model may reflect socio-cultural biases from training data.
  • Contextual Limitations: Long or complex prompts may impact performance.
  • Accuracy: Responses may lack factual accuracy for highly specific knowledge areas.

Benefits

Gemma models provide high-performance language generation capabilities, with an emphasis on responsible AI. They offer competitive performance relative to other open models, making advanced AI accessible to a broader audience and fostering innovation.


Citation

If you use Gemma in your research, please cite:

```bibtex @misc{https://doi.org/10.48550/arxiv.2210.11416, doi = {10.48550/ARXIV.2210.11416}, url = {https://arxiv.org/abs/2210.11416}, author = {Google AI}, title = {Gemma 7B: Instruction-Tuned Model for General and Conversational AI Tasks}, publisher = {arXiv}, year = {2023}, keywords = {Machine Learning (cs.LG), Computation and Language (cs.CL)}, copyright = {Creative Commons Attribution 4.0 International} }