prince-canuma commited on
Commit
5ae70ca
·
verified ·
1 Parent(s): 84e81c8

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,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ license_name: qwen
4
+ license_link: https://huggingface.co/Qwen/Qwen2.5-72B-Instruct/blob/main/LICENSE
5
+ pipeline_tag: image-text-to-text
6
+ library_name: transformers
7
+ base_model:
8
+ - OpenGVLab/InternViT-300M-448px-V2_5
9
+ - Qwen/Qwen2.5-0.5B
10
+ base_model_relation: merge
11
+ datasets:
12
+ - OpenGVLab/MMPR-v1.2
13
+ language:
14
+ - multilingual
15
+ tags:
16
+ - internvl
17
+ - custom_code
18
+ - mlx
19
+ ---
20
+
21
+ # mlx-gg-hf/gemma-3-12b-it-qat-6bit
22
+ This model was converted to MLX format from [`gg-hf-g/gemma-3-12b-it-qat-q4_0-unquantized`]() using mlx-vlm version **0.1.23**.
23
+ Refer to the [original model card](https://huggingface.co/gg-hf-g/gemma-3-12b-it-qat-q4_0-unquantized) for more details on the model.
24
+ ## Use with mlx
25
+
26
+ ```bash
27
+ pip install -U mlx-vlm
28
+ ```
29
+
30
+ ```bash
31
+ python -m mlx_vlm.generate --model mlx-gg-hf/gemma-3-12b-it-qat-6bit --max-tokens 100 --temperature 0.0 --prompt "Describe this image." --image <path_to_image>
32
+ ```
added_tokens.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {
2
+ "<image_soft_token>": 262144
3
+ }
chat_template.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {
2
+ "chat_template": "{{ bos_token }}\n{%- if messages[0]['role'] == 'system' -%}\n {%- if messages[0]['content'] is string -%}\n {%- set first_user_prefix = messages[0]['content'] + '\n\n' -%}\n {%- else -%}\n {%- set first_user_prefix = messages[0]['content'][0]['text'] + '\n\n' -%}\n {%- endif -%}\n {%- set loop_messages = messages[1:] -%}\n{%- else -%}\n {%- set first_user_prefix = \"\" -%}\n {%- set loop_messages = messages -%}\n{%- endif -%}\n{%- for message in loop_messages -%}\n {%- if (message['role'] == 'user') != (loop.index0 % 2 == 0) -%}\n {{ raise_exception(\"Conversation roles must alternate user/assistant/user/assistant/...\") }}\n {%- endif -%}\n {%- if (message['role'] == 'assistant') -%}\n {%- set role = \"model\" -%}\n {%- else -%}\n {%- set role = message['role'] -%}\n {%- endif -%}\n {{ '<start_of_turn>' + role + '\n' + (first_user_prefix if loop.first else \"\") }}\n {%- if message['content'] is string -%}\n {{ message['content'] | trim }}\n {%- elif message['content'] is iterable -%}\n {%- for item in message['content'] -%}\n {%- if item['type'] == 'image' -%}\n {{ '<start_of_image>' }}\n {%- elif item['type'] == 'text' -%}\n {{ item['text'] | trim }}\n {%- endif -%}\n {%- endfor -%}\n {%- else -%}\n {{ raise_exception(\"Invalid content type\") }}\n {%- endif -%}\n {{ '<end_of_turn>\n' }}\n{%- endfor -%}\n{%- if add_generation_prompt -%}\n {{'<start_of_turn>model\n'}}\n{%- endif -%}\n"
3
+ }
config.json ADDED
@@ -0,0 +1,243 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_attn_implementation_autoset": false,
3
+ "add_cross_attention": false,
4
+ "architectures": [
5
+ "Gemma3ForConditionalGeneration"
6
+ ],
7
+ "bad_words_ids": null,
8
+ "begin_suppress_tokens": null,
9
+ "boi_token_index": 255999,
10
+ "bos_token_id": null,
11
+ "chunk_size_feed_forward": 0,
12
+ "cross_attention_hidden_size": null,
13
+ "decoder_start_token_id": null,
14
+ "diversity_penalty": 0.0,
15
+ "do_sample": false,
16
+ "early_stopping": false,
17
+ "encoder_no_repeat_ngram_size": 0,
18
+ "eoi_token_index": 256000,
19
+ "eos_token_id": [
20
+ 1,
21
+ 106
22
+ ],
23
+ "exponential_decay_length_penalty": null,
24
+ "finetuning_task": null,
25
+ "forced_bos_token_id": null,
26
+ "forced_eos_token_id": null,
27
+ "id2label": {
28
+ "0": "LABEL_0",
29
+ "1": "LABEL_1"
30
+ },
31
+ "image_token_index": 262144,
32
+ "initializer_range": 0.02,
33
+ "is_decoder": false,
34
+ "is_encoder_decoder": false,
35
+ "label2id": {
36
+ "LABEL_0": 0,
37
+ "LABEL_1": 1
38
+ },
39
+ "length_penalty": 1.0,
40
+ "max_length": 20,
41
+ "min_length": 0,
42
+ "mm_tokens_per_image": 256,
43
+ "model_type": "gemma3",
44
+ "no_repeat_ngram_size": 0,
45
+ "num_beam_groups": 1,
46
+ "num_beams": 1,
47
+ "num_return_sequences": 1,
48
+ "output_attentions": false,
49
+ "output_hidden_states": false,
50
+ "output_scores": false,
51
+ "pad_token_id": null,
52
+ "prefix": null,
53
+ "problem_type": null,
54
+ "pruned_heads": {},
55
+ "quantization": {
56
+ "group_size": 64,
57
+ "bits": 6
58
+ },
59
+ "remove_invalid_values": false,
60
+ "repetition_penalty": 1.0,
61
+ "return_dict": true,
62
+ "return_dict_in_generate": false,
63
+ "sep_token_id": null,
64
+ "suppress_tokens": null,
65
+ "task_specific_params": null,
66
+ "temperature": 1.0,
67
+ "text_config": {
68
+ "return_dict": true,
69
+ "output_hidden_states": false,
70
+ "output_attentions": false,
71
+ "torchscript": false,
72
+ "torch_dtype": "bfloat16",
73
+ "use_bfloat16": false,
74
+ "tf_legacy_loss": false,
75
+ "pruned_heads": {},
76
+ "tie_word_embeddings": true,
77
+ "chunk_size_feed_forward": 0,
78
+ "is_encoder_decoder": false,
79
+ "is_decoder": false,
80
+ "cross_attention_hidden_size": null,
81
+ "add_cross_attention": false,
82
+ "tie_encoder_decoder": false,
83
+ "max_length": 20,
84
+ "min_length": 0,
85
+ "do_sample": false,
86
+ "early_stopping": false,
87
+ "num_beams": 1,
88
+ "num_beam_groups": 1,
89
+ "diversity_penalty": 0.0,
90
+ "temperature": 1.0,
91
+ "top_k": 50,
92
+ "top_p": 1.0,
93
+ "typical_p": 1.0,
94
+ "repetition_penalty": 1.0,
95
+ "length_penalty": 1.0,
96
+ "no_repeat_ngram_size": 0,
97
+ "encoder_no_repeat_ngram_size": 0,
98
+ "bad_words_ids": null,
99
+ "num_return_sequences": 1,
100
+ "output_scores": false,
101
+ "return_dict_in_generate": false,
102
+ "forced_bos_token_id": null,
103
+ "forced_eos_token_id": null,
104
+ "remove_invalid_values": false,
105
+ "exponential_decay_length_penalty": null,
106
+ "suppress_tokens": null,
107
+ "begin_suppress_tokens": null,
108
+ "architectures": null,
109
+ "finetuning_task": null,
110
+ "id2label": {
111
+ "0": "LABEL_0",
112
+ "1": "LABEL_1"
113
+ },
114
+ "label2id": {
115
+ "LABEL_0": 0,
116
+ "LABEL_1": 1
117
+ },
118
+ "tokenizer_class": null,
119
+ "prefix": null,
120
+ "bos_token_id": 2,
121
+ "pad_token_id": 0,
122
+ "eos_token_id": 1,
123
+ "sep_token_id": null,
124
+ "decoder_start_token_id": null,
125
+ "task_specific_params": null,
126
+ "problem_type": null,
127
+ "_name_or_path": "",
128
+ "_attn_implementation_autoset": false,
129
+ "model_type": "gemma3_text",
130
+ "vocab_size": 262208,
131
+ "max_position_embeddings": 131072,
132
+ "hidden_size": 3840,
133
+ "intermediate_size": 15360,
134
+ "num_hidden_layers": 48,
135
+ "num_attention_heads": 16,
136
+ "head_dim": 256,
137
+ "num_key_value_heads": 8,
138
+ "initializer_range": 0.02,
139
+ "rms_norm_eps": 1e-06,
140
+ "use_cache": true,
141
+ "rope_theta": 1000000,
142
+ "attention_bias": false,
143
+ "attention_dropout": 0.0,
144
+ "hidden_activation": "gelu_pytorch_tanh",
145
+ "query_pre_attn_scalar": 256,
146
+ "sliding_window": 1024,
147
+ "final_logit_softcapping": null,
148
+ "attn_logit_softcapping": null,
149
+ "cache_implementation": "hybrid",
150
+ "rope_local_base_freq": 10000,
151
+ "sliding_window_pattern": 6,
152
+ "rope_scaling": {
153
+ "factor": 8.0,
154
+ "rope_type": "linear"
155
+ }
156
+ },
157
+ "tf_legacy_loss": false,
158
+ "tie_encoder_decoder": false,
159
+ "tie_word_embeddings": true,
160
+ "tokenizer_class": null,
161
+ "top_k": 50,
162
+ "top_p": 1.0,
163
+ "torchscript": false,
164
+ "transformers_version": "4.51.3",
165
+ "typical_p": 1.0,
166
+ "use_bfloat16": false,
167
+ "vision_config": {
168
+ "return_dict": true,
169
+ "output_hidden_states": false,
170
+ "output_attentions": false,
171
+ "torchscript": false,
172
+ "torch_dtype": "bfloat16",
173
+ "use_bfloat16": false,
174
+ "tf_legacy_loss": false,
175
+ "pruned_heads": {},
176
+ "tie_word_embeddings": true,
177
+ "chunk_size_feed_forward": 0,
178
+ "is_encoder_decoder": false,
179
+ "is_decoder": false,
180
+ "cross_attention_hidden_size": null,
181
+ "add_cross_attention": false,
182
+ "tie_encoder_decoder": false,
183
+ "max_length": 20,
184
+ "min_length": 0,
185
+ "do_sample": false,
186
+ "early_stopping": false,
187
+ "num_beams": 1,
188
+ "num_beam_groups": 1,
189
+ "diversity_penalty": 0.0,
190
+ "temperature": 1.0,
191
+ "top_k": 50,
192
+ "top_p": 1.0,
193
+ "typical_p": 1.0,
194
+ "repetition_penalty": 1.0,
195
+ "length_penalty": 1.0,
196
+ "no_repeat_ngram_size": 0,
197
+ "encoder_no_repeat_ngram_size": 0,
198
+ "bad_words_ids": null,
199
+ "num_return_sequences": 1,
200
+ "output_scores": false,
201
+ "return_dict_in_generate": false,
202
+ "forced_bos_token_id": null,
203
+ "forced_eos_token_id": null,
204
+ "remove_invalid_values": false,
205
+ "exponential_decay_length_penalty": null,
206
+ "suppress_tokens": null,
207
+ "begin_suppress_tokens": null,
208
+ "architectures": null,
209
+ "finetuning_task": null,
210
+ "id2label": {
211
+ "0": "LABEL_0",
212
+ "1": "LABEL_1"
213
+ },
214
+ "label2id": {
215
+ "LABEL_0": 0,
216
+ "LABEL_1": 1
217
+ },
218
+ "tokenizer_class": null,
219
+ "prefix": null,
220
+ "bos_token_id": null,
221
+ "pad_token_id": null,
222
+ "eos_token_id": null,
223
+ "sep_token_id": null,
224
+ "decoder_start_token_id": null,
225
+ "task_specific_params": null,
226
+ "problem_type": null,
227
+ "_name_or_path": "",
228
+ "_attn_implementation_autoset": false,
229
+ "model_type": "siglip_vision_model",
230
+ "vision_use_head": false,
231
+ "hidden_size": 1152,
232
+ "intermediate_size": 4304,
233
+ "num_hidden_layers": 27,
234
+ "num_attention_heads": 16,
235
+ "num_channels": 3,
236
+ "patch_size": 14,
237
+ "image_size": 896,
238
+ "attention_dropout": 0.0,
239
+ "layer_norm_eps": 1e-06,
240
+ "hidden_act": "gelu_pytorch_tanh",
241
+ "skip_vision": true
242
+ }
243
+ }
generation_config.json ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cache_implementation": "hybrid",
3
+ "do_sample": true,
4
+ "eos_token_id": [
5
+ 1,
6
+ 106
7
+ ],
8
+ "top_k": 64,
9
+ "top_p": 0.95,
10
+ "transformers_version": "4.52.0.dev0"
11
+ }
model-00001-of-00003.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:25a7c53441b643c2bdcd2f1f700cd04534c1a1e9a786223d3b7124cc7370500c
3
+ size 5333090185
model-00002-of-00003.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:22fe108a3f69900b994932116264579d226582cdaeff8a17091ef9afb52ba314
3
+ size 5061681359
model-00003-of-00003.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d673a33086fd539dc1e7d0042ea0073331108ee1610ef7ccd9f9d35e328750de
3
+ size 826939195
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
+ }
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