Prince-1 commited on
Commit
6752fb1
·
verified ·
1 Parent(s): 4eb7c2c

Add files using upload-large-folder tool

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