Add files using upload-large-folder tool
Browse files- .gitattributes +1 -0
- README.md +22 -0
- config.json +188 -0
- generation_config.json +13 -0
- model-00001-of-00004.safetensors +3 -0
- model-00002-of-00004.safetensors +3 -0
- model-00003-of-00004.safetensors +3 -0
- model-00004-of-00004.safetensors +3 -0
- model.safetensors.index.json +0 -0
- preprocessor_config.json +51 -0
- processor_config.json +5 -0
- special_tokens_map.json +36 -0
- tokenizer.json +3 -0
- tokenizer.model +3 -0
- tokenizer_config.json +0 -0
.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,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
base_model: google/gemma-3n-E4B-it
|
3 |
+
---
|
4 |
+
## 💫 Community Model> gemma-3n-E4B-it by Google
|
5 |
+
|
6 |
+
_👾 [LM Studio](https://lmstudio.ai) Community models highlights program. Highlighting new & noteworthy models by the community. Join the conversation on [Discord](https://discord.gg/aPQfnNkxGC)_.
|
7 |
+
|
8 |
+
**Model creator:** [Google](https://huggingface.co/Google)<br>
|
9 |
+
**Original model**: [gemma-3n-E4B-it](https://huggingface.co/google/gemma-3n-E4B-it)<br>
|
10 |
+
**MLX conversion:** provided by [LM Studio team](https://x.com/lmstudio) using [mlx_vlm](https://github.com/Blaizzy/mlx-vlm)<br>
|
11 |
+
|
12 |
+
## Technical Details
|
13 |
+
|
14 |
+
Original bfloat16 version of gemma-3n-E4B-it using MLX, optimized for Apple Silicon.
|
15 |
+
|
16 |
+
## Special thanks
|
17 |
+
|
18 |
+
🙏 Special thanks to the [Apple Machine Learning Research](https://github.com/ml-explore) team for creating [MLX](https://github.com/ml-explore/mlx).
|
19 |
+
|
20 |
+
## Disclaimers
|
21 |
+
|
22 |
+
LM Studio is not the creator, originator, or owner of any Model featured in the Community Model Program. Each Community Model is created and provided by third parties. LM Studio does not endorse, support, represent or guarantee the completeness, truthfulness, accuracy, or reliability of any Community Model. You understand that Community Models can produce content that might be offensive, harmful, inaccurate or otherwise inappropriate, or deceptive. Each Community Model is the sole responsibility of the person or entity who originated such Model. LM Studio may not monitor or control the Community Models and cannot, and does not, take responsibility for any such Model. LM Studio disclaims all warranties or guarantees about the accuracy, reliability or benefits of the Community Models. LM Studio further disclaims any warranty that the Community Model will meet your requirements, be secure, uninterrupted or available at any time or location, or error-free, viruses-free, or that any errors will be corrected, or otherwise. You will be solely responsible for any damage resulting from your use of or access to the Community Models, your downloading of any Community Model, or use of any other Community Model provided by or through LM Studio.
|
config.json
ADDED
@@ -0,0 +1,188 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"architectures": [
|
3 |
+
"Gemma3nForConditionalGeneration"
|
4 |
+
],
|
5 |
+
"audio_config": {
|
6 |
+
"conf_attention_chunk_size": 12,
|
7 |
+
"conf_attention_context_left": 13,
|
8 |
+
"conf_attention_context_right": 0,
|
9 |
+
"conf_attention_logit_cap": 50.0,
|
10 |
+
"conf_conv_kernel_size": 5,
|
11 |
+
"conf_num_attention_heads": 8,
|
12 |
+
"conf_num_hidden_layers": 12,
|
13 |
+
"conf_positional_bias_size": 256,
|
14 |
+
"conf_reduction_factor": 4,
|
15 |
+
"conf_residual_weight": 0.5,
|
16 |
+
"gradient_clipping": 10000000000.0,
|
17 |
+
"hidden_size": 1536,
|
18 |
+
"input_feat_size": 128,
|
19 |
+
"model_type": "gemma3n_audio",
|
20 |
+
"rms_norm_eps": 1e-06,
|
21 |
+
"sscp_conv_channel_size": [
|
22 |
+
128,
|
23 |
+
32
|
24 |
+
],
|
25 |
+
"sscp_conv_eps": 0.001,
|
26 |
+
"sscp_conv_kernel_size": [
|
27 |
+
[
|
28 |
+
3,
|
29 |
+
3
|
30 |
+
],
|
31 |
+
[
|
32 |
+
3,
|
33 |
+
3
|
34 |
+
]
|
35 |
+
],
|
36 |
+
"sscp_conv_stride_size": [
|
37 |
+
[
|
38 |
+
2,
|
39 |
+
2
|
40 |
+
],
|
41 |
+
[
|
42 |
+
2,
|
43 |
+
2
|
44 |
+
]
|
45 |
+
],
|
46 |
+
"torch_dtype": "bfloat16",
|
47 |
+
"vocab_offset": 262272,
|
48 |
+
"vocab_size": 128
|
49 |
+
},
|
50 |
+
"audio_soft_tokens_per_image": 188,
|
51 |
+
"audio_token_id": 262273,
|
52 |
+
"boa_token_id": 256000,
|
53 |
+
"boi_token_id": 255999,
|
54 |
+
"eoa_token_id": 262272,
|
55 |
+
"eoi_token_id": 262144,
|
56 |
+
"eos_token_id": [
|
57 |
+
1,
|
58 |
+
106
|
59 |
+
],
|
60 |
+
"image_token_id": 262145,
|
61 |
+
"initializer_range": 0.02,
|
62 |
+
"model_type": "gemma3n",
|
63 |
+
"text_config": {
|
64 |
+
"activation_sparsity_pattern": [
|
65 |
+
0.95,
|
66 |
+
0.95,
|
67 |
+
0.95,
|
68 |
+
0.95,
|
69 |
+
0.95,
|
70 |
+
0.95,
|
71 |
+
0.95,
|
72 |
+
0.95,
|
73 |
+
0.95,
|
74 |
+
0.95,
|
75 |
+
0.0,
|
76 |
+
0.0,
|
77 |
+
0.0,
|
78 |
+
0.0,
|
79 |
+
0.0,
|
80 |
+
0.0,
|
81 |
+
0.0,
|
82 |
+
0.0,
|
83 |
+
0.0,
|
84 |
+
0.0,
|
85 |
+
0.0,
|
86 |
+
0.0,
|
87 |
+
0.0,
|
88 |
+
0.0,
|
89 |
+
0.0,
|
90 |
+
0.0,
|
91 |
+
0.0,
|
92 |
+
0.0,
|
93 |
+
0.0,
|
94 |
+
0.0,
|
95 |
+
0.0,
|
96 |
+
0.0,
|
97 |
+
0.0,
|
98 |
+
0.0,
|
99 |
+
0.0
|
100 |
+
],
|
101 |
+
"altup_active_idx": 0,
|
102 |
+
"altup_coef_clip": 120.0,
|
103 |
+
"altup_correct_scale": true,
|
104 |
+
"altup_lr_multiplier": 1.0,
|
105 |
+
"altup_num_inputs": 4,
|
106 |
+
"attention_bias": false,
|
107 |
+
"attention_dropout": 0.0,
|
108 |
+
"final_logit_softcapping": 30.0,
|
109 |
+
"head_dim": 256,
|
110 |
+
"hidden_activation": "gelu_pytorch_tanh",
|
111 |
+
"hidden_size": 2048,
|
112 |
+
"hidden_size_per_layer_input": 256,
|
113 |
+
"initializer_range": 0.02,
|
114 |
+
"intermediate_size": 16384,
|
115 |
+
"laurel_rank": 64,
|
116 |
+
"layer_types": [
|
117 |
+
"sliding_attention",
|
118 |
+
"sliding_attention",
|
119 |
+
"sliding_attention",
|
120 |
+
"sliding_attention",
|
121 |
+
"full_attention",
|
122 |
+
"sliding_attention",
|
123 |
+
"sliding_attention",
|
124 |
+
"sliding_attention",
|
125 |
+
"sliding_attention",
|
126 |
+
"full_attention",
|
127 |
+
"sliding_attention",
|
128 |
+
"sliding_attention",
|
129 |
+
"sliding_attention",
|
130 |
+
"sliding_attention",
|
131 |
+
"full_attention",
|
132 |
+
"sliding_attention",
|
133 |
+
"sliding_attention",
|
134 |
+
"sliding_attention",
|
135 |
+
"sliding_attention",
|
136 |
+
"full_attention",
|
137 |
+
"sliding_attention",
|
138 |
+
"sliding_attention",
|
139 |
+
"sliding_attention",
|
140 |
+
"sliding_attention",
|
141 |
+
"full_attention",
|
142 |
+
"sliding_attention",
|
143 |
+
"sliding_attention",
|
144 |
+
"sliding_attention",
|
145 |
+
"sliding_attention",
|
146 |
+
"full_attention",
|
147 |
+
"sliding_attention",
|
148 |
+
"sliding_attention",
|
149 |
+
"sliding_attention",
|
150 |
+
"sliding_attention",
|
151 |
+
"full_attention"
|
152 |
+
],
|
153 |
+
"max_position_embeddings": 32768,
|
154 |
+
"model_type": "gemma3n_text",
|
155 |
+
"num_attention_heads": 8,
|
156 |
+
"num_hidden_layers": 35,
|
157 |
+
"num_key_value_heads": 2,
|
158 |
+
"num_kv_shared_layers": 15,
|
159 |
+
"query_pre_attn_scalar": 256,
|
160 |
+
"rms_norm_eps": 1e-06,
|
161 |
+
"rope_local_base_freq": 10000.0,
|
162 |
+
"rope_scaling": null,
|
163 |
+
"rope_theta": 1000000.0,
|
164 |
+
"sliding_window": 512,
|
165 |
+
"torch_dtype": "bfloat16",
|
166 |
+
"use_cache": true,
|
167 |
+
"vocab_size": 262400,
|
168 |
+
"vocab_size_per_layer_input": 262144
|
169 |
+
},
|
170 |
+
"transformers_version": "4.53.0.dev0",
|
171 |
+
"vision_config": {
|
172 |
+
"architecture": "mobilenetv5_300m_enc",
|
173 |
+
"do_pooling": true,
|
174 |
+
"hidden_size": 2048,
|
175 |
+
"initializer_range": 0.02,
|
176 |
+
"label_names": [
|
177 |
+
"LABEL_0",
|
178 |
+
"LABEL_1"
|
179 |
+
],
|
180 |
+
"model_type": "gemma3n_vision",
|
181 |
+
"num_classes": 2,
|
182 |
+
"rms_norm_eps": 1e-06,
|
183 |
+
"torch_dtype": "bfloat16",
|
184 |
+
"vocab_offset": 262144,
|
185 |
+
"vocab_size": 128
|
186 |
+
},
|
187 |
+
"vision_soft_tokens_per_image": 256
|
188 |
+
}
|
generation_config.json
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token_id": 2,
|
3 |
+
"cache_implementation": "hybrid",
|
4 |
+
"do_sample": true,
|
5 |
+
"eos_token_id": [
|
6 |
+
1,
|
7 |
+
106
|
8 |
+
],
|
9 |
+
"pad_token_id": 0,
|
10 |
+
"top_k": 64,
|
11 |
+
"top_p": 0.95,
|
12 |
+
"transformers_version": "4.53.0.dev0"
|
13 |
+
}
|
model-00001-of-00004.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:aa377d4a57e6372686a841a3f186f8422cd441bcf0c8a0142ad0f579c549234d
|
3 |
+
size 5361861720
|
model-00002-of-00004.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:dad500c2838dc7031ab8ad02cc0f0534db4b1203fbe2c11a9180208b65c0dae5
|
3 |
+
size 3586985605
|
model-00003-of-00004.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6cb6afa6dd36eed84679e33f9c71dff0d42cdf9e10391b4fe20076b9a34b15bb
|
3 |
+
size 4784658158
|
model-00004-of-00004.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4a5c3c9748656a72faa7faa1d3b8a5c572ff5699be8881b986a2aaa9443e8974
|
3 |
+
size 3041461107
|
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,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"crop_size": null,
|
3 |
+
"data_format": "channels_first",
|
4 |
+
"default_to_square": false,
|
5 |
+
"device": null,
|
6 |
+
"dither": 0.0,
|
7 |
+
"do_center_crop": null,
|
8 |
+
"do_convert_rgb": null,
|
9 |
+
"do_normalize": false,
|
10 |
+
"do_rescale": true,
|
11 |
+
"do_resize": true,
|
12 |
+
"feature_extractor_type": "Gemma3nAudioFeatureExtractor",
|
13 |
+
"feature_size": 128,
|
14 |
+
"fft_length": 1024,
|
15 |
+
"fft_overdrive": true,
|
16 |
+
"frame_length": 512,
|
17 |
+
"hop_length": 160,
|
18 |
+
"image_mean": [
|
19 |
+
0.5,
|
20 |
+
0.5,
|
21 |
+
0.5
|
22 |
+
],
|
23 |
+
"image_processor_type": "SiglipImageProcessorFast",
|
24 |
+
"image_seq_length": 256,
|
25 |
+
"image_std": [
|
26 |
+
0.5,
|
27 |
+
0.5,
|
28 |
+
0.5
|
29 |
+
],
|
30 |
+
"input_data_format": null,
|
31 |
+
"input_scale_factor": 1.0,
|
32 |
+
"max_frequency": 7600.0,
|
33 |
+
"mel_floor": 1e-05,
|
34 |
+
"min_frequency": 125.0,
|
35 |
+
"padding_side": "right",
|
36 |
+
"padding_value": 0.0,
|
37 |
+
"per_bin_mean": null,
|
38 |
+
"per_bin_stddev": null,
|
39 |
+
"preemphasis": 0.97,
|
40 |
+
"preemphasis_htk_flavor": true,
|
41 |
+
"processor_class": "Gemma3nProcessor",
|
42 |
+
"resample": 2,
|
43 |
+
"rescale_factor": 0.00392156862745098,
|
44 |
+
"return_attention_mask": false,
|
45 |
+
"return_tensors": null,
|
46 |
+
"sampling_rate": 16000,
|
47 |
+
"size": {
|
48 |
+
"height": 768,
|
49 |
+
"width": 768
|
50 |
+
}
|
51 |
+
}
|
processor_config.json
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"audio_seq_length": 188,
|
3 |
+
"image_seq_length": 256,
|
4 |
+
"processor_class": "Gemma3nProcessor"
|
5 |
+
}
|
special_tokens_map.json
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"audio_token": "<audio_soft_token>",
|
3 |
+
"boa_token": "<start_of_audio>",
|
4 |
+
"boi_token": "<start_of_image>",
|
5 |
+
"bos_token": {
|
6 |
+
"content": "<bos>",
|
7 |
+
"lstrip": false,
|
8 |
+
"normalized": false,
|
9 |
+
"rstrip": false,
|
10 |
+
"single_word": false
|
11 |
+
},
|
12 |
+
"eoa_token": "<end_of_audio>",
|
13 |
+
"eoi_token": "<end_of_image>",
|
14 |
+
"eos_token": {
|
15 |
+
"content": "<eos>",
|
16 |
+
"lstrip": false,
|
17 |
+
"normalized": false,
|
18 |
+
"rstrip": false,
|
19 |
+
"single_word": false
|
20 |
+
},
|
21 |
+
"image_token": "<image_soft_token>",
|
22 |
+
"pad_token": {
|
23 |
+
"content": "<pad>",
|
24 |
+
"lstrip": false,
|
25 |
+
"normalized": false,
|
26 |
+
"rstrip": false,
|
27 |
+
"single_word": false
|
28 |
+
},
|
29 |
+
"unk_token": {
|
30 |
+
"content": "<unk>",
|
31 |
+
"lstrip": false,
|
32 |
+
"normalized": false,
|
33 |
+
"rstrip": false,
|
34 |
+
"single_word": false
|
35 |
+
}
|
36 |
+
}
|
tokenizer.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b6c35ee648c07754b44cd9e371c75d4caa05c4504910b7ad29b1847ee9d8ba5d
|
3 |
+
size 33442553
|
tokenizer.model
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ea5f0cc48abfbfc04d14562270a32e02149a3e7035f368cc5a462786f4a59961
|
3 |
+
size 4696020
|
tokenizer_config.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|