jetaudio commited on
Commit
06fe592
·
verified ·
1 Parent(s): a257ce9

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +427 -193
README.md CHANGED
@@ -1,199 +1,433 @@
1
  ---
 
2
  library_name: transformers
3
- tags: []
 
 
 
 
 
 
4
  ---
5
-
6
- # Model Card for Model ID
7
-
8
- <!-- Provide a quick summary of what the model is/does. -->
9
-
10
-
11
-
12
- ## Model Details
13
-
14
- ### Model Description
15
-
16
- <!-- Provide a longer summary of what this model is. -->
17
-
18
- This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
19
-
20
- - **Developed by:** [More Information Needed]
21
- - **Funded by [optional]:** [More Information Needed]
22
- - **Shared by [optional]:** [More Information Needed]
23
- - **Model type:** [More Information Needed]
24
- - **Language(s) (NLP):** [More Information Needed]
25
- - **License:** [More Information Needed]
26
- - **Finetuned from model [optional]:** [More Information Needed]
27
-
28
- ### Model Sources [optional]
29
-
30
- <!-- Provide the basic links for the model. -->
31
-
32
- - **Repository:** [More Information Needed]
33
- - **Paper [optional]:** [More Information Needed]
34
- - **Demo [optional]:** [More Information Needed]
35
-
36
- ## Uses
37
-
38
- <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
39
-
40
- ### Direct Use
41
-
42
- <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
43
-
44
- [More Information Needed]
45
-
46
- ### Downstream Use [optional]
47
-
48
- <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
49
-
50
- [More Information Needed]
51
-
52
- ### Out-of-Scope Use
53
-
54
- <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
55
-
56
- [More Information Needed]
57
-
58
- ## Bias, Risks, and Limitations
59
-
60
- <!-- This section is meant to convey both technical and sociotechnical limitations. -->
61
-
62
- [More Information Needed]
63
-
64
- ### Recommendations
65
-
66
- <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
67
-
68
- Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
69
-
70
- ## How to Get Started with the Model
71
-
72
- Use the code below to get started with the model.
73
-
74
- [More Information Needed]
75
-
76
- ## Training Details
77
-
78
- ### Training Data
79
-
80
- <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
81
-
82
- [More Information Needed]
83
-
84
- ### Training Procedure
85
-
86
- <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
87
-
88
- #### Preprocessing [optional]
89
-
90
- [More Information Needed]
91
-
92
-
93
- #### Training Hyperparameters
94
-
95
- - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
96
-
97
- #### Speeds, Sizes, Times [optional]
98
-
99
- <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
100
-
101
- [More Information Needed]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
102
 
103
  ## Evaluation
104
 
105
- <!-- This section describes the evaluation protocols and provides the results. -->
106
-
107
- ### Testing Data, Factors & Metrics
108
-
109
- #### Testing Data
110
-
111
- <!-- This should link to a Dataset Card if possible. -->
112
-
113
- [More Information Needed]
114
-
115
- #### Factors
116
-
117
- <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
118
-
119
- [More Information Needed]
120
-
121
- #### Metrics
122
-
123
- <!-- These are the evaluation metrics being used, ideally with a description of why. -->
124
-
125
- [More Information Needed]
126
-
127
- ### Results
128
-
129
- [More Information Needed]
130
-
131
- #### Summary
132
-
133
-
134
-
135
- ## Model Examination [optional]
136
-
137
- <!-- Relevant interpretability work for the model goes here -->
138
-
139
- [More Information Needed]
140
-
141
- ## Environmental Impact
142
-
143
- <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
144
-
145
- Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
146
-
147
- - **Hardware Type:** [More Information Needed]
148
- - **Hours used:** [More Information Needed]
149
- - **Cloud Provider:** [More Information Needed]
150
- - **Compute Region:** [More Information Needed]
151
- - **Carbon Emitted:** [More Information Needed]
152
-
153
- ## Technical Specifications [optional]
154
-
155
- ### Model Architecture and Objective
156
-
157
- [More Information Needed]
158
-
159
- ### Compute Infrastructure
160
-
161
- [More Information Needed]
162
-
163
- #### Hardware
164
-
165
- [More Information Needed]
166
-
167
- #### Software
168
-
169
- [More Information Needed]
170
-
171
- ## Citation [optional]
172
-
173
- <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
174
-
175
- **BibTeX:**
176
-
177
- [More Information Needed]
178
-
179
- **APA:**
180
-
181
- [More Information Needed]
182
-
183
- ## Glossary [optional]
184
-
185
- <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
186
-
187
- [More Information Needed]
188
-
189
- ## More Information [optional]
190
-
191
- [More Information Needed]
192
-
193
- ## Model Card Authors [optional]
194
-
195
- [More Information Needed]
196
-
197
- ## Model Card Contact
198
-
199
- [More Information Needed]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ license: gemma
3
  library_name: transformers
