coder3101 commited on
Commit
1aaff8c
·
verified ·
1 Parent(s): a59a16d

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +502 -157
README.md CHANGED
@@ -1,199 +1,544 @@
1
  ---
 
2
  library_name: transformers
3
- tags: []
 
 
 
 
 
 
 
 
 
 
 
4
  ---
 
5
 
6
- # Model Card for Model ID
7
 
8
- <!-- Provide a quick summary of what the model is/does. -->
 
 
 
 
 
 
 
 
 
 
9
 
 
10
 
 
 
 
 
11
 
12
- ## Model Details
13
 
14
- ### Model Description
15
 
16
- <!-- Provide a longer summary of what this model is. -->
17
 
18
- This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
19
 
20
- - **Developed by:** [More Information Needed]
21
- - **Funded by [optional]:** [More Information Needed]
22
- - **Shared by [optional]:** [More Information Needed]
23
- - **Model type:** [More Information Needed]
24
- - **Language(s) (NLP):** [More Information Needed]
25
- - **License:** [More Information Needed]
26
- - **Finetuned from model [optional]:** [More Information Needed]
27
 
28
- ### Model Sources [optional]
 
 
 
29
 
30
- <!-- Provide the basic links for the model. -->
31
 
32
- - **Repository:** [More Information Needed]
33
- - **Paper [optional]:** [More Information Needed]
34
- - **Demo [optional]:** [More Information Needed]
35
 
36
- ## Uses
37
 
38
- <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
39
 
40
- ### Direct Use
41
 
42
- <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
 
 
 
 
 
 
 
 
 
 
 
43
 
44
- [More Information Needed]
45
 
46
- ### Downstream Use [optional]
 
 
 
 
 
47
 
48
- <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
 
 
 
49
 
50
- [More Information Needed]
51
 
52
- ### Out-of-Scope Use
53
 
54
- <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
 
 
55
 
56
- [More Information Needed]
57
 
58
- ## Bias, Risks, and Limitations
59
 
60
- <!-- This section is meant to convey both technical and sociotechnical limitations. -->
61
 
62
- [More Information Needed]
 
 
63
 
64
- ### Recommendations
65
 
66
- <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
 
 
 
 
 
 
 
 
 
 
 
67
 
68
- Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
 
69
 
70
- ## How to Get Started with the Model
71
 
72
- Use the code below to get started with the model.
 
 
73
 
74
- [More Information Needed]
75
 
76
- ## Training Details
77
 
78
- ### Training Data
 
 
79
 
80
- <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
81
 
82
- [More Information Needed]
83
-
84
- ### Training Procedure
85
-
86
- <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
87
-
88
- #### Preprocessing [optional]
89
-
90
- [More Information Needed]
91
-
92
-
93
- #### Training Hyperparameters
94
-
95
- - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
96
-
97
- #### Speeds, Sizes, Times [optional]
98
-
99
- <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
100
-
101
- [More Information Needed]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
102
 
103
  ## Evaluation
104
 
105
- <!-- This section describes the evaluation protocols and provides the results. -->
106
-
107
- ### Testing Data, Factors & Metrics
108
-
109
- #### Testing Data
110
-
111
- <!-- This should link to a Dataset Card if possible. -->
112
-
113
- [More Information Needed]
114
-
115
- #### Factors
116
-
117
- <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
118
-
119
- [More Information Needed]
120
-
121
- #### Metrics
122
-
123
- <!-- These are the evaluation metrics being used, ideally with a description of why. -->
124
-
125
- [More Information Needed]
126
-
127
- ### Results
128
-
129
- [More Information Needed]
130
-
131
- #### Summary
132
-
133
-
134
-
135
- ## Model Examination [optional]
136
-
137
- <!-- Relevant interpretability work for the model goes here -->
138
-
139
- [More Information Needed]
140
-
141
- ## Environmental Impact
142
-
143
- <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
144
-
145
- Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
146
-
147
- - **Hardware Type:** [More Information Needed]
148
- - **Hours used:** [More Information Needed]
149
- - **Cloud Provider:** [More Information Needed]
150
- - **Compute Region:** [More Information Needed]
151
- - **Carbon Emitted:** [More Information Needed]
152
-
153
- ## Technical Specifications [optional]
154
-
155
- ### Model Architecture and Objective
156
-
157
- [More Information Needed]
158
-
159
- ### Compute Infrastructure
160
-
161
- [More Information Needed]
162
-
163
- #### Hardware
164
-
165
- [More Information Needed]
166
-
167
- #### Software
168
-
169
- [More Information Needed]
170
-
171
- ## Citation [optional]
172
-
173
- <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
174
-
175
- **BibTeX:**
176
-
177
- [More Information Needed]
178
-
179
- **APA:**
180
-
181
- [More Information Needed]
182
-
183
- ## Glossary [optional]
184
-
185
- <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
186
-
187
- [More Information Needed]
188
-
189
- ## More Information [optional]
190
-
191
- [More Information Needed]
192
-
193
- ## Model Card Authors [optional]
194
-
195
- [More Information Needed]
196
-
197
- ## Model Card Contact
198
-
199
- [More Information Needed]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ license: gemma
3
  library_name: transformers
