smdesai commited on
Commit
c33912e
·
verified ·
1 Parent(s): 79afae3

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,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ license: gemma
4
+ pipeline_tag: image-text-to-text
5
+ extra_gated_heading: Access PaliGemma on Hugging Face
6
+ extra_gated_prompt: To access PaliGemma on Hugging Face, you’re required to review
7
+ and agree to Google’s usage license. To do this, please ensure you’re logged-in
8
+ to Hugging Face and click below. Requests are processed immediately.
9
+ extra_gated_button_content: Acknowledge license
10
+ tags:
11
+ - mlx
12
+ ---
13
+
14
+ # smdesai/paligemma2-3b-pt-448-4bit
15
+ This model was converted to MLX format from [`google/paligemma2-3b-pt-448`]() using mlx-vlm version **0.1.9**.
16
+ Refer to the [original model card](https://huggingface.co/google/paligemma2-3b-pt-448) for more details on the model.
17
+ ## Use with mlx
18
+
19
+ ```bash
20
+ pip install -U mlx-vlm
21
+ ```
22
+
23
+ ```bash
24
+ python -m mlx_vlm.generate --model smdesai/paligemma2-3b-pt-448-4bit --max-tokens 100 --temp 0.0
25
+ ```
config.json ADDED
@@ -0,0 +1,244 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_attn_implementation_autoset": false,
3
+ "_vocab_size": 257152,
4
+ "add_cross_attention": false,
5
+ "architectures": [
6
+ "PaliGemmaForConditionalGeneration"
7
+ ],
8
+ "bad_words_ids": null,
9
+ "begin_suppress_tokens": null,
10
+ "bos_token_id": 2,
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
+ "eos_token_id": 1,
19
+ "exponential_decay_length_penalty": null,
20
+ "finetuning_task": null,
21
+ "forced_bos_token_id": null,
22
+ "forced_eos_token_id": null,
23
+ "hidden_size": 2048,
24
+ "id2label": {
25
+ "0": "LABEL_0",
26
+ "1": "LABEL_1"
27
+ },
28
+ "image_token_index": 257152,
29
+ "is_decoder": false,
30
+ "is_encoder_decoder": false,
31
+ "label2id": {
32
+ "LABEL_0": 0,
33
+ "LABEL_1": 1
34
+ },
35
+ "length_penalty": 1.0,
36
+ "max_length": 20,
37
+ "min_length": 0,
38
+ "model_type": "paligemma",
39
+ "no_repeat_ngram_size": 0,
40
+ "num_beam_groups": 1,
41
+ "num_beams": 1,
42
+ "num_hidden_layers": 26,
43
+ "num_return_sequences": 1,
44
+ "output_attentions": false,
45
+ "output_hidden_states": false,
46
+ "output_scores": false,
47
+ "pad_token_id": 0,
48
+ "prefix": null,
49
+ "problem_type": null,
50
+ "projection_dim": 2304,
51
+ "pruned_heads": {},
52
+ "quantization": {
53
+ "group_size": 64,
54
+ "bits": 4
55
+ },
56
+ "remove_invalid_values": false,
57
+ "repetition_penalty": 1.0,
58
+ "return_dict": true,
59
+ "return_dict_in_generate": false,
60
+ "sep_token_id": null,
61
+ "suppress_tokens": null,
62
+ "task_specific_params": null,
63
+ "temperature": 1.0,
64
+ "text_config": {
65
+ "return_dict": true,
66
+ "output_hidden_states": false,
67
+ "output_attentions": false,
68
+ "torchscript": false,
69
+ "torch_dtype": "bfloat16",
70
+ "use_bfloat16": false,
71
+ "tf_legacy_loss": false,
72
+ "pruned_heads": {},
73
+ "tie_word_embeddings": true,
74
+ "chunk_size_feed_forward": 0,
75
+ "is_encoder_decoder": false,
76
+ "is_decoder": false,
77
+ "cross_attention_hidden_size": null,
78
+ "add_cross_attention": false,
79
+ "tie_encoder_decoder": false,
80
+ "max_length": 20,
81
+ "min_length": 0,
82
+ "do_sample": false,
83
+ "early_stopping": false,
84
+ "num_beams": 1,
85
+ "num_beam_groups": 1,
86
+ "diversity_penalty": 0.0,
87
+ "temperature": 1.0,
88
+ "top_k": 50,
89
+ "top_p": 1.0,
90
+ "typical_p": 1.0,
91
+ "repetition_penalty": 1.0,
92
+ "length_penalty": 1.0,
93
+ "no_repeat_ngram_size": 0,
94
+ "encoder_no_repeat_ngram_size": 0,
95
+ "bad_words_ids": null,
96
+ "num_return_sequences": 1,
97
+ "output_scores": false,
98
+ "return_dict_in_generate": false,
99
+ "forced_bos_token_id": null,
100
+ "forced_eos_token_id": null,
101
+ "remove_invalid_values": false,
102
+ "exponential_decay_length_penalty": null,
103
+ "suppress_tokens": null,
104
+ "begin_suppress_tokens": null,
105
+ "architectures": [
106
+ "Gemma2ForCausalLM"
107
+ ],
108
+ "finetuning_task": null,
109
+ "id2label": {
110
+ "0": "LABEL_0",
111
+ "1": "LABEL_1"
112
+ },
113
+ "label2id": {
114
+ "LABEL_0": 0,
115
+ "LABEL_1": 1
116
+ },
117
+ "tokenizer_class": null,
118
+ "prefix": null,
119
+ "bos_token_id": 2,
120
+ "pad_token_id": 0,
121
+ "eos_token_id": [
122
+ 1,
123
+ 107
124
+ ],
125
+ "sep_token_id": null,
126
+ "decoder_start_token_id": null,
127
+ "task_specific_params": null,
128
+ "problem_type": null,
129
+ "_name_or_path": "",
130
+ "_attn_implementation_autoset": false,
131
+ "hidden_act": "gelu_pytorch_tanh",
132
+ "model_type": "gemma2",
133
+ "num_image_tokens": 1024,
134
+ "vocab_size": 257216,
135
+ "max_position_embeddings": 8192,
136
+ "hidden_size": 2304,
137
+ "intermediate_size": 9216,
138
+ "num_hidden_layers": 26,
139
+ "num_attention_heads": 8,
140
+ "head_dim": 256,
141
+ "num_key_value_heads": 4,
142
+ "initializer_range": 0.02,
143
+ "rms_norm_eps": 1e-06,
144
+ "use_cache": true,
145
+ "rope_theta": 10000.0,
146
+ "attention_bias": false,
147
+ "attention_dropout": 0.0,
148
+ "hidden_activation": "gelu_pytorch_tanh",
149
+ "query_pre_attn_scalar": 256,
150
+ "sliding_window": 4096,
151
+ "final_logit_softcapping": 30.0,
152
+ "attn_logit_softcapping": 50.0,
153
+ "cache_implementation": "hybrid"
154
+ },
155
+ "tf_legacy_loss": false,
156
+ "tie_encoder_decoder": false,
157
+ "tie_word_embeddings": true,
158
+ "tokenizer_class": null,
159
+ "top_k": 50,
160
+ "top_p": 1.0,
161
+ "torch_dtype": "bfloat16",
162
+ "torchscript": false,
163
+ "transformers_version": "4.47.1",
164
+ "typical_p": 1.0,
165
+ "use_bfloat16": false,
166
+ "vision_config": {
167
+ "return_dict": true,
168
+ "output_hidden_states": false,
169
+ "output_attentions": false,
170
+ "torchscript": false,
171
+ "torch_dtype": "bfloat16",
172
+ "use_bfloat16": false,
173
+ "tf_legacy_loss": false,
174
+ "pruned_heads": {},
175
+ "tie_word_embeddings": true,
176
+ "chunk_size_feed_forward": 0,
177
+ "is_encoder_decoder": false,
178
+ "is_decoder": false,
179
+ "cross_attention_hidden_size": null,
180
+ "add_cross_attention": false,
181
+ "tie_encoder_decoder": false,
182
+ "max_length": 20,
183
+ "min_length": 0,
184
+ "do_sample": false,
185
+ "early_stopping": false,
186
+ "num_beams": 1,
187
+ "num_beam_groups": 1,
188
+ "diversity_penalty": 0.0,
189
+ "temperature": 1.0,
190
+ "top_k": 50,
191
+ "top_p": 1.0,
192
+ "typical_p": 1.0,
193
+ "repetition_penalty": 1.0,
194
+ "length_penalty": 1.0,
195
+ "no_repeat_ngram_size": 0,
196
+ "encoder_no_repeat_ngram_size": 0,
197
+ "bad_words_ids": null,
198
+ "num_return_sequences": 1,
199
+ "output_scores": false,
200
+ "return_dict_in_generate": false,
201
+ "forced_bos_token_id": null,
202
+ "forced_eos_token_id": null,
203
+ "remove_invalid_values": false,
204
+ "exponential_decay_length_penalty": null,
205
+ "suppress_tokens": null,
206
+ "begin_suppress_tokens": null,
207
+ "architectures": null,
208
+ "finetuning_task": null,
209
+ "id2label": {
210
+ "0": "LABEL_0",
211
+ "1": "LABEL_1"
212
+ },
213
+ "label2id": {
214
+ "LABEL_0": 0,
215
+ "LABEL_1": 1
216
+ },
217
+ "tokenizer_class": null,
218
+ "prefix": null,
219
+ "bos_token_id": null,
220
+ "pad_token_id": null,
221
+ "eos_token_id": null,
222
+ "sep_token_id": null,
223
+ "decoder_start_token_id": null,
224
+ "task_specific_params": null,
225
+ "problem_type": null,
226
+ "_name_or_path": "",
227
+ "_attn_implementation_autoset": false,
228
+ "model_type": "siglip_vision_model",
229
+ "num_image_tokens": 1024,
230
+ "num_positions": 256,
231
+ "projection_dim": 2304,
232
+ "vision_use_head": false,
233
+ "hidden_size": 1152,
234
+ "intermediate_size": 4304,
235
+ "num_hidden_layers": 27,
236
+ "num_attention_heads": 16,
237
+ "num_channels": 3,
238
+ "patch_size": 14,
239
+ "image_size": 448,
240
+ "attention_dropout": 0.0,
241
+ "layer_norm_eps": 1e-06,
242
+ "hidden_act": "gelu_pytorch_tanh"
243
+ }
244
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:142b7b2844b71567a926faf43ef90f0b120f4867aec094c44c7863c4dc25e23a
3
+ size 1900655844
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,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "do_convert_rgb": null,
3
+ "do_normalize": true,
4
+ "do_rescale": true,
5
+ "do_resize": true,
6
+ "image_mean": [
7
+ 0.5,
8
+ 0.5,
9
+ 0.5
10
+ ],
11
+ "image_processor_type": "SiglipImageProcessor",
12
+ "image_seq_length": 1024,
13
+ "image_std": [
14
+ 0.5,
15
+ 0.5,
16
+ 0.5
17
+ ],
18
+ "processor_class": "PaliGemmaProcessor",
19
+ "resample": 3,
20
+ "rescale_factor": 0.00392156862745098,
21
+ "size": {
22
+ "height": 448,
23
+ "width": 448
24
+ }
25
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ {
4
+ "content": "<image>",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false
9
+ }
10
+ ],
11
+ "bos_token": {
12
+ "content": "<bos>",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false
17
+ },
18
+ "eos_token": {
19
+ "content": "<eos>",
20
+ "lstrip": false,
21
+ "normalized": false,
22
+ "rstrip": false,
23
+ "single_word": false
24
+ },
25
+ "pad_token": {
26
+ "content": "<pad>",
27
+ "lstrip": false,
28
+ "normalized": false,
29
+ "rstrip": false,
30
+ "single_word": false
31
+ },
32
+ "unk_token": {
33
+ "content": "<unk>",
34
+ "lstrip": false,
35
+ "normalized": false,
36
+ "rstrip": false,
37
+ "single_word": false
38
+ }
39
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:172fab587d68c56b63eb3620057c62dfd15e503079ff7fce584692e3fd5bf4da
3
+ size 34600820
tokenizer_config.json ADDED
The diff for this file is too large to render. See raw diff