Create processor_config.json

#1
Files changed (1) hide show
  1. processor_config.json +265 -0
processor_config.json ADDED
@@ -0,0 +1,265 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "auto_map": {
3
+ "AutoProcessor": "processing_llava.LlavaProcessor"
4
+ },
5
+ "image_processor_type": "SiglipImageProcessor",
6
+ "processor_class": "LlavaProcessor",
7
+ "tokenizer_class": "LlamaTokenizer",
8
+
9
+ "image_processor": {
10
+ "do_resize": true,
11
+ "size": {
12
+ "shortest_edge": 384,
13
+ "longest_edge": 384
14
+ },
15
+ "resample": 3,
16
+ "do_center_crop": false,
17
+ "crop_size": {
18
+ "height": 384,
19
+ "width": 384
20
+ },
21
+ "do_rescale": true,
22
+ "rescale_factor": 0.00392156862745098,
23
+ "do_normalize": true,
24
+ "image_mean": [0.5, 0.5, 0.5],
25
+ "image_std": [0.5, 0.5, 0.5],
26
+ "do_convert_rgb": true,
27
+ "image_grid_pinpoints": [
28
+ [336, 672],
29
+ [672, 336],
30
+ [672, 672],
31
+ [1008, 336],
32
+ [336, 1008]
33
+ ]
34
+ },
35
+
36
+ "tokenizer": {
37
+ "add_bos_token": true,
38
+ "add_eos_token": false,
39
+ "bos_token": "<s>",
40
+ "eos_token": "</s>",
41
+ "unk_token": "<unk>",
42
+ "pad_token": null,
43
+ "model_max_length": 200000,
44
+ "clean_up_tokenization_spaces": false,
45
+ "tokenizer_class": "LlamaTokenizer",
46
+ "legacy": true,
47
+ "use_default_system_prompt": false
48
+ },
49
+
50
+ "chat_template": "{% if messages[0]['role'] == 'system' %}{% set system_message = messages[0]['content'] %}{% set messages = messages[1:] %}{% else %}{% set system_message = 'You are Helion, a helpful, respectful, and honest AI assistant with vision and tool use capabilities.' %}{% endif %}{{ bos_token }}{% if system_message %}<|system|>\n{{ system_message }}\n</s>{% endif %}{% for message in messages %}{% if message['role'] == 'user' %}<|user|>\n{% if message.get('images') %}{% for image in message['images'] %}<image>{% endfor %}{% endif %}{{ message['content'] }}\n</s>{% elif message['role'] == 'assistant' %}<|assistant|>\n{{ message['content'] }}\n</s>{% elif message['role'] == 'tool' %}<|tool|>\n{{ message['content'] }}\n</s>{% endif %}{% endfor %}{% if add_generation_prompt %}<|assistant|>\n{% endif %}",
51
+
52
+ "vision_feature_layer": -2,
53
+ "vision_feature_select_strategy": "default",
54
+ "image_token_index": 32000,
55
+ "vision_aspect_ratio": "anyres",
56
+
57
+ "patch_size": 14,
58
+ "vision_config": {
59
+ "hidden_size": 1152,
60
+ "image_size": 384,
61
+ "intermediate_size": 4304,
62
+ "model_type": "siglip_vision_model",
63
+ "num_attention_heads": 16,
64
+ "num_hidden_layers": 27,
65
+ "patch_size": 14,
66
+ "projection_dim": 768
67
+ },
68
+
69
+ "text_config": {
70
+ "model_type": "llama",
71
+ "vocab_size": 32000,
72
+ "hidden_size": 4096,
73
+ "intermediate_size": 14336,
74
+ "num_hidden_layers": 48,
75
+ "num_attention_heads": 32,
76
+ "num_key_value_heads": 8,
77
+ "max_position_embeddings": 200000,
78
+ "rope_theta": 500000.0,
79
+ "rope_scaling": {
80
+ "type": "linear",
81
+ "factor": 8.0
82
+ }
83
+ },
84
+
85
+ "multimodal_config": {
86
+ "max_images_per_sample": 10,
87
+ "image_seq_length": 729,
88
+ "num_image_tokens": 1,
89
+ "image_aspect_ratio": "anyres",
90
+ "image_grid_pinpoints": [
91
+ [336, 672],
92
+ [672, 336],
93
+ [672, 672],
94
+ [1008, 336],
95
+ [336, 1008]
96
+ ],
97
+ "use_image_start_end": false,
98
+ "vision_feature_layer": -2,
99
+ "vision_feature_select_strategy": "default",
100
+ "mm_vision_select_feature": "patch"
101
+ },
102
+
103
+ "generation_config": {
104
+ "do_sample": true,
105
+ "temperature": 0.7,
106
+ "top_p": 0.9,
107
+ "top_k": 50,
108
+ "max_new_tokens": 2048,
109
+ "repetition_penalty": 1.1,
110
+ "length_penalty": 1.0,
111
+ "no_repeat_ngram_size": 0,
112
+ "num_beams": 1,
113
+ "early_stopping": false,
114
+ "use_cache": true,
115
+ "pad_token_id": 0,
116
+ "bos_token_id": 1,
117
+ "eos_token_id": 2
118
+ },
119
+
120
+ "preprocessing": {
121
+ "image_processing": {
122
+ "auto_augment": false,
123
+ "interpolation": "bilinear",
124
+ "fill_color": 0,
125
+ "do_flip": false,
126
+ "do_rotate": false
127
+ },
128
+ "text_processing": {
129
+ "lowercase": false,
130
+ "remove_accents": false,
131
+ "strip_accents": false,
132
+ "handle_chinese_chars": true
133
+ }
134
+ },
135
+
136
+ "special_tokens": {
137
+ "image_token": "<image>",
138
+ "image_start_token": null,
139
+ "image_end_token": null,
140
+ "pad_token": null,
141
+ "additional_special_tokens": [
142
+ "<image>"
143
+ ]
144
+ },
145
+
146
+ "model_metadata": {
147
+ "model_name": "Helion-V2.0-Thinking",
148
+ "model_type": "llava",
149
+ "model_version": "2.0",
150
+ "architecture": "LLaVA",
151
+ "base_model": "meta-llama/Llama-2-10b-hf",
152
+ "vision_encoder": "SigLIP-400M",
153
+ "context_length": 200000,
154
+ "total_parameters": "10.2B",
155
+ "license": "apache-2.0",
156
+ "created_by": "DeepXR"
157
+ },
158
+
159
+ "performance_optimizations": {
160
+ "use_flash_attention_2": true,
161
+ "torch_dtype": "bfloat16",
162
+ "low_cpu_mem_usage": true,
163
+ "use_cache": true,
164
+ "gradient_checkpointing": false,
165
+ "offload_folder": null,
166
+ "device_map": "auto"
167
+ },
168
+
169
+ "inference_optimization": {
170
+ "batch_size": 1,
171
+ "enable_torch_compile": false,
172
+ "torch_compile_mode": null,
173
+ "enable_xformers": false,
174
+ "enable_bettertransformer": false
175
+ },
176
+
177
+ "safety_config": {
178
+ "enable_content_filtering": true,
179
+ "enable_pii_detection": true,
180
+ "enable_toxicity_detection": true,
181
+ "max_output_tokens": 4096,
182
+ "temperature_bounds": {
183
+ "min": 0.0,
184
+ "max": 2.0
185
+ },
186
+ "blocked_token_ids": []
187
+ },
188
+
189
+ "prompt_engineering": {
190
+ "system_prompt_template": "You are Helion, an advanced AI assistant with vision and tool use capabilities. You are helpful, respectful, and honest.",
191
+ "user_prompt_prefix": "",
192
+ "user_prompt_suffix": "",
193
+ "assistant_prompt_prefix": "",
194
+ "stop_sequences": ["</s>", "<|end|>", "<|endoftext|>"],
195
+ "response_format": "text"
196
+ },
197
+
198
+ "tool_use_config": {
199
+ "enable_tool_calling": true,
200
+ "tool_call_format": "json",
201
+ "max_tool_calls_per_turn": 5,
202
+ "tool_response_format": "structured",
203
+ "parallel_tool_calls": true,
204
+ "tool_choice": "auto"
205
+ },
206
+
207
+ "vision_processing": {
208
+ "max_num_images": 10,
209
+ "image_token_length": 729,
210
+ "image_encoding": "base64",
211
+ "supported_formats": ["jpg", "jpeg", "png", "webp", "gif"],
212
+ "max_image_size_mb": 20,
213
+ "min_image_dimension": 224,
214
+ "max_image_dimension": 2048,
215
+ "preserve_aspect_ratio": true
216
+ },
217
+
218
+ "context_management": {
219
+ "max_context_length": 200000,
220
+ "context_window_strategy": "sliding",
221
+ "truncation_strategy": "left",
222
+ "preserve_system_message": true,
223
+ "context_compression": false
224
+ },
225
+
226
+ "output_formatting": {
227
+ "return_full_text": false,
228
+ "clean_up_tokenization_spaces": true,
229
+ "skip_special_tokens": true,
230
+ "return_tensors": false,
231
+ "return_token_type_ids": false,
232
+ "return_attention_mask": false
233
+ },
234
+
235
+ "error_handling": {
236
+ "on_error": "raise",
237
+ "fallback_behavior": "default_response",
238
+ "retry_attempts": 0,
239
+ "timeout_seconds": 300
240
+ },
241
+
242
+ "logging": {
243
+ "log_level": "WARNING",
244
+ "log_inputs": false,
245
+ "log_outputs": false,
246
+ "log_timings": false,
247
+ "log_memory_usage": false
248
+ },
249
+
250
+ "compatibility": {
251
+ "transformers_version": "4.36.0",
252
+ "torch_version": "2.1.0",
253
+ "python_version": "3.10+",
254
+ "cuda_version": "12.1+",
255
+ "supports_quantization": true,
256
+ "supports_distributed": true
257
+ },
258
+
259
+ "experimental_features": {
260
+ "enable_streaming": false,
261
+ "enable_batched_inference": false,
262
+ "enable_speculative_decoding": false,
263
+ "enable_kv_cache_quantization": false
264
+ }
265
+ }