Daniel Doña commited on
Commit
d07b26a
·
1 Parent(s): 9c6e408

Clone from gated

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,529 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: gemma
3
+ tags:
4
+ - gemma3
5
+ - gemma
6
+ - google
7
+ pipeline_tag: text-generation
8
+ library_name: transformers
9
+ extra_gated_heading: Access Gemma on Hugging Face
10
+ extra_gated_prompt: >-
11
+ To access Gemma on Hugging Face, you’re required to review and agree to
12
+ Google’s usage license. To do this, please ensure you’re logged in to Hugging
13
+ Face and click below. Requests are processed immediately.
14
+ extra_gated_button_content: Acknowledge license
15
+ ---
16
+
17
+ # Gemma 3 model card
18
+
19
+ **Model Page**: [Gemma](https://ai.google.dev/gemma/docs/core)
20
+
21
+ **Resources and Technical Documentation**:
22
+
23
+ * [Gemma 3 Technical Report][g3-tech-report]
24
+ * [Responsible Generative AI Toolkit][rai-toolkit]
25
+ * [Gemma on Kaggle][kaggle-gemma]
26
+ * [Gemma on Vertex Model Garden][vertex-mg-gemma3]
27
+
28
+ **Terms of Use**: [Terms][terms]
29
+
30
+ **Authors**: Google DeepMind
31
+
32
+ ## Model Information
33
+
34
+ Summary description and brief definition of inputs and outputs.
35
+
36
+ ### Description
37
+
38
+ Gemma is a family of lightweight, state-of-the-art open models from Google,
39
+ built from the same research and technology used to create the Gemini models.
40
+ Gemma 3 models are multimodal, handling text and image input and generating text
41
+ output, with open weights for both pre-trained variants and instruction-tuned
42
+ variants. Gemma 3 has a large, 128K context window, multilingual support in over
43
+ 140 languages, and is available in more sizes than previous versions. Gemma 3
44
+ models are well-suited for a variety of text generation and image understanding
45
+ tasks, including question answering, summarization, and reasoning. Their
46
+ relatively small size makes it possible to deploy them in environments with
47
+ limited resources such as laptops, desktops or your own cloud infrastructure,
48
+ democratizing access to state of the art AI models and helping foster innovation
49
+ for everyone.
50
+
51
+ ### Inputs and outputs
52
+
53
+ - **Input:**
54
+ - Text string, such as a question, a prompt, or a document to be summarized
55
+ - Images, normalized to 896 x 896 resolution and encoded to 256 tokens
56
+ each, for the 4B, 12B, and 27B sizes.
57
+ - Total input context of 128K tokens for the 4B, 12B, and 27B sizes, and
58
+ 32K tokens for the 1B and 270M sizes.
59
+
60
+ - **Output:**
61
+ - Generated text in response to the input, such as an answer to a
62
+ question, analysis of image content, or a summary of a document
63
+ - Total output context up to 128K tokens for the 4B, 12B, and 27B sizes,
64
+ and 32K tokens for the 1B and 270M sizes per request, subtracting the
65
+ request input tokens
66
+
67
+ ### Citation
68
+
69
+ ```none
70
+ @article{gemma_2025,
71
+ title={Gemma 3},
72
+ url={https://arxiv.org/abs/2503.19786},
73
+ publisher={Google DeepMind},
74
+ author={Gemma Team},
75
+ year={2025}
76
+ }
77
+ ```
78
+
79
+ ## Model Data
80
+
81
+ Data used for model training and how the data was processed.
82
+
83
+ ### Training Dataset
84
+
85
+ These models were trained on a dataset of text data that includes a wide variety
86
+ of sources. The 27B model was trained with 14 trillion tokens, the 12B model was
87
+ trained with 12 trillion tokens, 4B model was trained with 4 trillion tokens,
88
+ the 1B with 2 trillion tokens, and the 270M with 6 trillion tokens. The
89
+ knowledge cutoff date for the training data was August 2024. Here are the key
90
+ components:
91
+
92
+ - Web Documents: A diverse collection of web text ensures the model is
93
+ exposed to a broad range of linguistic styles, topics, and vocabulary. The
94
+ training dataset includes content in over 140 languages.
95
+ - Code: Exposing the model to code helps it to learn the syntax and
96
+ patterns of programming languages, which improves its ability to generate
97
+ code and understand code-related questions.
98
+ - Mathematics: Training on mathematical text helps the model learn logical
99
+ reasoning, symbolic representation, and to address mathematical queries.
100
+ - Images: A wide range of images enables the model to perform image
101
+ analysis and visual data extraction tasks.
102
+
103
+ The combination of these diverse data sources is crucial for training a powerful
104
+ multimodal model that can handle a wide variety of different tasks and data
105
+ formats.
106
+
107
+ ### Data Preprocessing
108
+
109
+ Here are the key data cleaning and filtering methods applied to the training
110
+ data:
111
+
112
+ - CSAM Filtering: Rigorous CSAM (Child Sexual Abuse Material) filtering
113
+ was applied at multiple stages in the data preparation process to ensure
114
+ the exclusion of harmful and illegal content.
115
+ - Sensitive Data Filtering: As part of making Gemma pre-trained models
116
+ safe and reliable, automated techniques were used to filter out certain
117
+ personal information and other sensitive data from training sets.
118
+ - Additional methods: Filtering based on content quality and safety in
119
+ line with [our policies][safety-policies].
120
+
121
+ ## Implementation Information
122
+
123
+ Details about the model internals.
124
+
125
+ ### Hardware
126
+
127
+ Gemma was trained using [Tensor Processing Unit (TPU)][tpu] hardware (TPUv4p,
128
+ TPUv5p and TPUv5e). Training vision-language models (VLMS) requires significant
129
+ computational power. TPUs, designed specifically for matrix operations common in
130
+ machine learning, offer several advantages in this domain:
131
+
132
+ - Performance: TPUs are specifically designed to handle the massive
133
+ computations involved in training VLMs. They can speed up training
134
+ considerably compared to CPUs.
135
+ - Memory: TPUs often come with large amounts of high-bandwidth memory,
136
+ allowing for the handling of large models and batch sizes during training.
137
+ This can lead to better model quality.
138
+ - Scalability: TPU Pods (large clusters of TPUs) provide a scalable
139
+ solution for handling the growing complexity of large foundation models.
140
+ You can distribute training across multiple TPU devices for faster and more
141
+ efficient processing.
142
+ - Cost-effectiveness: In many scenarios, TPUs can provide a more
143
+ cost-effective solution for training large models compared to CPU-based
144
+ infrastructure, especially when considering the time and resources saved
145
+ due to faster training.
146
+ - These advantages are aligned with
147
+ [Google's commitments to operate sustainably][sustainability].
148
+
149
+ ### Software
150
+
151
+ Training was done using [JAX][jax] and [ML Pathways][ml-pathways].
152
+
153
+ JAX allows researchers to take advantage of the latest generation of hardware,
154
+ including TPUs, for faster and more efficient training of large models. ML
155
+ Pathways is Google's latest effort to build artificially intelligent systems
156
+ capable of generalizing across multiple tasks. This is specially suitable for
157
+ foundation models, including large language models like these ones.
158
+
159
+ Together, JAX and ML Pathways are used as described in the
160
+ [paper about the Gemini family of models][gemini-2-paper]; *"the 'single
161
+ controller' programming model of Jax and Pathways allows a single Python
162
+ process to orchestrate the entire training run, dramatically simplifying the
163
+ development workflow."*
164
+
165
+ ## Evaluation
166
+
167
+ Model evaluation metrics and results.
168
+
169
+ ### Benchmark Results
170
+
171
+ These models were evaluated against a large collection of different datasets and
172
+ metrics to cover different aspects of text generation. Evaluation results marked
173
+ with **IT** are for instruction-tuned models. Evaluation results marked with
174
+ **PT** are for pre-trained models.
175
+
176
+ #### Gemma 3 270M
177
+
178
+ | **Benchmark** | **n-shot** | **Gemma 3 PT 270M** |
179
+ | :------------------------ | :-----------: | ------------------: |
180
+ | [HellaSwag][hellaswag] | 10-shot | 40.9 |
181
+ | [BoolQ][boolq] | 0-shot | 61.4 |
182
+ | [PIQA][piqa] | 0-shot | 67.7 |
183
+ | [TriviaQA][triviaqa] | 5-shot | 15.4 |
184
+ | [ARC-c][arc] | 25-shot | 29.0 |
185
+ | [ARC-e][arc] | 0-shot | 57.7 |
186
+ | [WinoGrande][winogrande] | 5-shot | 52.0 |
187
+
188
+ [hellaswag]: https://arxiv.org/abs/1905.07830
189
+ [boolq]: https://arxiv.org/abs/1905.10044
190
+ [piqa]: https://arxiv.org/abs/1911.11641
191
+ [triviaqa]: https://arxiv.org/abs/1705.03551
192
+ [arc]: https://arxiv.org/abs/1911.01547
193
+ [winogrande]: https://arxiv.org/abs/1907.10641
194
+
195
+ | **Benchmark** | **n-shot** | **Gemma 3 IT 270m** |
196
+ | :------------------------ | :-----------: | ------------------: |
197
+ | [HellaSwag][hellaswag] | 0-shot | 37.7 |
198
+ | [PIQA][piqa] | 0-shot | 66.2 |
199
+ | [ARC-c][arc] | 0-shot | 28.2 |
200
+ | [WinoGrande][winogrande] | 0-shot | 52.3 |
201
+ | [BIG-Bench Hard][bbh] | few-shot | 26.7 |
202
+ | [IF Eval][ifeval] | 0-shot | 51.2 |
203
+
204
+ [hellaswag]: https://arxiv.org/abs/1905.07830
205
+ [piqa]: https://arxiv.org/abs/1911.11641
206
+ [arc]: https://arxiv.org/abs/1911.01547
207
+ [winogrande]: https://arxiv.org/abs/1907.10641
208
+ [bbh]: https://paperswithcode.com/dataset/bbh
209
+ [bbh]: https://paperswithcode.com/dataset/bbh
210
+ [ifeval]: https://arxiv.org/abs/2311.07911
211
+
212
+ #### Gemma 3 1B, 4B, 12B & 27B
213
+
214
+ ##### Reasoning and factuality
215
+
216
+ | Benchmark | n-shot | Gemma 3 IT 1B | Gemma 3 IT 4B | Gemma 3 IT 12B | Gemma 3 IT 27B |
217
+ |--------------------------------|--------|:-------------:|:-------------:|:--------------:|:--------------:|
218
+ | [GPQA][gpqa] Diamond | 0-shot | 19.2 | 30.8 | 40.9 | 42.4 |
219
+ | [SimpleQA][simpleqa] | 0-shot | 2.2 | 4.0 | 6.3 | 10.0 |
220
+ | [FACTS Grounding][facts-grdg] | - | 36.4 | 70.1 | 75.8 | 74.9 |
221
+ | [BIG-Bench Hard][bbh] | 0-shot | 39.1 | 72.2 | 85.7 | 87.6 |
222
+ | [BIG-Bench Extra Hard][bbeh] | 0-shot | 7.2 | 11.0 | 16.3 | 19.3 |
223
+ | [IFEval][ifeval] | 0-shot | 80.2 | 90.2 | 88.9 | 90.4 |
224
+
225
+ | Benchmark | n-shot | Gemma 3 PT 1B | Gemma 3 PT 4B | Gemma 3 PT 12B | Gemma 3 PT 27B |
226
+ | ------------------------------ |----------|:--------------:|:-------------:|:--------------:|:--------------:|
227
+ | [HellaSwag][hellaswag] | 10-shot | 62.3 | 77.2 | 84.2 | 85.6 |
228
+ | [BoolQ][boolq] | 0-shot | 63.2 | 72.3 | 78.8 | 82.4 |
229
+ | [PIQA][piqa] | 0-shot | 73.8 | 79.6 | 81.8 | 83.3 |
230
+ | [SocialIQA][socialiqa] | 0-shot | 48.9 | 51.9 | 53.4 | 54.9 |
231
+ | [TriviaQA][triviaqa] | 5-shot | 39.8 | 65.8 | 78.2 | 85.5 |
232
+ | [Natural Questions][naturalq] | 5-shot | 9.48 | 20.0 | 31.4 | 36.1 |
233
+ | [ARC-c][arc] | 25-shot | 38.4 | 56.2 | 68.9 | 70.6 |
234
+ | [ARC-e][arc] | 0-shot | 73.0 | 82.4 | 88.3 | 89.0 |
235
+ | [WinoGrande][winogrande] | 5-shot | 58.2 | 64.7 | 74.3 | 78.8 |
236
+ | [BIG-Bench Hard][bbh] | few-shot | 28.4 | 50.9 | 72.6 | 77.7 |
237
+ | [DROP][drop] | 1-shot | 42.4 | 60.1 | 72.2 | 77.2 |
238
+
239
+ [gpqa]: https://arxiv.org/abs/2311.12022
240
+ [simpleqa]: https://arxiv.org/abs/2411.04368
241
+ [facts-grdg]: https://goo.gle/FACTS_paper
242
+ [bbeh]: https://github.com/google-deepmind/bbeh
243
+ [ifeval]: https://arxiv.org/abs/2311.07911
244
+ [hellaswag]: https://arxiv.org/abs/1905.07830
245
+ [boolq]: https://arxiv.org/abs/1905.10044
246
+ [piqa]: https://arxiv.org/abs/1911.11641
247
+ [socialiqa]: https://arxiv.org/abs/1904.09728
248
+ [triviaqa]: https://arxiv.org/abs/1705.03551
249
+ [naturalq]: https://github.com/google-research-datasets/natural-questions
250
+ [arc]: https://arxiv.org/abs/1911.01547
251
+ [winogrande]: https://arxiv.org/abs/1907.10641
252
+ [bbh]: https://paperswithcode.com/dataset/bbh
253
+ [drop]: https://arxiv.org/abs/1903.00161
254
+
255
+ ##### STEM and code
256
+
257
+ | Benchmark | n-shot | Gemma 3 IT 1B | Gemma 3 IT 4B | Gemma 3 IT 12B | Gemma 3 IT 27B |
258
+ |----------------------------|--------|:-------------:|:-------------:|:--------------:|:--------------:|
259
+ | [MMLU][mmlu] (Pro) | 0-shot | 14.7 | 43.6 | 60.6 | 67.5 |
260
+ | [LiveCodeBench][lcb] | 0-shot | 1.9 | 12.6 | 24.6 | 29.7 |
261
+ | [Bird-SQL][bird-sql] (dev) | - | 6.4 | 36.3 | 47.9 | 54.4 |
262
+ | [Math][math] | 0-shot | 48.0 | 75.6 | 83.8 | 89.0 |
263
+ | HiddenMath | 0-shot | 15.8 | 43.0 | 54.5 | 60.3 |
264
+ | [MBPP][mbpp] | 3-shot | 35.2 | 63.2 | 73.0 | 74.4 |
265
+ | [HumanEval][humaneval] | 0-shot | 41.5 | 71.3 | 85.4 | 87.8 |
266
+ | [Natural2Code][nat2code] | 0-shot | 56.0 | 70.3 | 80.7 | 84.5 |
267
+ | [GSM8K][gsm8k] | 0-shot | 62.8 | 89.2 | 94.4 | 95.9 |
268
+
269
+ | Benchmark | n-shot | Gemma 3 PT 4B | Gemma 3 PT 12B | Gemma 3 PT 27B |
270
+ | ------------------------------ |----------------|:-------------:|:--------------:|:--------------:|
271
+ | [MMLU][mmlu] | 5-shot | 59.6 | 74.5 | 78.6 |
272
+ | [MMLU][mmlu] (Pro COT) | 5-shot | 29.2 | 45.3 | 52.2 |
273
+ | [AGIEval][agieval] | 3-5-shot | 42.1 | 57.4 | 66.2 |
274
+ | [MATH][math] | 4-shot | 24.2 | 43.3 | 50.0 |
275
+ | [GSM8K][gsm8k] | 8-shot | 38.4 | 71.0 | 82.6 |
276
+ | [GPQA][gpqa] | 5-shot | 15.0 | 25.4 | 24.3 |
277
+ | [MBPP][mbpp] | 3-shot | 46.0 | 60.4 | 65.6 |
278
+ | [HumanEval][humaneval] | 0-shot | 36.0 | 45.7 | 48.8 |
279
+
280
+ [mmlu]: https://arxiv.org/abs/2009.03300
281
+ [agieval]: https://arxiv.org/abs/2304.06364
282
+ [math]: https://arxiv.org/abs/2103.03874
283
+ [gsm8k]: https://arxiv.org/abs/2110.14168
284
+ [gpqa]: https://arxiv.org/abs/2311.12022
285
+ [mbpp]: https://arxiv.org/abs/2108.07732
286
+ [humaneval]: https://arxiv.org/abs/2107.03374
287
+ [lcb]: https://arxiv.org/abs/2403.07974
288
+ [bird-sql]: https://arxiv.org/abs/2305.03111
289
+ [nat2code]: https://arxiv.org/abs/2405.04520
290
+
291
+ #### Multilingual
292
+
293
+ | Benchmark | n-shot | Gemma 3 IT 1B | Gemma 3 IT 4B | Gemma 3 IT 12B | Gemma 3 IT 27B |
294
+ |--------------------------------------|--------|:-------------:|:-------------:|:--------------:|:--------------:|
295
+ | [Global-MMLU-Lite][global-mmlu-lite] | 0-shot | 34.2 | 54.5 | 69.5 | 75.1 |
296
+ | [ECLeKTic][eclektic] | 0-shot | 1.4 | 4.6 | 10.3 | 16.7 |
297
+ | [WMT24++][wmt24pp] | 0-shot | 35.9 | 46.8 | 51.6 | 53.4 |
298
+
299
+ | Benchmark | Gemma 3 PT 1B | Gemma 3 PT 4B | Gemma 3 PT 12B | Gemma 3 PT 27B |
300
+ | ------------------------------------ |:-------------:|:-------------:|:--------------:|:--------------:|
301
+ | [MGSM][mgsm] | 2.04 | 34.7 | 64.3 | 74.3 |
302
+ | [Global-MMLU-Lite][global-mmlu-lite] | 24.9 | 57.0 | 69.4 | 75.7 |
303
+ | [WMT24++][wmt24pp] (ChrF) | 36.7 | 48.4 | 53.9 | 55.7 |
304
+ | [FloRes][flores] | 29.5 | 39.2 | 46.0 | 48.8 |
305
+ | [XQuAD][xquad] (all) | 43.9 | 68.0 | 74.5 | 76.8 |
306
+ | [ECLeKTic][eclektic] | 4.69 | 11.0 | 17.2 | 24.4 |
307
+ | [IndicGenBench][indicgenbench] | 41.4 | 57.2 | 61.7 | 63.4 |
308
+
309
+ [mgsm]: https://arxiv.org/abs/2210.03057
310
+ [flores]: https://arxiv.org/abs/2106.03193
311
+ [xquad]: https://arxiv.org/abs/1910.11856v3
312
+ [global-mmlu-lite]: https://huggingface.co/datasets/CohereForAI/Global-MMLU-Lite
313
+ [wmt24pp]: https://arxiv.org/abs/2502.12404v1
314
+ [eclektic]: https://arxiv.org/abs/2502.21228
315
+ [indicgenbench]: https://arxiv.org/abs/2404.16816
316
+
317
+ ##### Multimodal
318
+
319
+ | Benchmark | Gemma 3 IT 4B | Gemma 3 IT 12B | Gemma 3 IT 27B |
320
+ |-----------------------------------|:-------------:|:--------------:|:--------------:|
321
+ | [MMMU][mmmu] (val) | 48.8 | 59.6 | 64.9 |
322
+ | [DocVQA][docvqa] | 75.8 | 87.1 | 86.6 |
323
+ | [InfoVQA][info-vqa] | 50.0 | 64.9 | 70.6 |
324
+ | [TextVQA][textvqa] | 57.8 | 67.7 | 65.1 |
325
+ | [AI2D][ai2d] | 74.8 | 84.2 | 84.5 |
326
+ | [ChartQA][chartqa] | 68.8 | 75.7 | 78.0 |
327
+ | [VQAv2][vqav2] (val) | 62.4 | 71.6 | 71.0 |
328
+ | [MathVista][mathvista] (testmini) | 50.0 | 62.9 | 67.6 |
329
+
330
+ | Benchmark | Gemma 3 PT 4B | Gemma 3 PT 12B | Gemma 3 PT 27B |
331
+ | ------------------------------ |:-------------:|:--------------:|:--------------:|
332
+ | [COCOcap][coco-cap] | 102 | 111 | 116 |
333
+ | [DocVQA][docvqa] (val) | 72.8 | 82.3 | 85.6 |
334
+ | [InfoVQA][info-vqa] (val) | 44.1 | 54.8 | 59.4 |
335
+ | [MMMU][mmmu] (pt) | 39.2 | 50.3 | 56.1 |
336
+ | [TextVQA][textvqa] (val) | 58.9 | 66.5 | 68.6 |
337
+ | [RealWorldQA][realworldqa] | 45.5 | 52.2 | 53.9 |
338
+ | [ReMI][remi] | 27.3 | 38.5 | 44.8 |
339
+ | [AI2D][ai2d] | 63.2 | 75.2 | 79.0 |
340
+ | [ChartQA][chartqa] | 63.6 | 74.7 | 76.3 |
341
+ | [VQAv2][vqav2] | 63.9 | 71.2 | 72.9 |
342
+ | [BLINK][blinkvqa] | 38.0 | 35.9 | 39.6 |
343
+ | [OKVQA][okvqa] | 51.0 | 58.7 | 60.2 |
344
+ | [TallyQA][tallyqa] | 42.5 | 51.8 | 54.3 |
345
+ | [SpatialSense VQA][ss-vqa] | 50.9 | 60.0 | 59.4 |
346
+ | [CountBenchQA][countbenchqa] | 26.1 | 17.8 | 68.0 |
347
+
348
+ [coco-cap]: https://cocodataset.org/#home
349
+ [docvqa]: https://www.docvqa.org/
350
+ [info-vqa]: https://arxiv.org/abs/2104.12756
351
+ [mmmu]: https://arxiv.org/abs/2311.16502
352
+ [textvqa]: https://textvqa.org/
353
+ [realworldqa]: https://paperswithcode.com/dataset/realworldqa
354
+ [remi]: https://arxiv.org/html/2406.09175v1
355
+ [ai2d]: https://allenai.org/data/diagrams
356
+ [chartqa]: https://arxiv.org/abs/2203.10244
357
+ [vqav2]: https://visualqa.org/index.html
358
+ [blinkvqa]: https://arxiv.org/abs/2404.12390
359
+ [okvqa]: https://okvqa.allenai.org/
360
+ [tallyqa]: https://arxiv.org/abs/1810.12440
361
+ [ss-vqa]: https://arxiv.org/abs/1908.02660
362
+ [countbenchqa]: https://github.com/google-research/big_vision/blob/main/big_vision/datasets/countbenchqa/
363
+ [mathvista]: https://arxiv.org/abs/2310.02255
364
+
365
+ ## Ethics and Safety
366
+
367
+ Ethics and safety evaluation approach and results.
368
+
369
+ ### Evaluation Approach
370
+
371
+ Our evaluation methods include structured evaluations and internal red-teaming
372
+ testing of relevant content policies. Red-teaming was conducted by a number of
373
+ different teams, each with different goals and human evaluation metrics. These
374
+ models were evaluated against a number of different categories relevant to
375
+ ethics and safety, including:
376
+
377
+ - **Child Safety**: Evaluation of text-to-text and image to text prompts
378
+ covering child safety policies, including child sexual abuse and
379
+ exploitation.
380
+ - **Content Safety:** Evaluation of text-to-text and image to text prompts
381
+ covering safety policies including, harassment, violence and gore, and hate
382
+ speech.
383
+ - **Representational Harms**: Evaluation of text-to-text and image to text
384
+ prompts covering safety policies including bias, stereotyping, and harmful
385
+ associations or inaccuracies.
386
+
387
+ In addition to development level evaluations, we conduct "assurance
388
+ evaluations" which are our 'arms-length' internal evaluations for responsibility
389
+ governance decision making. They are conducted separately from the model
390
+ development team, to inform decision making about release. High level findings
391
+ are fed back to the model team, but prompt sets are held-out to prevent
392
+ overfitting and preserve the results' ability to inform decision making.
393
+ Assurance evaluation results are reported to our Responsibility & Safety Council
394
+ as part of release review.
395
+
396
+ ### Evaluation Results
397
+
398
+ For all areas of safety testing, we saw major improvements in the categories of
399
+ child safety, content safety, and representational harms relative to previous
400
+ Gemma models. All testing was conducted without safety filters to evaluate the
401
+ model capabilities and behaviors. For both text-to-text and image-to-text, and
402
+ across all model sizes, the model produced minimal policy violations, and showed
403
+ significant improvements over previous Gemma models' performance with respect
404
+ to ungrounded inferences. A limitation of our evaluations was they included only
405
+ English language prompts.
406
+
407
+ ## Usage and Limitations
408
+
409
+ These models have certain limitations that users should be aware of.
410
+
411
+ ### Intended Usage
412
+
413
+ Open vision-language models (VLMs) models have a wide range of applications
414
+ across various industries and domains. The following list of potential uses is
415
+ not comprehensive. The purpose of this list is to provide contextual information
416
+ about the possible use-cases that the model creators considered as part of model
417
+ training and development.
418
+
419
+ - Content Creation and Communication
420
+ - Text Generation: These models can be used to generate creative text
421
+ formats such as poems, scripts, code, marketing copy, and email drafts.
422
+ - Chatbots and Conversational AI: Power conversational interfaces
423
+ for customer service, virtual assistants, or interactive applications.
424
+ - Text Summarization: Generate concise summaries of a text corpus,
425
+ research papers, or reports.
426
+ - Image Data Extraction: These models can be used to extract,
427
+ interpret, and summarize visual data for text communications.
428
+ - Research and Education
429
+ - Natural Language Processing (NLP) and VLM Research: These
430
+ models can serve as a foundation for researchers to experiment with VLM
431
+ and NLP techniques, develop algorithms, and contribute to the
432
+ advancement of the field.
433
+ - Language Learning Tools: Support interactive language learning
434
+ experiences, aiding in grammar correction or providing writing practice.
435
+ - Knowledge Exploration: Assist researchers in exploring large
436
+ bodies of text by generating summaries or answering questions about
437
+ specific topics.
438
+
439
+ ### Limitations
440
+
441
+ - Training Data
442
+ - The quality and diversity of the training data significantly
443
+ influence the model's capabilities. Biases or gaps in the training data
444
+ can lead to limitations in the model's responses.
445
+ - The scope of the training dataset determines the subject areas
446
+ the model can handle effectively.
447
+ - Context and Task Complexity
448
+ - Models are better at tasks that can be framed with clear
449
+ prompts and instructions. Open-ended or highly complex tasks might be
450
+ challenging.
451
+ - A model's performance can be influenced by the amount of context
452
+ provided (longer context generally leads to better outputs, up to a
453
+ certain point).
454
+ - Language Ambiguity and Nuance
455
+ - Natural language is inherently complex. Models might struggle
456
+ to grasp subtle nuances, sarcasm, or figurative language.
457
+ - Factual Accuracy
458
+ - Models generate responses based on information they learned
459
+ from their training datasets, but they are not knowledge bases. They
460
+ may generate incorrect or outdated factual statements.
461
+ - Common Sense
462
+ - Models rely on statistical patterns in language. They might
463
+ lack the ability to apply common sense reasoning in certain situations.
464
+
465
+ ### Ethical Considerations and Risks
466
+
467
+ The development of vision-language models (VLMs) raises several ethical
468
+ concerns. In creating an open model, we have carefully considered the following:
469
+
470
+ - Bias and Fairness
471
+ - VLMs trained on large-scale, real-world text and image data can
472
+ reflect socio-cultural biases embedded in the training material. These
473
+ models underwent careful scrutiny, input data pre-processing described
474
+ and posterior evaluations reported in this card.
475
+ - Misinformation and Misuse
476
+ - VLMs can be misused to generate text that is false, misleading,
477
+ or harmful.
478
+ - Guidelines are provided for responsible use with the model, see the
479
+ [Responsible Generative AI Toolkit][rai-toolkit].
480
+ - Transparency and Accountability:
481
+ - This model card summarizes details on the models' architecture,
482
+ capabilities, limitations, and evaluation processes.
483
+ - A responsibly developed open model offers the opportunity to
484
+ share innovation by making VLM technology accessible to developers and
485
+ researchers across the AI ecosystem.
486
+
487
+ Risks identified and mitigations:
488
+
489
+ - **Perpetuation of biases**: It's encouraged to perform continuous
490
+ monitoring (using evaluation metrics, human review) and the exploration of
491
+ de-biasing techniques during model training, fine-tuning, and other use
492
+ cases.
493
+ - **Generation of harmful content**: Mechanisms and guidelines for content
494
+ safety are essential. Developers are encouraged to exercise caution and
495
+ implement appropriate content safety safeguards based on their specific
496
+ product policies and application use cases.
497
+ - **Misuse for malicious purposes**: Technical limitations and developer
498
+ and end-user education can help mitigate against malicious applications of
499
+ VLMs. Educational resources and reporting mechanisms for users to flag
500
+ misuse are provided. Prohibited uses of Gemma models are outlined in the
501
+ [Gemma Prohibited Use Policy][prohibited-use].
502
+ - **Privacy violations**: Models were trained on data filtered for removal
503
+ of certain personal information and other sensitive data. Developers are
504
+ encouraged to adhere to privacy regulations with privacy-preserving
505
+ techniques.
506
+
507
+ ### Benefits
508
+
509
+ At the time of release, this family of models provides high-performance open
510
+ vision-language model implementations designed from the ground up for
511
+ responsible AI development compared to similarly sized models.
512
+
513
+ Using the benchmark evaluation metrics described in this document, these models
514
+ have shown to provide superior performance to other, comparably-sized open model
515
+ alternatives.
516
+
517
+ [g3-tech-report]: https://arxiv.org/abs/2503.19786
518
+ [rai-toolkit]: https://ai.google.dev/responsible
519
+ [kaggle-gemma]: https://www.kaggle.com/models/google/gemma-3
520
+ [vertex-mg-gemma3]: https://console.cloud.google.com/vertex-ai/publishers/google/model-garden/gemma3
521
+ [terms]: https://ai.google.dev/gemma/terms
522
+ [safety-policies]: https://ai.google/static/documents/ai-responsibility-update-published-february-2025.pdf
523
+ [prohibited-use]: https://ai.google.dev/gemma/prohibited_use_policy
524
+ [tpu]: https://cloud.google.com/tpu/docs/intro-to-tpu
525
+ [sustainability]: https://sustainability.google/operating-sustainably/
526
+ [jax]: https://github.com/jax-ml/jax
527
+ [ml-pathways]: https://blog.google/technology/ai/introducing-pathways-next-generation-ai-architecture/
528
+ [sustainability]: https://sustainability.google/operating-sustainably/
529
+ [gemini-2-paper]: https://arxiv.org/abs/2312.11805
added_tokens.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {
2
+ "<image_soft_token>": 262144
3
+ }
config.json ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_sliding_window_pattern": 6,
3
+ "architectures": [
4
+ "Gemma3ForCausalLM"
5
+ ],
6
+ "attention_bias": false,
7
+ "attention_dropout": 0.0,
8
+ "attn_logit_softcapping": null,
9
+ "bos_token_id": 2,
10
+ "eos_token_id": 1,
11
+ "final_logit_softcapping": null,
12
+ "head_dim": 256,
13
+ "hidden_activation": "gelu_pytorch_tanh",
14
+ "hidden_size": 640,
15
+ "initializer_range": 0.02,
16
+ "intermediate_size": 2048,
17
+ "layer_types": [
18
+ "sliding_attention",
19
+ "sliding_attention",
20
+ "sliding_attention",
21
+ "sliding_attention",
22
+ "sliding_attention",
23
+ "full_attention",
24
+ "sliding_attention",
25
+ "sliding_attention",
26
+ "sliding_attention",
27
+ "sliding_attention",
28
+ "sliding_attention",
29
+ "full_attention",
30
+ "sliding_attention",
31
+ "sliding_attention",
32
+ "sliding_attention",
33
+ "sliding_attention",
34
+ "sliding_attention",
35
+ "full_attention"
36
+ ],
37
+ "max_position_embeddings": 32768,
38
+ "model_type": "gemma3_text",
39
+ "num_attention_heads": 4,
40
+ "num_hidden_layers": 18,
41
+ "num_key_value_heads": 1,
42
+ "pad_token_id": 0,
43
+ "query_pre_attn_scalar": 256,
44
+ "rms_norm_eps": 1e-06,
45
+ "rope_local_base_freq": 10000.0,
46
+ "rope_scaling": null,
47
+ "rope_theta": 1000000.0,
48
+ "sliding_window": 512,
49
+ "torch_dtype": "bfloat16",
50
+ "transformers_version": "4.55.0.dev0",
51
+ "use_bidirectional_attention": false,
52
+ "use_cache": true,
53
+ "vocab_size": 262144
54
+ }
generation_config.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "cache_implementation": "hybrid",
3
+ "do_sample": true,
4
+ "top_k": 64,
5
+ "top_p": 0.95,
6
+ "transformers_version": "4.55.0.dev0"
7
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:abb58eb73aece5163624090d5383c59cbcdb9e9539ec84cb864f74386c4b21d5
3
+ size 536223056
special_tokens_map.json ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "boi_token": "<start_of_image>",
3
+ "bos_token": {
4
+ "content": "<bos>",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false
9
+ },
10
+ "eoi_token": "<end_of_image>",
11
+ "eos_token": {
12
+ "content": "<eos>",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false
17
+ },
18
+ "image_token": "<image_soft_token>",
19
+ "pad_token": {
20
+ "content": "<pad>",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false
25
+ },
26
+ "unk_token": {
27
+ "content": "<unk>",
28
+ "lstrip": false,
29
+ "normalized": false,
30
+ "rstrip": false,
31
+ "single_word": false
32
+ }
33
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7d4046bf0505a327dd5a0abbb427ecd4fc82f99c2ceaa170bc61ecde12809b0c
3
+ size 33384570
tokenizer.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1299c11d7cf632ef3b4e11937501358ada021bbdf7c47638d13c0ee982f2e79c
3
+ size 4689074
tokenizer_config.json ADDED
The diff for this file is too large to render. See raw diff