danielhanchen commited on
Commit
8bc1d61
·
verified ·
1 Parent(s): 818b3b1

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