prince-canuma commited on
Commit
e13fae2
·
verified ·
1 Parent(s): 421952a

Re-upload google/gemma-4-26B-A4B-it MLX bf16

Browse files

Converted from google/gemma-4-26B-A4B-it at revision 20da991ab4afab98e8f910c4a2e8f4fbefc404ad with the current mlx-vlm checkout.

README.md CHANGED
@@ -5,21 +5,22 @@ license_link: https://ai.google.dev/gemma/docs/gemma_4_license
5
  pipeline_tag: image-text-to-text
6
  tags:
7
  - mlx
8
- base_model: google/gemma-4-26b-a4b-it
 
 
 
 
 
9
  ---
10
-
11
  # mlx-community/gemma-4-26b-a4b-it-bf16
12
 
13
- This model was converted to MLX format from [`google/gemma-4-26b-a4b-it`](https://huggingface.co/google/gemma-4-26b-a4b-it)
14
- using mlx-vlm version **0.4.3**.
15
- Refer to the [original model card](https://huggingface.co/google/gemma-4-26b-a4b-it) 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-it-bf16 --max-tokens 100 --temperature 0.0 --prompt "Describe this image." --image <path_to_image>
 
25
  ```
 
5
  pipeline_tag: image-text-to-text
6
  tags:
7
  - mlx
8
+ - safetensors
9
+ - gemma4
10
+ - image-text-to-text
11
+ - conversational
12
+ - bf16
13
+ base_model: google/gemma-4-26B-A4B-it
14
  ---
 
15
  # mlx-community/gemma-4-26b-a4b-it-bf16
16
 
17
+ This model was converted to MLX format from [google/gemma-4-26B-A4B-it](https://huggingface.co/google/gemma-4-26B-A4B-it) at revision `20da991ab4afab98e8f910c4a2e8f4fbefc404ad`.
 
 
18
 
19
+ It was generated from the current `mlx-vlm` source checkout.
20
 
21
+ ## Use with mlx-vlm
 
 
22
 
23
  ```bash
24
+ pip install -U mlx-vlm
25
+ mlx_vlm.generate --model mlx-community/gemma-4-26b-a4b-it-bf16 --max-tokens 100 --temperature 0.0 --prompt "Describe this image." --image <path_to_image>
26
  ```
config.json CHANGED
@@ -6,6 +6,7 @@
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,
@@ -15,9 +16,24 @@
15
  106,
16
  50
17
  ],
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
  "image_token_id": 258880,
19
  "initializer_range": 0.02,
20
  "model_type": "gemma4",
 
21
  "text_config": {
22
  "attention_bias": false,
23
  "attention_dropout": 0.0,
@@ -98,6 +114,8 @@
98
  "vocab_size_per_layer_input": 262144
99
  },
100
  "tie_word_embeddings": true,
 
 
101
  "transformers_version": "5.5.0.dev0",
102
  "video_token_id": 258884,
103
  "vision_config": {
 
6
  "audio_token_id": 258881,
7
  "boa_token_id": 256000,
8
  "boi_token_id": 255999,
9
+ "do_sample": true,
10
  "dtype": "bfloat16",
11
  "eoa_token_id": 258883,
12
  "eoa_token_index": 258883,
 
16
  106,
17
  50
18
  ],
19
+ "generation_config": {
20
+ "bos_token_id": 2,
21
+ "do_sample": true,
22
+ "eos_token_id": [
23
+ 1,
24
+ 106,
25
+ 50
26
+ ],
27
+ "pad_token_id": 0,
28
+ "temperature": 1.0,
29
+ "top_k": 64,
30
+ "top_p": 0.95,
31
+ "transformers_version": "5.5.0.dev0"
32
+ },
33
  "image_token_id": 258880,
34
  "initializer_range": 0.02,
35
  "model_type": "gemma4",
36
+ "temperature": 1.0,
37
  "text_config": {
38
  "attention_bias": false,
39
  "attention_dropout": 0.0,
 
114
  "vocab_size_per_layer_input": 262144
115
  },
116
  "tie_word_embeddings": true,
117
+ "top_k": 64,
118
+ "top_p": 0.95,
119
  "transformers_version": "5.5.0.dev0",
120
  "video_token_id": 258884,
121
  "vision_config": {
model-00001-of-00011.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:3d45efa2acca485d4b0c5ab94aa9567618a16091921fee1cdf356475ae63a46d
3
- size 5345934797
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3d3abd759970cd5a07a718e7a94412ee190aa324dcb5863571c7fa04cb49552d
3
+ size 5345934811
model-00002-of-00011.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:6af2b5a0eaaa7ab03e0479d62d7b6fe88c3f778dd33be0e74dba5e81bfc0ad52
3
- size 4913415705
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e5555b937f147b35ccbc282c3234a6c947877ab3b2214768c75aa20d818cc273
3
+ size 4913415699
model-00003-of-00011.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:f6bba82c9697c77283f3eb2dd35e21e435ba84240e4e29515e88f2f0edb43fd7
3
- size 4884578957
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:addadb54f41ef12f5a853751e88fdcd87d9ebeb35ef269f999300abf3ffbb0b9
3
+ size 4884578893
model-00004-of-00011.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:2c8e044bcc0561fcf3767bcc4fa376c16c9ff8c179f4b2f7f5ee376a38240e88
3
- size 4913415704
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a704d896d6f698abbe526e6ece4a49b7bb9fb26feed6e57444e776fbe2ca6db6
3
+ size 4913415700
model-00005-of-00011.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:4a12f307fda6cce6609fcf348c7cf3349a77941bfa16dbb8e7a691e0e530483e
3
- size 4884579052
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f5ecbc6e6b7d7fa53fdb8bd1314d2cb9ede8e9ffc371bbc43b6efff01224ad7f
3
+ size 4884578998
model-00006-of-00011.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:cff7bf2d752626dc96c1c4b9d0c926a7c4bb26c7b0576eab1c00e5a7cff29f7d
3
- size 4913415787
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e1aa7283837a88857f24bc3cd2a38f0651c79adaae182f0743310375d0d97f8d
3
+ size 4913415679
model-00007-of-00011.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:52a3396e00d73983eb232cad4144b82213a80d9ee5314db5c869b8c4ead0580b
3
- size 4884579052
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8fe948aded6caaae5f7870758b9087e0585c3f2f0984a9a53e9e80c89f251399
3
+ size 4884579000
model-00008-of-00011.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:e556d520889b47cc825c4be0b68d0e13976a00fa8f171c4d48121b6e541485fa
3
- size 4913415775
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3fdb53b1df10180b387fb78babb32b0cb5a4c2db7abcd81869e6c800db9f869d
3
+ size 4913415731
model-00009-of-00011.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:ef5ad458f72a60c6e41b0b69ef1b463ff7a01b14e87f1572371d288bb2d3a02d
3
- size 4884578952
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5bd647b7d70969a358dd416beb1a50a1971cd3e73d0428c87c78651053389233
3
+ size 4884579038
model-00010-of-00011.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:193b8a6b6cb356d6b99906fc982f6a1081d1220750216c4ec2e237629550f827
3
- size 4913415769
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7306fc374c6a2229a32e528828b10f06ffe1bfe216d66740ebb8ce66a66d2274
3
+ size 4913415721
model-00011-of-00011.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:eb11c16f78bcb6eccd4d40748bfa82ae21e2687a30c2ea247f935c67abe74679
3
- size 2160681433
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9e1e4bcb5721025e6d7101d96904ac579ce1cb01e9cfdee72bb6c17798371662
3
+ size 2160681171
processor_config.json CHANGED
@@ -28,5 +28,36 @@
28
  }
29
  },
30
  "image_seq_length": 280,
31
- "processor_class": "Gemma4Processor"
32
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
  }
29
  },
30
  "image_seq_length": 280,
31
+ "processor_class": "Gemma4Processor",
32
+ "video_processor": {
33
+ "default_fps": 2.0,
34
+ "do_normalize": true,
35
+ "do_rescale": true,
36
+ "image_mean": [
37
+ 0.0,
38
+ 0.0,
39
+ 0.0
40
+ ],
41
+ "image_std": [
42
+ 1.0,
43
+ 1.0,
44
+ 1.0
45
+ ],
46
+ "max_soft_tokens": 70,
47
+ "num_frames": 32,
48
+ "patch_size": 16,
49
+ "pooling_kernel_size": 3,
50
+ "rescale_factor": 0.00392156862745098,
51
+ "video_processor_type": "Gemma4VideoProcessor"
52
+ },
53
+ "feature_extractor": {
54
+ "feature_extractor_type": "Gemma4AudioFeatureExtractor",
55
+ "sampling_rate": 16000,
56
+ "num_mel_filters": 128,
57
+ "fft_length": 512,
58
+ "hop_length": 160,
59
+ "chunk_duration": 8.0,
60
+ "overlap_duration": 1.0
61
+ },
62
+ "audio_ms_per_token": 40
63
+ }
tokenizer_config.json CHANGED
@@ -17,50 +17,72 @@
17
  "<|video|>"
18
  ],
19
  "image_token": "<|image|>",
 
 
20
  "mask_token": "<mask>",
21
  "model_max_length": 1000000000000000019884624838656,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  "pad_token": "<pad>",
23
  "padding_side": "left",
24
  "processor_class": "Gemma4Processor",
25
  "response_schema": {
26
- "type": "object",
27
  "properties": {
 
 
 
28
  "role": {
29
  "const": "assistant"
30
  },
31
  "thinking": {
32
  "type": "string"
33
  },
34
- "content": {
35
- "type": "string"
36
- },
37
  "tool_calls": {
38
- "x-regex-iterator": "<\\|tool_call>(.*?)<tool_call\\|>",
39
- "type": "array",
40
  "items": {
41
- "type": "object",
42
  "properties": {
43
- "type": {
44
- "const": "function"
45
- },
46
  "function": {
47
- "type": "object",
48
- "x-regex": "call\\:(?P<name>\\w+)(?P<arguments>\\{.*\\})",
49
  "properties": {
50
- "name": {
51
- "type": "string"
52
- },
53
  "arguments": {
 
54
  "type": "object",
55
- "x-parser": "gemma4-tool-call",
56
- "additionalProperties": {}
 
 
57
  }
58
- }
 
 
 
 
 
59
  }
60
- }
61
- }
 
 
 
62
  }
63
  },
 
64
  "x-regex": "(\\<\\|channel\\>thought\\n(?P<thinking>.*?)\\<channel\\|\\>)?(?P<tool_calls>\\<\\|tool_call\\>.*\\<tool_call\\|\\>)?(?P<content>(?:(?!\\<turn\\|\\>)(?!\\<\\|tool_response\\>).)+)?(?:\\<turn\\|\\>|\\<\\|tool_response\\>)?"
65
  },
66
  "soc_token": "<|channel>",
 
17
  "<|video|>"
18
  ],
19
  "image_token": "<|image|>",
20
+ "is_local": true,
21
+ "local_files_only": true,
22
  "mask_token": "<mask>",
23
  "model_max_length": 1000000000000000019884624838656,
24
+ "model_specific_special_tokens": {
25
+ "audio_token": "<|audio|>",
26
+ "boa_token": "<|audio>",
27
+ "boi_token": "<|image>",
28
+ "eoa_token": "<audio|>",
29
+ "eoc_token": "<channel|>",
30
+ "eoi_token": "<image|>",
31
+ "eot_token": "<turn|>",
32
+ "escape_token": "<|\"|>",
33
+ "etc_token": "<tool_call|>",
34
+ "etd_token": "<tool|>",
35
+ "etr_token": "<tool_response|>",
36
+ "image_token": "<|image|>",
37
+ "soc_token": "<|channel>",
38
+ "sot_token": "<|turn>",
39
+ "stc_token": "<|tool_call>",
40
+ "std_token": "<|tool>",
41
+ "str_token": "<|tool_response>",
42
+ "think_token": "<|think|>"
43
+ },
44
  "pad_token": "<pad>",
45
  "padding_side": "left",
46
  "processor_class": "Gemma4Processor",
47
  "response_schema": {
 
48
  "properties": {
49
+ "content": {
50
+ "type": "string"
51
+ },
52
  "role": {
53
  "const": "assistant"
54
  },
55
  "thinking": {
56
  "type": "string"
57
  },
 
 
 
58
  "tool_calls": {
 
 
59
  "items": {
 
60
  "properties": {
 
 
 
61
  "function": {
 
 
62
  "properties": {
 
 
 
63
  "arguments": {
64
+ "additionalProperties": {},
65
  "type": "object",
66
+ "x-parser": "gemma4-tool-call"
67
+ },
68
+ "name": {
69
+ "type": "string"
70
  }
71
+ },
72
+ "type": "object",
73
+ "x-regex": "call\\:(?P<name>\\w+)(?P<arguments>\\{.*\\})"
74
+ },
75
+ "type": {
76
+ "const": "function"
77
  }
78
+ },
79
+ "type": "object"
80
+ },
81
+ "type": "array",
82
+ "x-regex-iterator": "<\\|tool_call>(.*?)<tool_call\\|>"
83
  }
84
  },
85
+ "type": "object",
86
  "x-regex": "(\\<\\|channel\\>thought\\n(?P<thinking>.*?)\\<channel\\|\\>)?(?P<tool_calls>\\<\\|tool_call\\>.*\\<tool_call\\|\\>)?(?P<content>(?:(?!\\<turn\\|\\>)(?!\\<\\|tool_response\\>).)+)?(?:\\<turn\\|\\>|\\<\\|tool_response\\>)?"
87
  },
88
  "soc_token": "<|channel>",