Gemma 7B is one of the lightweight open-source models in the Gemma series released by Google, and this model card corresponds to the 7B base version. The Gemma series is built on the same set of research and technology used to create the Gemini models, and offers open weights, pretrained variants, and instruction-tuned variants, currently supporting only English.
In terms of use, the Gemma model is suitable for a variety of text generation tasks, including question answering, summarization, and reasoning. The officially listed potential applications include: content creation and communication (generating creative text such as poems, scripts, code, marketing copy, and email drafts; powering conversational interfaces such as customer service and virtual assistants; generating text corpora, summaries of research papers or reports); research and education (serving as a foundation model for natural language processing research; supporting language learning tools such as grammar correction or writing practice; assisting researchers in exploring large amounts of text, generating summaries, or answering questions on specific topics).
In terms of main capabilities, the model is text-to-text with a decoder-only architecture and a training context length of 8192 tokens. The training data totals 6 trillion tokens, covering diverse web documents (primarily English content), code, and mathematical text to help the model learn programming language syntax patterns, logical reasoning, and symbolic representation. Data preprocessing includes CSAM filtering, sensitive data filtering, and additional filtering based on content quality and safety. The model was trained using the latest generation of Tensor Processing Units (TPUv5e), with training completed using JAX and ML Pathways.
In terms of usage, users must log in on Hugging Face and agree to the Google terms of use before accessing the model files. To get started quickly, first run pip install -U transformers, then choose the appropriate code snippet according to the use case. The model supports torch.float16, torch.bfloat16, 8-bit precision (int8), 4-bit precision, and Flash Attention 2 (requires installing flash-attn first). The official examples/ directory provides fine-tuning notebooks, including: a script for supervised fine-tuning (SFT) on the UltraChat dataset using QLoRA, a script for SFT using FSDP on TPU devices, and an SFT notebook on an English quotes dataset that can run on a free Google Colab instance.
Applicable scenarios include content creation, chatbots and conversational AI, text summarization, NLP research, language learning tools, and knowledge exploration.
In terms of limitations, the official documentation states: the quality and diversity of training data affect model capabilities, and biases or gaps in the data may lead to limited responses; the model is better at tasks with clear prompts and instructions, while open-ended or highly complex tasks may be challenging; ambiguity and nuance in natural language (such as sarcasm and metaphor) may be difficult to grasp; the model is not a knowledge base and may generate incorrect or outdated statements; the model relies on statistical patterns of language and may lack common-sense reasoning ability in some cases. In addition, the model may reflect sociocultural biases in the training data, and there is a risk of misuse to generate false, misleading, or harmful content; the official Responsible Generative AI Toolkit is provided as a guide for responsible use. The model supports only English.