LlamaFinetuneBase commited on
Commit
33a5891
1 Parent(s): 35322a5

Upload README.md with huggingface_hub

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