Lagstill commited on
Commit
2d7b580
1 Parent(s): 77cdf47

Update README.md

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