prince-canuma commited on
Commit
172bfb9
·
verified ·
1 Parent(s): 537834a

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: mlx
3
+ license: apache-2.0
4
+ license_link: https://ai.google.dev/gemma/docs/gemma_4_license
5
+ pipeline_tag: image-text-to-text
6
+ base_model: google/gemma-4-26b-a4b
7
+ tags:
8
+ - mlx
9
+ ---
10
+
11
+ # mlx-community/gemma-4-26b-a4b-bf16
12
+
13
+ This model was converted to MLX format from [`google/gemma-4-26b-a4b`](https://huggingface.co/google/gemma-4-26b-a4b)
14
+ using mlx-vlm version **0.4.3**.
15
+ Refer to the [original model card](https://huggingface.co/google/gemma-4-26b-a4b) for more details on the model.
16
+
17
+ ## Use with mlx
18
+
19
+ ```bash
20
+ pip install -U mlx-vlm
21
+ ```
22
+
23
+ ```bash
24
+ python -m mlx_vlm.generate --model mlx-community/gemma-4-26b-a4b-bf16 --max-tokens 100 --temperature 0.0 --prompt "Describe this image." --image <path_to_image>
25
+ ```
config.json ADDED
@@ -0,0 +1,143 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Gemma4ForConditionalGeneration"
4
+ ],
5
+ "audio_config": null,
6
+ "audio_token_id": 258881,
7
+ "boa_token_id": 256000,
8
+ "boi_token_id": 255999,
9
+ "dtype": "bfloat16",
10
+ "eoa_token_id": 258883,
11
+ "eoa_token_index": 258883,
12
+ "eoi_token_id": 258882,
13
+ "eos_token_id": 1,
14
+ "image_token_id": 258880,
15
+ "initializer_range": 0.02,
16
+ "model_type": "gemma4",
17
+ "text_config": {
18
+ "attention_bias": false,
19
+ "attention_dropout": 0.0,
20
+ "attention_k_eq_v": true,
21
+ "bos_token_id": 2,
22
+ "dtype": "bfloat16",
23
+ "enable_moe_block": true,
24
+ "eos_token_id": 1,
25
+ "final_logit_softcapping": 30.0,
26
+ "global_head_dim": 512,
27
+ "head_dim": 256,
28
+ "hidden_activation": "gelu_pytorch_tanh",
29
+ "hidden_size": 2816,
30
+ "hidden_size_per_layer_input": 0,
31
+ "initializer_range": 0.02,
32
+ "intermediate_size": 2112,
33
+ "layer_types": [
34
+ "sliding_attention",
35
+ "sliding_attention",
36
+ "sliding_attention",
37
+ "sliding_attention",
38
+ "sliding_attention",
39
+ "full_attention",
40
+ "sliding_attention",
41
+ "sliding_attention",
42
+ "sliding_attention",
43
+ "sliding_attention",
44
+ "sliding_attention",
45
+ "full_attention",
46
+ "sliding_attention",
47
+ "sliding_attention",
48
+ "sliding_attention",
49
+ "sliding_attention",
50
+ "sliding_attention",
51
+ "full_attention",
52
+ "sliding_attention",
53
+ "sliding_attention",
54
+ "sliding_attention",
55
+ "sliding_attention",
56
+ "sliding_attention",
57
+ "full_attention",
58
+ "sliding_attention",
59
+ "sliding_attention",
60
+ "sliding_attention",
61
+ "sliding_attention",
62
+ "sliding_attention",
63
+ "full_attention"
64
+ ],
65
+ "max_position_embeddings": 262144,
66
+ "model_type": "gemma4_text",
67
+ "moe_intermediate_size": 704,
68
+ "num_attention_heads": 16,
69
+ "num_experts": 128,
70
+ "num_global_key_value_heads": 2,
71
+ "num_hidden_layers": 30,
72
+ "num_key_value_heads": 8,
73
+ "num_kv_shared_layers": 0,
74
+ "pad_token_id": 0,
75
+ "rms_norm_eps": 1e-06,
76
+ "rope_parameters": {
77
+ "full_attention": {
78
+ "partial_rotary_factor": 0.25,
79
+ "rope_theta": 1000000.0,
80
+ "rope_type": "proportional"
81
+ },
82
+ "sliding_attention": {
83
+ "rope_theta": 10000.0,
84
+ "rope_type": "default"
85
+ }
86
+ },
87
+ "sliding_window": 1024,
88
+ "tie_word_embeddings": true,
89
+ "top_k_experts": 8,
90
+ "use_bidirectional_attention": "vision",
91
+ "use_cache": true,
92
+ "use_double_wide_mlp": false,
93
+ "vocab_size": 262144,
94
+ "vocab_size_per_layer_input": 262144
95
+ },
96
+ "tie_word_embeddings": true,
97
+ "transformers_version": "5.5.0.dev0",
98
+ "video_token_id": 258884,
99
+ "vision_config": {
100
+ "_name_or_path": "",
101
+ "architectures": null,
102
+ "attention_bias": false,
103
+ "attention_dropout": 0.0,
104
+ "chunk_size_feed_forward": 0,
105
+ "default_output_length": 280,
106
+ "dtype": "bfloat16",
107
+ "global_head_dim": 72,
108
+ "head_dim": 72,
109
+ "hidden_activation": "gelu_pytorch_tanh",
110
+ "hidden_size": 1152,
111
+ "id2label": {
112
+ "0": "LABEL_0",
113
+ "1": "LABEL_1"
114
+ },
115
+ "initializer_range": 0.02,
116
+ "intermediate_size": 4304,
117
+ "is_encoder_decoder": false,
118
+ "label2id": {
119
+ "LABEL_0": 0,
120
+ "LABEL_1": 1
121
+ },
122
+ "max_position_embeddings": 131072,
123
+ "model_type": "gemma4_vision",
124
+ "num_attention_heads": 16,
125
+ "num_hidden_layers": 27,
126
+ "num_key_value_heads": 16,
127
+ "output_attentions": false,
128
+ "output_hidden_states": false,
129
+ "patch_size": 16,
130
+ "pooling_kernel_size": 3,
131
+ "position_embedding_size": 10240,
132
+ "problem_type": null,
133
+ "return_dict": true,
134
+ "rms_norm_eps": 1e-06,
135
+ "rope_parameters": {
136
+ "rope_theta": 100.0,
137
+ "rope_type": "default"
138
+ },
139
+ "standardize": true,
140
+ "use_clipped_linears": false
141
+ },
142
+ "vision_soft_tokens_per_image": 280
143
+ }
generation_config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token_id": 2,
3
+ "do_sample": true,
4
+ "eos_token_id": 1,
5
+ "pad_token_id": 0,
6
+ "temperature": 1.0,
7
+ "top_k": 64,
8
+ "top_p": 0.95,
9
+ "transformers_version": "5.5.0.dev0"
10
+ }
model-00001-of-00011.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b98cd41ee55d01185beac51c44aa192dc9bbffbf989dcb8b8f251e2048a0e335
3
+ size 5345934797
model-00002-of-00011.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bf54b81aad9b0f3b74e7da448aec6bc7c04947d3a7c41564a251722262d17dba
3
+ size 4913415705
model-00003-of-00011.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:63635d28fcd2eaf56f64acc8e6d8b60a934be66e4fcf4823db99c502b3effc42
3
+ size 4884578957
model-00004-of-00011.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b225872d91b890a4d8b049401982e651f4f1436c2506a6c45dacb3fffbc4728e
3
+ size 4913415704
model-00005-of-00011.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c3279a9d36bb46da18aca9bebf53842d308ecd58f29763c50299f017ac041178
3
+ size 4884579052
model-00006-of-00011.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e79c840b21a6eaab570f6b8b5bc8a4a0e0db950f75b762ac0567788244018e22
3
+ size 4913415787
model-00007-of-00011.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9f079f84268865bd331acd1338e3cef2e98e919bbc00c51919e0529cabf32227
3
+ size 4884579052
model-00008-of-00011.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6f961f47f78c4cc67fae54bde3a32a3412ae32d00785e1c49c7881b5427957f7
3
+ size 4913415775
model-00009-of-00011.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6ebda12ac10dcda184e962dca677b205fcf63091a47d5693fa6c20e62ea03dd7
3
+ size 4884578952
model-00010-of-00011.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:603ae86a89f9f444f93b4df30d4a000d1b10f77b6e26d20840b39ed571259ea8
3
+ size 4913415769
model-00011-of-00011.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a125e910a4d0781094ce1fc0c0da6903e953134b07d9f8c56df198bdac33640e
3
+ size 2160681433
model.safetensors.index.json ADDED
The diff for this file is too large to render. See raw diff
 
