coder3101 commited on
Commit
e13b889
·
verified ·
1 Parent(s): f32849d

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +537 -170
README.md CHANGED
@@ -1,199 +1,566 @@
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-4b-pt
11
+ tags:
12
+ - heretic
13
+ - uncensored
14
+ - decensored
15
+ - abliterated
16
  ---
17
+ # This is a decensored version of [google/gemma-3-4b-it](https://huggingface.co/google/gemma-3-4b-it), made using [Heretic](https://github.com/p-e-w/heretic) v1.0.1
18
 
19
+ ## Abliteration parameters
20
 
21
+ | Parameter | Value |
22
+ | :-------- | :---: |
23
+ | **direction_index** | 16.63 |
24
+ | **attn.o_proj.max_weight** | 1.42 |
25
+ | **attn.o_proj.max_weight_position** | 23.45 |
26
+ | **attn.o_proj.min_weight** | 0.87 |
27
+ | **attn.o_proj.min_weight_distance** | 13.23 |
28
+ | **mlp.down_proj.max_weight** | 1.11 |
29
+ | **mlp.down_proj.max_weight_position** | 24.80 |
30
+ | **mlp.down_proj.min_weight** | 0.94 |
31
+ | **mlp.down_proj.min_weight_distance** | 5.39 |
32
 
33
+ ## Performance
34
 
