p-e-w commited on
Commit
e037e6e
·
verified ·
1 Parent(s): ebd630e

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +542 -176
README.md CHANGED
@@ -1,199 +1,565 @@
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: image-text-to-text
5
+ extra_gated_heading: Access Gemma on Hugging Face
6
+ extra_gated_prompt: To access Gemma on Hugging Face, you’re required to review and
7
+ agree to Google’s usage license. To do this, please ensure you’re logged in to Hugging
8
+ Face and click below. Requests are processed immediately.
9
+ extra_gated_button_content: Acknowledge license
10
+ base_model: google/gemma-3-12b-pt
11
+ tags:
12
+ - heretic
13
+ - uncensored
14
+ - decensored
15
+ - abliterated
16
  ---
17
+ # This is a decensored version of [google/gemma-3-12b-it](https://huggingface.co/google/gemma-3-12b-it), made using [Heretic](https://github.com/p-e-w/heretic) v1.0.0
18
 
19
+ ## Abliteration parameters
20
 
21
+ | Parameter | Value |
22
+ | :-------- | :---: |
23
+ | **direction_index** | per layer |
24
+ | **attn.o_proj.max_weight** | 1.48 |
25
+ | **attn.o_proj.max_weight_position** | 34.12 |
26
+ | **attn.o_proj.min_weight** | 0.94 |
27
+ | **attn.o_proj.min_weight_distance** | 19.48 |
28
+ | **mlp.down_proj.max_weight** | 0.81 |
29
+ | **mlp.down_proj.max_weight_position** | 35.83 |
30
+ | **mlp.down_proj.min_weight** | 0.52 |
31
+ | **mlp.down_proj.min_weight_distance** | 1.66 |
32
 
33
+ ## Performance
34
 
