RichardErkhov commited on
Commit
356c7f5
·
verified ·
1 Parent(s): 7c47cbe

uploaded readme

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