Xmm commited on
Commit
fef193b
1 Parent(s): e0bc3a2

Create README.md

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