RichardErkhov commited on
Commit
4ebca4f
1 Parent(s): 8fd91c3

uploaded readme

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