Update tiny models for HyperCLOVAXVisionV2ForConditionalGeneration
Browse filesFiles changed (8)
- chat_template.jinjaAdded+164
- config.jsonAdded+69
- generation_config.jsonAdded+10
- model.safetensorsAdded+3
- preprocessor_config.jsonAdded+76
- tokenizer.jsonAdded
- tokenizer_config.jsonAdded+23
- video_preprocessor_config.jsonAdded+39
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164{%- set ns_img = namespace(count=0) %}{%- set ns_vid = namespace(count=0) %}{%- if tools %} {{- '<|im_start|>system\n' }} {%- if messages[0].role == 'system' %} {%- if messages[0].content is string %} {%- if messages[0].content %} {{- messages[0].content + '\n\n' }} {%- endif %} {%- elif messages[0].content is sequence %} {%- for content_part in messages[0].content %} {%- if content_part.type == 'text' %} {{- content_part.text + '\n\n' }} {%- endif %} {%- endfor %} {%- endif %} {%- endif %} {{- '# Tools\n\n' }} {{- 'You may call one or more functions to assist with the user query.\n\n' }} {{- 'You are provided with function signatures within <tools></tools> XML tags:\n' }} {{- '<tools>\n' }} {%- for tool in tools %} {{- tool | tojson(ensure_ascii=False) }} {%- endfor %} {{- '\n</tools>\n\n' }} {{- 'For each function call, output the function name and arguments within the following XML format:\n' }} {{- '<tool_call>{function-name}\n' }} {{- '<arg_key>{arg-key-1}</arg_key>\n' }} {{- '<arg_value>{arg-value-1}</arg_value>\n' }} {{- '<arg_key>{arg-key-2}</arg_key>\n' }} {{- '<arg_value>{arg-value-2}</arg_value>\n' }} {{- '...\n' }} {{- '</tool_call><|im_end|>\n' }}{%- else %} {%- if messages[0].role == 'system' %} {{- '<|im_start|>system\n' }} {%- if messages[0].content is string %} {{- messages[0].content }} {%- elif messages[0].content is sequence %} {%- for content_part in messages[0].content %} {%- if content_part.type == 'text' %} {{- content_part.text }} {%- endif %} {%- endfor %} {%- endif %} {%- if messages[0].content %} {{- '\n' }} {%- endif %} {{- '<|im_end|>\n' }} {%- endif %}{%- endif %}{%- set ns = namespace(last_user_index=-1) %}{%- for m in messages %} {%- if m.role == 'user' %} {%- set ns.last_user_index = loop.index0 %} {%- endif %}{%- endfor %}{%- for message in messages %} {%- set content = message.content %} {%- if (message.role == 'system' and not loop.first) %} {{- '<|im_start|>' + message.role + '\n' }} {%- if content is string %} {{- content }} {%- elif content is sequence %} {%- for content_part in content %} {%- if content_part.type == 'text' %} {{- content_part.text }} {%- endif %} {%- endfor %} {%- endif %} {{- '<|im_end|>' + '\n' }} {%- elif message.role == 'user' %} {{- '<|im_start|>user\n' }} {%- if message['content'] is string %} {{- message['content'] + '<|im_end|>\n' }} {%- elif message['content'] is sequence %} {%- for content in message['content'] %} {%- if not loop.first %} {{- '\n' }} {%- endif %} {%- if content['type'] == 'image' or 'image' in content or 'image_url' in content %} {%- set image_id = 'image_%02d' % ns_img.count %} {%- set ns_img.count = ns_img.count + 1 %} {%- set mime_type = content.get('mime_type', 'image/jpeg') %} {{- '<|mime_start|>{"id": "' + image_id + '", "type": "' + mime_type + '", "filename": "' + content.get('filename', "a.jpg") + '"}<|mime_end|>\n' }} {{- '<|image_start|><|IMAGE_PAD|><|image_end|>' }} {%- elif content['type'] == 'video' or 'video' in content or 'video_url' in content %} {%- set video_id = 'video_%02d' % ns_vid.count %} {%- set ns_vid.count = ns_vid.count + 1 %} {%- set mime_type = content.get('mime_type', 'video/mp4') %} {{- '<|mime_start|>{"id": "' + video_id + '", "type": "' + mime_type + '", "filename": "' + content.get('filename', "a.mp4") + '"}<|mime_end|>\n' }} {{- '<|video_aux_start|>다음 중 video_duration은 비디오 길이 정보입니다. 참고하여 답변하세요. {"video_duration": ' + (content.get('video_duration') | tojson if content.get('video_duration') else '<|video_duration|>') + '}<|video_aux_end|>\n'}} {{- '<|video_start|><|VIDEO_PAD|><|video_end|>'}} {%- elif content['type'] == 'text' %} {{- content['text'] }} {%- endif %} {%- endfor %} {{- '<|im_end|>\n'}} {%- endif %} {%- elif message.role == 'assistant' %} {{- '<|im_start|>assistant\n' }} {%- if message.content is string %} {%- set reasoning_content = '' %} {%- if message.reasoning_content is string %} {%- set reasoning_content = message.reasoning_content %} {%- else %} {%- if '</think>' in content %} {%- set reasoning_content = content.split('</think>')[0].rstrip('\n').split('<think>')[-1].lstrip('\n') %} {%- set content = content.split('</think>')[-1].lstrip('\n') %} {%- endif %} {%- endif %} {%- if loop.index0 > ns.last_user_index %} {%- if (loop.index0 > 0 and messages[loop.index0 - 1].role == 'user') or reasoning_content %} {{- '<think>\n' + reasoning_content.strip('\n') + '\n</think>\n\n' + content.lstrip('\n') }} {%- else %} {{- content }} {%- endif %} {%- else %} {{- content }} {%- endif %} {%- elif message.content is sequence %} {%- for content_part in message.content %} {%- if content_part.type == 'text' %} {{- content_part.text }} {{- '\n' if not loop.last else '' -}} {%- endif %} {%- endfor %} {%- endif %} {%- if message.tool_calls %} {%- for tool_call in message.tool_calls %} {%- if not loop.first or content %} {{- '\n' }} {%- endif %} {%- if tool_call.function %} {%- set tool_call = tool_call.function %} {%- endif %} {{- '<tool_call>' + tool_call.name + '\n' }} {%- set _args = tool_call.arguments %} {%- for k, v in _args.items() %} {{- '<arg_key>' + k + '</arg_key>\n' }} {{- '<arg_value>' + (v | tojson(ensure_ascii=False) if v is not string else v) + '</arg_value>\n' }} {%- endfor %} {{- '</tool_call>' }} {%- endfor %} {%- endif %} {{- '<|im_end|>\n' }} {%- elif message.role == 'tool' %} {%- if loop.first or (messages[loop.index0 - 1].role != 'tool') %} {{- '<|im_start|>tool' }} {%- endif %} {{- '\n<tool_response>' + message.get('name', '') + '\n' }} {{- content }} {{- '\n</tool_response>' }} {%- if loop.last or (messages[loop.index0 + 1].role != 'tool') %} {{- '<|im_end|>\n' }} {%- endif %} {%- endif %}{%- endfor %}{%- if add_generation_prompt %} {{- '<|im_start|>assistant\n<think>\n' }} {%- if skip_reasoning is defined and skip_reasoning is true %} {{- '\n</think>\n\n' }} {%- endif %}{%- endif %}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869{ "architectures": [ "HyperCLOVAXVisionV2ForConditionalGeneration" ], "dtype": "float32", "image_token_id": 3, "model_type": "hyperclovax_vision_v2", "pad_token_id": 0, "text_config": { "attention_bias": false, "attention_dropout": 0.0, "attention_multiplier": 0.25, "bos_token_id": 0, "embedding_multiplier": 1.0, "eos_token_id": 128001, "head_dim": 16, "hidden_act": "gelu", "hidden_size": 32, "initializer_range": 0.02, "intermediate_size": 32, "logits_scaling": 1.0, "max_position_embeddings": 512, "mlp_bias": false, "model_type": "hyperclovax", "num_attention_heads": 2, "num_hidden_layers": 2, "num_key_value_heads": 2, "pad_token_id": 0, "residual_multiplier": 1.0, "rms_norm_eps": 1e-06, "rope_parameters": { "rope_theta": 10000.0, "rope_type": "default" }, "tie_word_embeddings": false, "use_cache": true, "use_post_norm": true, "vocab_size": 128256 }, "tie_word_embeddings": false, "transformers_version": "5.19.0.dev0", "video_token_id": 4, "vision_config": { "depth": 2, "fullatt_block_indexes": [ 7, 15, 23, 31 ], "hidden_act": "gelu", "hidden_size": 32, "in_channels": 3, "initializer_range": 0.02, "intermediate_size": 32, "model_type": "qwen2_5_vl_vision", "num_heads": 4, "out_hidden_size": 32, "patch_size": 14, "rope_parameters": { "rope_theta": 10000.0, "rope_type": "axial" }, "spatial_merge_size": 1, "temporal_patch_size": 2, "tokens_per_second": 1, "window_size": 112 }}12345678910{ "_from_model_config": true, "bos_token_id": 0, "eos_token_id": 128001, "output_attentions": false, "output_hidden_states": false, "pad_token_id": 0, "transformers_version": "5.19.0.dev0", "use_cache": true}123version https://git-lfs.github.com/spec/v1oid sha256:17763d87c619fcde2e0e6ee70a3c90e7e392b57532ebf3e82cc325b59aeb29d2size 3312155212345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576{ "discrete_image_end_token": "<|discrete_image_end|>", "discrete_image_ratios": [ [ 1, 1 ], [ 1, 2 ], [ 2, 1 ], [ 3, 4 ], [ 4, 3 ], [ 9, 16 ], [ 16, 9 ], [ 1, 3 ], [ 3, 1 ] ], "discrete_image_start_token": "<|discrete_image_start|>", "discrete_image_token": "<|DISCRETE_IMAGE_PAD|>", "discrete_token_size": 27, "do_center_crop": false, "do_convert_rgb": true, "do_normalize": true, "do_rescale": true, "do_resize": true, "image_end_token": "<|image_end|>", "image_mean": [ 0.48145466, 0.4578275, 0.40821073 ], "image_processor_type": "Qwen2VLImageProcessor", "image_start_token": "<|image_start|>", "image_std": [ 0.26862954, 0.26130258, 0.27577711 ], "image_token": "<|IMAGE_PAD|>", "merge_size": 2, "patch_size": 14, "resample": 3, "rescale_factor": 0.00392156862745098, "resize_mode": "smart_resize", "size": { "longest_edge": 2073600, "shortest_edge": 3136 }, "temporal_patch_size": 2, "use_discrete_token": false, "vision_eof_token": "<|vision_eof|>", "vision_eol_token": "<|vision_eol|>"}1234567891011121314151617181920212223{ "add_prefix_space": false, "backend": "tokenizers", "bos_token": "<|endoftext|>", "clean_up_tokenization_spaces": true, "eos_token": "<|im_end|>", "errors": "replace", "fix_mistral_regex": true, "image_token": "<|IMAGE_PAD|>", "is_local": true, "local_files_only": false, "model_max_length": 1000000000000000019884624838656, "model_specific_special_tokens": { "image_token": "<|IMAGE_PAD|>", "video_token": "<|VIDEO_PAD|>" }, "pad_token": "<|endoftext|>", "processor_class": "Exaone4_5_Processor", "sep_token": "<|endoftext|>", "tokenizer_class": "GPT2Tokenizer", "unk_token": "<|endoftext|>", "video_token": "<|VIDEO_PAD|>"}123456789101112131415161718192021222324252627282930313233343536373839{ "do_convert_rgb": true, "do_normalize": true, "do_rescale": true, "do_resize": true, "do_sample_frames": false, "image_mean": [ 0.48145466, 0.4578275, 0.40821073 ], "image_std": [ 0.26862954, 0.26130258, 0.27577711 ], "max_frames": 120, "max_video_tokens": 128000, "merge_size": 2, "min_frames": 4, "patch_size": 14, "resample": 3, "rescale_factor": 0.00392156862745098, "return_metadata": false, "size": { "longest_edge": 285768, "shortest_edge": 3136 }, "temporal_patch_size": 2, "use_audio_in_video": false, "use_discrete_token": false, "video_audio_token": "<|VIDEO_AUDIO_PAD|>", "video_end_token": "<|video_end|>", "video_processor_type": "Qwen2VLVideoProcessor", "video_start_token": "<|video_start|>", "video_token": "<|VIDEO_PAD|>", "vision_eof_token": "<|vision_eof|>", "vision_eol_token": "<|vision_eol|>"}chat_template.jinjaAdded+164
config.jsonAdded+69
generation_config.jsonAdded+10
model.safetensorsAdded+3
preprocessor_config.jsonAdded+76
tokenizer.jsonAdded
tokenizer_config.jsonAdded+23
video_preprocessor_config.jsonAdded+39