processor_config.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "audio_seq_length": 750,
3
+ "image_processor": {
4
+ "do_convert_rgb": true,
5
+ "do_normalize": false,
6
+ "do_rescale": true,
7
+ "do_resize": true,
8
+ "image_mean": [
9
+ 0.0,
10
+ 0.0,
11
+ 0.0
12
+ ],
13
+ "image_processor_type": "Gemma4ImageProcessor",
14
+ "image_seq_length": 280,
15
+ "image_std": [
16
+ 1.0,
17
+ 1.0,
18
+ 1.0
19
+ ],
20
+ "max_soft_tokens": 280,
21
+ "patch_size": 16,
22
+ "pooling_kernel_size": 3,
23
+ "resample": 3,
24
+ "rescale_factor": 0.00392156862745098,
25
+ "size": {
26
+ "height": 224,
27
+ "width": 224
28
+ }
29
+ },
30
+ "image_seq_length": 280,
31
+ "processor_class": "Gemma4Processor"
32
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:12bac982b793c44b03d52a250a9f0d0b666813da566b910c24a6da0695fd11e6
3
+ size 32170070
tokenizer_config.json ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "audio_token": "<|audio|>",
3
+ "backend": "tokenizers",
4
+ "boa_token": "<|audio>",
5
+ "boi_token": "<|image>",
6
+ "bos_token": "<bos>",
7
+ "eoa_token": "<audio|>",
8
+ "eoc_token": "<channel|>",
9
+ "eoi_token": "<image|>",
10
+ "eos_token": "<eos>",
11
+ "eot_token": "<turn|>",
12
+ "escape_token": "<|\"|>",
13
+ "etc_token": "<tool_call|>",
14
+ "etd_token": "<tool|>",
15
+ "etr_token": "<tool_response|>",
16
+ "extra_special_tokens": [
17
+ "<|video|>"
18
+ ],
19
+ "image_token": "<|image|>",
20
+ "is_local": true,
21
+ "mask_token": "<mask>",
22
+ "model_max_length": 1000000000000000019884624838656,
23
+ "model_specific_special_tokens": {
24
+ "audio_token": "<|audio|>",
25
+ "boa_token": "<|audio>",
26
+ "boi_token": "<|image>",
27
+ "eoa_token": "<audio|>",
28
+ "eoc_token": "<channel|>",
29
+ "eoi_token": "<image|>",
30
+ "eot_token": "<turn|>",
31
+ "escape_token": "<|\"|>",
32
+ "etc_token": "<tool_call|>",
33
+ "etd_token": "<tool|>",
34
+ "etr_token": "<tool_response|>",
35
+ "image_token": "<|image|>",
36
+ "soc_token": "<|channel>",
37
+ "sot_token": "<|turn>",
38
+ "stc_token": "<|tool_call>",
39
+ "std_token": "<|tool>",
40
+ "str_token": "<|tool_response>",
41
+ "think_token": "<|think|>"
42
+ },
43
+ "pad_token": "<pad>",
44
+ "padding_side": "left",
45
+ "processor_class": "Gemma4Processor",
46
+ "soc_token": "<|channel>",
47
+ "sot_token": "<|turn>",
48
+ "stc_token": "<|tool_call>",
49
+ "std_token": "<|tool>",
50
+ "str_token": "<|tool_response>",
51
+ "think_token": "<|think|>",
52
+ "tokenizer_class": "GemmaTokenizer",
53
+ "unk_token": "<unk>"
54
+ }