rpreite commited on
Commit
7c4707f
·
verified ·
1 Parent(s): cc7f062

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
chat_template.jinja ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {{ bos_token }}
2
+ {%- if messages[0]['role'] == 'system' -%}
3
+ {%- if messages[0]['content'] is string -%}
4
+ {%- set first_user_prefix = messages[0]['content'] + '
5
+
6
+ ' -%}
7
+ {%- else -%}
8
+ {%- set first_user_prefix = messages[0]['content'][0]['text'] + '
9
+
10
+ ' -%}
11
+ {%- endif -%}
12
+ {%- set loop_messages = messages[1:] -%}
13
+ {%- else -%}
14
+ {%- set first_user_prefix = "" -%}
15
+ {%- set loop_messages = messages -%}
16
+ {%- endif -%}
17
+ {%- for message in loop_messages -%}
18
+ {%- if (message['role'] == 'user') != (loop.index0 % 2 == 0) -%}
19
+ {{ raise_exception("Conversation roles must alternate user/assistant/user/assistant/...") }}
20
+ {%- endif -%}
21
+ {%- if (message['role'] == 'assistant') -%}
22
+ {%- set role = "model" -%}
23
+ {%- else -%}
24
+ {%- set role = message['role'] -%}
25
+ {%- endif -%}
26
+ {{ '<start_of_turn>' + role + '
27
+ ' + (first_user_prefix if loop.first else "") }}
28
+ {%- if message['content'] is string -%}
29
+ {{ message['content'] | trim }}
30
+ {%- elif message['content'] is iterable -%}
31
+ {%- for item in message['content'] -%}
32
+ {%- if item['type'] == 'image' -%}
33
+ {{ '<start_of_image>' }}
34
+ {%- elif item['type'] == 'text' -%}
35
+ {{ item['text'] | trim }}
36
+ {%- endif -%}
37
+ {%- endfor -%}
38
+ {%- else -%}
39
+ {{ raise_exception("Invalid content type") }}
40
+ {%- endif -%}
41
+ {{ '<end_of_turn>
42
+ ' }}
43
+ {%- endfor -%}
44
+ {%- if add_generation_prompt -%}
45
+ {{'<start_of_turn>model
46
+ '}}
47
+ {%- endif -%}
config.json ADDED
@@ -0,0 +1,172 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Gemma3ForConditionalGeneration"
4
+ ],
5
+ "boi_token_index": 255999,
6
+ "eoi_token_index": 256000,
7
+ "eos_token_id": [
8
+ 1,
9
+ 106
10
+ ],
11
+ "image_token_index": 262144,
12
+ "initializer_range": 0.02,
13
+ "mm_tokens_per_image": 256,
14
+ "model_type": "gemma3",
15
+ "quantization_config": {
16
+ "config_groups": {
17
+ "group_0": {
18
+ "format": "pack-quantized",
19
+ "input_activations": null,
20
+ "output_activations": null,
21
+ "targets": [
22
+ "Linear"
23
+ ],
24
+ "weights": {
25
+ "actorder": null,
26
+ "block_structure": null,
27
+ "dynamic": false,
28
+ "group_size": 128,
29
+ "num_bits": 4,
30
+ "observer": "minmax",
31
+ "observer_kwargs": {},
32
+ "strategy": "group",
33
+ "symmetric": true,
34
+ "type": "int"
35
+ }
36
+ }
37
+ },
38
+ "format": "pack-quantized",
39
+ "global_compression_ratio": null,
40
+ "ignore": [
41
+ "model.vision_tower.vision_model.encoder.layers.0.mlp.fc2",
42
+ "model.vision_tower.vision_model.encoder.layers.1.mlp.fc2",
43
+ "model.vision_tower.vision_model.encoder.layers.2.mlp.fc2",
44
+ "model.vision_tower.vision_model.encoder.layers.3.mlp.fc2",
45
+ "model.vision_tower.vision_model.encoder.layers.4.mlp.fc2",
46
+ "model.vision_tower.vision_model.encoder.layers.5.mlp.fc2",
47
+ "model.vision_tower.vision_model.encoder.layers.6.mlp.fc2",
48
+ "model.vision_tower.vision_model.encoder.layers.7.mlp.fc2",
49
+ "model.vision_tower.vision_model.encoder.layers.8.mlp.fc2",
50
+ "model.vision_tower.vision_model.encoder.layers.9.mlp.fc2",
51
+ "model.vision_tower.vision_model.encoder.layers.10.mlp.fc2",
52
+ "model.vision_tower.vision_model.encoder.layers.11.mlp.fc2",
53
+ "model.vision_tower.vision_model.encoder.layers.12.mlp.fc2",
54
+ "model.vision_tower.vision_model.encoder.layers.13.mlp.fc2",
55
+ "model.vision_tower.vision_model.encoder.layers.14.mlp.fc2",
56
+ "model.vision_tower.vision_model.encoder.layers.15.mlp.fc2",
57
+ "model.vision_tower.vision_model.encoder.layers.16.mlp.fc2",
58
+ "model.vision_tower.vision_model.encoder.layers.17.mlp.fc2",
59
+ "model.vision_tower.vision_model.encoder.layers.18.mlp.fc2",
60
+ "model.vision_tower.vision_model.encoder.layers.19.mlp.fc2",
61
+ "model.vision_tower.vision_model.encoder.layers.20.mlp.fc2",
62
+ "model.vision_tower.vision_model.encoder.layers.21.mlp.fc2",
63
+ "model.vision_tower.vision_model.encoder.layers.22.mlp.fc2",
64
+ "model.vision_tower.vision_model.encoder.layers.23.mlp.fc2",
65
+ "model.vision_tower.vision_model.encoder.layers.24.mlp.fc2",
66
+ "model.vision_tower.vision_model.encoder.layers.25.mlp.fc2",
67
+ "model.vision_tower.vision_model.encoder.layers.26.mlp.fc2",
68
+ "lm_head"
69
+ ],
70
+ "kv_cache_scheme": null,
71
+ "quant_method": "compressed-tensors",
72
+ "quantization_status": "compressed",
73
+ "sparsity_config": {},
74
+ "transform_config": {},
75
+ "version": "0.11.0"
76
+ },
77
+ "text_config": {
78
+ "_sliding_window_pattern": 6,
79
+ "attention_bias": false,
80
+ "attention_dropout": 0.0,
81
+ "attn_logit_softcapping": null,
82
+ "final_logit_softcapping": null,
83
+ "head_dim": 256,
84
+ "hidden_activation": "gelu_pytorch_tanh",
85
+ "hidden_size": 3840,
86
+ "initializer_range": 0.02,
87
+ "intermediate_size": 15360,
88
+ "layer_types": [
89
+ "sliding_attention",
90
+ "sliding_attention",
91
+ "sliding_attention",
92
+ "sliding_attention",
93
+ "sliding_attention",
94
+ "full_attention",
95
+ "sliding_attention",
96
+ "sliding_attention",
97
+ "sliding_attention",
98
+ "sliding_attention",
99
+ "sliding_attention",
100
+ "full_attention",
101
+ "sliding_attention",
102
+ "sliding_attention",
103
+ "sliding_attention",
104
+ "sliding_attention",
105
+ "sliding_attention",
106
+ "full_attention",
107
+ "sliding_attention",
108
+ "sliding_attention",
109
+ "sliding_attention",
110
+ "sliding_attention",
111
+ "sliding_attention",
112
+ "full_attention",
113
+ "sliding_attention",
114
+ "sliding_attention",
115
+ "sliding_attention",
116
+ "sliding_attention",
117
+ "sliding_attention",
118
+ "full_attention",
119
+ "sliding_attention",
120
+ "sliding_attention",
121
+ "sliding_attention",
122
+ "sliding_attention",
123
+ "sliding_attention",
124
+ "full_attention",
125
+ "sliding_attention",
126
+ "sliding_attention",
127
+ "sliding_attention",
128
+ "sliding_attention",
129
+ "sliding_attention",
130
+ "full_attention",
131
+ "sliding_attention",
132
+ "sliding_attention",
133
+ "sliding_attention",
134
+ "sliding_attention",
135
+ "sliding_attention",
136
+ "full_attention"
137
+ ],
138
+ "max_position_embeddings": 131072,
139
+ "model_type": "gemma3_text",
140
+ "num_attention_heads": 16,
141
+ "num_hidden_layers": 48,
142
+ "num_key_value_heads": 8,
143
+ "query_pre_attn_scalar": 256,
144
+ "rms_norm_eps": 1e-06,
145
+ "rope_local_base_freq": 10000.0,
146
+ "rope_scaling": {
147
+ "factor": 8.0,
148
+ "rope_type": "linear"
149
+ },
150
+ "rope_theta": 1000000.0,
151
+ "sliding_window": 1024,
152
+ "use_cache": true,
153
+ "vocab_size": 262208
154
+ },
155
+ "tie_word_embeddings": false,
156
+ "torch_dtype": "bfloat16",
157
+ "transformers_version": "4.55.2",
158
+ "vision_config": {
159
+ "attention_dropout": 0.0,
160
+ "hidden_act": "gelu_pytorch_tanh",
161
+ "hidden_size": 1152,
162
+ "image_size": 896,
163
+ "intermediate_size": 4304,
164
+ "layer_norm_eps": 1e-06,
165
+ "model_type": "siglip_vision_model",
166
+ "num_attention_heads": 16,
167
+ "num_channels": 3,
168
+ "num_hidden_layers": 27,
169
+ "patch_size": 14,
170
+ "vision_use_head": false
171
+ }
172
+ }
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.55.2"
13
+ }
model-00001-of-00003.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:caf10a72fc9287ffe5a83051c52ee55eb7f9e28999cc4eaf8418bb9386b96f99
3
+ size 4996371416
model-00002-of-00003.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bfceb379fb7db4d2b6c3f67dee3d1d24f7726079a8848edea46b04a873c1dd0b
3
+ size 2997601240
model-00003-of-00003.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ead2180d70715d2eca76bf634d4defc4d0f41a8690e74c3cc8735177ffcf853d
3
+ size 2013757584
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,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "crop_size": null,
3
+ "data_format": "channels_first",
4
+ "default_to_square": true,
5
+ "device": null,
6
+ "disable_grouping": null,
7
+ "do_center_crop": null,
8
+ "do_convert_rgb": null,
9
+ "do_normalize": true,
10
+ "do_pan_and_scan": null,
11
+ "do_rescale": true,
12
+ "do_resize": true,
13
+ "image_mean": [
14
+ 0.5,
15
+ 0.5,
16
+ 0.5
17
+ ],
18
+ "image_processor_type": "Gemma3ImageProcessorFast",
19
+ "image_seq_length": 256,
20
+ "image_std": [
21
+ 0.5,
22
+ 0.5,
23
+ 0.5
24
+ ],
25
+ "input_data_format": null,
26
+ "pan_and_scan_max_num_crops": null,
27
+ "pan_and_scan_min_crop_size": null,
28
+ "pan_and_scan_min_ratio_to_activate": null,
29
+ "processor_class": "Gemma3Processor",
30
+ "resample": 2,
31
+ "rescale_factor": 0.00392156862745098,
32
+ "return_tensors": null,
33
+ "size": {
34
+ "height": 896,
35
+ "width": 896
36
+ }
37
+ }
processor_config.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "image_seq_length": 256,
3
+ "processor_class": "Gemma3Processor"
4
+ }
recipe.yaml ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ default_stage:
2
+ default_modifiers:
3
+ AWQModifier:
4
+ targets: [Linear]
5
+ ignore: ['re:.*lm_head.*', 're:.*embed_tokens.*', 're:vision_tower.*', 're:multi_modal_projector.*',
6
+ 're:.*model.vision_tower.vision_model.encoder.layers.0.mlp.fc2.*', 're:.*model.vision_tower.vision_model.encoder.layers.1.mlp.fc2.*',
7
+ 're:.*model.vision_tower.vision_model.encoder.layers.2.mlp.fc2.*', 're:.*model.vision_tower.vision_model.encoder.layers.3.mlp.fc2.*',
8
+ 're:.*model.vision_tower.vision_model.encoder.layers.4.mlp.fc2.*', 're:.*model.vision_tower.vision_model.encoder.layers.5.mlp.fc2.*',
9
+ 're:.*model.vision_tower.vision_model.encoder.layers.6.mlp.fc2.*', 're:.*model.vision_tower.vision_model.encoder.layers.7.mlp.fc2.*',
10
+ 're:.*model.vision_tower.vision_model.encoder.layers.8.mlp.fc2.*', 're:.*model.vision_tower.vision_model.encoder.layers.9.mlp.fc2.*',
11
+ 're:.*model.vision_tower.vision_model.encoder.layers.10.mlp.fc2.*', 're:.*model.vision_tower.vision_model.encoder.layers.11.mlp.fc2.*',
12
+ 're:.*model.vision_tower.vision_model.encoder.layers.12.mlp.fc2.*', 're:.*model.vision_tower.vision_model.encoder.layers.13.mlp.fc2.*',
13
+ 're:.*model.vision_tower.vision_model.encoder.layers.14.mlp.fc2.*', 're:.*model.vision_tower.vision_model.encoder.layers.15.mlp.fc2.*',
14
+ 're:.*model.vision_tower.vision_model.encoder.layers.16.mlp.fc2.*', 're:.*model.vision_tower.vision_model.encoder.layers.17.mlp.fc2.*',
15
+ 're:.*model.vision_tower.vision_model.encoder.layers.18.mlp.fc2.*', 're:.*model.vision_tower.vision_model.encoder.layers.19.mlp.fc2.*',
16
+ 're:.*model.vision_tower.vision_model.encoder.layers.20.mlp.fc2.*', 're:.*model.vision_tower.vision_model.encoder.layers.21.mlp.fc2.*',
17
+ 're:.*model.vision_tower.vision_model.encoder.layers.22.mlp.fc2.*', 're:.*model.vision_tower.vision_model.encoder.layers.23.mlp.fc2.*',
18
+ 're:.*model.vision_tower.vision_model.encoder.layers.24.mlp.fc2.*', 're:.*model.vision_tower.vision_model.encoder.layers.25.mlp.fc2.*',
19
+ 're:.*model.vision_tower.vision_model.encoder.layers.26.mlp.fc2.*']
20
+ scheme: W4A16
21
+ sequential_targets: [Gemma3DecoderLayer]
22
+ mappings:
23
+ - smooth_layer: re:.*input_layernorm$
24
+ balance_layers: ['re:.*q_proj$', 're:.*k_proj$', 're:.*v_proj$']
25
+ - smooth_layer: re:.*v_proj$
26
+ balance_layers: ['re:.*o_proj$']
27
+ - smooth_layer: re:.*pre_feedforward_layernorm$
28
+ balance_layers: ['re:.*gate_proj$', 're:.*up_proj$']
29
+ - smooth_layer: re:.*up_proj$
30
+ balance_layers: ['re:.*down_proj$']
31
+ duo_scaling: true
special_tokens_map.json ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "boi_token": "<start_of_image>",
3
+ "bos_token": {
4
+ "content": "<bos>",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false
9
+ },
10
+ "eoi_token": "<end_of_image>",
11
+ "eos_token": {
12
+ "content": "<eos>",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false
17
+ },
18
+ "image_token": "<image_soft_token>",
19
+ "pad_token": {
20
+ "content": "<pad>",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false
25
+ },
26
+ "unk_token": {
27
+ "content": "<unk>",
28
+ "lstrip": false,
29
+ "normalized": false,
30
+ "rstrip": false,
31
+ "single_word": false
32
+ }
33
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9bb63c355e7589f305f785b4cd16398ddcb08848c7e7a0f315a3b764aaec032f
3
+ size 33384834
tokenizer_config.json ADDED
The diff for this file is too large to render. See raw diff