neifuisan commited on
Commit
76d1160
1 Parent(s): 1a3ba22

Upload folder using huggingface_hub

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