rombodawg commited on
Commit
39ffa7e
1 Parent(s): f8b91ee

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +527 -0
README.md ADDED
@@ -0,0 +1,527 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: gemma
3
+ library_name: transformers
4
+ pipeline_tag: text-generation
5
+ extra_gated_heading: Access Gemma on Hugging Face
6
+ extra_gated_prompt: >-
7
+ To access Gemma on Hugging Face, you’re required to review and agree to
8
+ Google’s usage license. To do this, please ensure you’re logged in to Hugging
9
+ Face and click below. Requests are processed immediately.
10
+ extra_gated_button_content: Acknowledge license
11
+ ---
12
+
13
+
14
+ # Gemma 2 model card
15
+
16
+ **Model Page**: [Gemma](https://ai.google.dev/gemma/docs)
17
+
18
+ **Resources and Technical Documentation**:
19
+
20
+ * [Responsible Generative AI Toolkit][rai-toolkit]
21
+ * [Gemma on Kaggle][kaggle-gemma]
22
+ * [Gemma on Vertex Model Garden][vertex-mg-gemma]
23
+
24
+ **Terms of Use**: [Terms](https://www.kaggle.com/models/google/gemma/license/consent/verify/huggingface?returnModelRepoId=google/gemma-2-27b-it)
25
+
26
+ **Authors**: Google
27
+
28
+ ## Model Information
29
+
30
+ Summary description and brief definition of inputs and outputs.
31
+
32
+ ### Description
33
+
34
+ Gemma is a family of lightweight, state-of-the-art open models from Google,
35
+ built from the same research and technology used to create the Gemini models.
36
+ They are text-to-text, decoder-only large language models, available in English,
37
+ with open weights for both pre-trained variants and instruction-tuned variants.
38
+ Gemma models are well-suited for a variety of text generation tasks, including
39
+ question answering, summarization, and reasoning. Their relatively small size
40
+ makes it possible to deploy them in environments with limited resources such as
41
+ a laptop, desktop or your own cloud infrastructure, democratizing access to
42
+ state of the art AI models and helping foster innovation for everyone.
43
+
44
+ ### Usage
45
+
46
+ Below we share some code snippets on how to get quickly started with running the model. First make sure to `pip install -U transformers`, then copy the snippet from the section that is relevant for your usecase.
47
+
48
+
49
+ #### Running the model on a single / multi GPU
50
+
51
+ > [!IMPORTANT]
52
+ > Given the model instabilities with SDPA/ FA2, by default, the model inference would utilise `eager` attention.
53
+
54
+ ```python
55
+ # pip install accelerate
56
+ from transformers import AutoTokenizer, AutoModelForCausalLM
57
+ import torch
58
+
59
+ tokenizer = AutoTokenizer.from_pretrained("google/gemma-2-27b-it")
60
+ model = AutoModelForCausalLM.from_pretrained(
61
+ "google/gemma-2-27b-it",
62
+ device_map="auto",
63
+ torch_dtype=torch.bfloat16
64
+ )
65
+
66
+ input_text = "Write me a poem about Machine Learning."
67
+ input_ids = tokenizer(input_text, return_tensors="pt").to("cuda")
68
+
69
+ outputs = model.generate(**input_ids)
70
+ print(tokenizer.decode(outputs[0]))
71
+ ```
72
+
73
+ <a name="precisions"></a>
74
+ #### Running the model on a GPU using different precisions
75
+
76
+ The native weights of this model were exported in `bfloat16` precision.
77
+
78
+ You can also use `float32` if you skip the dtype, but no precision increase will occur (model weights will just be upcasted to `float32`). See examples below.
79
+
80
+ * _Upcasting to `torch.float32`_
81
+
82
+ ```python
83
+ # pip install accelerate
84
+ from transformers import AutoTokenizer, AutoModelForCausalLM
85
+
86
+ tokenizer = AutoTokenizer.from_pretrained("google/gemma-2-27b-it")
87
+ model = AutoModelForCausalLM.from_pretrained(
88
+ "google/gemma-2-27b-it",
89
+ device_map="auto"
90
+ )
91
+
92
+ input_text = "Write me a poem about Machine Learning."
93
+ input_ids = tokenizer(input_text, return_tensors="pt").to("cuda")
94
+
95
+ outputs = model.generate(**input_ids)
96
+ print(tokenizer.decode(outputs[0]))
97
+ ```
98
+
99
+ #### Quantized Versions through `bitsandbytes`
100
+
101
+ * _Using 8-bit precision (int8)_
102
+
103
+ ```python
104
+ # pip install bitsandbytes accelerate
105
+ from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig
106
+
107
+ quantization_config = BitsAndBytesConfig(load_in_8bit=True)
108
+
109
+ tokenizer = AutoTokenizer.from_pretrained("google/gemma-2-27b-it")
110
+ model = AutoModelForCausalLM.from_pretrained(
111
+ "google/gemma-2-27b-it",
112
+ quantization_config=quantization_config)
113
+
114
+ input_text = "Write me a poem about Machine Learning."
115
+ input_ids = tokenizer(input_text, return_tensors="pt").to("cuda")
116
+
117
+ outputs = model.generate(**input_ids)
118
+ print(tokenizer.decode(outputs[0]))
119
+ ```
120
+
121
+ * _Using 4-bit precision_
122
+
123
+ ```python
124
+ # pip install bitsandbytes accelerate
125
+ from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig
126
+
127
+ quantization_config = BitsAndBytesConfig(load_in_4bit=True)
128
+
129
+ tokenizer = AutoTokenizer.from_pretrained("google/gemma-2-27b-it")
130
+ model = AutoModelForCausalLM.from_pretrained(
131
+ "google/gemma-2-27b-it",
132
+ quantization_config=quantization_config)
133
+
134
+ input_text = "Write me a poem about Machine Learning."
135
+ input_ids = tokenizer(input_text, return_tensors="pt").to("cuda")
136
+
137
+ outputs = model.generate(**input_ids)
138
+ print(tokenizer.decode(outputs[0]))
139
+ ```
140
+
141
+
142
+ #### Other optimizations
143
+
144
+ * _Flash Attention 2_
145
+
146
+ > [!WARNING]
147
+ > Gemma 2 is currently incompatible with Flash Attention/ SDPA, using it might result in unreliable generations. Use at your own risk.
148
+
149
+ First make sure to install `flash-attn` in your environment `pip install flash-attn`
150
+
151
+ ```diff
152
+ model = AutoModelForCausalLM.from_pretrained(
153
+ model_id,
154
+ torch_dtype=torch.float16,
155
+ + attn_implementation="flash_attention_2"
156
+ ).to(0)
157
+ ```
158
+
159
+ ### Chat Template
160
+
161
+ The instruction-tuned models use a chat template that must be adhered to for conversational use.
162
+ The easiest way to apply it is using the tokenizer's built-in chat template, as shown in the following snippet.
163
+
164
+ Let's load the model and apply the chat template to a conversation. In this example, we'll start with a single user interaction:
165
+
166
+ ```py
167
+ from transformers import AutoTokenizer, AutoModelForCausalLM
168
+ import transformers
169
+ import torch
170
+
171
+ model_id = "google/gemma-2-27b-it"
172
+ dtype = torch.bfloat16
173
+
174
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
175
+ model = AutoModelForCausalLM.from_pretrained(
176
+ model_id,
177
+ device_map="cuda",
178
+ torch_dtype=dtype,
179
+ )
180
+
181
+ chat = [
182
+ { "role": "user", "content": "Write a hello world program" },
183
+ ]
184
+ prompt = tokenizer.apply_chat_template(chat, tokenize=False, add_generation_prompt=True)
185
+ ```
186
+
187
+ At this point, the prompt contains the following text:
188
+
189
+ ```
190
+ <bos><start_of_turn>user
191
+ Write a hello world program<end_of_turn>
192
+ <start_of_turn>model
193
+ ```
194
+
195
+ As you can see, each turn is preceded by a `<start_of_turn>` delimiter and then the role of the entity
196
+ (either `user`, for content supplied by the user, or `model` for LLM responses). Turns finish with
197
+ the `<end_of_turn>` token.
198
+
199
+ You can follow this format to build the prompt manually, if you need to do it without the tokenizer's
200
+ chat template.
201
+
202
+ After the prompt is ready, generation can be performed like this:
203
+
204
+ ```py
205
+ inputs = tokenizer.encode(prompt, add_special_tokens=False, return_tensors="pt")
206
+ outputs = model.generate(input_ids=inputs.to(model.device), max_new_tokens=150)
207
+ print(tokenizer.decode(outputs[0]))
208
+ ```
209
+
210
+ ### Inputs and outputs
211
+
212
+ * **Input:** Text string, such as a question, a prompt, or a document to be
213
+ summarized.
214
+ * **Output:** Generated English-language text in response to the input, such
215
+ as an answer to a question, or a summary of a document.
216
+
217
+ ### Citation
218
+
219
+ ```none
220
+ @article{gemma_2024,
221
+ title={Gemma},
222
+ url={https://www.kaggle.com/m/3301},
223
+ DOI={10.34740/KAGGLE/M/3301},
224
+ publisher={Kaggle},
225
+ author={Gemma Team},
226
+ year={2024}
227
+ }
228
+ ```
229
+
230
+ ## Model Data
231
+
232
+ Data used for model training and how the data was processed.
233
+
234
+ ### Training Dataset
235
+
236
+ These models were trained on a dataset of text data that includes a wide variety of sources. The 27B model was trained with 13 trillion tokens and the 9B model was trained with 8 trillion tokens.
237
+ Here are the key components:
238
+
239
+ * Web Documents: A diverse collection of web text ensures the model is exposed
240
+ to a broad range of linguistic styles, topics, and vocabulary. Primarily
241
+ English-language content.
242
+ * Code: Exposing the model to code helps it to learn the syntax and patterns of
243
+ programming languages, which improves its ability to generate code or
244
+ understand code-related questions.
245
+ * Mathematics: Training on mathematical text helps the model learn logical
246
+ reasoning, symbolic representation, and to address mathematical queries.
247
+
248
+ The combination of these diverse data sources is crucial for training a powerful
249
+ language model that can handle a wide variety of different tasks and text
250
+ formats.
251
+
252
+ ### Data Preprocessing
253
+
254
+ Here are the key data cleaning and filtering methods applied to the training
255
+ data:
256
+
257
+ * CSAM Filtering: Rigorous CSAM (Child Sexual Abuse Material) filtering was
258
+ applied at multiple stages in the data preparation process to ensure the
259
+ exclusion of harmful and illegal content.
260
+ * Sensitive Data Filtering: As part of making Gemma pre-trained models safe and
261
+ reliable, automated techniques were used to filter out certain personal
262
+ information and other sensitive data from training sets.
263
+ * Additional methods: Filtering based on content quality and safety in line with
264
+ [our policies][safety-policies].
265
+
266
+ ## Implementation Information
267
+
268
+ Details about the model internals.
269
+
270
+ ### Hardware
271
+
272
+ Gemma was trained using the latest generation of
273
+ [Tensor Processing Unit (TPU)][tpu] hardware (TPUv5p).
274
+
275
+ Training large language models requires significant computational power. TPUs,
276
+ designed specifically for matrix operations common in machine learning, offer
277
+ several advantages in this domain:
278
+
279
+ * Performance: TPUs are specifically designed to handle the massive computations
280
+ involved in training LLMs. They can speed up training considerably compared to
281
+ CPUs.
282
+ * Memory: TPUs often come with large amounts of high-bandwidth memory, allowing
283
+ for the handling of large models and batch sizes during training. This can
284
+ lead to better model quality.
285
+ * Scalability: TPU Pods (large clusters of TPUs) provide a scalable solution for
286
+ handling the growing complexity of large foundation models. You can distribute
287
+ training across multiple TPU devices for faster and more efficient processing.
288
+ * Cost-effectiveness: In many scenarios, TPUs can provide a more cost-effective
289
+ solution for training large models compared to CPU-based infrastructure,
290
+ especially when considering the time and resources saved due to faster
291
+ training.
292
+ * These advantages are aligned with
293
+ [Google's commitments to operate sustainably][sustainability].
294
+
295
+ ### Software
296
+
297
+ Training was done using [JAX][jax] and [ML Pathways][ml-pathways].
298
+
299
+ JAX allows researchers to take advantage of the latest generation of hardware,
300
+ including TPUs, for faster and more efficient training of large models.
301
+
302
+ ML Pathways is Google's latest effort to build artificially intelligent systems
303
+ capable of generalizing across multiple tasks. This is specially suitable for
304
+ [foundation models][foundation-models], including large language models like
305
+ these ones.
306
+
307
+ Together, JAX and ML Pathways are used as described in the
308
+ [paper about the Gemini family of models][gemini-2-paper]; "the 'single
309
+ controller' programming model of Jax and Pathways allows a single Python
310
+ process to orchestrate the entire training run, dramatically simplifying the
311
+ development workflow."
312
+
313
+ ## Evaluation
314
+
315
+ Model evaluation metrics and results.
316
+
317
+ ### Benchmark Results
318
+
319
+ These models were evaluated against a large collection of different datasets and
320
+ metrics to cover different aspects of text generation:
321
+
322
+ | Benchmark | Metric | Gemma PT 9B | Gemma PT 27B |
323
+ | ------------------------------ | ------------- | ----------- | ------------ |
324
+ | [MMLU][mmlu] | 5-shot, top-1 | 71.3 | 75.2 |
325
+ | [HellaSwag][hellaswag] | 10-shot | 81.9 | 86.4 |
326
+ | [PIQA][piqa] | 0-shot | 81.7 | 83.2 |
327
+ | [SocialIQA][socialiqa] | 0-shot | 53.4 | 53.7 |
328
+ | [BoolQ][boolq] | 0-shot | 84.2 | 84.8 |
329
+ | [WinoGrande][winogrande] | partial score | 80.6 | 83.7 |
330
+ | [ARC-e][arc] | 0-shot | 88.0 | 88.6 |
331
+ | [ARC-c][arc] | 25-shot | 68.4 | 71.4 |
332
+ | [TriviaQA][triviaqa] | 5-shot | 76.6 | 83.7 |
333
+ | [Natural Questions][naturalq] | 5-shot | 29.2 | 34.5 |
334
+ | [HumanEval][humaneval] | pass@1 | 40.2 | 51.8 |
335
+ | [MBPP][mbpp] | 3-shot | 52.4 | 62.6 |
336
+ | [GSM8K][gsm8k] | 5-shot, maj@1 | 68.6 | 74.0 |
337
+ | [MATH][math] | 4-shot | 36.6 | 42.3 |
338
+ | [AGIEval][agieval] | 3-5-shot | 52.8 | 55.1 |
339
+ | [BIG-Bench][big-bench] | 3-shot, CoT | 68.2 | 74.9 |
340
+ | ------------------------------ | ------------- | ----------- | ------------ |
341
+
342
+ ## Ethics and Safety
343
+
344
+ Ethics and safety evaluation approach and results.
345
+
346
+ ### Evaluation Approach
347
+
348
+ Our evaluation methods include structured evaluations and internal red-teaming
349
+ testing of relevant content policies. Red-teaming was conducted by a number of
350
+ different teams, each with different goals and human evaluation metrics. These
351
+ models were evaluated against a number of different categories relevant to
352
+ ethics and safety, including:
353
+
354
+ * Text-to-Text Content Safety: Human evaluation on prompts covering safety
355
+ policies including child sexual abuse and exploitation, harassment, violence
356
+ and gore, and hate speech.
357
+ * Text-to-Text Representational Harms: Benchmark against relevant academic
358
+ datasets such as [WinoBias][winobias] and [BBQ Dataset][bbq].
359
+ * Memorization: Automated evaluation of memorization of training data, including
360
+ the risk of personally identifiable information exposure.
361
+ * Large-scale harm: Tests for "dangerous capabilities," such as chemical,
362
+ biological, radiological, and nuclear (CBRN) risks.
363
+
364
+ ### Evaluation Results
365
+
366
+ The results of ethics and safety evaluations are within acceptable thresholds
367
+ for meeting [internal policies][safety-policies] for categories such as child
368
+ safety, content safety, representational harms, memorization, large-scale harms.
369
+ On top of robust internal evaluations, the results of well-known safety
370
+ benchmarks like BBQ, BOLD, Winogender, Winobias, RealToxicity, and TruthfulQA
371
+ are shown here.
372
+
373
+ #### Gemma 2.0
374
+
375
+ | Benchmark | Metric | Gemma 2 IT 9B | Gemma 2 IT 27B |
376
+ | ------------------------ | ------------- | --------------- | ---------------- |
377
+ | [RealToxicity][realtox] | average | 8.25 | 8.84 |
378
+ | [CrowS-Pairs][crows] | top-1 | 37.47 | 36.67 |
379
+ | [BBQ Ambig][bbq] | 1-shot, top-1 | 88.58 | 85.99 |
380
+ | [BBQ Disambig][bbq] | top-1 | 82.67 | 86.94 |
381
+ | [Winogender][winogender] | top-1 | 79.17 | 77.22 |
382
+ | [TruthfulQA][truthfulqa] | | 50.27 | 51.60 |
383
+ | [Winobias 1_2][winobias] | | 78.09 | 81.94 |
384
+ | [Winobias 2_2][winobias] | | 95.32 | 97.22 |
385
+ | [Toxigen][toxigen] | | 39.30 | 38.42 |
386
+ | ------------------------ | ------------- | --------------- | ---------------- |
387
+
388
+ ## Usage and Limitations
389
+
390
+ These models have certain limitations that users should be aware of.
391
+
392
+ ### Intended Usage
393
+
394
+ Open Large Language Models (LLMs) have a wide range of applications across
395
+ various industries and domains. The following list of potential uses is not
396
+ comprehensive. The purpose of this list is to provide contextual information
397
+ about the possible use-cases that the model creators considered as part of model
398
+ training and development.
399
+
400
+ * Content Creation and Communication
401
+ * Text Generation: These models can be used to generate creative text formats
402
+ such as poems, scripts, code, marketing copy, and email drafts.
403
+ * Chatbots and Conversational AI: Power conversational interfaces for customer
404
+ service, virtual assistants, or interactive applications.
405
+ * Text Summarization: Generate concise summaries of a text corpus, research
406
+ papers, or reports.
407
+ * Research and Education
408
+ * Natural Language Processing (NLP) Research: These models can serve as a
409
+ foundation for researchers to experiment with NLP techniques, develop
410
+ algorithms, and contribute to the advancement of the field.
411
+ * Language Learning Tools: Support interactive language learning experiences,
412
+ aiding in grammar correction or providing writing practice.
413
+ * Knowledge Exploration: Assist researchers in exploring large bodies of text
414
+ by generating summaries or answering questions about specific topics.
415
+
416
+ ### Limitations
417
+
418
+ * Training Data
419
+ * The quality and diversity of the training data significantly influence the
420
+ model's capabilities. Biases or gaps in the training data can lead to
421
+ limitations in the model's responses.
422
+ * The scope of the training dataset determines the subject areas the model can
423
+ handle effectively.
424
+ * Context and Task Complexity
425
+ * LLMs are better at tasks that can be framed with clear prompts and
426
+ instructions. Open-ended or highly complex tasks might be challenging.
427
+ * A model's performance can be influenced by the amount of context provided
428
+ (longer context generally leads to better outputs, up to a certain point).
429
+ * Language Ambiguity and Nuance
430
+ * Natural language is inherently complex. LLMs might struggle to grasp subtle
431
+ nuances, sarcasm, or figurative language.
432
+ * Factual Accuracy
433
+ * LLMs generate responses based on information they learned from their
434
+ training datasets, but they are not knowledge bases. They may generate
435
+ incorrect or outdated factual statements.
436
+ * Common Sense
437
+ * LLMs rely on statistical patterns in language. They might lack the ability
438
+ to apply common sense reasoning in certain situations.
439
+
440
+ ### Ethical Considerations and Risks
441
+
442
+ The development of large language models (LLMs) raises several ethical concerns.
443
+ In creating an open model, we have carefully considered the following:
444
+
445
+ * Bias and Fairness
446
+ * LLMs trained on large-scale, real-world text data can reflect socio-cultural
447
+ biases embedded in the training material. These models underwent careful
448
+ scrutiny, input data pre-processing described and posterior evaluations
449
+ reported in this card.
450
+ * Misinformation and Misuse
451
+ * LLMs can be misused to generate text that is false, misleading, or harmful.
452
+ * Guidelines are provided for responsible use with the model, see the
453
+ [Responsible Generative AI Toolkit][rai-toolkit].
454
+ * Transparency and Accountability:
455
+ * This model card summarizes details on the models' architecture,
456
+ capabilities, limitations, and evaluation processes.
457
+ * A responsibly developed open model offers the opportunity to share
458
+ innovation by making LLM technology accessible to developers and researchers
459
+ across the AI ecosystem.
460
+
461
+ Risks identified and mitigations:
462
+
463
+ * Perpetuation of biases: It's encouraged to perform continuous monitoring
464
+ (using evaluation metrics, human review) and the exploration of de-biasing
465
+ techniques during model training, fine-tuning, and other use cases.
466
+ * Generation of harmful content: Mechanisms and guidelines for content safety
467
+ are essential. Developers are encouraged to exercise caution and implement
468
+ appropriate content safety safeguards based on their specific product policies
469
+ and application use cases.
470
+ * Misuse for malicious purposes: Technical limitations and developer and
471
+ end-user education can help mitigate against malicious applications of LLMs.
472
+ Educational resources and reporting mechanisms for users to flag misuse are
473
+ provided. Prohibited uses of Gemma models are outlined in the
474
+ [Gemma Prohibited Use Policy][prohibited-use].
475
+ * Privacy violations: Models were trained on data filtered for removal of PII
476
+ (Personally Identifiable Information). Developers are encouraged to adhere to
477
+ privacy regulations with privacy-preserving techniques.
478
+
479
+ ### Benefits
480
+
481
+ At the time of release, this family of models provides high-performance open
482
+ large language model implementations designed from the ground up for Responsible
483
+ AI development compared to similarly sized models.
484
+
485
+ Using the benchmark evaluation metrics described in this document, these models
486
+ have shown to provide superior performance to other, comparably-sized open model
487
+ alternatives.
488
+
489
+ [rai-toolkit]: https://ai.google.dev/responsible
490
+ [kaggle-gemma]: https://www.kaggle.com/models/google/gemma-2
491
+ [terms]: https://ai.google.dev/gemma/terms
492
+ [vertex-mg-gemma]: https://console.cloud.google.com/vertex-ai/publishers/google/model-garden/335
493
+ [sensitive-info]: https://cloud.google.com/dlp/docs/high-sensitivity-infotypes-reference
494
+ [safety-policies]: https://storage.googleapis.com/gweb-uniblog-publish-prod/documents/2023_Google_AI_Principles_Progress_Update.pdf#page=11
495
+ [prohibited-use]: https://ai.google.dev/gemma/prohibited_use_policy
496
+ [tpu]: https://cloud.google.com/tpu/docs/intro-to-tpu
497
+ [sustainability]: https://sustainability.google/operating-sustainably/
498
+ [jax]: https://github.com/google/jax
499
+ [ml-pathways]: https://blog.google/technology/ai/introducing-pathways-next-generation-ai-architecture/
500
+ [sustainability]: https://sustainability.google/operating-sustainably/
501
+ [foundation-models]: https://ai.google/discover/foundation-models/
502
+ [gemini-2-paper]: https://goo.gle/gemma2report
503
+ [mmlu]: https://arxiv.org/abs/2009.03300
504
+ [hellaswag]: https://arxiv.org/abs/1905.07830
505
+ [piqa]: https://arxiv.org/abs/1911.11641
506
+ [socialiqa]: https://arxiv.org/abs/1904.09728
507
+ [boolq]: https://arxiv.org/abs/1905.10044
508
+ [winogrande]: https://arxiv.org/abs/1907.10641
509
+ [commonsenseqa]: https://arxiv.org/abs/1811.00937
510
+ [openbookqa]: https://arxiv.org/abs/1809.02789
511
+ [arc]: https://arxiv.org/abs/1911.01547
512
+ [triviaqa]: https://arxiv.org/abs/1705.03551
513
+ [naturalq]: https://github.com/google-research-datasets/natural-questions
514
+ [humaneval]: https://arxiv.org/abs/2107.03374
515
+ [mbpp]: https://arxiv.org/abs/2108.07732
516
+ [gsm8k]: https://arxiv.org/abs/2110.14168
517
+ [realtox]: https://arxiv.org/abs/2009.11462
518
+ [bold]: https://arxiv.org/abs/2101.11718
519
+ [crows]: https://aclanthology.org/2020.emnlp-main.154/
520
+ [bbq]: https://arxiv.org/abs/2110.08193v2
521
+ [winogender]: https://arxiv.org/abs/1804.09301
522
+ [truthfulqa]: https://arxiv.org/abs/2109.07958
523
+ [winobias]: https://arxiv.org/abs/1804.06876
524
+ [math]: https://arxiv.org/abs/2103.03874
525
+ [agieval]: https://arxiv.org/abs/2304.06364
526
+ [big-bench]: https://arxiv.org/abs/2206.04615
527
+ [toxigen]: https://arxiv.org/abs/2203.09509