35
+ | Metric | This model | Original model ([google/gemma-3-4b-it](https://huggingface.co/google/gemma-3-4b-it)) |
36
+ | :----- | :--------: | :---------------------------: |
37
+ | **KL divergence** | 0.26 | 0 *(by definition)* |
38
+ | **Refusals** | 1/100 | 98/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-4b-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-4b-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
+
193
+ ### Citation
194
+
195
+ ```none
196
+ @article{gemma_2025,
197
+ title={Gemma 3},
198
+ url={https://goo.gle/Gemma3Report},
199
+ publisher={Kaggle},
200
+ author={Gemma Team},
201
+ year={2025}
202
+ }
203
+ ```
204
+
205
+ ## Model Data
206
+
207
+ Data used for model training and how the data was processed.
208
+
209
+ ### Training Dataset
210
+
211
+ These models were trained on a dataset of text data that includes a wide variety
212
+ of sources. The 27B model was trained with 14 trillion tokens, the 12B model was
213
+ trained with 12 trillion tokens, 4B model was trained with 4 trillion tokens and
214
+ 1B with 2 trillion tokens. Here are the key components:
215
+
216
+ - Web Documents: A diverse collection of web text ensures the model is
217
+ exposed to a broad range of linguistic styles, topics, and vocabulary. The
218
+ training dataset includes content in over 140 languages.
219
+ - Code: Exposing the model to code helps it to learn the syntax and
220
+ patterns of programming languages, which improves its ability to generate
221
+ code and understand code-related questions.
222
+ - Mathematics: Training on mathematical text helps the model learn logical
223
+ reasoning, symbolic representation, and to address mathematical queries.
224
+ - Images: A wide range of images enables the model to perform image
225
+ analysis and visual data extraction tasks.
226
+
227
+ The combination of these diverse data sources is crucial for training a powerful
228
+ multimodal model that can handle a wide variety of different tasks and data
229
+ formats.
230
+
231
+ ### Data Preprocessing
232
+
233
+ Here are the key data cleaning and filtering methods applied to the training
234
+ data:
235
+
236
+ - CSAM Filtering: Rigorous CSAM (Child Sexual Abuse Material) filtering
237
+ was applied at multiple stages in the data preparation process to ensure
238
+ the exclusion of harmful and illegal content.
239
+ - Sensitive Data Filtering: As part of making Gemma pre-trained models
240
+ safe and reliable, automated techniques were used to filter out certain
241
+ personal information and other sensitive data from training sets.
242
+ - Additional methods: Filtering based on content quality and safety in
243
+ line with [our policies][safety-policies].
244
+
245
+ ## Implementation Information
246
+
247
+ Details about the model internals.
248
+
249
+ ### Hardware
250
+
251
+ Gemma was trained using [Tensor Processing Unit (TPU)][tpu] hardware (TPUv4p,
252
+ TPUv5p and TPUv5e). Training vision-language models (VLMS) requires significant
253
+ computational power. TPUs, designed specifically for matrix operations common in
254
+ machine learning, offer several advantages in this domain:
255
+
256
+ - Performance: TPUs are specifically designed to handle the massive
257
+ computations involved in training VLMs. They can speed up training
258
+ considerably compared to CPUs.
259
+ - Memory: TPUs often come with large amounts of high-bandwidth memory,
260
+ allowing for the handling of large models and batch sizes during training.
261
+ This can lead to better model quality.
262
+ - Scalability: TPU Pods (large clusters of TPUs) provide a scalable
263
+ solution for handling the growing complexity of large foundation models.
264
+ You can distribute training across multiple TPU devices for faster and more
265
+ efficient processing.
266
+ - Cost-effectiveness: In many scenarios, TPUs can provide a more
267
+ cost-effective solution for training large models compared to CPU-based
268
+ infrastructure, especially when considering the time and resources saved
269
+ due to faster training.
270
+ - These advantages are aligned with
271
+ [Google's commitments to operate sustainably][sustainability].
272
+
273
+ ### Software
274
+
275
+ Training was done using [JAX][jax] and [ML Pathways][ml-pathways].
276
+
277
+ JAX allows researchers to take advantage of the latest generation of hardware,
278
+ including TPUs, for faster and more efficient training of large models. ML
279
+ Pathways is Google's latest effort to build artificially intelligent systems
280
+ capable of generalizing across multiple tasks. This is specially suitable for
281
+ foundation models, including large language models like these ones.
282
+
283
+ Together, JAX and ML Pathways are used as described in the
284
+ [paper about the Gemini family of models][gemini-2-paper]; *"the 'single
285
+ controller' programming model of Jax and Pathways allows a single Python
286
+ process to orchestrate the entire training run, dramatically simplifying the
287
+ development workflow."*
288
 
289
  ## Evaluation
290
 
291
+ Model evaluation metrics and results.
292
+
293
+ ### Benchmark Results
294
+
295
+ These models were evaluated against a large collection of different datasets and
296
+ metrics to cover different aspects of text generation:
297
+
298
+ #### Reasoning and factuality
299
+
300
+ | Benchmark | Metric | Gemma 3 PT 1B | Gemma 3 PT 4B | Gemma 3 PT 12B | Gemma 3 PT 27B |
301
+ | ------------------------------ |----------------|:--------------:|:-------------:|:--------------:|:--------------:|
302
+ | [HellaSwag][hellaswag] | 10-shot | 62.3 | 77.2 | 84.2 | 85.6 |
303
+ | [BoolQ][boolq] | 0-shot | 63.2 | 72.3 | 78.8 | 82.4 |
304
+ | [PIQA][piqa] | 0-shot | 73.8 | 79.6 | 81.8 | 83.3 |
305
+ | [SocialIQA][socialiqa] | 0-shot | 48.9 | 51.9 | 53.4 | 54.9 |
306
+ | [TriviaQA][triviaqa] | 5-shot | 39.8 | 65.8 | 78.2 | 85.5 |
307
+ | [Natural Questions][naturalq] | 5-shot | 9.48 | 20.0 | 31.4 | 36.1 |
308
+ | [ARC-c][arc] | 25-shot | 38.4 | 56.2 | 68.9 | 70.6 |
309
+ | [ARC-e][arc] | 0-shot | 73.0 | 82.4 | 88.3 | 89.0 |
310
+ | [WinoGrande][winogrande] | 5-shot | 58.2 | 64.7 | 74.3 | 78.8 |
311
+ | [BIG-Bench Hard][bbh] | few-shot | 28.4 | 50.9 | 72.6 | 77.7 |
312
+ | [DROP][drop] | 1-shot | 42.4 | 60.1 | 72.2 | 77.2 |
313
+
314
+ [hellaswag]: https://arxiv.org/abs/1905.07830
315
+ [boolq]: https://arxiv.org/abs/1905.10044
316
+ [piqa]: https://arxiv.org/abs/1911.11641
317
+ [socialiqa]: https://arxiv.org/abs/1904.09728
318
+ [triviaqa]: https://arxiv.org/abs/1705.03551
319
+ [naturalq]: https://github.com/google-research-datasets/natural-questions
320
+ [arc]: https://arxiv.org/abs/1911.01547
321
+ [winogrande]: https://arxiv.org/abs/1907.10641
322
+ [bbh]: https://paperswithcode.com/dataset/bbh
323
+ [drop]: https://arxiv.org/abs/1903.00161
324
+
325
+ #### STEM and code
326
+
327
+ | Benchmark | Metric | Gemma 3 PT 4B | Gemma 3 PT 12B | Gemma 3 PT 27B |
328
+ | ------------------------------ |----------------|:-------------:|:--------------:|:--------------:|
329
+ | [MMLU][mmlu] | 5-shot | 59.6 | 74.5 | 78.6 |
330
+ | [MMLU][mmlu] (Pro COT) | 5-shot | 29.2 | 45.3 | 52.2 |
331
+ | [AGIEval][agieval] | 3-5-shot | 42.1 | 57.4 | 66.2 |
332
+ | [MATH][math] | 4-shot | 24.2 | 43.3 | 50.0 |
333
+ | [GSM8K][gsm8k] | 8-shot | 38.4 | 71.0 | 82.6 |
334
+ | [GPQA][gpqa] | 5-shot | 15.0 | 25.4 | 24.3 |
335
+ | [MBPP][mbpp] | 3-shot | 46.0 | 60.4 | 65.6 |
336
+ | [HumanEval][humaneval] | 0-shot | 36.0 | 45.7 | 48.8 |
337
+
338
+ [mmlu]: https://arxiv.org/abs/2009.03300
339
+ [agieval]: https://arxiv.org/abs/2304.06364
340
+ [math]: https://arxiv.org/abs/2103.03874
341
+ [gsm8k]: https://arxiv.org/abs/2110.14168
342
+ [gpqa]: https://arxiv.org/abs/2311.12022
343
+ [mbpp]: https://arxiv.org/abs/2108.07732
344
+ [humaneval]: https://arxiv.org/abs/2107.03374
345
+
346
+ #### Multilingual
347
+
348
+ | Benchmark | Gemma 3 PT 1B | Gemma 3 PT 4B | Gemma 3 PT 12B | Gemma 3 PT 27B |
349
+ | ------------------------------------ |:-------------:|:-------------:|:--------------:|:--------------:|
350
+ | [MGSM][mgsm] | 2.04 | 34.7 | 64.3 | 74.3 |
351
+ | [Global-MMLU-Lite][global-mmlu-lite] | 24.9 | 57.0 | 69.4 | 75.7 |
352
+ | [WMT24++][wmt24pp] (ChrF) | 36.7 | 48.4 | 53.9 | 55.7 |
353
+ | [FloRes][flores] | 29.5 | 39.2 | 46.0 | 48.8 |
354
+ | [XQuAD][xquad] (all) | 43.9 | 68.0 | 74.5 | 76.8 |
355
+ | [ECLeKTic][eclektic] | 4.69 | 11.0 | 17.2 | 24.4 |
356
+ | [IndicGenBench][indicgenbench] | 41.4 | 57.2 | 61.7 | 63.4 |
357
+
358
+ [mgsm]: https://arxiv.org/abs/2210.03057
359
+ [flores]: https://arxiv.org/abs/2106.03193
360
+ [xquad]: https://arxiv.org/abs/1910.11856v3
361
+ [global-mmlu-lite]: https://huggingface.co/datasets/CohereForAI/Global-MMLU-Lite
362
+ [wmt24pp]: https://arxiv.org/abs/2502.12404v1
363
+ [eclektic]: https://arxiv.org/abs/2502.21228
364
+ [indicgenbench]: https://arxiv.org/abs/2404.16816
365
+
366
+ #### Multimodal
367
+
368
+ | Benchmark | Gemma 3 PT 4B | Gemma 3 PT 12B | Gemma 3 PT 27B |
369
+ | ------------------------------ |:-------------:|:--------------:|:--------------:|
370
+ | [COCOcap][coco-cap] | 102 | 111 | 116 |
371
+ | [DocVQA][docvqa] (val) | 72.8 | 82.3 | 85.6 |
372
+ | [InfoVQA][info-vqa] (val) | 44.1 | 54.8 | 59.4 |
373
+ | [MMMU][mmmu] (pt) | 39.2 | 50.3 | 56.1 |
374
+ | [TextVQA][textvqa] (val) | 58.9 | 66.5 | 68.6 |
375
+ | [RealWorldQA][realworldqa] | 45.5 | 52.2 | 53.9 |
376
+ | [ReMI][remi] | 27.3 | 38.5 | 44.8 |
377
+ | [AI2D][ai2d] | 63.2 | 75.2 | 79.0 |
378
+ | [ChartQA][chartqa] | 63.6 | 74.7 | 76.3 |
379
+ | [VQAv2][vqav2] | 63.9 | 71.2 | 72.9 |
380
+ | [BLINK][blinkvqa] | 38.0 | 35.9 | 39.6 |
381
+ | [OKVQA][okvqa] | 51.0 | 58.7 | 60.2 |
382
+ | [TallyQA][tallyqa] | 42.5 | 51.8 | 54.3 |
383
+ | [SpatialSense VQA][ss-vqa] | 50.9 | 60.0 | 59.4 |
384
+ | [CountBenchQA][countbenchqa] | 26.1 | 17.8 | 68.0 |
385
+
386
+ [coco-cap]: https://cocodataset.org/#home
387
+ [docvqa]: https://www.docvqa.org/
388
+ [info-vqa]: https://arxiv.org/abs/2104.12756
389
+ [mmmu]: https://arxiv.org/abs/2311.16502
390
+ [textvqa]: https://textvqa.org/
391
+ [realworldqa]: https://paperswithcode.com/dataset/realworldqa
392
+ [remi]: https://arxiv.org/html/2406.09175v1
393
+ [ai2d]: https://allenai.org/data/diagrams
394
+ [chartqa]: https://arxiv.org/abs/2203.10244
395
+ [vqav2]: https://visualqa.org/index.html
396
+ [blinkvqa]: https://arxiv.org/abs/2404.12390
397
+ [okvqa]: https://okvqa.allenai.org/
398
+ [tallyqa]: https://arxiv.org/abs/1810.12440
399
+ [ss-vqa]: https://arxiv.org/abs/1908.02660
400
+ [countbenchqa]: https://github.com/google-research/big_vision/blob/main/big_vision/datasets/countbenchqa/
401
+
402
+ ## Ethics and Safety
403
+
404
+ Ethics and safety evaluation approach and results.
405
+
406
+ ### Evaluation Approach
407
+
408
+ Our evaluation methods include structured evaluations and internal red-teaming
409
+ testing of relevant content policies. Red-teaming was conducted by a number of
410
+ different teams, each with different goals and human evaluation metrics. These
411
+ models were evaluated against a number of different categories relevant to
412
+ ethics and safety, including:
413
+
414
+ - **Child Safety**: Evaluation of text-to-text and image to text prompts
415
+ covering child safety policies, including child sexual abuse and
416
+ exploitation.
417
+ - **Content Safety:** Evaluation of text-to-text and image to text prompts
418
+ covering safety policies including, harassment, violence and gore, and hate
419
+ speech.
420
+ - **Representational Harms**: Evaluation of text-to-text and image to text
421
+ prompts covering safety policies including bias, stereotyping, and harmful
422
+ associations or inaccuracies.
423
+
424
+ In addition to development level evaluations, we conduct "assurance
425
+ evaluations" which are our 'arms-length' internal evaluations for responsibility
426
+ governance decision making. They are conducted separately from the model
427
+ development team, to inform decision making about release. High level findings
428
+ are fed back to the model team, but prompt sets are held-out to prevent
429
+ overfitting and preserve the results' ability to inform decision making.
430
+ Assurance evaluation results are reported to our Responsibility & Safety Council
431
+ as part of release review.
432
+
433
+ ### Evaluation Results
434
+
435
+ For all areas of safety testing, we saw major improvements in the categories of
436
+ child safety, content safety, and representational harms relative to previous
437
+ Gemma models. All testing was conducted without safety filters to evaluate the
438
+ model capabilities and behaviors. For both text-to-text and image-to-text, and
439
+ across all model sizes, the model produced minimal policy violations, and showed
440
+ significant improvements over previous Gemma models' performance with respect
441
+ to ungrounded inferences. A limitation of our evaluations was they included only
442
+ English language prompts.
443
+
444
+ ## Usage and Limitations
445
+
446
+ These models have certain limitations that users should be aware of.
447
+
448
+ ### Intended Usage
449
+
450
+ Open vision-language models (VLMs) models have a wide range of applications
451
+ across various industries and domains. The following list of potential uses is
452
+ not comprehensive. The purpose of this list is to provide contextual information
453
+ about the possible use-cases that the model creators considered as part of model
454
+ training and development.
455
+
456
+ - Content Creation and Communication
457
+ - Text Generation: These models can be used to generate creative text
458
+ formats such as poems, scripts, code, marketing copy, and email drafts.
459
+ - Chatbots and Conversational AI: Power conversational interfaces
460
+ for customer service, virtual assistants, or interactive applications.
461
+ - Text Summarization: Generate concise summaries of a text corpus,
462
+ research papers, or reports.
463
+ - Image Data Extraction: These models can be used to extract,
464
+ interpret, and summarize visual data for text communications.
465
+ - Research and Education
466
+ - Natural Language Processing (NLP) and VLM Research: These
467
+ models can serve as a foundation for researchers to experiment with VLM
468
+ and NLP techniques, develop algorithms, and contribute to the
469
+ advancement of the field.
470
+ - Language Learning Tools: Support interactive language learning
471
+ experiences, aiding in grammar correction or providing writing practice.
472
+ - Knowledge Exploration: Assist researchers in exploring large
473
+ bodies of text by generating summaries or answering questions about
474
+ specific topics.
475
+
476
+ ### Limitations
477
+
478
+ - Training Data
479
+ - The quality and diversity of the training data significantly
480
+ influence the model's capabilities. Biases or gaps in the training data
481
+ can lead to limitations in the model's responses.
482
+ - The scope of the training dataset determines the subject areas
483
+ the model can handle effectively.
484
+ - Context and Task Complexity
485
+ - Models are better at tasks that can be framed with clear
486
+ prompts and instructions. Open-ended or highly complex tasks might be
487
+ challenging.
488
+ - A model's performance can be influenced by the amount of context
489
+ provided (longer context generally leads to better outputs, up to a
490
+ certain point).
491
+ - Language Ambiguity and Nuance
492
+ - Natural language is inherently complex. Models might struggle
493
+ to grasp subtle nuances, sarcasm, or figurative language.
494
+ - Factual Accuracy
495
+ - Models generate responses based on information they learned
496
+ from their training datasets, but they are not knowledge bases. They
497
+ may generate incorrect or outdated factual statements.
498
+ - Common Sense
499
+ - Models rely on statistical patterns in language. They might
500
+ lack the ability to apply common sense reasoning in certain situations.
501
+
502
+ ### Ethical Considerations and Risks
503
+
504
+ The development of vision-language models (VLMs) raises several ethical
505
+ concerns. In creating an open model, we have carefully considered the following:
506
+
507
+ - Bias and Fairness
508
+ - VLMs trained on large-scale, real-world text and image data can
509
+ reflect socio-cultural biases embedded in the training material. These
510
+ models underwent careful scrutiny, input data pre-processing described
511
+ and posterior evaluations reported in this card.
512
+ - Misinformation and Misuse
513
+ - VLMs can be misused to generate text that is false, misleading,
514
+ or harmful.
515
+ - Guidelines are provided for responsible use with the model, see the
516
+ [Responsible Generative AI Toolkit][rai-toolkit].
517
+ - Transparency and Accountability:
518
+ - This model card summarizes details on the models' architecture,
519
+ capabilities, limitations, and evaluation processes.
520
+ - A responsibly developed open model offers the opportunity to
521
+ share innovation by making VLM technology accessible to developers and
522
+ researchers across the AI ecosystem.
523
+
524
+ Risks identified and mitigations:
525
+
526
+ - **Perpetuation of biases**: It's encouraged to perform continuous
527
+ monitoring (using evaluation metrics, human review) and the exploration of
528
+ de-biasing techniques during model training, fine-tuning, and other use
529
+ cases.
530
+ - **Generation of harmful content**: Mechanisms and guidelines for content
531
+ safety are essential. Developers are encouraged to exercise caution and
532
+ implement appropriate content safety safeguards based on their specific
533
+ product policies and application use cases.
534
+ - **Misuse for malicious purposes**: Technical limitations and developer
535
+ and end-user education can help mitigate against malicious applications of
536
+ VLMs. Educational resources and reporting mechanisms for users to flag
537
+ misuse are provided. Prohibited uses of Gemma models are outlined in the
538
+ [Gemma Prohibited Use Policy][prohibited-use].
539
+ - **Privacy violations**: Models were trained on data filtered for removal
540
+ of certain personal information and other sensitive data. Developers are
541
+ encouraged to adhere to privacy regulations with privacy-preserving
542
+ techniques.
543
+
544
+ ### Benefits
545
+
546
+ At the time of release, this family of models provides high-performance open
547
+ vision-language model implementations designed from the ground up for
548
+ responsible AI development compared to similarly sized models.
549
+
550
+ Using the benchmark evaluation metrics described in this document, these models
551
+ have shown to provide superior performance to other, comparably-sized open model
552
+ alternatives.
553
+
554
+ [g3-tech-report]: https://goo.gle/Gemma3Report
555
+ [rai-toolkit]: https://ai.google.dev/responsible
556
+ [kaggle-gemma]: https://www.kaggle.com/models/google/gemma-3
557
+ [vertex-mg-gemma3]: https://console.cloud.google.com/vertex-ai/publishers/google/model-garden/gemma3
558
+ [terms]: https://ai.google.dev/gemma/terms
559
+ [safety-policies]: https://ai.google/static/documents/ai-responsibility-update-published-february-2025.pdf
560
+ [prohibited-use]: https://ai.google.dev/gemma/prohibited_use_policy
561
+ [tpu]: https://cloud.google.com/tpu/docs/intro-to-tpu
562
+ [sustainability]: https://sustainability.google/operating-sustainably/
563
+ [jax]: https://github.com/jax-ml/jax
564
+ [ml-pathways]: https://blog.google/technology/ai/introducing-pathways-next-generation-ai-architecture/
565
+ [sustainability]: https://sustainability.google/operating-sustainably/
566
+ [gemini-2-paper]: https://arxiv.org/abs/2312.11805