nihaomur commited on
Commit
1ed6b8e
·
verified ·
1 Parent(s): e219840

Create README.md

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