TamWaiban commited on
Commit
1c35a64
·
verified ·
1 Parent(s): eebc792

Upload folder using huggingface_hub

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