hf-transformers-bot commited on
Commit
2e8ad0e
·
verified ·
1 Parent(s): 83f8092

Add tiny processor fixture for testing

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
config.json ADDED
@@ -0,0 +1,220 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_reduction_factor": 4,
14
+ "conf_residual_weight": 0.5,
15
+ "gradient_clipping": 10000000000.0,
16
+ "hidden_size": 1536,
17
+ "input_feat_size": 128,
18
+ "model_type": "gemma3n_audio",
19
+ "rms_norm_eps": 1e-06,
20
+ "sscp_conv_channel_size": [
21
+ 128,
22
+ 32
23
+ ],
24
+ "sscp_conv_group_norm_eps": 0.001,
25
+ "sscp_conv_kernel_size": [
26
+ [
27
+ 3,
28
+ 3
29
+ ],
30
+ [
31
+ 3,
32
+ 3
33
+ ]
34
+ ],
35
+ "sscp_conv_stride_size": [
36
+ [
37
+ 2,
38
+ 2
39
+ ],
40
+ [
41
+ 2,
42
+ 2
43
+ ]
44
+ ],
45
+ "torch_dtype": "bfloat16",
46
+ "vocab_offset": 262272,
47
+ "vocab_size": 128
48
+ },
49
+ "audio_soft_tokens_per_image": 188,
50
+ "audio_token_id": 262273,
51
+ "boa_token_id": 256000,
52
+ "boi_token_id": 255999,
53
+ "eoa_token_id": 262272,
54
+ "eoi_token_id": 262144,
55
+ "image_token_id": 262145,
56
+ "initializer_range": 0.02,
57
+ "model_type": "gemma3n",
58
+ "text_config": {
59
+ "activation_sparsity_pattern": [
60
+ 0.95,
61
+ 0.95,
62
+ 0.95,
63
+ 0.95,
64
+ 0.95,
65
+ 0.95,
66
+ 0.95,
67
+ 0.95,
68
+ 0.95,
69
+ 0.95,
70
+ 0.0,
71
+ 0.0,
72
+ 0.0,
73
+ 0.0,
74
+ 0.0,
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
+ ],
96
+ "altup_active_idx": 0,
97
+ "altup_coef_clip": 120.0,
98
+ "altup_correct_scale": true,
99
+ "altup_num_inputs": 4,
100
+ "attention_bias": false,
101
+ "attention_dropout": 0.0,
102
+ "final_logit_softcapping": 30.0,
103
+ "head_dim": 256,
104
+ "hidden_activation": "gelu_pytorch_tanh",
105
+ "hidden_size": 2048,
106
+ "hidden_size_per_layer_input": 256,
107
+ "initializer_range": 0.02,
108
+ "intermediate_size": [
109
+ 16384,
110
+ 16384,
111
+ 16384,
112
+ 16384,
113
+ 16384,
114
+ 16384,
115
+ 16384,
116
+ 16384,
117
+ 16384,
118
+ 16384,
119
+ 16384,
120
+ 16384,
121
+ 16384,
122
+ 16384,
123
+ 16384,
124
+ 16384,
125
+ 16384,
126
+ 16384,
127
+ 16384,
128
+ 16384,
129
+ 16384,
130
+ 16384,
131
+ 16384,
132
+ 16384,
133
+ 16384,
134
+ 16384,
135
+ 16384,
136
+ 16384,
137
+ 16384,
138
+ 16384,
139
+ 16384,
140
+ 16384,
141
+ 16384,
142
+ 16384,
143
+ 16384
144
+ ],
145
+ "laurel_rank": 64,
146
+ "layer_types": [
147
+ "sliding_attention",
148
+ "sliding_attention",
149
+ "sliding_attention",
150
+ "sliding_attention",
151
+ "full_attention",
152
+ "sliding_attention",
153
+ "sliding_attention",
154
+ "sliding_attention",
155
+ "sliding_attention",
156
+ "full_attention",
157
+ "sliding_attention",
158
+ "sliding_attention",
159
+ "sliding_attention",
160
+ "sliding_attention",
161
+ "full_attention",
162
+ "sliding_attention",
163
+ "sliding_attention",
164
+ "sliding_attention",
165
+ "sliding_attention",
166
+ "full_attention",
167
+ "sliding_attention",
168
+ "sliding_attention",
169
+ "sliding_attention",
170
+ "sliding_attention",
171
+ "full_attention",
172
+ "sliding_attention",
173
+ "sliding_attention",
174
+ "sliding_attention",
175
+ "sliding_attention",
176
+ "full_attention",
177
+ "sliding_attention",
178
+ "sliding_attention",
179
+ "sliding_attention",
180
+ "sliding_attention",
181
+ "full_attention"
182
+ ],
183
+ "max_position_embeddings": 32768,
184
+ "model_type": "gemma3n_text",
185
+ "num_attention_heads": 8,
186
+ "num_hidden_layers": 35,
187
+ "num_key_value_heads": 2,
188
+ "num_kv_shared_layers": 15,
189
+ "rms_norm_eps": 1e-06,
190
+ "rope_local_base_freq": 10000.0,
191
+ "rope_scaling": null,
192
+ "rope_theta": 1000000.0,
193
+ "sliding_window": 512,
194
+ "torch_dtype": "bfloat16",
195
+ "use_cache": true,
196
+ "vocab_size": 262400,
197
+ "vocab_size_per_layer_input": 262144
198
+ },
199
+ "torch_dtype": "bfloat16",
200
+ "transformers_version": "4.53.0.dev0",
201
+ "vision_config": {
202
+ "architecture": "mobilenetv5_300m_enc",
203
+ "do_pooling": false,
204
+ "hidden_size": 2048,
205
+ "initializer_range": 0.02,
206
+ "label_names": [
207
+ "LABEL_0",
208
+ "LABEL_1"
209
+ ],
210
+ "model_args": null,
211
+ "model_type": "gemma3n_vision",
212
+ "num_classes": 2,
213
+ "rms_norm_eps": 1e-06,
214
+ "torch_dtype": "bfloat16",
215
+ "vocab_offset": 262144,
216
+ "vocab_size": 128
217
+ },
218
+ "vision_soft_tokens_per_image": 256,
219
+ "vocab_size": 6932
220
+ }
generation_config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token_id": 2,
3
+ "cache_implementation": "hybrid",
4
+ "do_sample": true,
5
+ "eos_token_id": 1,
6
+ "pad_token_id": 0,
7
+ "top_k": 64,
8
+ "top_p": 0.95,
9
+ "transformers_version": "4.54.0.dev0"
10
+ }
preprocessor_config.json ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "crop_size": null,
3
+ "data_format": "channels_first",
4
+ "default_to_square": false,
5
+ "device": null,
6
+ "disable_grouping": null,
7
+ "dither": 0.0,
8
+ "do_center_crop": null,
9
+ "do_convert_rgb": null,
10
+ "do_normalize": false,
11
+ "do_rescale": true,
12
+ "do_resize": true,
13
+ "feature_extractor_type": "Gemma3nAudioFeatureExtractor",
14
+ "feature_size": 128,
15
+ "fft_length": 1024,
16
+ "fft_overdrive": true,
17
+ "frame_length": 512,
18
+ "hop_length": 160,
19
+ "image_mean": [
20
+ 0.5,
21
+ 0.5,
22
+ 0.5
23
+ ],
24
+ "image_processor_type": "SiglipImageProcessorFast",
25
+ "image_seq_length": 256,
26
+ "image_std": [
27
+ 0.5,
28
+ 0.5,
29
+ 0.5
30
+ ],
31
+ "input_data_format": null,
32
+ "input_scale_factor": 1.0,
33
+ "max_frequency": 7600.0,
34
+ "mel_floor": 1e-05,
35
+ "min_frequency": 125.0,
36
+ "padding_side": "right",
37
+ "padding_value": 0.0,
38
+ "per_bin_mean": null,
39
+ "per_bin_stddev": null,
40
+ "preemphasis": 0.97,
41
+ "preemphasis_htk_flavor": true,
42
+ "processor_class": "Gemma3nProcessor",
43
+ "resample": 2,
44
+ "rescale_factor": 0.00392156862745098,
45
+ "return_attention_mask": true,
46
+ "return_tensors": null,
47
+ "sampling_rate": 16000,
48
+ "size": {
49
+ "height": 768,
50
+ "width": 768
51
+ }
52
+ }
processor_config.json ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ {
2
+ "audio_seq_length": 188,
3
+ "image_seq_length": 256,
4
+ "processor_class": "Gemma3nProcessor"
5
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
The diff for this file is too large to render. See raw diff