NeoChen1024 commited on
Commit
9015290
·
verified ·
1 Parent(s): 11d7781

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,537 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: gemma
3
+ library_name: transformers
4
+ pipeline_tag: image-text-to-text
5
+ extra_gated_heading: Access Gemma on Hugging Face
6
+ extra_gated_prompt: To access Gemma on Hugging Face, you’re required to review and
7
+ agree to Google’s usage license. To do this, please ensure you’re logged in to Hugging
8
+ Face and click below. Requests are processed immediately.
9
+ extra_gated_button_content: Acknowledge license
10
+ base_model: google/gemma-3-12b-it
11
+ ---
12
+
13
+ # NVFP4 quantization of gemma-3-12b-it model using llm-compressor
14
+
15
+ # Gemma 3 model card
16
+
17
+ **Model Page**: [Gemma](https://ai.google.dev/gemma/docs/core)
18
+
19
+ **Resources and Technical Documentation**:
20
+
21
+ * [Gemma 3 Technical Report][g3-tech-report]
22
+ * [Responsible Generative AI Toolkit][rai-toolkit]
23
+ * [Gemma on Kaggle][kaggle-gemma]
24
+ * [Gemma on Vertex Model Garden][vertex-mg-gemma3]
25
+
26
+ **Terms of Use**: [Terms][terms]
27
+
28
+ **Authors**: Google DeepMind
29
+
30
+ ## Model Information
31
+
32
+ Summary description and brief definition of inputs and outputs.
33
+
34
+ ### Description
35
+
36
+ Gemma is a family of lightweight, state-of-the-art open models from Google,
37
+ built from the same research and technology used to create the Gemini models.
38
+ Gemma 3 models are multimodal, handling text and image input and generating text
39
+ output, with open weights for both pre-trained variants and instruction-tuned
40
+ variants. Gemma 3 has a large, 128K context window, multilingual support in over
41
+ 140 languages, and is available in more sizes than previous versions. Gemma 3
42
+ models are well-suited for a variety of text generation and image understanding
43
+ tasks, including question answering, summarization, and reasoning. Their
44
+ relatively small size makes it possible to deploy them in environments with
45
+ limited resources such as laptops, desktops or your own cloud infrastructure,
46
+ democratizing access to state of the art AI models and helping foster innovation
47
+ for everyone.
48
+
49
+ ### Inputs and outputs
50
+
51
+ - **Input:**
52
+ - Text string, such as a question, a prompt, or a document to be summarized
53
+ - Images, normalized to 896 x 896 resolution and encoded to 256 tokens
54
+ each
55
+ - Total input context of 128K tokens for the 4B, 12B, and 27B sizes, and
56
+ 32K tokens for the 1B size
57
+
58
+ - **Output:**
59
+ - Generated text in response to the input, such as an answer to a
60
+ question, analysis of image content, or a summary of a document
61
+ - Total output context of 8192 tokens
62
+
63
+ ### Usage
64
+
65
+ Below, there are some code snippets on how to get quickly started with running the model. First, install the Transformers library. Gemma 3 is supported starting from transformers 4.50.0.
66
+
67
+ ```sh
68
+ $ pip install -U transformers
69
+ ```
70
+
71
+ Then, copy the snippet from the section that is relevant for your use case.
72
+
73
+ #### Running with the `pipeline` API
74
+
75
+ You can initialize the model and processor for inference with `pipeline` as follows.
76
+
77
+ ```python
78
+ from transformers import pipeline
79
+ import torch
80
+
81
+ pipe = pipeline(
82
+ "image-text-to-text",
83
+ model="google/gemma-3-12b-it",
84
+ device="cuda",
85
+ torch_dtype=torch.bfloat16
86
+ )
87
+ ```
88
+
89
+ With instruction-tuned models, you need to use chat templates to process our inputs first. Then, you can pass it to the pipeline.
90
+
91
+ ```python
92
+ messages = [
93
+ {
94
+ "role": "system",
95
+ "content": [{"type": "text", "text": "You are a helpful assistant."}]
96
+ },
97
+ {
98
+ "role": "user",
99
+ "content": [
100
+ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"},
101
+ {"type": "text", "text": "What animal is on the candy?"}
102
+ ]
103
+ }
104
+ ]
105
+
106
+ output = pipe(text=messages, max_new_tokens=200)
107
+ print(output[0]["generated_text"][-1]["content"])
108
+ # Okay, let's take a look!
109
+ # Based on the image, the animal on the candy is a **turtle**.
110
+ # You can see the shell shape and the head and legs.
111
+ ```
112
+
113
+ #### Running the model on a single / multi GPU
114
+
115
+ ```python
116
+ # pip install accelerate
117
+
118
+ from transformers import AutoProcessor, Gemma3ForConditionalGeneration
119
+ from PIL import Image
120
+ import requests
121
+ import torch
122
+
123
+ model_id = "google/gemma-3-12b-it"
124
+
125
+ model = Gemma3ForConditionalGeneration.from_pretrained(
126
+ model_id, device_map="auto"
127
+ ).eval()
128
+
129
+ processor = AutoProcessor.from_pretrained(model_id)
130
+
131
+ messages = [
132
+ {
133
+ "role": "system",
134
+ "content": [{"type": "text", "text": "You are a helpful assistant."}]
135
+ },
136
+ {
137
+ "role": "user",
138
+ "content": [
139
+ {"type": "image", "image": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/bee.jpg"},
140
+ {"type": "text", "text": "Describe this image in detail."}
141
+ ]
142
+ }
143
+ ]
144
+
145
+ inputs = processor.apply_chat_template(
146
+ messages, add_generation_prompt=True, tokenize=True,
147
+ return_dict=True, return_tensors="pt"
148
+ ).to(model.device, dtype=torch.bfloat16)
149
+
150
+ input_len = inputs["input_ids"].shape[-1]
151
+
152
+ with torch.inference_mode():
153
+ generation = model.generate(**inputs, max_new_tokens=100, do_sample=False)
154
+ generation = generation[0][input_len:]
155
+
156
+ decoded = processor.decode(generation, skip_special_tokens=True)
157
+ print(decoded)
158
+
159
+ # **Overall Impression:** The image is a close-up shot of a vibrant garden scene,
160
+ # focusing on a cluster of pink cosmos flowers and a busy bumblebee.
161
+ # It has a slightly soft, natural feel, likely captured in daylight.
162
+ ```
163
+
164
+ ### Citation
165
+
166
+ ```none
167
+ @article{gemma_2025,
168
+ title={Gemma 3},
169
+ url={https://goo.gle/Gemma3Report},
170
+ publisher={Kaggle},
171
+ author={Gemma Team},
172
+ year={2025}
173
+ }
174
+ ```
175
+
176
+ ## Model Data
177
+
178
+ Data used for model training and how the data was processed.
179
+
180
+ ### Training Dataset
181
+
182
+ These models were trained on a dataset of text data that includes a wide variety
183
+ of sources. The 27B model was trained with 14 trillion tokens, the 12B model was
184
+ trained with 12 trillion tokens, 4B model was trained with 4 trillion tokens and
185
+ 1B with 2 trillion tokens. Here are the key components:
186
+
187
+ - Web Documents: A diverse collection of web text ensures the model is
188
+ exposed to a broad range of linguistic styles, topics, and vocabulary. The
189
+ training dataset includes content in over 140 languages.
190
+ - Code: Exposing the model to code helps it to learn the syntax and
191
+ patterns of programming languages, which improves its ability to generate
192
+ code and understand code-related questions.
193
+ - Mathematics: Training on mathematical text helps the model learn logical
194
+ reasoning, symbolic representation, and to address mathematical queries.
195
+ - Images: A wide range of images enables the model to perform image
196
+ analysis and visual data extraction tasks.
197
+
198
+ The combination of these diverse data sources is crucial for training a powerful
199
+ multimodal model that can handle a wide variety of different tasks and data
200
+ formats.
201
+
202
+ ### Data Preprocessing
203
+
204
+ Here are the key data cleaning and filtering methods applied to the training
205
+ data:
206
+
207
+ - CSAM Filtering: Rigorous CSAM (Child Sexual Abuse Material) filtering
208
+ was applied at multiple stages in the data preparation process to ensure
209
+ the exclusion of harmful and illegal content.
210
+ - Sensitive Data Filtering: As part of making Gemma pre-trained models
211
+ safe and reliable, automated techniques were used to filter out certain
212
+ personal information and other sensitive data from training sets.
213
+ - Additional methods: Filtering based on content quality and safety in
214
+ line with [our policies][safety-policies].
215
+
216
+ ## Implementation Information
217
+
218
+ Details about the model internals.
219
+
220
+ ### Hardware
221
+
222
+ Gemma was trained using [Tensor Processing Unit (TPU)][tpu] hardware (TPUv4p,
223
+ TPUv5p and TPUv5e). Training vision-language models (VLMS) requires significant
224
+ computational power. TPUs, designed specifically for matrix operations common in
225
+ machine learning, offer several advantages in this domain:
226
+
227
+ - Performance: TPUs are specifically designed to handle the massive
228
+ computations involved in training VLMs. They can speed up training
229
+ considerably compared to CPUs.
230
+ - Memory: TPUs often come with large amounts of high-bandwidth memory,
231
+ allowing for the handling of large models and batch sizes during training.
232
+ This can lead to better model quality.
233
+ - Scalability: TPU Pods (large clusters of TPUs) provide a scalable
234
+ solution for handling the growing complexity of large foundation models.
235
+ You can distribute training across multiple TPU devices for faster and more
236
+ efficient processing.
237
+ - Cost-effectiveness: In many scenarios, TPUs can provide a more
238
+ cost-effective solution for training large models compared to CPU-based
239
+ infrastructure, especially when considering the time and resources saved
240
+ due to faster training.
241
+ - These advantages are aligned with
242
+ [Google's commitments to operate sustainably][sustainability].
243
+
244
+ ### Software
245
+
246
+ Training was done using [JAX][jax] and [ML Pathways][ml-pathways].
247
+
248
+ JAX allows researchers to take advantage of the latest generation of hardware,
249
+ including TPUs, for faster and more efficient training of large models. ML
250
+ Pathways is Google's latest effort to build artificially intelligent systems
251
+ capable of generalizing across multiple tasks. This is specially suitable for
252
+ foundation models, including large language models like these ones.
253
+
254
+ Together, JAX and ML Pathways are used as described in the
255
+ [paper about the Gemini family of models][gemini-2-paper]; *"the 'single
256
+ controller' programming model of Jax and Pathways allows a single Python
257
+ process to orchestrate the entire training run, dramatically simplifying the
258
+ development workflow."*
259
+
260
+ ## Evaluation
261
+
262
+ Model evaluation metrics and results.
263
+
264
+ ### Benchmark Results
265
+
266
+ These models were evaluated against a large collection of different datasets and
267
+ metrics to cover different aspects of text generation:
268
+
269
+ #### Reasoning and factuality
270
+
271
+ | Benchmark | Metric | Gemma 3 PT 1B | Gemma 3 PT 4B | Gemma 3 PT 12B | Gemma 3 PT 27B |
272
+ | ------------------------------ |----------------|:--------------:|:-------------:|:--------------:|:--------------:|
273
+ | [HellaSwag][hellaswag] | 10-shot | 62.3 | 77.2 | 84.2 | 85.6 |
274
+ | [BoolQ][boolq] | 0-shot | 63.2 | 72.3 | 78.8 | 82.4 |
275
+ | [PIQA][piqa] | 0-shot | 73.8 | 79.6 | 81.8 | 83.3 |
276
+ | [SocialIQA][socialiqa] | 0-shot | 48.9 | 51.9 | 53.4 | 54.9 |
277
+ | [TriviaQA][triviaqa] | 5-shot | 39.8 | 65.8 | 78.2 | 85.5 |
278
+ | [Natural Questions][naturalq] | 5-shot | 9.48 | 20.0 | 31.4 | 36.1 |
279
+ | [ARC-c][arc] | 25-shot | 38.4 | 56.2 | 68.9 | 70.6 |
280
+ | [ARC-e][arc] | 0-shot | 73.0 | 82.4 | 88.3 | 89.0 |
281
+ | [WinoGrande][winogrande] | 5-shot | 58.2 | 64.7 | 74.3 | 78.8 |
282
+ | [BIG-Bench Hard][bbh] | few-shot | 28.4 | 50.9 | 72.6 | 77.7 |
283
+ | [DROP][drop] | 1-shot | 42.4 | 60.1 | 72.2 | 77.2 |
284
+
285
+ [hellaswag]: https://arxiv.org/abs/1905.07830
286
+ [boolq]: https://arxiv.org/abs/1905.10044
287
+ [piqa]: https://arxiv.org/abs/1911.11641
288
+ [socialiqa]: https://arxiv.org/abs/1904.09728
289
+ [triviaqa]: https://arxiv.org/abs/1705.03551
290
+ [naturalq]: https://github.com/google-research-datasets/natural-questions
291
+ [arc]: https://arxiv.org/abs/1911.01547
292
+ [winogrande]: https://arxiv.org/abs/1907.10641
293
+ [bbh]: https://paperswithcode.com/dataset/bbh
294
+ [drop]: https://arxiv.org/abs/1903.00161
295
+
296
+ #### STEM and code
297
+
298
+ | Benchmark | Metric | Gemma 3 PT 4B | Gemma 3 PT 12B | Gemma 3 PT 27B |
299
+ | ------------------------------ |----------------|:-------------:|:--------------:|:--------------:|
300
+ | [MMLU][mmlu] | 5-shot | 59.6 | 74.5 | 78.6 |
301
+ | [MMLU][mmlu] (Pro COT) | 5-shot | 29.2 | 45.3 | 52.2 |
302
+ | [AGIEval][agieval] | 3-5-shot | 42.1 | 57.4 | 66.2 |
303
+ | [MATH][math] | 4-shot | 24.2 | 43.3 | 50.0 |
304
+ | [GSM8K][gsm8k] | 8-shot | 38.4 | 71.0 | 82.6 |
305
+ | [GPQA][gpqa] | 5-shot | 15.0 | 25.4 | 24.3 |
306
+ | [MBPP][mbpp] | 3-shot | 46.0 | 60.4 | 65.6 |
307
+ | [HumanEval][humaneval] | 0-shot | 36.0 | 45.7 | 48.8 |
308
+
309
+ [mmlu]: https://arxiv.org/abs/2009.03300
310
+ [agieval]: https://arxiv.org/abs/2304.06364
311
+ [math]: https://arxiv.org/abs/2103.03874
312
+ [gsm8k]: https://arxiv.org/abs/2110.14168
313
+ [gpqa]: https://arxiv.org/abs/2311.12022
314
+ [mbpp]: https://arxiv.org/abs/2108.07732
315
+ [humaneval]: https://arxiv.org/abs/2107.03374
316
+
317
+ #### Multilingual
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 PT 4B | Gemma 3 PT 12B | Gemma 3 PT 27B |
340
+ | ------------------------------ |:-------------:|:--------------:|:--------------:|
341
+ | [COCOcap][coco-cap] | 102 | 111 | 116 |
342
+ | [DocVQA][docvqa] (val) | 72.8 | 82.3 | 85.6 |
343
+ | [InfoVQA][info-vqa] (val) | 44.1 | 54.8 | 59.4 |
344
+ | [MMMU][mmmu] (pt) | 39.2 | 50.3 | 56.1 |
345
+ | [TextVQA][textvqa] (val) | 58.9 | 66.5 | 68.6 |
346
+ | [RealWorldQA][realworldqa] | 45.5 | 52.2 | 53.9 |
347
+ | [ReMI][remi] | 27.3 | 38.5 | 44.8 |
348
+ | [AI2D][ai2d] | 63.2 | 75.2 | 79.0 |
349
+ | [ChartQA][chartqa] | 63.6 | 74.7 | 76.3 |
350
+ | [VQAv2][vqav2] | 63.9 | 71.2 | 72.9 |
351
+ | [BLINK][blinkvqa] | 38.0 | 35.9 | 39.6 |
352
+ | [OKVQA][okvqa] | 51.0 | 58.7 | 60.2 |
353
+ | [TallyQA][tallyqa] | 42.5 | 51.8 | 54.3 |
354
+ | [SpatialSense VQA][ss-vqa] | 50.9 | 60.0 | 59.4 |
355
+ | [CountBenchQA][countbenchqa] | 26.1 | 17.8 | 68.0 |
356
+
357
+ [coco-cap]: https://cocodataset.org/#home
358
+ [docvqa]: https://www.docvqa.org/
359
+ [info-vqa]: https://arxiv.org/abs/2104.12756
360
+ [mmmu]: https://arxiv.org/abs/2311.16502
361
+ [textvqa]: https://textvqa.org/
362
+ [realworldqa]: https://paperswithcode.com/dataset/realworldqa
363
+ [remi]: https://arxiv.org/html/2406.09175v1
364
+ [ai2d]: https://allenai.org/data/diagrams
365
+ [chartqa]: https://arxiv.org/abs/2203.10244
366
+ [vqav2]: https://visualqa.org/index.html
367
+ [blinkvqa]: https://arxiv.org/abs/2404.12390
368
+ [okvqa]: https://okvqa.allenai.org/
369
+ [tallyqa]: https://arxiv.org/abs/1810.12440
370
+ [ss-vqa]: https://arxiv.org/abs/1908.02660
371
+ [countbenchqa]: https://github.com/google-research/big_vision/blob/main/big_vision/datasets/countbenchqa/
372
+
373
+ ## Ethics and Safety
374
+
375
+ Ethics and safety evaluation approach and results.
376
+
377
+ ### Evaluation Approach
378
+
379
+ Our evaluation methods include structured evaluations and internal red-teaming
380
+ testing of relevant content policies. Red-teaming was conducted by a number of
381
+ different teams, each with different goals and human evaluation metrics. These
382
+ models were evaluated against a number of different categories relevant to
383
+ ethics and safety, including:
384
+
385
+ - **Child Safety**: Evaluation of text-to-text and image to text prompts
386
+ covering child safety policies, including child sexual abuse and
387
+ exploitation.
388
+ - **Content Safety:** Evaluation of text-to-text and image to text prompts
389
+ covering safety policies including, harassment, violence and gore, and hate
390
+ speech.
391
+ - **Representational Harms**: Evaluation of text-to-text and image to text
392
+ prompts covering safety policies including bias, stereotyping, and harmful
393
+ associations or inaccuracies.
394
+
395
+ In addition to development level evaluations, we conduct "assurance
396
+ evaluations" which are our 'arms-length' internal evaluations for responsibility
397
+ governance decision making. They are conducted separately from the model
398
+ development team, to inform decision making about release. High level findings
399
+ are fed back to the model team, but prompt sets are held-out to prevent
400
+ overfitting and preserve the results' ability to inform decision making.
401
+ Assurance evaluation results are reported to our Responsibility & Safety Council
402
+ as part of release review.
403
+
404
+ ### Evaluation Results
405
+
406
+ For all areas of safety testing, we saw major improvements in the categories of
407
+ child safety, content safety, and representational harms relative to previous
408
+ Gemma models. All testing was conducted without safety filters to evaluate the
409
+ model capabilities and behaviors. For both text-to-text and image-to-text, and
410
+ across all model sizes, the model produced minimal policy violations, and showed
411
+ significant improvements over previous Gemma models' performance with respect
412
+ to ungrounded inferences. A limitation of our evaluations was they included only
413
+ English language prompts.
414
+
415
+ ## Usage and Limitations
416
+
417
+ These models have certain limitations that users should be aware of.
418
+
419
+ ### Intended Usage
420
+
421
+ Open vision-language models (VLMs) models have a wide range of applications
422
+ across various industries and domains. The following list of potential uses is
423
+ not comprehensive. The purpose of this list is to provide contextual information
424
+ about the possible use-cases that the model creators considered as part of model
425
+ training and development.
426
+
427
+ - Content Creation and Communication
428
+ - Text Generation: These models can be used to generate creative text
429
+ formats such as poems, scripts, code, marketing copy, and email drafts.
430
+ - Chatbots and Conversational AI: Power conversational interfaces
431
+ for customer service, virtual assistants, or interactive applications.
432
+ - Text Summarization: Generate concise summaries of a text corpus,
433
+ research papers, or reports.
434
+ - Image Data Extraction: These models can be used to extract,
435
+ interpret, and summarize visual data for text communications.
436
+ - Research and Education
437
+ - Natural Language Processing (NLP) and VLM Research: These
438
+ models can serve as a foundation for researchers to experiment with VLM
439
+ and NLP techniques, develop algorithms, and contribute to the
440
+ advancement of the field.
441
+ - Language Learning Tools: Support interactive language learning
442
+ experiences, aiding in grammar correction or providing writing practice.
443
+ - Knowledge Exploration: Assist researchers in exploring large
444
+ bodies of text by generating summaries or answering questions about
445
+ specific topics.
446
+
447
+ ### Limitations
448
+
449
+ - Training Data
450
+ - The quality and diversity of the training data significantly
451
+ influence the model's capabilities. Biases or gaps in the training data
452
+ can lead to limitations in the model's responses.
453
+ - The scope of the training dataset determines the subject areas
454
+ the model can handle effectively.
455
+ - Context and Task Complexity
456
+ - Models are better at tasks that can be framed with clear
457
+ prompts and instructions. Open-ended or highly complex tasks might be
458
+ challenging.
459
+ - A model's performance can be influenced by the amount of context
460
+ provided (longer context generally leads to better outputs, up to a
461
+ certain point).
462
+ - Language Ambiguity and Nuance
463
+ - Natural language is inherently complex. Models might struggle
464
+ to grasp subtle nuances, sarcasm, or figurative language.
465
+ - Factual Accuracy
466
+ - Models generate responses based on information they learned
467
+ from their training datasets, but they are not knowledge bases. They
468
+ may generate incorrect or outdated factual statements.
469
+ - Common Sense
470
+ - Models rely on statistical patterns in language. They might
471
+ lack the ability to apply common sense reasoning in certain situations.
472
+
473
+ ### Ethical Considerations and Risks
474
+
475
+ The development of vision-language models (VLMs) raises several ethical
476
+ concerns. In creating an open model, we have carefully considered the following:
477
+
478
+ - Bias and Fairness
479
+ - VLMs trained on large-scale, real-world text and image data can
480
+ reflect socio-cultural biases embedded in the training material. These
481
+ models underwent careful scrutiny, input data pre-processing described
482
+ and posterior evaluations reported in this card.
483
+ - Misinformation and Misuse
484
+ - VLMs can be misused to generate text that is false, misleading,
485
+ or harmful.
486
+ - Guidelines are provided for responsible use with the model, see the
487
+ [Responsible Generative AI Toolkit][rai-toolkit].
488
+ - Transparency and Accountability:
489
+ - This model card summarizes details on the models' architecture,
490
+ capabilities, limitations, and evaluation processes.
491
+ - A responsibly developed open model offers the opportunity to
492
+ share innovation by making VLM technology accessible to developers and
493
+ researchers across the AI ecosystem.
494
+
495
+ Risks identified and mitigations:
496
+
497
+ - **Perpetuation of biases**: It's encouraged to perform continuous
498
+ monitoring (using evaluation metrics, human review) and the exploration of
499
+ de-biasing techniques during model training, fine-tuning, and other use
500
+ cases.
501
+ - **Generation of harmful content**: Mechanisms and guidelines for content
502
+ safety are essential. Developers are encouraged to exercise caution and
503
+ implement appropriate content safety safeguards based on their specific
504
+ product policies and application use cases.
505
+ - **Misuse for malicious purposes**: Technical limitations and developer
506
+ and end-user education can help mitigate against malicious applications of
507
+ VLMs. Educational resources and reporting mechanisms for users to flag
508
+ misuse are provided. Prohibited uses of Gemma models are outlined in the
509
+ [Gemma Prohibited Use Policy][prohibited-use].
510
+ - **Privacy violations**: Models were trained on data filtered for removal
511
+ of certain personal information and other sensitive data. Developers are
512
+ encouraged to adhere to privacy regulations with privacy-preserving
513
+ techniques.
514
+
515
+ ### Benefits
516
+
517
+ At the time of release, this family of models provides high-performance open
518
+ vision-language model implementations designed from the ground up for
519
+ responsible AI development compared to similarly sized models.
520
+
521
+ Using the benchmark evaluation metrics described in this document, these models
522
+ have shown to provide superior performance to other, comparably-sized open model
523
+ alternatives.
524
+
525
+ [g3-tech-report]: https://goo.gle/Gemma3Report
526
+ [rai-toolkit]: https://ai.google.dev/responsible
527
+ [kaggle-gemma]: https://www.kaggle.com/models/google/gemma-3
528
+ [vertex-mg-gemma3]: https://console.cloud.google.com/vertex-ai/publishers/google/model-garden/gemma3
529
+ [terms]: https://ai.google.dev/gemma/terms
530
+ [safety-policies]: https://ai.google/static/documents/ai-responsibility-update-published-february-2025.pdf
531
+ [prohibited-use]: https://ai.google.dev/gemma/prohibited_use_policy
532
+ [tpu]: https://cloud.google.com/tpu/docs/intro-to-tpu
533
+ [sustainability]: https://sustainability.google/operating-sustainably/
534
+ [jax]: https://github.com/jax-ml/jax
535
+ [ml-pathways]: https://blog.google/technology/ai/introducing-pathways-next-generation-ai-architecture/
536
+ [sustainability]: https://sustainability.google/operating-sustainably/
537
+ [gemini-2-paper]: https://arxiv.org/abs/2312.11805
chat_template.jinja ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {{ bos_token }}
2
+ {%- if messages[0]['role'] == 'system' -%}
3
+ {%- if messages[0]['content'] is string -%}
4
+ {%- set first_user_prefix = messages[0]['content'] + '
5
+
6
+ ' -%}
7
+ {%- else -%}
8
+ {%- set first_user_prefix = messages[0]['content'][0]['text'] + '
9
+
10
+ ' -%}
11
+ {%- endif -%}
12
+ {%- set loop_messages = messages[1:] -%}
13
+ {%- else -%}
14
+ {%- set first_user_prefix = "" -%}
15
+ {%- set loop_messages = messages -%}
16
+ {%- endif -%}
17
+ {%- for message in loop_messages -%}
18
+ {%- if (message['role'] == 'user') != (loop.index0 % 2 == 0) -%}
19
+ {{ raise_exception("Conversation roles must alternate user/assistant/user/assistant/...") }}
20
+ {%- endif -%}
21
+ {%- if (message['role'] == 'assistant') -%}
22
+ {%- set role = "model" -%}
23
+ {%- else -%}
24
+ {%- set role = message['role'] -%}
25
+ {%- endif -%}
26
+ {{ '<start_of_turn>' + role + '
27
+ ' + (first_user_prefix if loop.first else "") }}
28
+ {%- if message['content'] is string -%}
29
+ {{ message['content'] | trim }}
30
+ {%- elif message['content'] is iterable -%}
31
+ {%- for item in message['content'] -%}
32
+ {%- if item['type'] == 'image' -%}
33
+ {{ '<start_of_image>' }}
34
+ {%- elif item['type'] == 'text' -%}
35
+ {{ item['text'] | trim }}
36
+ {%- endif -%}
37
+ {%- endfor -%}
38
+ {%- else -%}
39
+ {{ raise_exception("Invalid content type") }}
40
+ {%- endif -%}
41
+ {{ '<end_of_turn>
42
+ ' }}
43
+ {%- endfor -%}
44
+ {%- if add_generation_prompt -%}
45
+ {{'<start_of_turn>model
46
+ '}}
47
+ {%- endif -%}
config.json ADDED
@@ -0,0 +1,318 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Gemma3ForConditionalGeneration"
4
+ ],
5
+ "boi_token_index": 255999,
6
+ "dtype": "bfloat16",
7
+ "eoi_token_index": 256000,
8
+ "eos_token_id": [
9
+ 1,
10
+ 106
11
+ ],
12
+ "image_token_index": 262144,
13
+ "initializer_range": 0.02,
14
+ "mm_tokens_per_image": 256,
15
+ "model_type": "gemma3",
16
+ "quantization_config": {
17
+ "config_groups": {
18
+ "group_0": {
19
+ "format": "nvfp4-pack-quantized",
20
+ "input_activations": {
21
+ "actorder": null,
22
+ "block_structure": null,
23
+ "dynamic": "local",
24
+ "group_size": 16,
25
+ "num_bits": 4,
26
+ "observer": "static_minmax",
27
+ "observer_kwargs": {},
28
+ "strategy": "tensor_group",
29
+ "symmetric": true,
30
+ "type": "float"
31
+ },
32
+ "output_activations": null,
33
+ "targets": [
34
+ "Linear"
35
+ ],
36
+ "weights": {
37
+ "actorder": null,
38
+ "block_structure": null,
39
+ "dynamic": false,
40
+ "group_size": 16,
41
+ "num_bits": 4,
42
+ "observer": "static_minmax",
43
+ "observer_kwargs": {},
44
+ "strategy": "tensor_group",
45
+ "symmetric": true,
46
+ "type": "float"
47
+ }
48
+ }
49
+ },
50
+ "format": "nvfp4-pack-quantized",
51
+ "global_compression_ratio": null,
52
+ "ignore": [
53
+ "model.vision_tower.vision_model.encoder.layers.0.self_attn.k_proj",
54
+ "model.vision_tower.vision_model.encoder.layers.0.self_attn.v_proj",
55
+ "model.vision_tower.vision_model.encoder.layers.0.self_attn.q_proj",
56
+ "model.vision_tower.vision_model.encoder.layers.0.self_attn.out_proj",
57
+ "model.vision_tower.vision_model.encoder.layers.0.mlp.fc1",
58
+ "model.vision_tower.vision_model.encoder.layers.0.mlp.fc2",
59
+ "model.vision_tower.vision_model.encoder.layers.1.self_attn.k_proj",
60
+ "model.vision_tower.vision_model.encoder.layers.1.self_attn.v_proj",
61
+ "model.vision_tower.vision_model.encoder.layers.1.self_attn.q_proj",
62
+ "model.vision_tower.vision_model.encoder.layers.1.self_attn.out_proj",
63
+ "model.vision_tower.vision_model.encoder.layers.1.mlp.fc1",
64
+ "model.vision_tower.vision_model.encoder.layers.1.mlp.fc2",
65
+ "model.vision_tower.vision_model.encoder.layers.2.self_attn.k_proj",
66
+ "model.vision_tower.vision_model.encoder.layers.2.self_attn.v_proj",
67
+ "model.vision_tower.vision_model.encoder.layers.2.self_attn.q_proj",
68
+ "model.vision_tower.vision_model.encoder.layers.2.self_attn.out_proj",
69
+ "model.vision_tower.vision_model.encoder.layers.2.mlp.fc1",
70
+ "model.vision_tower.vision_model.encoder.layers.2.mlp.fc2",
71
+ "model.vision_tower.vision_model.encoder.layers.3.self_attn.k_proj",
72
+ "model.vision_tower.vision_model.encoder.layers.3.self_attn.v_proj",
73
+ "model.vision_tower.vision_model.encoder.layers.3.self_attn.q_proj",
74
+ "model.vision_tower.vision_model.encoder.layers.3.self_attn.out_proj",
75
+ "model.vision_tower.vision_model.encoder.layers.3.mlp.fc1",
76
+ "model.vision_tower.vision_model.encoder.layers.3.mlp.fc2",
77
+ "model.vision_tower.vision_model.encoder.layers.4.self_attn.k_proj",
78
+ "model.vision_tower.vision_model.encoder.layers.4.self_attn.v_proj",
79
+ "model.vision_tower.vision_model.encoder.layers.4.self_attn.q_proj",
80
+ "model.vision_tower.vision_model.encoder.layers.4.self_attn.out_proj",
81
+ "model.vision_tower.vision_model.encoder.layers.4.mlp.fc1",
82
+ "model.vision_tower.vision_model.encoder.layers.4.mlp.fc2",
83
+ "model.vision_tower.vision_model.encoder.layers.5.self_attn.k_proj",
84
+ "model.vision_tower.vision_model.encoder.layers.5.self_attn.v_proj",
85
+ "model.vision_tower.vision_model.encoder.layers.5.self_attn.q_proj",
86
+ "model.vision_tower.vision_model.encoder.layers.5.self_attn.out_proj",
87
+ "model.vision_tower.vision_model.encoder.layers.5.mlp.fc1",
88
+ "model.vision_tower.vision_model.encoder.layers.5.mlp.fc2",
89
+ "model.vision_tower.vision_model.encoder.layers.6.self_attn.k_proj",
90
+ "model.vision_tower.vision_model.encoder.layers.6.self_attn.v_proj",
91
+ "model.vision_tower.vision_model.encoder.layers.6.self_attn.q_proj",
92
+ "model.vision_tower.vision_model.encoder.layers.6.self_attn.out_proj",
93
+ "model.vision_tower.vision_model.encoder.layers.6.mlp.fc1",
94
+ "model.vision_tower.vision_model.encoder.layers.6.mlp.fc2",
95
+ "model.vision_tower.vision_model.encoder.layers.7.self_attn.k_proj",
96
+ "model.vision_tower.vision_model.encoder.layers.7.self_attn.v_proj",
97
+ "model.vision_tower.vision_model.encoder.layers.7.self_attn.q_proj",
98
+ "model.vision_tower.vision_model.encoder.layers.7.self_attn.out_proj",
99
+ "model.vision_tower.vision_model.encoder.layers.7.mlp.fc1",
100
+ "model.vision_tower.vision_model.encoder.layers.7.mlp.fc2",
101
+ "model.vision_tower.vision_model.encoder.layers.8.self_attn.k_proj",
102
+ "model.vision_tower.vision_model.encoder.layers.8.self_attn.v_proj",
103
+ "model.vision_tower.vision_model.encoder.layers.8.self_attn.q_proj",
104
+ "model.vision_tower.vision_model.encoder.layers.8.self_attn.out_proj",
105
+ "model.vision_tower.vision_model.encoder.layers.8.mlp.fc1",
106
+ "model.vision_tower.vision_model.encoder.layers.8.mlp.fc2",
107
+ "model.vision_tower.vision_model.encoder.layers.9.self_attn.k_proj",
108
+ "model.vision_tower.vision_model.encoder.layers.9.self_attn.v_proj",
109
+ "model.vision_tower.vision_model.encoder.layers.9.self_attn.q_proj",
110
+ "model.vision_tower.vision_model.encoder.layers.9.self_attn.out_proj",
111
+ "model.vision_tower.vision_model.encoder.layers.9.mlp.fc1",
112
+ "model.vision_tower.vision_model.encoder.layers.9.mlp.fc2",
113
+ "model.vision_tower.vision_model.encoder.layers.10.self_attn.k_proj",
114
+ "model.vision_tower.vision_model.encoder.layers.10.self_attn.v_proj",
115
+ "model.vision_tower.vision_model.encoder.layers.10.self_attn.q_proj",
116
+ "model.vision_tower.vision_model.encoder.layers.10.self_attn.out_proj",
117
+ "model.vision_tower.vision_model.encoder.layers.10.mlp.fc1",
118
+ "model.vision_tower.vision_model.encoder.layers.10.mlp.fc2",
119
+ "model.vision_tower.vision_model.encoder.layers.11.self_attn.k_proj",
120
+ "model.vision_tower.vision_model.encoder.layers.11.self_attn.v_proj",
121
+ "model.vision_tower.vision_model.encoder.layers.11.self_attn.q_proj",
122
+ "model.vision_tower.vision_model.encoder.layers.11.self_attn.out_proj",
123
+ "model.vision_tower.vision_model.encoder.layers.11.mlp.fc1",
124
+ "model.vision_tower.vision_model.encoder.layers.11.mlp.fc2",
125
+ "model.vision_tower.vision_model.encoder.layers.12.self_attn.k_proj",
126
+ "model.vision_tower.vision_model.encoder.layers.12.self_attn.v_proj",
127
+ "model.vision_tower.vision_model.encoder.layers.12.self_attn.q_proj",
128
+ "model.vision_tower.vision_model.encoder.layers.12.self_attn.out_proj",
129
+ "model.vision_tower.vision_model.encoder.layers.12.mlp.fc1",
130
+ "model.vision_tower.vision_model.encoder.layers.12.mlp.fc2",
131
+ "model.vision_tower.vision_model.encoder.layers.13.self_attn.k_proj",
132
+ "model.vision_tower.vision_model.encoder.layers.13.self_attn.v_proj",
133
+ "model.vision_tower.vision_model.encoder.layers.13.self_attn.q_proj",
134
+ "model.vision_tower.vision_model.encoder.layers.13.self_attn.out_proj",
135
+ "model.vision_tower.vision_model.encoder.layers.13.mlp.fc1",
136
+ "model.vision_tower.vision_model.encoder.layers.13.mlp.fc2",
137
+ "model.vision_tower.vision_model.encoder.layers.14.self_attn.k_proj",
138
+ "model.vision_tower.vision_model.encoder.layers.14.self_attn.v_proj",
139
+ "model.vision_tower.vision_model.encoder.layers.14.self_attn.q_proj",
140
+ "model.vision_tower.vision_model.encoder.layers.14.self_attn.out_proj",
141
+ "model.vision_tower.vision_model.encoder.layers.14.mlp.fc1",
142
+ "model.vision_tower.vision_model.encoder.layers.14.mlp.fc2",
143
+ "model.vision_tower.vision_model.encoder.layers.15.self_attn.k_proj",
144
+ "model.vision_tower.vision_model.encoder.layers.15.self_attn.v_proj",
145
+ "model.vision_tower.vision_model.encoder.layers.15.self_attn.q_proj",
146
+ "model.vision_tower.vision_model.encoder.layers.15.self_attn.out_proj",
147
+ "model.vision_tower.vision_model.encoder.layers.15.mlp.fc1",
148
+ "model.vision_tower.vision_model.encoder.layers.15.mlp.fc2",
149
+ "model.vision_tower.vision_model.encoder.layers.16.self_attn.k_proj",
150
+ "model.vision_tower.vision_model.encoder.layers.16.self_attn.v_proj",
151
+ "model.vision_tower.vision_model.encoder.layers.16.self_attn.q_proj",
152
+ "model.vision_tower.vision_model.encoder.layers.16.self_attn.out_proj",
153
+ "model.vision_tower.vision_model.encoder.layers.16.mlp.fc1",
154
+ "model.vision_tower.vision_model.encoder.layers.16.mlp.fc2",
155
+ "model.vision_tower.vision_model.encoder.layers.17.self_attn.k_proj",
156
+ "model.vision_tower.vision_model.encoder.layers.17.self_attn.v_proj",
157
+ "model.vision_tower.vision_model.encoder.layers.17.self_attn.q_proj",
158
+ "model.vision_tower.vision_model.encoder.layers.17.self_attn.out_proj",
159
+ "model.vision_tower.vision_model.encoder.layers.17.mlp.fc1",
160
+ "model.vision_tower.vision_model.encoder.layers.17.mlp.fc2",
161
+ "model.vision_tower.vision_model.encoder.layers.18.self_attn.k_proj",
162
+ "model.vision_tower.vision_model.encoder.layers.18.self_attn.v_proj",
163
+ "model.vision_tower.vision_model.encoder.layers.18.self_attn.q_proj",
164
+ "model.vision_tower.vision_model.encoder.layers.18.self_attn.out_proj",
165
+ "model.vision_tower.vision_model.encoder.layers.18.mlp.fc1",
166
+ "model.vision_tower.vision_model.encoder.layers.18.mlp.fc2",
167
+ "model.vision_tower.vision_model.encoder.layers.19.self_attn.k_proj",
168
+ "model.vision_tower.vision_model.encoder.layers.19.self_attn.v_proj",
169
+ "model.vision_tower.vision_model.encoder.layers.19.self_attn.q_proj",
170
+ "model.vision_tower.vision_model.encoder.layers.19.self_attn.out_proj",
171
+ "model.vision_tower.vision_model.encoder.layers.19.mlp.fc1",
172
+ "model.vision_tower.vision_model.encoder.layers.19.mlp.fc2",
173
+ "model.vision_tower.vision_model.encoder.layers.20.self_attn.k_proj",
174
+ "model.vision_tower.vision_model.encoder.layers.20.self_attn.v_proj",
175
+ "model.vision_tower.vision_model.encoder.layers.20.self_attn.q_proj",
176
+ "model.vision_tower.vision_model.encoder.layers.20.self_attn.out_proj",
177
+ "model.vision_tower.vision_model.encoder.layers.20.mlp.fc1",
178
+ "model.vision_tower.vision_model.encoder.layers.20.mlp.fc2",
179
+ "model.vision_tower.vision_model.encoder.layers.21.self_attn.k_proj",
180
+ "model.vision_tower.vision_model.encoder.layers.21.self_attn.v_proj",
181
+ "model.vision_tower.vision_model.encoder.layers.21.self_attn.q_proj",
182
+ "model.vision_tower.vision_model.encoder.layers.21.self_attn.out_proj",
183
+ "model.vision_tower.vision_model.encoder.layers.21.mlp.fc1",
184
+ "model.vision_tower.vision_model.encoder.layers.21.mlp.fc2",
185
+ "model.vision_tower.vision_model.encoder.layers.22.self_attn.k_proj",
186
+ "model.vision_tower.vision_model.encoder.layers.22.self_attn.v_proj",
187
+ "model.vision_tower.vision_model.encoder.layers.22.self_attn.q_proj",
188
+ "model.vision_tower.vision_model.encoder.layers.22.self_attn.out_proj",
189
+ "model.vision_tower.vision_model.encoder.layers.22.mlp.fc1",
190
+ "model.vision_tower.vision_model.encoder.layers.22.mlp.fc2",
191
+ "model.vision_tower.vision_model.encoder.layers.23.self_attn.k_proj",
192
+ "model.vision_tower.vision_model.encoder.layers.23.self_attn.v_proj",
193
+ "model.vision_tower.vision_model.encoder.layers.23.self_attn.q_proj",
194
+ "model.vision_tower.vision_model.encoder.layers.23.self_attn.out_proj",
195
+ "model.vision_tower.vision_model.encoder.layers.23.mlp.fc1",
196
+ "model.vision_tower.vision_model.encoder.layers.23.mlp.fc2",
197
+ "model.vision_tower.vision_model.encoder.layers.24.self_attn.k_proj",
198
+ "model.vision_tower.vision_model.encoder.layers.24.self_attn.v_proj",
199
+ "model.vision_tower.vision_model.encoder.layers.24.self_attn.q_proj",
200
+ "model.vision_tower.vision_model.encoder.layers.24.self_attn.out_proj",
201
+ "model.vision_tower.vision_model.encoder.layers.24.mlp.fc1",
202
+ "model.vision_tower.vision_model.encoder.layers.24.mlp.fc2",
203
+ "model.vision_tower.vision_model.encoder.layers.25.self_attn.k_proj",
204
+ "model.vision_tower.vision_model.encoder.layers.25.self_attn.v_proj",
205
+ "model.vision_tower.vision_model.encoder.layers.25.self_attn.q_proj",
206
+ "model.vision_tower.vision_model.encoder.layers.25.self_attn.out_proj",
207
+ "model.vision_tower.vision_model.encoder.layers.25.mlp.fc1",
208
+ "model.vision_tower.vision_model.encoder.layers.25.mlp.fc2",
209
+ "model.vision_tower.vision_model.encoder.layers.26.self_attn.k_proj",
210
+ "model.vision_tower.vision_model.encoder.layers.26.self_attn.v_proj",
211
+ "model.vision_tower.vision_model.encoder.layers.26.self_attn.q_proj",
212
+ "model.vision_tower.vision_model.encoder.layers.26.self_attn.out_proj",
213
+ "model.vision_tower.vision_model.encoder.layers.26.mlp.fc1",
214
+ "model.vision_tower.vision_model.encoder.layers.26.mlp.fc2",
215
+ "lm_head"
216
+ ],
217
+ "kv_cache_scheme": null,
218
+ "quant_method": "compressed-tensors",
219
+ "quantization_status": "compressed",
220
+ "sparsity_config": {},
221
+ "transform_config": {},
222
+ "version": "0.12.3.a20251028"
223
+ },
224
+ "text_config": {
225
+ "_sliding_window_pattern": 6,
226
+ "attention_bias": false,
227
+ "attention_dropout": 0.0,
228
+ "attn_logit_softcapping": null,
229
+ "final_logit_softcapping": null,
230
+ "head_dim": 256,
231
+ "hidden_activation": "gelu_pytorch_tanh",
232
+ "hidden_size": 3840,
233
+ "initializer_range": 0.02,
234
+ "intermediate_size": 15360,
235
+ "layer_types": [
236
+ "sliding_attention",
237
+ "sliding_attention",
238
+ "sliding_attention",
239
+ "sliding_attention",
240
+ "sliding_attention",
241
+ "full_attention",
242
+ "sliding_attention",
243
+ "sliding_attention",
244
+ "sliding_attention",
245
+ "sliding_attention",
246
+ "sliding_attention",
247
+ "full_attention",
248
+ "sliding_attention",
249
+ "sliding_attention",
250
+ "sliding_attention",
251
+ "sliding_attention",
252
+ "sliding_attention",
253
+ "full_attention",
254
+ "sliding_attention",
255
+ "sliding_attention",
256
+ "sliding_attention",
257
+ "sliding_attention",
258
+ "sliding_attention",
259
+ "full_attention",
260
+ "sliding_attention",
261
+ "sliding_attention",
262
+ "sliding_attention",
263
+ "sliding_attention",
264
+ "sliding_attention",
265
+ "full_attention",
266
+ "sliding_attention",
267
+ "sliding_attention",
268
+ "sliding_attention",
269
+ "sliding_attention",
270
+ "sliding_attention",
271
+ "full_attention",
272
+ "sliding_attention",
273
+ "sliding_attention",
274
+ "sliding_attention",
275
+ "sliding_attention",
276
+ "sliding_attention",
277
+ "full_attention",
278
+ "sliding_attention",
279
+ "sliding_attention",
280
+ "sliding_attention",
281
+ "sliding_attention",
282
+ "sliding_attention",
283
+ "full_attention"
284
+ ],
285
+ "max_position_embeddings": 131072,
286
+ "model_type": "gemma3_text",
287
+ "num_attention_heads": 16,
288
+ "num_hidden_layers": 48,
289
+ "num_key_value_heads": 8,
290
+ "query_pre_attn_scalar": 256,
291
+ "rms_norm_eps": 1e-06,
292
+ "rope_local_base_freq": 10000.0,
293
+ "rope_scaling": {
294
+ "factor": 8.0,
295
+ "rope_type": "linear"
296
+ },
297
+ "rope_theta": 1000000.0,
298
+ "sliding_window": 1024,
299
+ "use_bidirectional_attention": false,
300
+ "use_cache": true,
301
+ "vocab_size": 262208
302
+ },
303
+ "transformers_version": "4.57.1",
304
+ "vision_config": {
305
+ "attention_dropout": 0.0,
306
+ "hidden_act": "gelu_pytorch_tanh",
307
+ "hidden_size": 1152,
308
+ "image_size": 896,
309
+ "intermediate_size": 4304,
310
+ "layer_norm_eps": 1e-06,
311
+ "model_type": "siglip_vision_model",
312
+ "num_attention_heads": 16,
313
+ "num_channels": 3,
314
+ "num_hidden_layers": 27,
315
+ "patch_size": 14,
316
+ "vision_use_head": false
317
+ }
318
+ }
generation_config.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token_id": 2,
3
+ "cache_implementation": "hybrid",
4
+ "do_sample": true,
5
+ "eos_token_id": [
6
+ 1,
7
+ 106
8
+ ],
9
+ "pad_token_id": 0,
10
+ "top_k": 64,
11
+ "top_p": 0.95,
12
+ "transformers_version": "4.57.1"
13
+ }
model-00001-of-00003.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9b1a5404aa5f0212ef5154ab07630ca412a3b53e2cfc73dc5d383a83051f196a
3
+ size 4996570464
model-00002-of-00003.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8dd269d16dbc07e45d6013d9dfed5288564d5bbba538c433602c7a3398da247c
3
+ size 3913167880
model-00003-of-00003.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ead2180d70715d2eca76bf634d4defc4d0f41a8690e74c3cc8735177ffcf853d
3
+ size 2013757584
model.safetensors.index.json ADDED
The diff for this file is too large to render. See raw diff
 
preprocessor_config.json ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "do_convert_rgb": null,
3
+ "do_normalize": true,
4
+ "do_pan_and_scan": null,
5
+ "do_rescale": true,
6
+ "do_resize": true,
7
+ "image_mean": [
8
+ 0.5,
9
+ 0.5,
10
+ 0.5
11
+ ],
12
+ "image_processor_type": "Gemma3ImageProcessor",
13
+ "image_seq_length": 256,
14
+ "image_std": [
15
+ 0.5,
16
+ 0.5,
17
+ 0.5
18
+ ],
19
+ "pan_and_scan_max_num_crops": null,
20
+ "pan_and_scan_min_crop_size": null,
21
+ "pan_and_scan_min_ratio_to_activate": null,
22
+ "processor_class": "Gemma3Processor",
23
+ "resample": 2,
24
+ "rescale_factor": 0.00392156862745098,
25
+ "size": {
26
+ "height": 896,
27
+ "width": 896
28
+ }
29
+ }
processor_config.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "image_seq_length": 256,
3
+ "processor_class": "Gemma3Processor"
4
+ }
recipe.yaml ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ default_stage:
2
+ default_modifiers:
3
+ QuantizationModifier:
4
+ targets: [Linear]
5
+ ignore: [lm_head, 're:model\.vision_tower.*', 're:model\.multi_modal_projector.*']
6
+ scheme: NVFP4
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