35
+ | Metric | This model | Original model ([google/gemma-3-12b-it](https://huggingface.co/google/gemma-3-12b-it)) |
36
+ | :----- | :--------: | :---------------------------: |
37
+ | **KL divergence** | 0.16 | 0 *(by definition)* |
38
+ | **Refusals** | 3/100 | 97/100 |
39
 
40
+ -----
41
 
 
42
 
43
+ # Gemma 3 model card
44
 
45
+ **Model Page**: [Gemma](https://ai.google.dev/gemma/docs/core)
46
 
47
+ **Resources and Technical Documentation**:
 
 
 
 
 
 
48
 
49
+ * [Gemma 3 Technical Report][g3-tech-report]
50
+ * [Responsible Generative AI Toolkit][rai-toolkit]
51
+ * [Gemma on Kaggle][kaggle-gemma]
52
+ * [Gemma on Vertex Model Garden][vertex-mg-gemma3]
53
 
54
+ **Terms of Use**: [Terms][terms]
55
 
56
+ **Authors**: Google DeepMind
 
 
57
 
58
+ ## Model Information
59
 
60
+ Summary description and brief definition of inputs and outputs.
61
 
62
+ ### Description
63
 
64
+ Gemma is a family of lightweight, state-of-the-art open models from Google,
65
+ built from the same research and technology used to create the Gemini models.
66
+ Gemma 3 models are multimodal, handling text and image input and generating text
67
+ output, with open weights for both pre-trained variants and instruction-tuned
68
+ variants. Gemma 3 has a large, 128K context window, multilingual support in over
69
+ 140 languages, and is available in more sizes than previous versions. Gemma 3
70
+ models are well-suited for a variety of text generation and image understanding
71
+ tasks, including question answering, summarization, and reasoning. Their
72
+ relatively small size makes it possible to deploy them in environments with
73
+ limited resources such as laptops, desktops or your own cloud infrastructure,
74
+ democratizing access to state of the art AI models and helping foster innovation
75
+ for everyone.
76
+
77
+ ### Inputs and outputs
78
+
79
+ - **Input:**
80
+ - Text string, such as a question, a prompt, or a document to be summarized
81
+ - Images, normalized to 896 x 896 resolution and encoded to 256 tokens
82
+ each
83
+ - Total input context of 128K tokens for the 4B, 12B, and 27B sizes, and
84
+ 32K tokens for the 1B size
85
+
86
+ - **Output:**
87
+ - Generated text in response to the input, such as an answer to a
88
+ question, analysis of image content, or a summary of a document
89
+ - Total output context of 8192 tokens
90
+
91
+ ### Usage
92
+
93
+ Below, there are some code snippets on how to get quickly started with running the model. First, install the Transformers library. Gemma 3 is supported starting from transformers 4.50.0.
94
 
95
+ ```sh
96
+ $ pip install -U transformers
97
+ ```
98
+
99
+ Then, copy the snippet from the section that is relevant for your use case.
100
+
101
+ #### Running with the `pipeline` API
102
+
103
+ You can initialize the model and processor for inference with `pipeline` as follows.
104
+
105
+ ```python
106
+ from transformers import pipeline
107
+ import torch
108
+
109
+ pipe = pipeline(
110
+ "image-text-to-text",
111
+ model="google/gemma-3-12b-it",
112
+ device="cuda",
113
+ torch_dtype=torch.bfloat16
114
+ )
115
+ ```
116
+
117
+ With instruction-tuned models, you need to use chat templates to process our inputs first. Then, you can pass it to the pipeline.
118
+
119
+ ```python
120
+ messages = [
121
+ {
122
+ "role": "system",
123
+ "content": [{"type": "text", "text": "You are a helpful assistant."}]
124
+ },
125
+ {
126
+ "role": "user",
127
+ "content": [
128
+ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"},
129
+ {"type": "text", "text": "What animal is on the candy?"}
130
+ ]
131
+ }
132
+ ]
133
+
134
+ output = pipe(text=messages, max_new_tokens=200)
135
+ print(output[0]["generated_text"][-1]["content"])
136
+ # Okay, let's take a look!
137
+ # Based on the image, the animal on the candy is a **turtle**.
138
+ # You can see the shell shape and the head and legs.
139
+ ```
140
+
141
+ #### Running the model on a single / multi GPU
142
+
143
+ ```python
144
+ # pip install accelerate
145
+
146
+ from transformers import AutoProcessor, Gemma3ForConditionalGeneration
147
+ from PIL import Image
148
+ import requests
149
+ import torch
150
+
151
+ model_id = "google/gemma-3-12b-it"
152
+
153
+ model = Gemma3ForConditionalGeneration.from_pretrained(
154
+ model_id, device_map="auto"
155
+ ).eval()
156
+
157
+ processor = AutoProcessor.from_pretrained(model_id)
158
+
159
+ messages = [
160
+ {
161
+ "role": "system",
162
+ "content": [{"type": "text", "text": "You are a helpful assistant."}]
163
+ },
164
+ {
165
+ "role": "user",
166
+ "content": [
167
+ {"type": "image", "image": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/bee.jpg"},
168
+ {"type": "text", "text": "Describe this image in detail."}
169
+ ]
170
+ }
171
+ ]
172
+
173
+ inputs = processor.apply_chat_template(
174
+ messages, add_generation_prompt=True, tokenize=True,
175
+ return_dict=True, return_tensors="pt"
176
+ ).to(model.device, dtype=torch.bfloat16)
177
+
178
+ input_len = inputs["input_ids"].shape[-1]
179
+
180
+ with torch.inference_mode():
181
+ generation = model.generate(**inputs, max_new_tokens=100, do_sample=False)
182
+ generation = generation[0][input_len:]
183
+
184
+ decoded = processor.decode(generation, skip_special_tokens=True)
185
+ print(decoded)
186
+
187
+ # **Overall Impression:** The image is a close-up shot of a vibrant garden scene,
188
+ # focusing on a cluster of pink cosmos flowers and a busy bumblebee.
189
+ # It has a slightly soft, natural feel, likely captured in daylight.
190
+ ```
191
+
192
+ ### Citation
193
+
194
+ ```none
195
+ @article{gemma_2025,
196
+ title={Gemma 3},
197
+ url={https://goo.gle/Gemma3Report},
198
+ publisher={Kaggle},
199
+ author={Gemma Team},
200
+ year={2025}
201
+ }
202
+ ```
203
+
204
+ ## Model Data
205
+
206
+ Data used for model training and how the data was processed.
207
+
208
+ ### Training Dataset
209
+
210
+ These models were trained on a dataset of text data that includes a wide variety
211
+ of sources. The 27B model was trained with 14 trillion tokens, the 12B model was
212
+ trained with 12 trillion tokens, 4B model was trained with 4 trillion tokens and
213
+ 1B with 2 trillion tokens. Here are the key components:
214
+
215
+ - Web Documents: A diverse collection of web text ensures the model is
216
+ exposed to a broad range of linguistic styles, topics, and vocabulary. The
217
+ training dataset includes content in over 140 languages.
218
+ - Code: Exposing the model to code helps it to learn the syntax and
219
+ patterns of programming languages, which improves its ability to generate
220
+ code and understand code-related questions.
221
+ - Mathematics: Training on mathematical text helps the model learn logical
222
+ reasoning, symbolic representation, and to address mathematical queries.
223
+ - Images: A wide range of images enables the model to perform image
224
+ analysis and visual data extraction tasks.
225
+
226
+ The combination of these diverse data sources is crucial for training a powerful
227
+ multimodal model that can handle a wide variety of different tasks and data
228
+ formats.
229
+
230
+ ### Data Preprocessing
231
+
232
+ Here are the key data cleaning and filtering methods applied to the training
233
+ data:
234
+
235
+ - CSAM Filtering: Rigorous CSAM (Child Sexual Abuse Material) filtering
236
+ was applied at multiple stages in the data preparation process to ensure
237
+ the exclusion of harmful and illegal content.
238
+ - Sensitive Data Filtering: As part of making Gemma pre-trained models
239
+ safe and reliable, automated techniques were used to filter out certain
240
+ personal information and other sensitive data from training sets.
241
+ - Additional methods: Filtering based on content quality and safety in
242
+ line with [our policies][safety-policies].
243
+
244
+ ## Implementation Information
245
+
246
+ Details about the model internals.
247
+
248
+ ### Hardware
249
+
250
+ Gemma was trained using [Tensor Processing Unit (TPU)][tpu] hardware (TPUv4p,
251
+ TPUv5p and TPUv5e). Training vision-language models (VLMS) requires significant
252
+ computational power. TPUs, designed specifically for matrix operations common in
253
+ machine learning, offer several advantages in this domain:
254
+
255
+ - Performance: TPUs are specifically designed to handle the massive
256
+ computations involved in training VLMs. They can speed up training
257
+ considerably compared to CPUs.
258
+ - Memory: TPUs often come with large amounts of high-bandwidth memory,
259
+ allowing for the handling of large models and batch sizes during training.
260
+ This can lead to better model quality.
261
+ - Scalability: TPU Pods (large clusters of TPUs) provide a scalable
262
+ solution for handling the growing complexity of large foundation models.
263
+ You can distribute training across multiple TPU devices for faster and more
264
+ efficient processing.
265
+ - Cost-effectiveness: In many scenarios, TPUs can provide a more
266
+ cost-effective solution for training large models compared to CPU-based
267
+ infrastructure, especially when considering the time and resources saved
268
+ due to faster training.
269
+ - These advantages are aligned with
270
+ [Google's commitments to operate sustainably][sustainability].
271
+
272
+ ### Software
273
+
274
+ Training was done using [JAX][jax] and [ML Pathways][ml-pathways].
275
+
276
+ JAX allows researchers to take advantage of the latest generation of hardware,
277
+ including TPUs, for faster and more efficient training of large models. ML
278
+ Pathways is Google's latest effort to build artificially intelligent systems
279
+ capable of generalizing across multiple tasks. This is specially suitable for
280
+ foundation models, including large language models like these ones.
281
+
282
+ Together, JAX and ML Pathways are used as described in the
283
+ [paper about the Gemini family of models][gemini-2-paper]; *"the 'single
284
+ controller' programming model of Jax and Pathways allows a single Python
285
+ process to orchestrate the entire training run, dramatically simplifying the
286
+ development workflow."*
287
 
288
  ## Evaluation
289
 
290
+ Model evaluation metrics and results.
291
+
292
+ ### Benchmark Results
293
+
294
+ These models were evaluated against a large collection of different datasets and
295
+ metrics to cover different aspects of text generation:
296
+
297
+ #### Reasoning and factuality
298
+
299
+ | Benchmark | Metric | Gemma 3 PT 1B | Gemma 3 PT 4B | Gemma 3 PT 12B | Gemma 3 PT 27B |
300
+ | ------------------------------ |----------------|:--------------:|:-------------:|:--------------:|:--------------:|
301
+ | [HellaSwag][hellaswag] | 10-shot | 62.3 | 77.2 | 84.2 | 85.6 |
302
+ | [BoolQ][boolq] | 0-shot | 63.2 | 72.3 | 78.8 | 82.4 |
303
+ | [PIQA][piqa] | 0-shot | 73.8 | 79.6 | 81.8 | 83.3 |
304
+ | [SocialIQA][socialiqa] | 0-shot | 48.9 | 51.9 | 53.4 | 54.9 |
305
+ | [TriviaQA][triviaqa] | 5-shot | 39.8 | 65.8 | 78.2 | 85.5 |
306
+ | [Natural Questions][naturalq] | 5-shot | 9.48 | 20.0 | 31.4 | 36.1 |
307
+ | [ARC-c][arc] | 25-shot | 38.4 | 56.2 | 68.9 | 70.6 |
308
+ | [ARC-e][arc] | 0-shot | 73.0 | 82.4 | 88.3 | 89.0 |
309
+ | [WinoGrande][winogrande] | 5-shot | 58.2 | 64.7 | 74.3 | 78.8 |
310
+ | [BIG-Bench Hard][bbh] | few-shot | 28.4 | 50.9 | 72.6 | 77.7 |
311
+ | [DROP][drop] | 1-shot | 42.4 | 60.1 | 72.2 | 77.2 |
312
+
313
+ [hellaswag]: https://arxiv.org/abs/1905.07830
314
+ [boolq]: https://arxiv.org/abs/1905.10044
315
+ [piqa]: https://arxiv.org/abs/1911.11641
316
+ [socialiqa]: https://arxiv.org/abs/1904.09728
317
+ [triviaqa]: https://arxiv.org/abs/1705.03551
318
+ [naturalq]: https://github.com/google-research-datasets/natural-questions
319
+ [arc]: https://arxiv.org/abs/1911.01547
320
+ [winogrande]: https://arxiv.org/abs/1907.10641
321
+ [bbh]: https://paperswithcode.com/dataset/bbh
322
+ [drop]: https://arxiv.org/abs/1903.00161
323
+
324
+ #### STEM and code
325
+
326
+ | Benchmark | Metric | Gemma 3 PT 4B | Gemma 3 PT 12B | Gemma 3 PT 27B |
327
+ | ------------------------------ |----------------|:-------------:|:--------------:|:--------------:|
328
+ | [MMLU][mmlu] | 5-shot | 59.6 | 74.5 | 78.6 |
329
+ | [MMLU][mmlu] (Pro COT) | 5-shot | 29.2 | 45.3 | 52.2 |
330
+ | [AGIEval][agieval] | 3-5-shot | 42.1 | 57.4 | 66.2 |
331
+ | [MATH][math] | 4-shot | 24.2 | 43.3 | 50.0 |
332
+ | [GSM8K][gsm8k] | 8-shot | 38.4 | 71.0 | 82.6 |
333
+ | [GPQA][gpqa] | 5-shot | 15.0 | 25.4 | 24.3 |
334
+ | [MBPP][mbpp] | 3-shot | 46.0 | 60.4 | 65.6 |
335
+ | [HumanEval][humaneval] | 0-shot | 36.0 | 45.7 | 48.8 |
336
+
337
+ [mmlu]: https://arxiv.org/abs/2009.03300
338
+ [agieval]: https://arxiv.org/abs/2304.06364
339
+ [math]: https://arxiv.org/abs/2103.03874
340
+ [gsm8k]: https://arxiv.org/abs/2110.14168
341
+ [gpqa]: https://arxiv.org/abs/2311.12022
342
+ [mbpp]: https://arxiv.org/abs/2108.07732
343
+ [humaneval]: https://arxiv.org/abs/2107.03374
344
+
345
+ #### Multilingual
346
+
347
+ | Benchmark | Gemma 3 PT 1B | Gemma 3 PT 4B | Gemma 3 PT 12B | Gemma 3 PT 27B |
348
+ | ------------------------------------ |:-------------:|:-------------:|:--------------:|:--------------:|
349
+ | [MGSM][mgsm] | 2.04 | 34.7 | 64.3 | 74.3 |
350
+ | [Global-MMLU-Lite][global-mmlu-lite] | 24.9 | 57.0 | 69.4 | 75.7 |
351
+ | [WMT24++][wmt24pp] (ChrF) | 36.7 | 48.4 | 53.9 | 55.7 |
352
+ | [FloRes][flores] | 29.5 | 39.2 | 46.0 | 48.8 |
353
+ | [XQuAD][xquad] (all) | 43.9 | 68.0 | 74.5 | 76.8 |
354
+ | [ECLeKTic][eclektic] | 4.69 | 11.0 | 17.2 | 24.4 |
355
+ | [IndicGenBench][indicgenbench] | 41.4 | 57.2 | 61.7 | 63.4 |
356
+
357
+ [mgsm]: https://arxiv.org/abs/2210.03057
358
+ [flores]: https://arxiv.org/abs/2106.03193
359
+ [xquad]: https://arxiv.org/abs/1910.11856v3
360
+ [global-mmlu-lite]: https://huggingface.co/datasets/CohereForAI/Global-MMLU-Lite
361
+ [wmt24pp]: https://arxiv.org/abs/2502.12404v1
362
+ [eclektic]: https://arxiv.org/abs/2502.21228
363
+ [indicgenbench]: https://arxiv.org/abs/2404.16816
364
+
365
+ #### Multimodal
366
+
367
+ | Benchmark | Gemma 3 PT 4B | Gemma 3 PT 12B | Gemma 3 PT 27B |
368
+ | ------------------------------ |:-------------:|:--------------:|:--------------:|
369
+ | [COCOcap][coco-cap] | 102 | 111 | 116 |
370
+ | [DocVQA][docvqa] (val) | 72.8 | 82.3 | 85.6 |
371
+ | [InfoVQA][info-vqa] (val) | 44.1 | 54.8 | 59.4 |
372
+ | [MMMU][mmmu] (pt) | 39.2 | 50.3 | 56.1 |
373
+ | [TextVQA][textvqa] (val) | 58.9 | 66.5 | 68.6 |
374
+ | [RealWorldQA][realworldqa] | 45.5 | 52.2 | 53.9 |
375
+ | [ReMI][remi] | 27.3 | 38.5 | 44.8 |
376
+ | [AI2D][ai2d] | 63.2 | 75.2 | 79.0 |
377
+ | [ChartQA][chartqa] | 63.6 | 74.7 | 76.3 |
378
+ | [VQAv2][vqav2] | 63.9 | 71.2 | 72.9 |
379
+ | [BLINK][blinkvqa] | 38.0 | 35.9 | 39.6 |
380
+ | [OKVQA][okvqa] | 51.0 | 58.7 | 60.2 |
381
+ | [TallyQA][tallyqa] | 42.5 | 51.8 | 54.3 |
382
+ | [SpatialSense VQA][ss-vqa] | 50.9 | 60.0 | 59.4 |
383
+ | [CountBenchQA][countbenchqa] | 26.1 | 17.8 | 68.0 |
384
+
385
+ [coco-cap]: https://cocodataset.org/#home
386
+ [docvqa]: https://www.docvqa.org/
387
+ [info-vqa]: https://arxiv.org/abs/2104.12756
388
+ [mmmu]: https://arxiv.org/abs/2311.16502
389
+ [textvqa]: https://textvqa.org/
390
+ [realworldqa]: https://paperswithcode.com/dataset/realworldqa
391
+ [remi]: https://arxiv.org/html/2406.09175v1
392
+ [ai2d]: https://allenai.org/data/diagrams
393
+ [chartqa]: https://arxiv.org/abs/2203.10244
394
+ [vqav2]: https://visualqa.org/index.html
395
+ [blinkvqa]: https://arxiv.org/abs/2404.12390
396
+ [okvqa]: https://okvqa.allenai.org/
397
+ [tallyqa]: https://arxiv.org/abs/1810.12440
398
+ [ss-vqa]: https://arxiv.org/abs/1908.02660
399
+ [countbenchqa]: https://github.com/google-research/big_vision/blob/main/big_vision/datasets/countbenchqa/
400
+
401
+ ## Ethics and Safety
402
+
403
+ Ethics and safety evaluation approach and results.
404
+
405
+ ### Evaluation Approach
406
+
407
+ Our evaluation methods include structured evaluations and internal red-teaming
408
+ testing of relevant content policies. Red-teaming was conducted by a number of
409
+ different teams, each with different goals and human evaluation metrics. These
410
+ models were evaluated against a number of different categories relevant to
411
+ ethics and safety, including:
412
+
413
+ - **Child Safety**: Evaluation of text-to-text and image to text prompts
414
+ covering child safety policies, including child sexual abuse and
415
+ exploitation.
416
+ - **Content Safety:** Evaluation of text-to-text and image to text prompts
417
+ covering safety policies including, harassment, violence and gore, and hate
418
+ speech.
419
+ - **Representational Harms**: Evaluation of text-to-text and image to text
420
+ prompts covering safety policies including bias, stereotyping, and harmful
421
+ associations or inaccuracies.
422
+
423
+ In addition to development level evaluations, we conduct "assurance
424
+ evaluations" which are our 'arms-length' internal evaluations for responsibility
425
+ governance decision making. They are conducted separately from the model
426
+ development team, to inform decision making about release. High level findings
427
+ are fed back to the model team, but prompt sets are held-out to prevent
428
+ overfitting and preserve the results' ability to inform decision making.
429
+ Assurance evaluation results are reported to our Responsibility & Safety Council
430
+ as part of release review.
431
+
432
+ ### Evaluation Results
433
+
434
+ For all areas of safety testing, we saw major improvements in the categories of
435
+ child safety, content safety, and representational harms relative to previous
436
+ Gemma models. All testing was conducted without safety filters to evaluate the
437
+ model capabilities and behaviors. For both text-to-text and image-to-text, and
438
+ across all model sizes, the model produced minimal policy violations, and showed
439
+ significant improvements over previous Gemma models' performance with respect
440
+ to ungrounded inferences. A limitation of our evaluations was they included only
441
+ English language prompts.
442
+
443
+ ## Usage and Limitations
444
+
445
+ These models have certain limitations that users should be aware of.
446
+
447
+ ### Intended Usage
448
+
449
+ Open vision-language models (VLMs) models have a wide range of applications
450
+ across various industries and domains. The following list of potential uses is
451
+ not comprehensive. The purpose of this list is to provide contextual information
452
+ about the possible use-cases that the model creators considered as part of model
453
+ training and development.
454
+
455
+ - Content Creation and Communication
456
+ - Text Generation: These models can be used to generate creative text
457
+ formats such as poems, scripts, code, marketing copy, and email drafts.
458
+ - Chatbots and Conversational AI: Power conversational interfaces
459
+ for customer service, virtual assistants, or interactive applications.
460
+ - Text Summarization: Generate concise summaries of a text corpus,
461
+ research papers, or reports.
462
+ - Image Data Extraction: These models can be used to extract,
463
+ interpret, and summarize visual data for text communications.
464
+ - Research and Education
465
+ - Natural Language Processing (NLP) and VLM Research: These
466
+ models can serve as a foundation for researchers to experiment with VLM
467
+ and NLP techniques, develop algorithms, and contribute to the
468
+ advancement of the field.
469
+ - Language Learning Tools: Support interactive language learning
470
+ experiences, aiding in grammar correction or providing writing practice.
471
+ - Knowledge Exploration: Assist researchers in exploring large
472
+ bodies of text by generating summaries or answering questions about
473
+ specific topics.
474
+
475
+ ### Limitations
476
+
477
+ - Training Data
478
+ - The quality and diversity of the training data significantly
479
+ influence the model's capabilities. Biases or gaps in the training data
480
+ can lead to limitations in the model's responses.
481
+ - The scope of the training dataset determines the subject areas
482
+ the model can handle effectively.
483
+ - Context and Task Complexity
484
+ - Models are better at tasks that can be framed with clear
485
+ prompts and instructions. Open-ended or highly complex tasks might be
486
+ challenging.
487
+ - A model's performance can be influenced by the amount of context
488
+ provided (longer context generally leads to better outputs, up to a
489
+ certain point).
490
+ - Language Ambiguity and Nuance
491
+ - Natural language is inherently complex. Models might struggle
492
+ to grasp subtle nuances, sarcasm, or figurative language.
493
+ - Factual Accuracy
494
+ - Models generate responses based on information they learned
495
+ from their training datasets, but they are not knowledge bases. They
496
+ may generate incorrect or outdated factual statements.
497
+ - Common Sense
498
+ - Models rely on statistical patterns in language. They might
499
+ lack the ability to apply common sense reasoning in certain situations.
500
+
501
+ ### Ethical Considerations and Risks
502
+
503
+ The development of vision-language models (VLMs) raises several ethical
504
+ concerns. In creating an open model, we have carefully considered the following:
505
+
506
+ - Bias and Fairness
507
+ - VLMs trained on large-scale, real-world text and image data can
508
+ reflect socio-cultural biases embedded in the training material. These
509
+ models underwent careful scrutiny, input data pre-processing described
510
+ and posterior evaluations reported in this card.
511
+ - Misinformation and Misuse
512
+ - VLMs can be misused to generate text that is false, misleading,
513
+ or harmful.
514
+ - Guidelines are provided for responsible use with the model, see the
515
+ [Responsible Generative AI Toolkit][rai-toolkit].
516
+ - Transparency and Accountability:
517
+ - This model card summarizes details on the models' architecture,
518
+ capabilities, limitations, and evaluation processes.
519
+ - A responsibly developed open model offers the opportunity to
520
+ share innovation by making VLM technology accessible to developers and
521
+ researchers across the AI ecosystem.
522
+
523
+ Risks identified and mitigations:
524
+
525
+ - **Perpetuation of biases**: It's encouraged to perform continuous
526
+ monitoring (using evaluation metrics, human review) and the exploration of
527
+ de-biasing techniques during model training, fine-tuning, and other use
528
+ cases.
529
+ - **Generation of harmful content**: Mechanisms and guidelines for content
530
+ safety are essential. Developers are encouraged to exercise caution and
531
+ implement appropriate content safety safeguards based on their specific
532
+ product policies and application use cases.
533
+ - **Misuse for malicious purposes**: Technical limitations and developer
534
+ and end-user education can help mitigate against malicious applications of
535
+ VLMs. Educational resources and reporting mechanisms for users to flag
536
+ misuse are provided. Prohibited uses of Gemma models are outlined in the
537
+ [Gemma Prohibited Use Policy][prohibited-use].
538
+ - **Privacy violations**: Models were trained on data filtered for removal
539
+ of certain personal information and other sensitive data. Developers are
540
+ encouraged to adhere to privacy regulations with privacy-preserving
541
+ techniques.
542
+
543
+ ### Benefits
544
+
545
+ At the time of release, this family of models provides high-performance open
546
+ vision-language model implementations designed from the ground up for
547
+ responsible AI development compared to similarly sized models.
548
+
549
+ Using the benchmark evaluation metrics described in this document, these models
550
+ have shown to provide superior performance to other, comparably-sized open model
551
+ alternatives.
552
+
553
+ [g3-tech-report]: https://goo.gle/Gemma3Report
554
+ [rai-toolkit]: https://ai.google.dev/responsible
555
+ [kaggle-gemma]: https://www.kaggle.com/models/google/gemma-3
556
+ [vertex-mg-gemma3]: https://console.cloud.google.com/vertex-ai/publishers/google/model-garden/gemma3
557
+ [terms]: https://ai.google.dev/gemma/terms
558
+ [safety-policies]: https://ai.google/static/documents/ai-responsibility-update-published-february-2025.pdf
559
+ [prohibited-use]: https://ai.google.dev/gemma/prohibited_use_policy
560
+ [tpu]: https://cloud.google.com/tpu/docs/intro-to-tpu
561
+ [sustainability]: https://sustainability.google/operating-sustainably/
562
+ [jax]: https://github.com/jax-ml/jax
563
+ [ml-pathways]: https://blog.google/technology/ai/introducing-pathways-next-generation-ai-architecture/
564
+ [sustainability]: https://sustainability.google/operating-sustainably/
565
+ [gemini-2-paper]: https://arxiv.org/abs/2312.11805