4
+ pipeline_tag: text-generation
5
+ extra_gated_heading: Access Gemma on Hugging Face
6
+ extra_gated_prompt: >-
7
+ To access Gemma on Hugging Face, you’re required to review and agree to
8
+ Google’s usage license. To do this, please ensure you’re logged in to Hugging
9
+ Face and click below. Requests are processed immediately.
10
+ extra_gated_button_content: Acknowledge license
11
  ---
12
+ # Model Description
13
+
14
+ This model is `google/gemma-3-1b-pt` finetuned on waka books dataset for 1 epoch, with seq_len = 4096 (I know. But not enough $$$)
15
+ # Gemma 3 model card
16
+ **Model Page**: [Gemma](https://ai.google.dev/gemma/docs/core)
17
+ **Resources and Technical Documentation**:
18
+ * [Gemma 3 Technical Report][g3-tech-report]
19
+ * [Responsible Generative AI Toolkit][rai-toolkit]
20
+ * [Gemma on Kaggle][kaggle-gemma]
21
+ * [Gemma on Vertex Model Garden][vertex-mg-gemma3]
22
+ **Terms of Use**: [Terms][terms]
23
+ **Authors**: Google DeepMind
24
+ ## Model Information
25
+ Summary description and brief definition of inputs and outputs.
26
+ ### Description
27
+ Gemma is a family of lightweight, state-of-the-art open models from Google,
28
+ built from the same research and technology used to create the Gemini models.
29
+ Gemma 3 models are multimodal, handling text and image input and generating text
30
+ output, with open weights for both pre-trained variants and instruction-tuned
31
+ variants. Gemma 3 has a large, 128K context window, multilingual support in over
32
+ 140 languages, and is available in more sizes than previous versions. Gemma 3
33
+ models are well-suited for a variety of text generation and image understanding
34
+ tasks, including question answering, summarization, and reasoning. Their
35
+ relatively small size makes it possible to deploy them in environments with
36
+ limited resources such as laptops, desktops or your own cloud infrastructure,
37
+ democratizing access to state of the art AI models and helping foster innovation
38
+ for everyone.
39
+ ### Usage
40
+ Below, there are some code snippets on how to get quickly started with running the model. First, install the Transformers library with the version made for Gemma 3:
41
+ ```sh
42
+ $ pip install git+https://github.com/huggingface/[email protected]
43
+ ```
44
+ Then, copy the snippet from the section that is relevant for your use case.
45
+ #### Running with the `pipeline` API
46
+ ```python
47
+ from transformers import pipeline
48
+ import torch
49
+ pipe = pipeline("text-generation", model="google/gemma-3-1b-pt", device="cuda", torch_dtype=torch.bfloat16)
50
+ output = pipe("Eiffel tower is located in", max_new_tokens=50)
51
+ ```
52
+ #### Running the model on a single / multi GPU
53
+ ```python
54
+ import torch
55
+ from transformers import AutoTokenizer, Gemma3ForCausalLM
56
+ ckpt = "google/gemma-3-1b-pt"
57
+ tokenizer = AutoTokenizer.from_pretrained(ckpt)
58
+ model = Gemma3ForCausalLM.from_pretrained(
59
+ ckpt,
60
+ torch_dtype=torch.bfloat16,
61
+ device_map="auto"
62
+ )
63
+ prompt = "Eiffel tower is located in"
64
+ model_inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
65
+ input_len = model_inputs["input_ids"].shape[-1]
66
+ with torch.inference_mode():
67
+ generation = model.generate(**model_inputs, max_new_tokens=50, do_sample=False)
68
+ generation = generation[0][input_len:]
69
+ decoded = tokenizer.decode(generation, skip_special_tokens=True)
70
+ print(decoded)
71
+ ```
72
+ ### Inputs and outputs
73
+
74
+ - **Input:**
75
+ - Text string, such as a question, a prompt, or a document to be summarized
76
+ - Images, normalized to 896 x 896 resolution and encoded to 256 tokens
77
+ each
78
+ - Total input context of 128K tokens for the 4B, 12B, and 27B sizes, and
79
+ 32K tokens for the 1B size
80
+ - **Output:**
81
+ - Generated text in response to the input, such as an answer to a
82
+ question, analysis of image content, or a summary of a document
83
+ - Total output context of 8192 tokens
84
+ ### Citation
85
+ ```none
86
+ @article{gemma_2025,
87
+ title={Gemma 3},
88
+ url={https://goo.gle/Gemma3Report},
89
+ publisher={Kaggle},
90
+ author={Gemma Team},
91
+ year={2025}
92
+ }
93
+ ```
94
+ ## Model Data
95
+
96
+ Data used for model training and how the data was processed.
97
+
98
+ ### Training Dataset
99
+
100
+ These models were trained on a dataset of text data that includes a wide variety
101
+ of sources. The 27B model was trained with 14 trillion tokens, the 12B model was
102
+ trained with 12 trillion tokens, 4B model was trained with 4 trillion tokens and
103
+ 1B with 2 trillion tokens. Here are the key components:
104
+
105
+ - Web Documents: A diverse collection of web text ensures the model is
106
+ exposed to a broad range of linguistic styles, topics, and vocabulary. The
107
+ training dataset includes content in over 140 languages.
108
+ - Code: Exposing the model to code helps it to learn the syntax and
109
+ patterns of programming languages, which improves its ability to generate
110
+ code and understand code-related questions.
111
+ - Mathematics: Training on mathematical text helps the model learn logical
112
+ reasoning, symbolic representation, and to address mathematical queries.
113
+ - Images: A wide range of images enables the model to perform image
114
+ analysis and visual data extraction tasks.
115
+ The combination of these diverse data sources is crucial for training a powerful
116
+ multimodal model that can handle a wide variety of different tasks and data
117
+ formats.
118
+ ### Data Preprocessing
119
+ Here are the key data cleaning and filtering methods applied to the training
120
+ data:
121
+
122
+ - CSAM Filtering: Rigorous CSAM (Child Sexual Abuse Material) filtering
123
+ was applied at multiple stages in the data preparation process to ensure
124
+ the exclusion of harmful and illegal content.
125
+ - Sensitive Data Filtering: As part of making Gemma pre-trained models
126
+ safe and reliable, automated techniques were used to filter out certain
127
+ personal information and other sensitive data from training sets.
128
+ - Additional methods: Filtering based on content quality and safety in
129
+ line with [our policies][safety-policies].
130
+ ## Implementation Information
131
+ Details about the model internals.
132
+ ### Hardware
133
+
134
+ Gemma was trained using [Tensor Processing Unit (TPU)][tpu] hardware (TPUv4p,
135
+ TPUv5p and TPUv5e). Training vision-language models (VLMS) requires significant
136
+ computational power. TPUs, designed specifically for matrix operations common in
137
+ machine learning, offer several advantages in this domain:
138
+
139
+ - Performance: TPUs are specifically designed to handle the massive
140
+ computations involved in training VLMs. They can speed up training
141
+ considerably compared to CPUs.
142
+ - Memory: TPUs often come with large amounts of high-bandwidth memory,
143
+ allowing for the handling of large models and batch sizes during training.
144
+ This can lead to better model quality.
145
+ - Scalability: TPU Pods (large clusters of TPUs) provide a scalable
146
+ solution for handling the growing complexity of large foundation models.
147
+ You can distribute training across multiple TPU devices for faster and more
148
+ efficient processing.
149
+ - Cost-effectiveness: In many scenarios, TPUs can provide a more
150
+ cost-effective solution for training large models compared to CPU-based
151
+ infrastructure, especially when considering the time and resources saved
152
+ due to faster training.
153
+ - These advantages are aligned with
154
+ [Google's commitments to operate sustainably][sustainability].
155
+ ### Software
156
+ Training was done using [JAX][jax] and [ML Pathways][ml-pathways].
157
+ JAX allows researchers to take advantage of the latest generation of hardware,
158
+ including TPUs, for faster and more efficient training of large models. ML
159
+ Pathways is Google's latest effort to build artificially intelligent systems
160
+ capable of generalizing across multiple tasks. This is specially suitable for
161
+ foundation models, including large language models like these ones.
162
+
163
+ Together, JAX and ML Pathways are used as described in the
164
+ [paper about the Gemini family of models][gemini-2-paper]; *"the 'single
165
+ controller' programming model of Jax and Pathways allows a single Python
166
+ process to orchestrate the entire training run, dramatically simplifying the
167
+ development workflow."*
168
 
169
  ## Evaluation
170
 
171
+ Model evaluation metrics and results.
172
+
173
+ ### Benchmark Results
174
+
175
+ These models were evaluated against a large collection of different datasets and
176
+ metrics to cover different aspects of text generation:
177
+
178
+ #### Reasoning and factuality
179
+
180
+ | Benchmark | Metric | Gemma 3 PT 1B | Gemma 3 PT 4B | Gemma 3 PT 12B | Gemma 3 PT 27B |
181
+ | ------------------------------ |----------------|:--------------:|:-------------:|:--------------:|:--------------:|
182
+ | [HellaSwag][hellaswag] | 10-shot | 62.3 | 77.2 | 84.2 | 85.6 |
183
+ | [BoolQ][boolq] | 0-shot | 63.2 | 72.3 | 78.8 | 82.4 |
184
+ | [PIQA][piqa] | 0-shot | 73.8 | 79.6 | 81.8 | 83.3 |
185
+ | [SocialIQA][socialiqa] | 0-shot | 48.9 | 51.9 | 53.4 | 54.9 |
186
+ | [TriviaQA][triviaqa] | 5-shot | 39.8 | 65.8 | 78.2 | 85.5 |
187
+ | [Natural Questions][naturalq] | 5-shot | 9.48 | 20.0 | 31.4 | 36.1 |
188
+ | [ARC-c][arc] | 25-shot | 38.4 | 56.2 | 68.9 | 70.6 |
189
+ | [ARC-e][arc] | 0-shot | 73.0 | 82.4 | 88.3 | 89.0 |
190
+ | [WinoGrande][winogrande] | 5-shot | 58.2 | 64.7 | 74.3 | 78.8 |
191
+ | [BIG-Bench Hard][bbh] | few-shot | 28.4 | 50.9 | 72.6 | 77.7 |
192
+ | [DROP][drop] | 1-shot | 42.4 | 60.1 | 72.2 | 77.2 |
193
+
194
+ [hellaswag]: https://arxiv.org/abs/1905.07830
195
+ [boolq]: https://arxiv.org/abs/1905.10044
196
+ [piqa]: https://arxiv.org/abs/1911.11641
197
+ [socialiqa]: https://arxiv.org/abs/1904.09728
198
+ [triviaqa]: https://arxiv.org/abs/1705.03551
199
+ [naturalq]: https://github.com/google-research-datasets/natural-questions
200
+ [arc]: https://arxiv.org/abs/1911.01547
201
+ [winogrande]: https://arxiv.org/abs/1907.10641
202
+ [bbh]: https://paperswithcode.com/dataset/bbh
203
+ [drop]: https://arxiv.org/abs/1903.00161
204
+
205
+ #### STEM and code
206
+
207
+ | Benchmark | Metric | Gemma 3 PT 4B | Gemma 3 PT 12B | Gemma 3 PT 27B |
208
+ | ------------------------------ |----------------|:-------------:|:--------------:|:--------------:|
209
+ | [MMLU][mmlu] | 5-shot | 59.6 | 74.5 | 78.6 |
210
+ | [MMLU][mmlu] (Pro COT) | 5-shot | 29.2 | 45.3 | 52.2 |
211
+ | [AGIEval][agieval] | 3-5-shot | 42.1 | 57.4 | 66.2 |
212
+ | [MATH][math] | 4-shot | 24.2 | 43.3 | 50.0 |
213
+ | [GSM8K][gsm8k] | 8-shot | 38.4 | 71.0 | 82.6 |
214
+ | [GPQA][gpqa] | 5-shot | 15.0 | 25.4 | 24.3 |
215
+ | [MBPP][mbpp] | 3-shot | 46.0 | 60.4 | 65.6 |
216
+ | [HumanEval][humaneval] | 0-shot | 36.0 | 45.7 | 48.8 |
217
+
218
+ [mmlu]: https://arxiv.org/abs/2009.03300
219
+ [agieval]: https://arxiv.org/abs/2304.06364
220
+ [math]: https://arxiv.org/abs/2103.03874
221
+ [gsm8k]: https://arxiv.org/abs/2110.14168
222
+ [gpqa]: https://arxiv.org/abs/2311.12022
223
+ [mbpp]: https://arxiv.org/abs/2108.07732
224
+ [humaneval]: https://arxiv.org/abs/2107.03374
225
+
226
+ #### Multilingual
227
+
228
+ | Benchmark | Gemma 3 PT 1B | Gemma 3 PT 4B | Gemma 3 PT 12B | Gemma 3 PT 27B |
229
+ | ------------------------------------ |:-------------:|:-------------:|:--------------:|:--------------:|
230
+ | [MGSM][mgsm] | 2.04 | 34.7 | 64.3 | 74.3 |
231
+ | [Global-MMLU-Lite][global-mmlu-lite] | 24.9 | 57.0 | 69.4 | 75.7 |
232
+ | [WMT24++][wmt24pp] (ChrF) | 36.7 | 48.4 | 53.9 | 55.7 |
233
+ | [FloRes][flores] | 29.5 | 39.2 | 46.0 | 48.8 |
234
+ | [XQuAD][xquad] (all) | 43.9 | 68.0 | 74.5 | 76.8 |
235
+ | [ECLeKTic][eclektic] | 4.69 | 11.0 | 17.2 | 24.4 |
236
+ | [IndicGenBench][indicgenbench] | 41.4 | 57.2 | 61.7 | 63.4 |
237
+
238
+ [mgsm]: https://arxiv.org/abs/2210.03057
239
+ [flores]: https://arxiv.org/abs/2106.03193
240
+ [xquad]: https://arxiv.org/abs/1910.11856v3
241
+ [global-mmlu-lite]: https://huggingface.co/datasets/CohereForAI/Global-MMLU-Lite
242
+ [wmt24pp]: https://arxiv.org/abs/2502.12404v1
243
+ [eclektic]: https://arxiv.org/abs/2502.21228
244
+ [indicgenbench]: https://arxiv.org/abs/2404.16816
245
+
246
+ #### Multimodal
247
+
248
+ | Benchmark | Gemma 3 PT 4B | Gemma 3 PT 12B | Gemma 3 PT 27B |
249
+ | ------------------------------ |:-------------:|:--------------:|:--------------:|
250
+ | [COCOcap][coco-cap] | 102 | 111 | 116 |
251
+ | [DocVQA][docvqa] (val) | 72.8 | 82.3 | 85.6 |
252
+ | [InfoVQA][info-vqa] (val) | 44.1 | 54.8 | 59.4 |
253
+ | [MMMU][mmmu] (pt) | 39.2 | 50.3 | 56.1 |
254
+ | [TextVQA][textvqa] (val) | 58.9 | 66.5 | 68.6 |
255
+ | [RealWorldQA][realworldqa] | 45.5 | 52.2 | 53.9 |
256
+ | [ReMI][remi] | 27.3 | 38.5 | 44.8 |
257
+ | [AI2D][ai2d] | 63.2 | 75.2 | 79.0 |
258
+ | [ChartQA][chartqa] | 63.6 | 74.7 | 76.3 |
259
+ | [VQAv2][vqav2] | 63.9 | 71.2 | 72.9 |
260
+ | [BLINK][blinkvqa] | 38.0 | 35.9 | 39.6 |
261
+ | [OKVQA][okvqa] | 51.0 | 58.7 | 60.2 |
262
+ | [TallyQA][tallyqa] | 42.5 | 51.8 | 54.3 |
263
+ | [SpatialSense VQA][ss-vqa] | 50.9 | 60.0 | 59.4 |
264
+ | [CountBenchQA][countbenchqa] | 26.1 | 17.8 | 68.0 |
265
+
266
+ [coco-cap]: https://cocodataset.org/#home
267
+ [docvqa]: https://www.docvqa.org/
268
+ [info-vqa]: https://arxiv.org/abs/2104.12756
269
+ [mmmu]: https://arxiv.org/abs/2311.16502
270
+ [textvqa]: https://textvqa.org/
271
+ [realworldqa]: https://paperswithcode.com/dataset/realworldqa
272
+ [remi]: https://arxiv.org/html/2406.09175v1
273
+ [ai2d]: https://allenai.org/data/diagrams
274
+ [chartqa]: https://arxiv.org/abs/2203.10244
275
+ [vqav2]: https://visualqa.org/index.html
276
+ [blinkvqa]: https://arxiv.org/abs/2404.12390
277
+ [okvqa]: https://okvqa.allenai.org/
278
+ [tallyqa]: https://arxiv.org/abs/1810.12440
279
+ [ss-vqa]: https://arxiv.org/abs/1908.02660
280
+ [countbenchqa]: https://github.com/google-research/big_vision/blob/main/big_vision/datasets/countbenchqa/
281
+
282
+ ## Ethics and Safety
283
+
284
+ Ethics and safety evaluation approach and results.
285
+
286
+ ### Evaluation Approach
287
+
288
+ Our evaluation methods include structured evaluations and internal red-teaming
289
+ testing of relevant content policies. Red-teaming was conducted by a number of
290
+ different teams, each with different goals and human evaluation metrics. These
291
+ models were evaluated against a number of different categories relevant to
292
+ ethics and safety, including:
293
+
294
+ - **Child Safety**: Evaluation of text-to-text and image to text prompts
295
+ covering child safety policies, including child sexual abuse and
296
+ exploitation.
297
+ - **Content Safety:** Evaluation of text-to-text and image to text prompts
298
+ covering safety policies including, harassment, violence and gore, and hate
299
+ speech.
300
+ - **Representational Harms**: Evaluation of text-to-text and image to text
301
+ prompts covering safety policies including bias, stereotyping, and harmful
302
+ associations or inaccuracies.
303
+ In addition to development level evaluations, we conduct "assurance
304
+ evaluations" which are our 'arms-length' internal evaluations for responsibility
305
+ governance decision making. They are conducted separately from the model
306
+ development team, to inform decision making about release. High level findings
307
+ are fed back to the model team, but prompt sets are held-out to prevent
308
+ overfitting and preserve the results' ability to inform decision making.
309
+ Assurance evaluation results are reported to our Responsibility & Safety Council
310
+ as part of release review.
311
+ ### Evaluation Results
312
+ For all areas of safety testing, we saw major improvements in the categories of
313
+ child safety, content safety, and representational harms relative to previous
314
+ Gemma models. All testing was conducted without safety filters to evaluate the
315
+ model capabilities and behaviors. For both text-to-text and image-to-text, and
316
+ across all model sizes, the model produced minimal policy violations, and showed
317
+ significant improvements over previous Gemma models' performance with respect
318
+ to ungrounded inferences. A limitation of our evaluations was they included only
319
+ English language prompts.
320
+
321
+ ## Usage and Limitations
322
+
323
+ These models have certain limitations that users should be aware of.
324
+
325
+ ### Intended Usage
326
+
327
+ Open vision-language models (VLMs) models have a wide range of applications
328
+ across various industries and domains. The following list of potential uses is
329
+ not comprehensive. The purpose of this list is to provide contextual information
330
+ about the possible use-cases that the model creators considered as part of model
331
+ training and development.
332
+
333
+ - Content Creation and Communication
334
+ - Text Generation: These models can be used to generate creative text
335
+ formats such as poems, scripts, code, marketing copy, and email drafts.
336
+ - Chatbots and Conversational AI: Power conversational interfaces
337
+ for customer service, virtual assistants, or interactive applications.
338
+ - Text Summarization: Generate concise summaries of a text corpus,
339
+ research papers, or reports.
340
+ - Image Data Extraction: These models can be used to extract,
341
+ interpret, and summarize visual data for text communications.
342
+ - Research and Education
343
+ - Natural Language Processing (NLP) and VLM Research: These
344
+ models can serve as a foundation for researchers to experiment with VLM
345
+ and NLP techniques, develop algorithms, and contribute to the
346
+ advancement of the field.
347
+ - Language Learning Tools: Support interactive language learning
348
+ experiences, aiding in grammar correction or providing writing practice.
349
+ - Knowledge Exploration: Assist researchers in exploring large
350
+ bodies of text by generating summaries or answering questions about
351
+ specific topics.
352
+ ### Limitations
353
+ - Training Data
354
+ - The quality and diversity of the training data significantly
355
+ influence the model's capabilities. Biases or gaps in the training data
356
+ can lead to limitations in the model's responses.
357
+ - The scope of the training dataset determines the subject areas
358
+ the model can handle effectively.
359
+ - Context and Task Complexity
360
+ - Models are better at tasks that can be framed with clear
361
+ prompts and instructions. Open-ended or highly complex tasks might be
362
+ challenging.
363
+ - A model's performance can be influenced by the amount of context
364
+ provided (longer context generally leads to better outputs, up to a
365
+ certain point).
366
+ - Language Ambiguity and Nuance
367
+ - Natural language is inherently complex. Models might struggle
368
+ to grasp subtle nuances, sarcasm, or figurative language.
369
+ - Factual Accuracy
370
+ - Models generate responses based on information they learned
371
+ from their training datasets, but they are not knowledge bases. They
372
+ may generate incorrect or outdated factual statements.
373
+ - Common Sense
374
+ - Models rely on statistical patterns in language. They might
375
+ lack the ability to apply common sense reasoning in certain situations.
376
+ ### Ethical Considerations and Risks
377
+ The development of vision-language models (VLMs) raises several ethical
378
+ concerns. In creating an open model, we have carefully considered the following:
379
+ - Bias and Fairness
380
+ - VLMs trained on large-scale, real-world text and image data can
381
+ reflect socio-cultural biases embedded in the training material. These
382
+ models underwent careful scrutiny, input data pre-processing described
383
+ and posterior evaluations reported in this card.
384
+ - Misinformation and Misuse
385
+ - VLMs can be misused to generate text that is false, misleading,
386
+ or harmful.
387
+ - Guidelines are provided for responsible use with the model, see the
388
+ [Responsible Generative AI Toolkit][rai-toolkit].
389
+ - Transparency and Accountability:
390
+ - This model card summarizes details on the models' architecture,
391
+ capabilities, limitations, and evaluation processes.
392
+ - A responsibly developed open model offers the opportunity to
393
+ share innovation by making VLM technology accessible to developers and
394
+ researchers across the AI ecosystem.
395
+ Risks identified and mitigations:
396
+ - **Perpetuation of biases**: It's encouraged to perform continuous
397
+ monitoring (using evaluation metrics, human review) and the exploration of
398
+ de-biasing techniques during model training, fine-tuning, and other use
399
+ cases.
400
+ - **Generation of harmful content**: Mechanisms and guidelines for content
401
+ safety are essential. Developers are encouraged to exercise caution and
402
+ implement appropriate content safety safeguards based on their specific
403
+ product policies and application use cases.
404
+ - **Misuse for malicious purposes**: Technical limitations and developer
405
+ and end-user education can help mitigate against malicious applications of
406
+ VLMs. Educational resources and reporting mechanisms for users to flag
407
+ misuse are provided. Prohibited uses of Gemma models are outlined in the
408
+ [Gemma Prohibited Use Policy][prohibited-use].
409
+ - **Privacy violations**: Models were trained on data filtered for removal
410
+ of certain personal information and other sensitive data. Developers are
411
+ encouraged to adhere to privacy regulations with privacy-preserving
412
+ techniques.
413
+ ### Benefits
414
+ At the time of release, this family of models provides high-performance open
415
+ vision-language model implementations designed from the ground up for
416
+ responsible AI development compared to similarly sized models.
417
+ Using the benchmark evaluation metrics described in this document, these models
418
+ have shown to provide superior performance to other, comparably-sized open model
419
+ alternatives.
420
+
421
+ [g3-tech-report]: https://goo.gle/Gemma3Report
422
+ [rai-toolkit]: https://ai.google.dev/responsible
423
+ [kaggle-gemma]: https://www.kaggle.com/models/google/gemma-3
424
+ [vertex-mg-gemma3]: https://console.cloud.google.com/vertex-ai/publishers/google/model-garden/gemma3
425
+ [terms]: https://ai.google.dev/gemma/terms
426
+ [safety-policies]: https://ai.google/static/documents/ai-responsibility-update-published-february-2025.pdf
427
+ [prohibited-use]: https://ai.google.dev/gemma/prohibited_use_policy
428
+ [tpu]: https://cloud.google.com/tpu/docs/intro-to-tpu
429
+ [sustainability]: https://sustainability.google/operating-sustainably/
430
+ [jax]: https://github.com/jax-ml/jax
431
+ [ml-pathways]: https://blog.google/technology/ai/introducing-pathways-next-generation-ai-architecture/
432
+ [sustainability]: https://sustainability.google/operating-sustainably/
433
+ [gemini-2-paper]: https://arxiv.org/abs/2312.11805