4
+ pipeline_tag: text-generation
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-1b-pt
11
+ tags:
12
+ - heretic
13
+ - uncensored
14
+ - decensored
15
+ - abliterated
16
  ---
17
+ # This is a decensored version of [google/gemma-3-1b-it](https://huggingface.co/google/gemma-3-1b-it), made using [Heretic](https://github.com/p-e-w/heretic) v1.0.1
18
 
19
+ ## Abliteration parameters
20
 
21
+ | Parameter | Value |
22
+ | :-------- | :---: |
23
+ | **direction_index** | 15.42 |
24
+ | **attn.o_proj.max_weight** | 1.44 |
25
+ | **attn.o_proj.max_weight_position** | 16.56 |
26
+ | **attn.o_proj.min_weight** | 1.32 |
27
+ | **attn.o_proj.min_weight_distance** | 6.34 |
28
+ | **mlp.down_proj.max_weight** | 1.27 |
29
+ | **mlp.down_proj.max_weight_position** | 17.74 |
30
+ | **mlp.down_proj.min_weight** | 0.11 |
31
+ | **mlp.down_proj.min_weight_distance** | 11.95 |
32
 
33
+ ## Performance
34
 
35
+ | Metric | This model | Original model ([google/gemma-3-1b-it](https://huggingface.co/google/gemma-3-1b-it)) |
36
+ | :----- | :--------: | :---------------------------: |
37
+ | **KL divergence** | 0.78 | 0 *(by definition)* |
38
+ | **Refusals** | 1/100 | 99/100 |
39
 
40
+ -----
41
 
 
42
 
43
+ # Gemma 3 model card
44
 
45
+ **Model Page**: [Gemma](https://ai.google.dev/gemma/docs/core)
46
 
47
+ **Resources and Technical Documentation**:
 
 
 
 
 
 
48
 
49
+ * [Gemma 3 Technical Report][g3-tech-report]
50
+ * [Responsible Generative AI Toolkit][rai-toolkit]
51
+ * [Gemma on Kaggle][kaggle-gemma]
52
+ * [Gemma on Vertex Model Garden][vertex-mg-gemma3]
53
 
54
+ **Terms of Use**: [Terms][terms]
55
 
56
+ **Authors**: Google DeepMind
 
 
57
 
58
+ ## Model Information
59
 
60
+ Summary description and brief definition of inputs and outputs.
61
 
62
+ ### Description
63
 
64
+ Gemma is a family of lightweight, state-of-the-art open models from Google,
65
+ built from the same research and technology used to create the Gemini models.
66
+ Gemma 3 models are multimodal, handling text and image input and generating text
67
+ output, with open weights for both pre-trained variants and instruction-tuned
68
+ variants. Gemma 3 has a large, 128K context window, multilingual support in over
69
+ 140 languages, and is available in more sizes than previous versions. Gemma 3
70
+ models are well-suited for a variety of text generation and image understanding
71
+ tasks, including question answering, summarization, and reasoning. Their
72
+ relatively small size makes it possible to deploy them in environments with
73
+ limited resources such as laptops, desktops or your own cloud infrastructure,
74
+ democratizing access to state of the art AI models and helping foster innovation
75
+ for everyone.
76
 
77
+ ### Inputs and outputs
78
 
79
+ - **Input:**
80
+ - Text string, such as a question, a prompt, or a document to be summarized
81
+ - Images, normalized to 896 x 896 resolution and encoded to 256 tokens
82
+ each
83
+ - Total input context of 128K tokens for the 4B, 12B, and 27B sizes, and
84
+ 32K tokens for the 1B size
85
 
86
+ - **Output:**
87
+ - Generated text in response to the input, such as an answer to a
88
+ question, analysis of image content, or a summary of a document
89
+ - Total output context of 8192 tokens
90
 
91
+ ### Usage
92
 
93
+ 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.
94
 
95
+ ```sh
96
+ $ pip install -U transformers
97
+ ```
98
 
99
+ Then, copy the snippet from the section that is relevant for your use case.
100
 
101
+ #### Running with the `pipeline` API
102
 
103
+ With instruction-tuned models, you need to use chat templates to process our inputs first. Then, you can pass it to the pipeline.
104
 
105
+ ```python
106
+ from transformers import pipeline
107
+ import torch
108
 
109
+ pipe = pipeline("text-generation", model="google/gemma-3-1b-it", device="cuda", torch_dtype=torch.bfloat16)
110
 
111
+ messages = [
112
+ [
113
+ {
114
+ "role": "system",
115
+ "content": [{"type": "text", "text": "You are a helpful assistant."},]
116
+ },
117
+ {
118
+ "role": "user",
119
+ "content": [{"type": "text", "text": "Write a poem on Hugging Face, the company"},]
120
+ },
121
+ ],
122
+ ]
123
 
124
+ output = pipe(messages, max_new_tokens=50)
125
+ ```
126
 
127
+ #### Running the model on a single / multi GPU
128
 
129
+ ```python
130
+ from transformers import AutoTokenizer, BitsAndBytesConfig, Gemma3ForCausalLM
131
+ import torch
132
 
133
+ model_id = "google/gemma-3-1b-it"
134
 
135
+ quantization_config = BitsAndBytesConfig(load_in_8bit=True)
136
 
137
+ model = Gemma3ForCausalLM.from_pretrained(
138
+ model_id, quantization_config=quantization_config
139
+ ).eval()
140
 
141
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
142
 
143
+ messages = [
144
+ [
145
+ {
146
+ "role": "system",
147
+ "content": [{"type": "text", "text": "You are a helpful assistant."},]
148
+ },
149
+ {
150
+ "role": "user",
151
+ "content": [{"type": "text", "text": "Write a poem on Hugging Face, the company"},]
152
+ },
153
+ ],
154
+ ]
155
+ inputs = tokenizer.apply_chat_template(
156
+ messages,
157
+ add_generation_prompt=True,
158
+ tokenize=True,
159
+ return_dict=True,
160
+ return_tensors="pt",
161
+ ).to(model.device).to(torch.bfloat16)
162
+
163
+
164
+ with torch.inference_mode():
165
+ outputs = model.generate(**inputs, max_new_tokens=64)
166
+
167
+ outputs = tokenizer.batch_decode(outputs)
168
+ ```
169
+
170
+
171
+ ### Citation
172
+
173
+ ```none
174
+ @article{gemma_2025,
175
+ title={Gemma 3},
176
+ url={https://goo.gle/Gemma3Report},
177
+ publisher={Kaggle},
178
+ author={Gemma Team},
179
+ year={2025}
180
+ }
181
+ ```
182
+
183
+ ## Model Data
184
+
185
+ Data used for model training and how the data was processed.
186
+
187
+ ### Training Dataset
188
+
189
+ These models were trained on a dataset of text data that includes a wide variety
190
+ of sources. The 27B model was trained with 14 trillion tokens, the 12B model was
191
+ trained with 12 trillion tokens, 4B model was trained with 4 trillion tokens and
192
+ 1B with 2 trillion tokens. Here are the key components:
193
+
194
+ - Web Documents: A diverse collection of web text ensures the model is
195
+ exposed to a broad range of linguistic styles, topics, and vocabulary. The
196
+ training dataset includes content in over 140 languages.
197
+ - Code: Exposing the model to code helps it to learn the syntax and
198
+ patterns of programming languages, which improves its ability to generate
199
+ code and understand code-related questions.
200
+ - Mathematics: Training on mathematical text helps the model learn logical
201
+ reasoning, symbolic representation, and to address mathematical queries.
202
+ - Images: A wide range of images enables the model to perform image
203
+ analysis and visual data extraction tasks.
204
+
205
+ The combination of these diverse data sources is crucial for training a powerful
206
+ multimodal model that can handle a wide variety of different tasks and data
207
+ formats.
208
+
209
+ ### Data Preprocessing
210
+
211
+ Here are the key data cleaning and filtering methods applied to the training
212
+ data:
213
+
214
+ - CSAM Filtering: Rigorous CSAM (Child Sexual Abuse Material) filtering
215
+ was applied at multiple stages in the data preparation process to ensure
216
+ the exclusion of harmful and illegal content.
217
+ - Sensitive Data Filtering: As part of making Gemma pre-trained models
218
+ safe and reliable, automated techniques were used to filter out certain
219
+ personal information and other sensitive data from training sets.
220
+ - Additional methods: Filtering based on content quality and safety in
221
+ line with [our policies][safety-policies].
222
+
223
+ ## Implementation Information
224
+
225
+ Details about the model internals.
226
+
227
+ ### Hardware
228
+
229
+ Gemma was trained using [Tensor Processing Unit (TPU)][tpu] hardware (TPUv4p,
230
+ TPUv5p and TPUv5e). Training vision-language models (VLMS) requires significant
231
+ computational power. TPUs, designed specifically for matrix operations common in
232
+ machine learning, offer several advantages in this domain:
233
+
234
+ - Performance: TPUs are specifically designed to handle the massive
235
+ computations involved in training VLMs. They can speed up training
236
+ considerably compared to CPUs.
237
+ - Memory: TPUs often come with large amounts of high-bandwidth memory,
238
+ allowing for the handling of large models and batch sizes during training.
239
+ This can lead to better model quality.
240
+ - Scalability: TPU Pods (large clusters of TPUs) provide a scalable
241
+ solution for handling the growing complexity of large foundation models.
242
+ You can distribute training across multiple TPU devices for faster and more
243
+ efficient processing.
244
+ - Cost-effectiveness: In many scenarios, TPUs can provide a more
245
+ cost-effective solution for training large models compared to CPU-based
246
+ infrastructure, especially when considering the time and resources saved
247
+ due to faster training.
248
+ - These advantages are aligned with
249
+ [Google's commitments to operate sustainably][sustainability].
250
+
251
+ ### Software
252
+
253
+ Training was done using [JAX][jax] and [ML Pathways][ml-pathways].
254
+
255
+ JAX allows researchers to take advantage of the latest generation of hardware,
256
+ including TPUs, for faster and more efficient training of large models. ML
257
+ Pathways is Google's latest effort to build artificially intelligent systems
258
+ capable of generalizing across multiple tasks. This is specially suitable for
259
+ foundation models, including large language models like these ones.
260
+
261
+ Together, JAX and ML Pathways are used as described in the
262
+ [paper about the Gemini family of models][gemini-2-paper]; *"the 'single
263
+ controller' programming model of Jax and Pathways allows a single Python
264
+ process to orchestrate the entire training run, dramatically simplifying the
265
+ development workflow."*
266
 
267
  ## Evaluation
268
 
269
+ Model evaluation metrics and results.
270
+
271
+ ### Benchmark Results
272
+
273
+ These models were evaluated against a large collection of different datasets and
274
+ metrics to cover different aspects of text generation:
275
+
276
+ #### Reasoning and factuality
277
+
278
+ | Benchmark | Metric | Gemma 3 PT 1B | Gemma 3 PT 4B | Gemma 3 PT 12B | Gemma 3 PT 27B |
279
+ | ------------------------------ |----------------|:--------------:|:-------------:|:--------------:|:--------------:|
280
+ | [HellaSwag][hellaswag] | 10-shot | 62.3 | 77.2 | 84.2 | 85.6 |
281
+ | [BoolQ][boolq] | 0-shot | 63.2 | 72.3 | 78.8 | 82.4 |
282
+ | [PIQA][piqa] | 0-shot | 73.8 | 79.6 | 81.8 | 83.3 |
283
+ | [SocialIQA][socialiqa] | 0-shot | 48.9 | 51.9 | 53.4 | 54.9 |
284
+ | [TriviaQA][triviaqa] | 5-shot | 39.8 | 65.8 | 78.2 | 85.5 |
285
+ | [Natural Questions][naturalq] | 5-shot | 9.48 | 20.0 | 31.4 | 36.1 |
286
+ | [ARC-c][arc] | 25-shot | 38.4 | 56.2 | 68.9 | 70.6 |
287
+ | [ARC-e][arc] | 0-shot | 73.0 | 82.4 | 88.3 | 89.0 |
288
+ | [WinoGrande][winogrande] | 5-shot | 58.2 | 64.7 | 74.3 | 78.8 |
289
+ | [BIG-Bench Hard][bbh] | few-shot | 28.4 | 50.9 | 72.6 | 77.7 |
290
+ | [DROP][drop] | 1-shot | 42.4 | 60.1 | 72.2 | 77.2 |
291
+
292
+ [hellaswag]: https://arxiv.org/abs/1905.07830
293
+ [boolq]: https://arxiv.org/abs/1905.10044
294
+ [piqa]: https://arxiv.org/abs/1911.11641
295
+ [socialiqa]: https://arxiv.org/abs/1904.09728
296
+ [triviaqa]: https://arxiv.org/abs/1705.03551
297
+ [naturalq]: https://github.com/google-research-datasets/natural-questions
298
+ [arc]: https://arxiv.org/abs/1911.01547
299
+ [winogrande]: https://arxiv.org/abs/1907.10641
300
+ [bbh]: https://paperswithcode.com/dataset/bbh
301
+ [drop]: https://arxiv.org/abs/1903.00161
302
+
303
+ #### STEM and code
304
+
305
+ | Benchmark | Metric | Gemma 3 PT 4B | Gemma 3 PT 12B | Gemma 3 PT 27B |
306
+ | ------------------------------ |----------------|:-------------:|:--------------:|:--------------:|
307
+ | [MMLU][mmlu] | 5-shot | 59.6 | 74.5 | 78.6 |
308
+ | [MMLU][mmlu] (Pro COT) | 5-shot | 29.2 | 45.3 | 52.2 |
309
+ | [AGIEval][agieval] | 3-5-shot | 42.1 | 57.4 | 66.2 |
310
+ | [MATH][math] | 4-shot | 24.2 | 43.3 | 50.0 |
311
+ | [GSM8K][gsm8k] | 8-shot | 38.4 | 71.0 | 82.6 |
312
+ | [GPQA][gpqa] | 5-shot | 15.0 | 25.4 | 24.3 |
313
+ | [MBPP][mbpp] | 3-shot | 46.0 | 60.4 | 65.6 |
314
+ | [HumanEval][humaneval] | 0-shot | 36.0 | 45.7 | 48.8 |
315
+
316
+ [mmlu]: https://arxiv.org/abs/2009.03300
317
+ [agieval]: https://arxiv.org/abs/2304.06364
318
+ [math]: https://arxiv.org/abs/2103.03874
319
+ [gsm8k]: https://arxiv.org/abs/2110.14168
320
+ [gpqa]: https://arxiv.org/abs/2311.12022
321
+ [mbpp]: https://arxiv.org/abs/2108.07732
322
+ [humaneval]: https://arxiv.org/abs/2107.03374
323
+
324
+ #### Multilingual
325
+
326
+ | Benchmark | Gemma 3 PT 1B | Gemma 3 PT 4B | Gemma 3 PT 12B | Gemma 3 PT 27B |
327
+ | ------------------------------------ |:-------------:|:-------------:|:--------------:|:--------------:|
328
+ | [MGSM][mgsm] | 2.04 | 34.7 | 64.3 | 74.3 |
329
+ | [Global-MMLU-Lite][global-mmlu-lite] | 24.9 | 57.0 | 69.4 | 75.7 |
330
+ | [WMT24++][wmt24pp] (ChrF) | 36.7 | 48.4 | 53.9 | 55.7 |
331
+ | [FloRes][flores] | 29.5 | 39.2 | 46.0 | 48.8 |
332
+ | [XQuAD][xquad] (all) | 43.9 | 68.0 | 74.5 | 76.8 |
333
+ | [ECLeKTic][eclektic] | 4.69 | 11.0 | 17.2 | 24.4 |
334
+ | [IndicGenBench][indicgenbench] | 41.4 | 57.2 | 61.7 | 63.4 |
335
+
336
+ [mgsm]: https://arxiv.org/abs/2210.03057
337
+ [flores]: https://arxiv.org/abs/2106.03193
338
+ [xquad]: https://arxiv.org/abs/1910.11856v3
339
+ [global-mmlu-lite]: https://huggingface.co/datasets/CohereForAI/Global-MMLU-Lite
340
+ [wmt24pp]: https://arxiv.org/abs/2502.12404v1
341
+ [eclektic]: https://arxiv.org/abs/2502.21228
342
+ [indicgenbench]: https://arxiv.org/abs/2404.16816
343
+
344
+ #### Multimodal
345
+
346
+ | Benchmark | Gemma 3 PT 4B | Gemma 3 PT 12B | Gemma 3 PT 27B |
347
+ | ------------------------------ |:-------------:|:--------------:|:--------------:|
348
+ | [COCOcap][coco-cap] | 102 | 111 | 116 |
349
+ | [DocVQA][docvqa] (val) | 72.8 | 82.3 | 85.6 |
350
+ | [InfoVQA][info-vqa] (val) | 44.1 | 54.8 | 59.4 |
351
+ | [MMMU][mmmu] (pt) | 39.2 | 50.3 | 56.1 |
352
+ | [TextVQA][textvqa] (val) | 58.9 | 66.5 | 68.6 |
353
+ | [RealWorldQA][realworldqa] | 45.5 | 52.2 | 53.9 |
354
+ | [ReMI][remi] | 27.3 | 38.5 | 44.8 |
355
+ | [AI2D][ai2d] | 63.2 | 75.2 | 79.0 |
356
+ | [ChartQA][chartqa] | 63.6 | 74.7 | 76.3 |
357
+ | [VQAv2][vqav2] | 63.9 | 71.2 | 72.9 |
358
+ | [BLINK][blinkvqa] | 38.0 | 35.9 | 39.6 |
359
+ | [OKVQA][okvqa] | 51.0 | 58.7 | 60.2 |
360
+ | [TallyQA][tallyqa] | 42.5 | 51.8 | 54.3 |
361
+ | [SpatialSense VQA][ss-vqa] | 50.9 | 60.0 | 59.4 |
362
+ | [CountBenchQA][countbenchqa] | 26.1 | 17.8 | 68.0 |
363
+
364
+ [coco-cap]: https://cocodataset.org/#home
365
+ [docvqa]: https://www.docvqa.org/
366
+ [info-vqa]: https://arxiv.org/abs/2104.12756
367
+ [mmmu]: https://arxiv.org/abs/2311.16502
368
+ [textvqa]: https://textvqa.org/
369
+ [realworldqa]: https://paperswithcode.com/dataset/realworldqa
370
+ [remi]: https://arxiv.org/html/2406.09175v1
371
+ [ai2d]: https://allenai.org/data/diagrams
372
+ [chartqa]: https://arxiv.org/abs/2203.10244
373
+ [vqav2]: https://visualqa.org/index.html
374
+ [blinkvqa]: https://arxiv.org/abs/2404.12390
375
+ [okvqa]: https://okvqa.allenai.org/
376
+ [tallyqa]: https://arxiv.org/abs/1810.12440
377
+ [ss-vqa]: https://arxiv.org/abs/1908.02660
378
+ [countbenchqa]: https://github.com/google-research/big_vision/blob/main/big_vision/datasets/countbenchqa/
379
+
380
+ ## Ethics and Safety
381
+
382
+ Ethics and safety evaluation approach and results.
383
+
384
+ ### Evaluation Approach
385
+
386
+ Our evaluation methods include structured evaluations and internal red-teaming
387
+ testing of relevant content policies. Red-teaming was conducted by a number of
388
+ different teams, each with different goals and human evaluation metrics. These
389
+ models were evaluated against a number of different categories relevant to
390
+ ethics and safety, including:
391
+
392
+ - **Child Safety**: Evaluation of text-to-text and image to text prompts
393
+ covering child safety policies, including child sexual abuse and
394
+ exploitation.
395
+ - **Content Safety:** Evaluation of text-to-text and image to text prompts
396
+ covering safety policies including, harassment, violence and gore, and hate
397
+ speech.
398
+ - **Representational Harms**: Evaluation of text-to-text and image to text
399
+ prompts covering safety policies including bias, stereotyping, and harmful
400
+ associations or inaccuracies.
401
+
402
+ In addition to development level evaluations, we conduct "assurance
403
+ evaluations" which are our 'arms-length' internal evaluations for responsibility
404
+ governance decision making. They are conducted separately from the model
405
+ development team, to inform decision making about release. High level findings
406
+ are fed back to the model team, but prompt sets are held-out to prevent
407
+ overfitting and preserve the results' ability to inform decision making.
408
+ Assurance evaluation results are reported to our Responsibility & Safety Council
409
+ as part of release review.
410
+
411
+ ### Evaluation Results
412
+
413
+ For all areas of safety testing, we saw major improvements in the categories of
414
+ child safety, content safety, and representational harms relative to previous
415
+ Gemma models. All testing was conducted without safety filters to evaluate the
416
+ model capabilities and behaviors. For both text-to-text and image-to-text, and
417
+ across all model sizes, the model produced minimal policy violations, and showed
418
+ significant improvements over previous Gemma models' performance with respect
419
+ to ungrounded inferences. A limitation of our evaluations was they included only
420
+ English language prompts.
421
+
422
+ ## Usage and Limitations
423
+
424
+ These models have certain limitations that users should be aware of.
425
+
426
+ ### Intended Usage
427
+
428
+ Open vision-language models (VLMs) models have a wide range of applications
429
+ across various industries and domains. The following list of potential uses is
430
+ not comprehensive. The purpose of this list is to provide contextual information
431
+ about the possible use-cases that the model creators considered as part of model
432
+ training and development.
433
+
434
+ - Content Creation and Communication
435
+ - Text Generation: These models can be used to generate creative text
436
+ formats such as poems, scripts, code, marketing copy, and email drafts.
437
+ - Chatbots and Conversational AI: Power conversational interfaces
438
+ for customer service, virtual assistants, or interactive applications.
439
+ - Text Summarization: Generate concise summaries of a text corpus,
440
+ research papers, or reports.
441
+ - Image Data Extraction: These models can be used to extract,
442
+ interpret, and summarize visual data for text communications.
443
+ - Research and Education
444
+ - Natural Language Processing (NLP) and VLM Research: These
445
+ models can serve as a foundation for researchers to experiment with VLM
446
+ and NLP techniques, develop algorithms, and contribute to the
447
+ advancement of the field.
448
+ - Language Learning Tools: Support interactive language learning
449
+ experiences, aiding in grammar correction or providing writing practice.
450
+ - Knowledge Exploration: Assist researchers in exploring large
451
+ bodies of text by generating summaries or answering questions about
452
+ specific topics.
453
+
454
+ ### Limitations
455
+
456
+ - Training Data
457
+ - The quality and diversity of the training data significantly
458
+ influence the model's capabilities. Biases or gaps in the training data
459
+ can lead to limitations in the model's responses.
460
+ - The scope of the training dataset determines the subject areas
461
+ the model can handle effectively.
462
+ - Context and Task Complexity
463
+ - Models are better at tasks that can be framed with clear
464
+ prompts and instructions. Open-ended or highly complex tasks might be
465
+ challenging.
466
+ - A model's performance can be influenced by the amount of context
467
+ provided (longer context generally leads to better outputs, up to a
468
+ certain point).
469
+ - Language Ambiguity and Nuance
470
+ - Natural language is inherently complex. Models might struggle
471
+ to grasp subtle nuances, sarcasm, or figurative language.
472
+ - Factual Accuracy
473
+ - Models generate responses based on information they learned
474
+ from their training datasets, but they are not knowledge bases. They
475
+ may generate incorrect or outdated factual statements.
476
+ - Common Sense
477
+ - Models rely on statistical patterns in language. They might
478
+ lack the ability to apply common sense reasoning in certain situations.
479
+
480
+ ### Ethical Considerations and Risks
481
+
482
+ The development of vision-language models (VLMs) raises several ethical
483
+ concerns. In creating an open model, we have carefully considered the following:
484
+
485
+ - Bias and Fairness
486
+ - VLMs trained on large-scale, real-world text and image data can
487
+ reflect socio-cultural biases embedded in the training material. These
488
+ models underwent careful scrutiny, input data pre-processing described
489
+ and posterior evaluations reported in this card.
490
+ - Misinformation and Misuse
491
+ - VLMs can be misused to generate text that is false, misleading,
492
+ or harmful.
493
+ - Guidelines are provided for responsible use with the model, see the
494
+ [Responsible Generative AI Toolkit][rai-toolkit].
495
+ - Transparency and Accountability:
496
+ - This model card summarizes details on the models' architecture,
497
+ capabilities, limitations, and evaluation processes.
498
+ - A responsibly developed open model offers the opportunity to
499
+ share innovation by making VLM technology accessible to developers and
500
+ researchers across the AI ecosystem.
501
+
502
+ Risks identified and mitigations:
503
+
504
+ - **Perpetuation of biases**: It's encouraged to perform continuous
505
+ monitoring (using evaluation metrics, human review) and the exploration of
506
+ de-biasing techniques during model training, fine-tuning, and other use
507
+ cases.
508
+ - **Generation of harmful content**: Mechanisms and guidelines for content
509
+ safety are essential. Developers are encouraged to exercise caution and
510
+ implement appropriate content safety safeguards based on their specific
511
+ product policies and application use cases.
512
+ - **Misuse for malicious purposes**: Technical limitations and developer
513
+ and end-user education can help mitigate against malicious applications of
514
+ VLMs. Educational resources and reporting mechanisms for users to flag
515
+ misuse are provided. Prohibited uses of Gemma models are outlined in the
516
+ [Gemma Prohibited Use Policy][prohibited-use].
517
+ - **Privacy violations**: Models were trained on data filtered for removal
518
+ of certain personal information and other sensitive data. Developers are
519
+ encouraged to adhere to privacy regulations with privacy-preserving
520
+ techniques.
521
+
522
+ ### Benefits
523
+
524
+ At the time of release, this family of models provides high-performance open
525
+ vision-language model implementations designed from the ground up for
526
+ responsible AI development compared to similarly sized models.
527
+
528
+ Using the benchmark evaluation metrics described in this document, these models
529
+ have shown to provide superior performance to other, comparably-sized open model
530
+ alternatives.
531
+
532
+ [g3-tech-report]: https://goo.gle/Gemma3Report
533
+ [rai-toolkit]: https://ai.google.dev/responsible
534
+ [kaggle-gemma]: https://www.kaggle.com/models/google/gemma-3
535
+ [vertex-mg-gemma3]: https://console.cloud.google.com/vertex-ai/publishers/google/model-garden/gemma3
536
+ [terms]: https://ai.google.dev/gemma/terms
537
+ [safety-policies]: https://ai.google/static/documents/ai-responsibility-update-published-february-2025.pdf
538
+ [prohibited-use]: https://ai.google.dev/gemma/prohibited_use_policy
539
+ [tpu]: https://cloud.google.com/tpu/docs/intro-to-tpu
540
+ [sustainability]: https://sustainability.google/operating-sustainably/
541
+ [jax]: https://github.com/jax-ml/jax
542
+ [ml-pathways]: https://blog.google/technology/ai/introducing-pathways-next-generation-ai-architecture/
543
+ [sustainability]: https://sustainability.google/operating-sustainably/
544
+ [gemini-2-paper]: https://arxiv.org/abs/2312.11805